diff --git a/backend/src/app.ts b/backend/src/app.ts index ab0423e..54d5918 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -54,10 +54,10 @@ app.use(morgan("dev")); router(app); app.use(errorHandler); socketIo(io); -if (process.env.NODE_ENV === "production") { - app.use(express.static(path.join(__dirname, "frontend", "build"))); +if (process.env.NODE_ENV === "production" ) { + app.use(express.static(path.join(__dirname, "public", "dist"))); app.get("*", (_, res) => { - res.sendFile(path.join(__dirname, "frontend", "build", "index.html")); + res.sendFile(path.join(__dirname, "public", "dist", "index.html")); }); } else { app.get("/", (req, res) => { diff --git a/backend/src/public/dist/assets/Chat-9581ceea.js b/backend/src/public/dist/assets/Chat-9581ceea.js new file mode 100644 index 0000000..c3d8ac6 --- /dev/null +++ b/backend/src/public/dist/assets/Chat-9581ceea.js @@ -0,0 +1,34 @@ +import{Y as C1,Z as Je,$ as S1,a0 as R1,a1 as z1,c as K,r as i,j as o,D as pa,m as ha,a2 as va,B as P,a3 as P1,a4 as M1,L as T1,K as Te,a5 as Ae,a6 as Ne,g as Mf,a7 as A1,i as gf,a8 as N1,a9 as Uf,P as lf,v as D1,aa as ka,ab as L1,ac as I1,ad as O1,ae as F1,af as ya,ag as Tf,ah as wa,f as le,u as B1,ai as _1,aj as U1,ak as ie,al as Xe,am as V1,an as q1,ao as $1,ap as te,aq as H1,ar as G1,as as K1,at as Ea,au as W1,av as fa,aw as Y1,ax as xa,d as qf,ay as Z1,az as Q1,C as J1,aA as X1,R as mf,aB as fn,e as en,aC as ea,aD as an,aE as nn,aF as rn}from"./index-d8866171.js";import{u as ja,M as tn,C as on,R as dn,P as cn,S as ln}from"./message-4e5b8c88.js";var un=class extends C1{constructor(f,e){super(f,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(f,e){super.setOptions({...f,behavior:Je()},e)}getOptimisticResult(f){return f.behavior=Je(),super.getOptimisticResult(f)}fetchNextPage(f){return this.fetch({...f,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(f){return this.fetch({...f,meta:{fetchMore:{direction:"backward"}}})}createResult(f,e){var x,v;const{state:a}=f,n=super.createResult(f,e),{isFetching:r,isRefetching:t,isError:d,isRefetchError:l}=n,c=(v=(x=a.fetchMeta)==null?void 0:x.fetchMore)==null?void 0:v.direction,u=d&&c==="forward",s=r&&c==="forward",g=d&&c==="backward",m=r&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:S1(e,a.data),hasPreviousPage:R1(e,a.data),isFetchNextPageError:u,isFetchingNextPage:s,isFetchPreviousPageError:g,isFetchingPreviousPage:m,isRefetchError:l&&!u&&!g,isRefetching:t&&!s&&!m}}};function sn(f,e){return z1(f,un,e)}const gn=K("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]),mn=K("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),bn=K("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),pn=K("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]),hn=K("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),vn=K("ShieldCheck",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",key:"3xmgem"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),kn=K("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]),Ca=K("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),yn=K("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),wn=K("Video",[["path",{d:"m22 8-6 4 6 4V8Z",key:"50v9me"}],["rect",{width:"14",height:"12",x:"2",y:"6",rx:"2",ry:"2",key:"1rqjg6"}]]),En=K("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),xn=K("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),jn=K("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function Cn({src:f,open:e,setOpen:a}){const[n,r]=i.useState(1),[t,d]=i.useState(0),l=()=>{r(g=>Math.min(g+.1,3))},c=()=>{r(g=>Math.max(g-.1,1))},u=()=>{d(g=>(g+90)%360)},s=()=>{const g=document.createElement("a");g.href=f,g.download="image.jpg",g.click()};return o.jsx(pa,{open:e,onOpenChange:a,children:o.jsxs(ha,{className:"bg-transparent border-none",children:[o.jsx("div",{className:"relative h-[500px] max-w-[1000px] ring-transparent overflow-hidden rounded-lg",children:o.jsx("figure",{className:"flex justify-center",children:o.jsx("img",{src:f,alt:"Media",className:"object-cover max-w-[1000px] w-full transition-transform duration-200",style:{transform:`scale(${n}) rotate(${t}deg)`}})})}),o.jsxs(va,{className:"flex max-w-[500px] mx-auto justify-between mt-4",children:[o.jsxs("div",{className:"flex self-center bg-black/90 p-2 rounded-lg space-x-2 items-center",children:[o.jsxs(P,{onClick:l,variant:"ghost",size:"icon",children:[o.jsx(xn,{className:"w-5 h-5 text-gray-200"}),o.jsx("span",{className:"ml-1 sr-only",children:"Zoom In"})]}),o.jsxs("p",{className:"text-white",children:[Math.round(n*100),"%"]}),o.jsxs(P,{onClick:c,className:"rounded",variant:"ghost",size:"icon",children:[o.jsx(jn,{className:"w-5 h-5 text-gray-200"}),o.jsx("span",{className:"ml-1 sr-only",children:"Zoom Out"})]})]}),o.jsxs("div",{className:"flex space-x-2 items-center",children:[o.jsxs(P,{onClick:u,variant:"ghost",size:"icon",children:[o.jsx(hn,{className:"w-5 h-5 text-gray-200"}),o.jsx("span",{className:"ml-1 sr-only",children:"Rotate"})]}),o.jsxs(P,{onClick:s,variant:"ghost",size:"icon",children:[o.jsx(mn,{className:"w-5 h-5 text-gray-300"}),o.jsx("span",{className:"ml-1 sr-only",children:"Download"})]})]})]})]})})}function Sn({scrollOnMount:f=!0}){const[e,a]=i.useState(!1),n=i.useRef(null);function r(){n.current&&n.current.scrollIntoView({behavior:"smooth"})}function t(){a(!0)}function d(){if(n.current){const{scrollTop:l,scrollHeight:c,clientHeight:u}=n.current.parentElement;return c-l-u<=100}return!1}return i.useEffect(()=>{(f||e)&&(r(),a(!1))},[f,e]),{scrollToRef:n,scrollToBottom:r,shouldAutoScroll:d,hasNewMessage:t}}function Rn({queryKey:f,enabled:e,route:a,defaultMessage:n,displayToast:r,cursorKey:t="cursor"}){const[d,l]=i.useState(!1),{token:c,refetchToken:u}=P1({shouldFetchToken:!0});i.useEffect(()=>{l(!!(c!==null&&e))},[c,e]);const{refetch:s,error:g,isError:m,...p}=sn({initialPageParam:null,queryKey:f,enabled:d,queryFn:({pageParam:x})=>T1.get(`${a}${x?"?"+t+"="+x:""}`,{headers:{Authorization:`Bearer ${c}`}}),getNextPageParam:x=>{var v;return((v=x==null?void 0:x.data)==null?void 0:v.nextCursor)??null}});return M1({error:g,isError:m,refetch:s,refetchToken:u,defaultMessage:n,displayToast:r}),{refetch:s,error:g,isError:m,...p}}function zn(){var J;const[f,e]=i.useState(!1),[a,n]=i.useState(""),{chatId:r}=Te(),{messages:t,setMessages:d}=Ae(),{socket:l}=Ne(),c=i.useRef(null),{profile:u}=Mf(),{scrollToRef:s,scrollToBottom:g,hasNewMessage:m}=Sn({scrollOnMount:!0}),p=i.useMemo(()=>A1((u==null?void 0:u.wallpaperType)??"DEFAULT",(u==null?void 0:u.wallpaperUrl)??""),[u==null?void 0:u.wallpaperType,u==null?void 0:u.wallpaperUrl]);function x(y){e(!0),n(y)}const{data:v,isPending:S,hasNextPage:w,isFetchingNextPage:z,fetchNextPage:b}=Rn({enabled:!0,route:`/chats/${r}/messages`,queryKey:["messages",r]}),{toggleDeleteModal:j,messageOptions:{deleteModal:{id:C,open:Z,index:Q}},resetOptions:wf,toggleDisabled:Ef}=ja(),{mutateAsync:If,isPending:Of}=gf({method:"delete",route:`/messages/${C??((J=c.current)==null?void 0:J.id)}`,defaultMessage:"Failed to delete message",displayToast:!1});function xf(y,A){if(console.log("messages copy and prevIndex in delete error",y,A),r===void 0||(u==null?void 0:u.id)===void 0)return;const af=y.length===0||A>y.length-1?null:y[A],uf={deletedMessageId:C,prevMessage:af??null,chatId:r,userId:u==null?void 0:u.id};l==null||l.emit("deleteMessage",uf),wf(),c.current=null}function N(y,A){c.current&&(d(y.splice(A,0,c.current)??null),wf(),c.current=null)}i.useEffect(()=>{var y;if(v!=null&&v.pages&&((y=v==null?void 0:v.pages)!=null&&y.length)){const A=v.pages.flatMap(af=>af==null?void 0:af.data.messages).filter(af=>af!==void 0);console.log("data in chat body: ",A),A!==void 0&&(A.reverse(),d(A)),v.pages.length===1&&g()}},[v,r]),N1({hasNewMessage:m,attachListeners:!0});async function df(){Ef(!0);const y=(t==null?void 0:t.slice())??[];try{console.log("delete modal: ",C,Q);const A=y.length>0?null:y[Q];y==null||y.splice(Q,1),c.current=A,d(y),await If(),xf(y,Q-1)}catch{N(y,Q-1)}}function cf(y){j({id:C,open:y,index:Q})}return o.jsxs(o.Fragment,{children:[o.jsx("section",{style:{...p,backgroundRepeat:"repeat",backgroundSize:"cover",backgroundPosition:"center"},className:"mt-[75px] min-h-screen mb-16 relative",children:S||t===null?o.jsx("div",{className:"h-screen flex items-center justify-center",children:o.jsx(Uf,{withBackground:!1,size:"sm"})}):(t==null?void 0:t.length)==0?o.jsxs("div",{className:"h-screen grid place-items-center content-center",children:[o.jsx("figure",{className:"mb-5",children:o.jsx(bn,{className:"text-gray-800 dark:text-gray-50 rotate-[360deg]",size:96})}),o.jsx(lf,{className:"font-medium opacity-90 text-gray-800 dark:text-gray-50",children:"No messages here yet..."})]}):o.jsxs(o.Fragment,{children:[w&&o.jsx("div",{className:"flex justify-center",children:z?o.jsx(Uf,{withBackground:!1,size:"sm"}):o.jsx("button",{onClick:()=>b(),className:`text-zinc-500 hover:text-zinc-600 dark:text-zinc-400 text-xs\r + my-4 dark:hover:text-zinc-300 transition`,children:"Load previous messages"})}),t==null?void 0:t.map((y,A)=>y.type==="SYSTEM"?o.jsx("div",{className:"flex justify-center my-8",children:o.jsx(lf,{className:"bg-brand-p1/80 dark:bg-[rgb(60,116,161)]/80 text-white py-2 px-4 rounded-3xl",children:y.body})},A):i.createElement(tn,{...y,sending:y==null?void 0:y.sending,failed:y==null?void 0:y.failed,openModal:x,key:D1(),index:A}))]})}),o.jsx(Cn,{src:a,open:f,setOpen:e}),o.jsx(ka,{deleteFn:df,open:Z,onOpenChange:cf,isPending:Of,title:"Delete Message",message:"Are you sure you want to delete this message?"}),o.jsx("div",{ref:s})]})}function Pn(f){const e=t=>typeof window<"u"?window.matchMedia(t).matches:!1,[a,n]=i.useState(e(f));function r(){n(e(f))}return i.useEffect(()=>{const t=window.matchMedia(f);return r(),t.addListener?t.addListener(r):t.addEventListener("change",r),()=>{t.removeListener?t.removeListener(r):t.removeEventListener("change",r)}},[f]),a}function Mn({open:f,inviteLink:e,setVisiblity:a}){function n(){navigator.clipboard.writeText(`${window.location.origin}/${e}`),ya.success("successfully copied link")}return o.jsx(pa,{open:f,onOpenChange:r=>a(r),children:o.jsxs(ha,{className:"sm:max-w-md",children:[o.jsxs(L1,{children:[o.jsx(I1,{children:"Share link"}),o.jsx(O1,{children:"Anyone who has this link will be able to join this group."})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs("div",{className:"grid flex-1 gap-2",children:[o.jsx("label",{htmlFor:"link",className:"sr-only",children:"Link"}),o.jsx("input",{id:"link",defaultValue:`${window.location.origin}/${e}`,readOnly:!0,className:"dark:text-gray-950 underline bg-gray-100 dark:bg-gray-300 rounded-lg p-2 w-full"})]}),o.jsxs(P,{type:"submit",size:"sm",onClick:n,className:"px-3",children:[o.jsx("span",{className:"sr-only",children:"Copy"}),o.jsx(on,{className:"h-4 w-4"})]})]}),o.jsx(va,{className:"sm:justify-start",children:o.jsx(F1,{asChild:!0,children:o.jsx(P,{type:"button",variant:"secondary",children:"Close"})})})]})})}function Tn({imageUrl:f,privacyType:e,inviteCode:a,closeDrawer:n,description:r="No Description Provided!",name:t="No Groupchat name"}){const{profile:d}=Mf(),{chatId:l}=Te(),{socket:c}=Ne(),{activeChat:u,reset:s}=Tf(),{removeChat:g}=wa(),{setMessages:m}=Ae(),[p,x]=i.useState(!1),[v,S]=i.useState(!1),[w,z]=i.useState(!1),[b,j]=i.useState(null),[C,Z]=i.useState({name:t,description:r,privacyType:e}),[Q,wf]=i.useState({open:!1,link:`invite-link/${l}/${a}`}),[Ef,If]=i.useState(!1),[Of,xf]=i.useState(!1),[N,df]=i.useState([]),cf=i.useRef({index:-1,role:"MEMBER"}),J=le(),y=i.useRef(null),A=B1(),af=t!==C.name||r!==C.description||e!==C.privacyType,{data:uf,isPending:Ff}=_1({enabled:!0,queryKey:["members",l],route:`/chats/${l}/members`,displayToast:!1}),{mutate:we,isPending:Xf}=gf({route:`/chats/${l}/change-role`,method:"patch",displayToast:!0,onSuccess(){L(),A.invalidateQueries({queryKey:["members",l],exact:!0})},onError(){if(!b)return;const{index:h,role:R}=cf.current,F=b==null?void 0:b.slice();F[h].role=R,j(F)}}),{mutate:fe,isPending:ee}=gf({route:`/chats/${l}/leave`,method:"patch",displayToast:!0,defaultMessage:"Failed to leave chat",onSuccess(h){var R;c==null||c.emit("newMessage",{message:(R=h.data)==null?void 0:R.leftMessage,chatInfo:u==null?void 0:u.groupInfo}),c==null||c.emit("leaveChat",{chatId:l,userId:d==null?void 0:d.id})}}),{mutate:ae,isPending:ne}=gf({route:`/chats/${l}/remove-member`,method:"patch",displayToast:!0,defaultMessage:"Failed to remove member",onSuccess(h){var R,F;c==null||c.emit("newMessage",{message:(R=h.data)==null?void 0:R.removedMessage,chatInfo:u==null?void 0:u.groupInfo}),c==null||c.emit("leaveChat",{userId:(F=h.data)==null?void 0:F.removedMemberId,chatId:l})},onError(){if(y.current){const h=(b==null?void 0:b.slice())??[];h.splice(y.current.index,0,y.current),j(h),y.current=null}}}),{mutate:Ee,isPending:xe}=gf({route:`/chats/${l}/group-chat`,method:"delete",displayToast:!0,defaultMessage:"Failed to delete group chat",onSuccess(){l&&g(l),b==null||b.forEach(h=>{c==null||c.emit("leaveChat",{userId:h.id,chatId:l})}),m([]),s(),n(),J(`/${d==null?void 0:d.id}/chats`)}}),{mutate:je,isPending:M}=gf({route:`/chats/${l}/group-chat`,method:"patch",displayToast:!0,defaultMessage:"Failed to update group chat",onSuccess(){A.invalidateQueries({queryKey:["chats"],exact:!0})}});i.useEffect(()=>{const h=uf==null?void 0:uf.data;if(h){const R=h.chatMembers.find(F=>F.id===(d==null?void 0:d.id));R?R.role==="OWNER"?(S(!0),z(!0)):R.role==="ADMIN"&&z(!0):(z(!1),S(!1)),df(h.chatMembers.map(F=>F.id)),j(h.chatMembers)}},[uf]);function L(){cf.current={index:-1,role:"MEMBER"}}function I(h,R){Z(F=>({...F,[h]:R}))}function B(h){wf(R=>({...R,open:h}))}function $(h,R){If(h)}function H(h){xf(h)}function jf(h){x(h)}function T(h,R,F){if(!(d!=null&&d.id))return;const Bf=(b==null?void 0:b.slice())??[];cf.current={index:R,role:F},F==="MEMBER"?Bf[R].role="ADMIN":Bf[R].role="MEMBER",j(Bf),we({adminId:d.id,role:F,targetUserId:h})}async function sf(h){h!=null&&h.privacyType&&je(h)}async function O(h,R){if(!d)return;const F=(b==null?void 0:b.slice())??[],Bf=F[R];y.current={...Bf,index:R},F.splice(R,1),j(F),ae(h)}async function Cf(){fe({username:d==null?void 0:d.username})}async function j1(){Ee()}const re=ee||Xf||p||Ff||ne||M;return o.jsxs(o.Fragment,{children:[o.jsx(Mn,{open:Q.open,inviteLink:Q.link,setVisiblity:B}),o.jsx(U1,{open:Ef,isCreateGroup:!1,setModal:$,initialMemberIds:N}),o.jsx(ka,{isPending:xe,open:Of,title:"Delete Group Chat",deleteFn:j1,message:"Are you sure you want to delete this group chat?",onOpenChange:H}),o.jsxs("div",{className:"relative",children:[af&&o.jsx(P,{disabled:re,onClick:()=>sf(C),className:"absolute -top-2 right-5 font-semibold text-[15.5px] px-6 bg-brand-p2 text-white",children:M?"Saving...":"Save"}),o.jsxs("header",{className:"border-b mb-5 mt-6 pb-3",children:[o.jsx("div",{className:"mx-auto w-fit mb-3",children:o.jsx(ie,{type:"Group",src:f??null,size:120})}),Ff?o.jsx("div",{className:"bg-[#383A47] dark:gray-300 h-5 w-8 rounded-sm mt-1.5 animate-ping"}):o.jsx(lf,{className:"opacity-80 text-xs font-medium mt-1.5 text-[#383A47] dark:text-gray-300",children:`${(b==null?void 0:b.length)??0} Member${((b==null?void 0:b.length)??0)>1?"s":""} `}),o.jsxs("div",{className:"",children:[o.jsx(Xe,{label:"name",isEditable:w,defaultValue:C.name,onChange:I,inputClassName:"text-xl font-semibold p-0",labelClassName:"!text-neutral-600"}),o.jsx(Xe,{label:"description",isEditable:w,defaultValue:C.description,inputClassName:"p-0",labelClassName:"!text-neutral-600",onChange:I})]})]}),o.jsxs("div",{className:"space-y-4",children:[w&&C.privacyType&&o.jsxs("div",{className:"flex items-center justify-between p-3 text-gray-600 dark:text-gray-100 font-medium",children:[o.jsxs(lf,{className:"flex items-center gap-5",children:[o.jsx("span",{children:o.jsx(V1,{size:20})})," ",o.jsx("span",{children:"Make Group Private"})]}),o.jsx(q1,{checked:C.privacyType==="PRIVATE",value:C.privacyType,onCheckedChange:()=>{if(C.privacyType==="PRIVATE"){I("privacyType","PUBLIC");return}I("privacyType","PRIVATE")}})]}),o.jsxs(P,{variant:"outline",className:"w-full justify-start gap-x-2",onClick:()=>B(!0),children:[o.jsx(yn,{size:20})," Get Invite Link"]}),b!==null&&o.jsxs(P,{variant:"outline",className:"w-full justify-start gap-x-2",onClick:()=>$(!0),children:[o.jsx($1,{size:20}),"Add Members"]}),o.jsxs("div",{children:[o.jsx(te,{className:"text-lg mt-4 mb-2",children:"Members"}),b!==null?b.length>0?b.map((h,R)=>o.jsxs("div",{className:"flex items-center gap-x-2",children:[o.jsx(H1,{type:"user",...h,disable:(d==null?void 0:d.id)===h.id,showRole:!0,toggleLoading:jf}),w&&h.role!=="OWNER"&&o.jsxs(G1,{children:[o.jsx(K1,{asChild:!0,children:o.jsx(P,{variant:"ghost",className:"text-brand-p2 hover:bg-transparent !p-0",size:"icon",disabled:Xf,children:o.jsx(Ea,{size:25})})}),o.jsxs(W1,{className:"py-4",children:[o.jsx(fa,{className:"gap-x-5",onClick:()=>T(h.id,R,h.role??"MEMBER"),disabled:re,children:o.jsxs("div",{className:"flex items-center",children:[o.jsx(vn,{size:20,className:"mr-2"}),h.role!=="ADMIN"?"Make ":"Remove as "," ","Admin"]})}),o.jsxs(fa,{disabled:re,onClick:()=>O({targetUserId:h.id,adminUsername:(d==null?void 0:d.username)??"",targetUsername:h.username,userId:(d==null?void 0:d.id)??""},R),children:[o.jsx(En,{size:20,className:"mr-2"}),"Remove"]})]})]})]},h.id)):o.jsx("div",{children:o.jsx(lf,{children:"No members yet! "})}):Ff&&o.jsxs("div",{children:[" ",o.jsx(Uf,{withBackground:!1,size:"sm"})," "]})]}),o.jsx(P,{onClick:Cf,variant:"outline",disabled:re,className:" mt-5 w-full justify-start",children:ee?o.jsx(Uf,{size:"sm",withBackground:!1}):o.jsxs(o.Fragment,{children:[o.jsx(Y1,{size:20,className:"mr-2"})," Leave"]})})]}),v&&o.jsxs(P,{onClick:()=>H(!0),variant:"outline",className:"text-destructive w-full justify-start mt-3",children:[o.jsx(Ca,{size:20,className:"mr-2"})," Delete Group Chat"]}),p&&o.jsx(Uf,{})]})]})}function An({avatar:f,email:e,username:a,lastSeen:n,bio:r}){const{profile:t}=Mf(),{dmInfo:d}=Tf(s=>s.activeChat),l=le(),{lastSeen:c,isOnline:u}=xa(n??new Date);return o.jsxs("div",{children:[o.jsxs("header",{className:"border-b mb-5 mt-6 pb-3",children:[o.jsxs("div",{className:" flex items-center gap-x-5 justify-start",children:[o.jsx(ie,{type:"User",src:f,size:96,alt:`${a??"User"}'s avatar`}),o.jsxs("div",{children:[o.jsx(te,{children:a}),o.jsx(lf,{className:qf("text-sm font-light opacity-80",u&&"text-brand-p1 opacity-100 dark:text-brand-p2"),children:c})]})]}),o.jsxs("div",{className:"my-4",children:[o.jsx(te,{className:"text-[15px] text-neutral-600 ",children:"Email"}),o.jsx("a",{href:`mailto:${e}`,className:"underline text-brand-p2",children:e})]}),o.jsxs("div",{children:[o.jsx(te,{className:"text-[15px] text-neutral-600 ",children:"Bio"}),o.jsx(lf,{children:r})]})]}),o.jsxs("section",{children:[o.jsxs(P,{variant:"outline",className:"w-full justify-start mt-3",children:[" ",o.jsx(gn,{className:"mr-2"}),"Block user"]}),o.jsxs(P,{onClick:()=>l(`/${t==null?void 0:t.id}/chats/${d==null?void 0:d.id}/video-chat`),variant:"outline",className:"w-full justify-start mt-3",children:[" ",o.jsx(wn,{className:"mr-2"}),"Video Chat"]}),o.jsxs(P,{variant:"outline",className:"text-destructive w-full justify-start mt-3",children:[o.jsx(Ca,{className:"mr-2"}),"Delete Chat"]})]})]})}function Nn({isOpen:f,openDrawer:e}){var r,t,d,l,c,u,s,g;const{activeChat:a}=Tf();function n(){e(!1)}return o.jsx(Z1,{open:f,onOpenChange:m=>e(m),children:o.jsx(Q1,{side:"right",className:qf("overflow-y-auto w-full",(a==null?void 0:a.groupInfo)&&"sm:!w-[500px] !max-w-[500px]"),children:a!=null&&a.groupInfo?o.jsx(Tn,{name:((r=a.groupInfo)==null?void 0:r.name)??"No name",description:((t=a.groupInfo)==null?void 0:t.description)??"No description",imageUrl:a.groupInfo.imageUrl??null,privacyType:((d=a.groupInfo)==null?void 0:d.privacy)??void 0,inviteCode:((l=a.groupInfo)==null?void 0:l.inviteCode)??"No invite code",closeDrawer:n}):a!=null&&a.dmInfo?o.jsx(An,{username:a.dmInfo.username,avatar:((c=a.dmInfo)==null?void 0:c.avatarUrl)??null,lastSeen:((u=a.dmInfo)==null?void 0:u.lastSeen)??new Date,bio:((s=a.dmInfo)==null?void 0:s.bio)??"No bio",email:((g=a.dmInfo)==null?void 0:g.email)??"No email",id:a.dmInfo.id,closeDrawer:n}):o.jsx(lf,{children:"Nothing to show here!"})})})}function Dn(){var s,g,m,p,x,v,S,w,z,b;const[f,e]=i.useState(!1),a=Pn("(max-width: 1024px)"),n=Tf(j=>j.activeChat),{profile:r}=Mf(),t=i.useMemo(()=>{var j;return((j=n==null?void 0:n.groupInfo)==null?void 0:j.members)??[]},[n]),{lastSeen:d,isOnline:l}=xa(((s=n==null?void 0:n.dmInfo)==null?void 0:s.lastSeen)??new Date),c=le();function u(){e(!0)}return o.jsxs(o.Fragment,{children:[o.jsx(Nn,{openDrawer:e,isOpen:f}),o.jsxs("header",{className:"flex h-[75px] items-center justify-between px-4 py-5 bg-white dark:bg-[#17191C] w-full lg:w-[calc(100%-350px)] fixed top-0 z-[50] border-b",children:[o.jsx(P,{variant:"ghost",className:"lg:hidden",size:"icon",onClick:()=>c(`/${r==null?void 0:r.id}/chats`),children:o.jsx(J1,{})}),o.jsxs("div",{className:"flex max-lg:w-[80%] max-lg:flex-shrink-0 flex-row-reverse lg:gap-5 justify-between lg:items-center lg:flex-row",children:[o.jsx("figure",{onClick:a?u:void 0,className:"max-lg:hover:opacity-70 max-lg:cursor-pointer max-lg:text-center text-slate-500 flex items-center justify-center ",children:(g=n==null?void 0:n.groupInfo)!=null&&g.isGroup?o.jsx(ie,{type:"Group",src:((m=n==null?void 0:n.groupInfo)==null?void 0:m.imageUrl)??null,size:48,alt:"Group Avatar"}):o.jsx(ie,{type:"User",src:((p=n==null?void 0:n.dmInfo)==null?void 0:p.avatarUrl)??null,alt:`${((x=n==null?void 0:n.dmInfo)==null?void 0:x.username)??""} avatar`,size:48})}),o.jsxs("div",{className:"text-center lg:text-left max-lg:w-[calc(80%-12*0.25rem)] max-lg:flex-shrink-0",children:[o.jsx(X1,{className:"text-xl truncate",children:(v=n==null?void 0:n.groupInfo)!=null&&v.isGroup?(S=n==null?void 0:n.groupInfo)==null?void 0:S.name:(w=n==null?void 0:n.dmInfo)==null?void 0:w.username}),o.jsx(lf,{className:qf("text-sm font-light",l&&!((z=n==null?void 0:n.groupInfo)!=null&&z.isGroup)&&"text-brand-p1 dark:text-brand-p2"),children:(b=n==null?void 0:n.groupInfo)!=null&&b.isGroup?t.join(", ")+"...":d})]})]}),o.jsxs(P,{variant:"ghost",className:" hidden lg:block text-brand-p2 hover:bg-transparent !p-0",size:"icon",onClick:u,children:[o.jsx(Ea,{size:25}),o.jsx("span",{className:"sr-only",children:"Chat menu"})]})]})]})}var k;(function(f){f.hiddenOnSearch="epr-hidden-on-search",f.searchActive="epr-search-active",f.hidden="epr-hidden",f.visible="epr-visible",f.active="epr-active",f.emoji="epr-emoji",f.category="epr-emoji-category",f.label="epr-emoji-category-label",f.categoryContent="epr-emoji-category-content",f.emojiHasVariations="epr-emoji-has-variations",f.scrollBody="epr-body",f.emojiList="epr-emoji-list",f.external="__EmojiPicker__",f.emojiPicker="EmojiPickerReact",f.open="epr-open",f.vertical="epr-vertical",f.horizontal="epr-horizontal",f.variationPicker="epr-emoji-variation-picker",f.darkTheme="epr-dark-theme",f.autoTheme="epr-auto-theme"})(k||(k={}));function q(){for(var f=arguments.length,e=new Array(f),a=0;a<f;a++)e[a]=arguments[a];return e.map(function(n){return"."+n}).join("")}function U(){for(var f=arguments.length,e=new Array(f),a=0;a<f;a++)e[a]=arguments[a];var n=e.reduce(function(r,t){return typeof t=="string"&&r.push(t),Array.isArray(t)&&r.push(U.apply(void 0,t)),typeof t=="object"&&Object.entries(t).forEach(function(d){var l=d[0],c=d[1];c&&r.push(l)}),r},[]);return n.filter(Boolean).join(" ")}function W(f){f&&requestAnimationFrame(function(){f.focus()})}function Sa(f){if(f){var e=f.previousElementSibling;W(e)}}function Ra(f){if(f){var e=f.nextElementSibling;W(e)}}function za(f){if(f){var e=f.firstElementChild;W(e)}}function Ln(f){var e=f.children,a=i.useRef(null),n=i.useRef(null),r=i.useRef(null),t=i.useRef(null),d=i.useRef(null),l=i.useRef(null),c=i.useRef(null);return i.createElement(Pa.Provider,{value:{AnchoredEmojiRef:n,BodyRef:r,CategoryNavigationRef:l,PickerMainRef:a,SearchInputRef:t,SkinTonePickerRef:d,VariationPickerRef:c}},e)}var Pa=i.createContext({AnchoredEmojiRef:i.createRef(),BodyRef:i.createRef(),CategoryNavigationRef:i.createRef(),PickerMainRef:i.createRef(),SearchInputRef:i.createRef(),SkinTonePickerRef:i.createRef(),VariationPickerRef:i.createRef()});function vf(){return i.useContext(Pa)}function Yf(){return vf().PickerMainRef}function ue(){return vf().AnchoredEmojiRef}function Ma(){var f=ue();return function(e){e===null&&f.current!==null&&W(f.current),f.current=e}}function ef(){return vf().BodyRef}function bf(){return vf().SearchInputRef}function De(){return vf().SkinTonePickerRef}function Le(){return vf().CategoryNavigationRef}function In(){return vf().VariationPickerRef}function tf(){return tf=Object.assign?Object.assign.bind():function(f){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(f[n]=a[n])}return f},tf.apply(this,arguments)}function On(f,e){f.prototype=Object.create(e.prototype),f.prototype.constructor=f,Se(f,e)}function Se(f,e){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Se(f,e)}function Fn(f,e){if(f==null)return{};var a={},n=Object.keys(f),r,t;for(t=0;t<n.length;t++)r=n[t],!(e.indexOf(r)>=0)&&(a[r]=f[r]);return a}function Bn(f,e){if(f){if(typeof f=="string")return aa(f,e);var a=Object.prototype.toString.call(f).slice(8,-1);if(a==="Object"&&f.constructor&&(a=f.constructor.name),a==="Map"||a==="Set")return Array.from(f);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return aa(f,e)}}function aa(f,e){(e==null||e>f.length)&&(e=f.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=f[a];return n}function _n(f,e){var a=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(a)return(a=a.call(f)).next.bind(a);if(Array.isArray(f)||(a=Bn(f))||e&&f&&typeof f.length=="number"){a&&(f=a);var n=0;return function(){return n>=f.length?{done:!0}:{done:!1,value:f[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $f;(function(f){f.RECENT="recent",f.FREQUENT="frequent"})($f||($f={}));var G;(function(f){f.NATIVE="native",f.APPLE="apple",f.TWITTER="twitter",f.GOOGLE="google",f.FACEBOOK="facebook"})(G||(G={}));var hf;(function(f){f.DARK="dark",f.LIGHT="light",f.AUTO="auto"})(hf||(hf={}));var nf;(function(f){f.NEUTRAL="neutral",f.LIGHT="1f3fb",f.MEDIUM_LIGHT="1f3fc",f.MEDIUM="1f3fd",f.MEDIUM_DARK="1f3fe",f.DARK="1f3ff"})(nf||(nf={}));var E;(function(f){f.SUGGESTED="suggested",f.CUSTOM="custom",f.SMILEYS_PEOPLE="smileys_people",f.ANIMALS_NATURE="animals_nature",f.FOOD_DRINK="food_drink",f.TRAVEL_PLACES="travel_places",f.ACTIVITIES="activities",f.OBJECTS="objects",f.SYMBOLS="symbols",f.FLAGS="flags"})(E||(E={}));var zf;(function(f){f.SEARCH="SEARCH",f.PREVIEW="PREVIEW"})(zf||(zf={}));var X,Un=[E.SUGGESTED,E.CUSTOM,E.SMILEYS_PEOPLE,E.ANIMALS_NATURE,E.FOOD_DRINK,E.TRAVEL_PLACES,E.ACTIVITIES,E.OBJECTS,E.SYMBOLS,E.FLAGS],Vn={name:"Recently Used",category:E.SUGGESTED},Ta=(X={},X[E.SUGGESTED]={category:E.SUGGESTED,name:"Frequently Used"},X[E.CUSTOM]={category:E.CUSTOM,name:"Custom Emojis"},X[E.SMILEYS_PEOPLE]={category:E.SMILEYS_PEOPLE,name:"Smileys & People"},X[E.ANIMALS_NATURE]={category:E.ANIMALS_NATURE,name:"Animals & Nature"},X[E.FOOD_DRINK]={category:E.FOOD_DRINK,name:"Food & Drink"},X[E.TRAVEL_PLACES]={category:E.TRAVEL_PLACES,name:"Travel & Places"},X[E.ACTIVITIES]={category:E.ACTIVITIES,name:"Activities"},X[E.OBJECTS]={category:E.OBJECTS,name:"Objects"},X[E.SYMBOLS]={category:E.SYMBOLS,name:"Symbols"},X[E.FLAGS]={category:E.FLAGS,name:"Flags"},X);function Aa(f){return Un.map(function(e){return tf({},Ta[e],f&&f[e]&&f[e])})}function Ie(f){return f.category}function Na(f){return f.name}function qn(f,e){var a;f===void 0&&(f=[]),e===void 0&&(e={});var n={};e.suggestionMode===$f.RECENT&&(n[E.SUGGESTED]=Vn);var r=Aa(n);return(a=f)!=null&&a.length?f.map(function(t){return typeof t=="string"?na(t,n[t]):tf({},na(t.category,n[t.category]),t)}):r}function na(f,e){return e===void 0&&(e={}),Object.assign(Ta[f],e)}var $n="https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/",Hn="https://cdn.jsdelivr.net/npm/emoji-datasource-facebook/img/facebook/64/",Gn="https://cdn.jsdelivr.net/npm/emoji-datasource-twitter/img/twitter/64/",Kn="https://cdn.jsdelivr.net/npm/emoji-datasource-google/img/google/64/";function Wn(f){switch(f){case G.TWITTER:return Gn;case G.GOOGLE:return Kn;case G.FACEBOOK:return Hn;case G.APPLE:default:return $n}}var Yn=[],Zn=[{n:["grinning","grinning face"],u:"1f600",a:"1.0"},{n:["smiley","smiling face with open mouth"],u:"1f603",a:"0.6"},{n:["smile","smiling face with open mouth and smiling eyes"],u:"1f604",a:"0.6"},{n:["grin","grinning face with smiling eyes"],u:"1f601",a:"0.6"},{n:["laughing","satisfied","smiling face with open mouth and tightly-closed eyes"],u:"1f606",a:"0.6"},{n:["sweat smile","smiling face with open mouth and cold sweat"],u:"1f605",a:"0.6"},{n:["rolling on the floor laughing"],u:"1f923",a:"3.0"},{n:["joy","face with tears of joy"],u:"1f602",a:"0.6"},{n:["slightly smiling face"],u:"1f642",a:"1.0"},{n:["upside-down face","upside down face"],u:"1f643",a:"1.0"},{n:["melting face"],u:"1fae0",a:"14.0"},{n:["wink","winking face"],u:"1f609",a:"0.6"},{n:["blush","smiling face with smiling eyes"],u:"1f60a",a:"0.6"},{n:["innocent","smiling face with halo"],u:"1f607",a:"1.0"},{n:["smiling face with 3 hearts","smiling face with smiling eyes and three hearts"],u:"1f970",a:"11.0"},{n:["heart eyes","smiling face with heart-shaped eyes"],u:"1f60d",a:"0.6"},{n:["star-struck","grinning face with star eyes"],u:"1f929",a:"5.0"},{n:["kissing heart","face throwing a kiss"],u:"1f618",a:"0.6"},{n:["kissing","kissing face"],u:"1f617",a:"1.0"},{n:["relaxed","white smiling face"],u:"263a-fe0f",a:"0.6"},{n:["kissing closed eyes","kissing face with closed eyes"],u:"1f61a",a:"0.6"},{n:["kissing smiling eyes","kissing face with smiling eyes"],u:"1f619",a:"1.0"},{n:["smiling face with tear"],u:"1f972",a:"13.0"},{n:["yum","face savouring delicious food"],u:"1f60b",a:"0.6"},{n:["stuck out tongue","face with stuck-out tongue"],u:"1f61b",a:"1.0"},{n:["stuck out tongue winking eye","face with stuck-out tongue and winking eye"],u:"1f61c",a:"0.6"},{n:["zany face","grinning face with one large and one small eye"],u:"1f92a",a:"5.0"},{n:["stuck out tongue closed eyes","face with stuck-out tongue and tightly-closed eyes"],u:"1f61d",a:"0.6"},{n:["money-mouth face","money mouth face"],u:"1f911",a:"1.0"},{n:["hugging face"],u:"1f917",a:"1.0"},{n:["face with hand over mouth","smiling face with smiling eyes and hand covering mouth"],u:"1f92d",a:"5.0"},{n:["face with open eyes and hand over mouth"],u:"1fae2",a:"14.0"},{n:["face with peeking eye"],u:"1fae3",a:"14.0"},{n:["shushing face","face with finger covering closed lips"],u:"1f92b",a:"5.0"},{n:["thinking face"],u:"1f914",a:"1.0"},{n:["saluting face"],u:"1fae1",a:"14.0"},{n:["zipper-mouth face","zipper mouth face"],u:"1f910",a:"1.0"},{n:["face with raised eyebrow","face with one eyebrow raised"],u:"1f928",a:"5.0"},{n:["neutral face"],u:"1f610",a:"0.7"},{n:["expressionless","expressionless face"],u:"1f611",a:"1.0"},{n:["no mouth","face without mouth"],u:"1f636",a:"1.0"},{n:["dotted line face"],u:"1fae5",a:"14.0"},{n:["face in clouds"],u:"1f636-200d-1f32b-fe0f",a:"13.1"},{n:["smirk","smirking face"],u:"1f60f",a:"0.6"},{n:["unamused","unamused face"],u:"1f612",a:"0.6"},{n:["face with rolling eyes"],u:"1f644",a:"1.0"},{n:["grimacing","grimacing face"],u:"1f62c",a:"1.0"},{n:["face exhaling"],u:"1f62e-200d-1f4a8",a:"13.1"},{n:["lying face"],u:"1f925",a:"3.0"},{n:["relieved","relieved face"],u:"1f60c",a:"0.6"},{n:["pensive","pensive face"],u:"1f614",a:"0.6"},{n:["sleepy","sleepy face"],u:"1f62a",a:"0.6"},{n:["drooling face"],u:"1f924",a:"3.0"},{n:["sleeping","sleeping face"],u:"1f634",a:"1.0"},{n:["mask","face with medical mask"],u:"1f637",a:"0.6"},{n:["face with thermometer"],u:"1f912",a:"1.0"},{n:["face with head-bandage","face with head bandage"],u:"1f915",a:"1.0"},{n:["nauseated face"],u:"1f922",a:"3.0"},{n:["face vomiting","face with open mouth vomiting"],u:"1f92e",a:"5.0"},{n:["sneezing face"],u:"1f927",a:"3.0"},{n:["hot face","overheated face"],u:"1f975",a:"11.0"},{n:["cold face","freezing face"],u:"1f976",a:"11.0"},{n:["woozy face","face with uneven eyes and wavy mouth"],u:"1f974",a:"11.0"},{n:["dizzy face"],u:"1f635",a:"0.6"},{n:["face with spiral eyes"],u:"1f635-200d-1f4ab",a:"13.1"},{n:["exploding head","shocked face with exploding head"],u:"1f92f",a:"5.0"},{n:["face with cowboy hat"],u:"1f920",a:"3.0"},{n:["partying face","face with party horn and party hat"],u:"1f973",a:"11.0"},{n:["disguised face"],u:"1f978",a:"13.0"},{n:["sunglasses","smiling face with sunglasses"],u:"1f60e",a:"1.0"},{n:["nerd face"],u:"1f913",a:"1.0"},{n:["face with monocle"],u:"1f9d0",a:"5.0"},{n:["confused","confused face"],u:"1f615",a:"1.0"},{n:["face with diagonal mouth"],u:"1fae4",a:"14.0"},{n:["worried","worried face"],u:"1f61f",a:"1.0"},{n:["slightly frowning face"],u:"1f641",a:"1.0"},{n:["frowning face","white frowning face"],u:"2639-fe0f",a:"0.7"},{n:["open mouth","face with open mouth"],u:"1f62e",a:"1.0"},{n:["hushed","hushed face"],u:"1f62f",a:"1.0"},{n:["astonished","astonished face"],u:"1f632",a:"0.6"},{n:["flushed","flushed face"],u:"1f633",a:"0.6"},{n:["pleading face","face with pleading eyes"],u:"1f97a",a:"11.0"},{n:["face holding back tears"],u:"1f979",a:"14.0"},{n:["frowning","frowning face with open mouth"],u:"1f626",a:"1.0"},{n:["anguished","anguished face"],u:"1f627",a:"1.0"},{n:["fearful","fearful face"],u:"1f628",a:"0.6"},{n:["cold sweat","face with open mouth and cold sweat"],u:"1f630",a:"0.6"},{n:["disappointed relieved","disappointed but relieved face"],u:"1f625",a:"0.6"},{n:["cry","crying face"],u:"1f622",a:"0.6"},{n:["sob","loudly crying face"],u:"1f62d",a:"0.6"},{n:["scream","face screaming in fear"],u:"1f631",a:"0.6"},{n:["confounded","confounded face"],u:"1f616",a:"0.6"},{n:["persevere","persevering face"],u:"1f623",a:"0.6"},{n:["disappointed","disappointed face"],u:"1f61e",a:"0.6"},{n:["sweat","face with cold sweat"],u:"1f613",a:"0.6"},{n:["weary","weary face"],u:"1f629",a:"0.6"},{n:["tired face"],u:"1f62b",a:"0.6"},{n:["yawning face"],u:"1f971",a:"12.0"},{n:["triumph","face with look of triumph"],u:"1f624",a:"0.6"},{n:["rage","pouting face"],u:"1f621",a:"0.6"},{n:["angry","angry face"],u:"1f620",a:"0.6"},{n:["face with symbols on mouth","serious face with symbols covering mouth"],u:"1f92c",a:"5.0"},{n:["smiling imp","smiling face with horns"],u:"1f608",a:"1.0"},{n:["imp"],u:"1f47f",a:"0.6"},{n:["skull"],u:"1f480",a:"0.6"},{n:["skull and crossbones"],u:"2620-fe0f",a:"1.0"},{n:["poop","shit","hankey","pile of poo"],u:"1f4a9",a:"0.6"},{n:["clown face"],u:"1f921",a:"3.0"},{n:["japanese ogre"],u:"1f479",a:"0.6"},{n:["japanese goblin"],u:"1f47a",a:"0.6"},{n:["ghost"],u:"1f47b",a:"0.6"},{n:["alien","extraterrestrial alien"],u:"1f47d",a:"0.6"},{n:["alien monster","space invader"],u:"1f47e",a:"0.6"},{n:["robot face"],u:"1f916",a:"1.0"},{n:["smiley cat","smiling cat face with open mouth"],u:"1f63a",a:"0.6"},{n:["smile cat","grinning cat face with smiling eyes"],u:"1f638",a:"0.6"},{n:["joy cat","cat face with tears of joy"],u:"1f639",a:"0.6"},{n:["heart eyes cat","smiling cat face with heart-shaped eyes"],u:"1f63b",a:"0.6"},{n:["smirk cat","cat face with wry smile"],u:"1f63c",a:"0.6"},{n:["kissing cat","kissing cat face with closed eyes"],u:"1f63d",a:"0.6"},{n:["scream cat","weary cat face"],u:"1f640",a:"0.6"},{n:["crying cat face"],u:"1f63f",a:"0.6"},{n:["pouting cat","pouting cat face"],u:"1f63e",a:"0.6"},{n:["see no evil","see-no-evil monkey"],u:"1f648",a:"0.6"},{n:["hear no evil","hear-no-evil monkey"],u:"1f649",a:"0.6"},{n:["speak no evil","speak-no-evil monkey"],u:"1f64a",a:"0.6"},{n:["kiss","kiss mark"],u:"1f48b",a:"0.6"},{n:["love letter"],u:"1f48c",a:"0.6"},{n:["cupid","heart with arrow"],u:"1f498",a:"0.6"},{n:["gift heart","heart with ribbon"],u:"1f49d",a:"0.6"},{n:["sparkling heart"],u:"1f496",a:"0.6"},{n:["heartpulse","growing heart"],u:"1f497",a:"0.6"},{n:["heartbeat","beating heart"],u:"1f493",a:"0.6"},{n:["revolving hearts"],u:"1f49e",a:"0.6"},{n:["two hearts"],u:"1f495",a:"0.6"},{n:["heart decoration"],u:"1f49f",a:"0.6"},{n:["heart exclamation","heavy heart exclamation mark ornament"],u:"2763-fe0f",a:"1.0"},{n:["broken heart"],u:"1f494",a:"0.6"},{n:["heart on fire"],u:"2764-fe0f-200d-1f525",a:"13.1"},{n:["mending heart"],u:"2764-fe0f-200d-1fa79",a:"13.1"},{n:["heart","heavy black heart"],u:"2764-fe0f",a:"0.6"},{n:["orange heart"],u:"1f9e1",a:"5.0"},{n:["yellow heart"],u:"1f49b",a:"0.6"},{n:["green heart"],u:"1f49a",a:"0.6"},{n:["blue heart"],u:"1f499",a:"0.6"},{n:["purple heart"],u:"1f49c",a:"0.6"},{n:["brown heart"],u:"1f90e",a:"12.0"},{n:["black heart"],u:"1f5a4",a:"3.0"},{n:["white heart"],u:"1f90d",a:"12.0"},{n:["100","hundred points symbol"],u:"1f4af",a:"0.6"},{n:["anger","anger symbol"],u:"1f4a2",a:"0.6"},{n:["boom","collision","collision symbol"],u:"1f4a5",a:"0.6"},{n:["dizzy","dizzy symbol"],u:"1f4ab",a:"0.6"},{n:["sweat drops","splashing sweat symbol"],u:"1f4a6",a:"0.6"},{n:["dash","dash symbol"],u:"1f4a8",a:"0.6"},{n:["hole"],u:"1f573-fe0f",a:"0.7"},{n:["bomb"],u:"1f4a3",a:"0.6"},{n:["speech balloon"],u:"1f4ac",a:"0.6"},{n:["eye in speech bubble","eye-in-speech-bubble"],u:"1f441-fe0f-200d-1f5e8-fe0f",a:"2.0"},{n:["left speech bubble"],u:"1f5e8-fe0f",a:"2.0"},{n:["right anger bubble"],u:"1f5ef-fe0f",a:"0.7"},{n:["thought balloon"],u:"1f4ad",a:"1.0"},{n:["zzz","sleeping symbol"],u:"1f4a4",a:"0.6"},{n:["wave","waving hand sign"],u:"1f44b",v:["1f44b-1f3fb","1f44b-1f3fc","1f44b-1f3fd","1f44b-1f3fe","1f44b-1f3ff"],a:"0.6"},{n:["raised back of hand"],u:"1f91a",v:["1f91a-1f3fb","1f91a-1f3fc","1f91a-1f3fd","1f91a-1f3fe","1f91a-1f3ff"],a:"3.0"},{n:["hand with fingers splayed","raised hand with fingers splayed"],u:"1f590-fe0f",v:["1f590-1f3fb","1f590-1f3fc","1f590-1f3fd","1f590-1f3fe","1f590-1f3ff"],a:"0.7"},{n:["hand","raised hand"],u:"270b",v:["270b-1f3fb","270b-1f3fc","270b-1f3fd","270b-1f3fe","270b-1f3ff"],a:"0.6"},{n:["spock-hand","raised hand with part between middle and ring fingers"],u:"1f596",v:["1f596-1f3fb","1f596-1f3fc","1f596-1f3fd","1f596-1f3fe","1f596-1f3ff"],a:"1.0"},{n:["rightwards hand"],u:"1faf1",v:["1faf1-1f3fb","1faf1-1f3fc","1faf1-1f3fd","1faf1-1f3fe","1faf1-1f3ff"],a:"14.0"},{n:["leftwards hand"],u:"1faf2",v:["1faf2-1f3fb","1faf2-1f3fc","1faf2-1f3fd","1faf2-1f3fe","1faf2-1f3ff"],a:"14.0"},{n:["palm down hand"],u:"1faf3",v:["1faf3-1f3fb","1faf3-1f3fc","1faf3-1f3fd","1faf3-1f3fe","1faf3-1f3ff"],a:"14.0"},{n:["palm up hand"],u:"1faf4",v:["1faf4-1f3fb","1faf4-1f3fc","1faf4-1f3fd","1faf4-1f3fe","1faf4-1f3ff"],a:"14.0"},{n:["ok hand","ok hand sign"],u:"1f44c",v:["1f44c-1f3fb","1f44c-1f3fc","1f44c-1f3fd","1f44c-1f3fe","1f44c-1f3ff"],a:"0.6"},{n:["pinched fingers"],u:"1f90c",v:["1f90c-1f3fb","1f90c-1f3fc","1f90c-1f3fd","1f90c-1f3fe","1f90c-1f3ff"],a:"13.0"},{n:["pinching hand"],u:"1f90f",v:["1f90f-1f3fb","1f90f-1f3fc","1f90f-1f3fd","1f90f-1f3fe","1f90f-1f3ff"],a:"12.0"},{n:["v","victory hand"],u:"270c-fe0f",v:["270c-1f3fb","270c-1f3fc","270c-1f3fd","270c-1f3fe","270c-1f3ff"],a:"0.6"},{n:["crossed fingers","hand with index and middle fingers crossed"],u:"1f91e",v:["1f91e-1f3fb","1f91e-1f3fc","1f91e-1f3fd","1f91e-1f3fe","1f91e-1f3ff"],a:"3.0"},{n:["hand with index finger and thumb crossed"],u:"1faf0",v:["1faf0-1f3fb","1faf0-1f3fc","1faf0-1f3fd","1faf0-1f3fe","1faf0-1f3ff"],a:"14.0"},{n:["i love you hand sign"],u:"1f91f",v:["1f91f-1f3fb","1f91f-1f3fc","1f91f-1f3fd","1f91f-1f3fe","1f91f-1f3ff"],a:"5.0"},{n:["the horns","sign of the horns"],u:"1f918",v:["1f918-1f3fb","1f918-1f3fc","1f918-1f3fd","1f918-1f3fe","1f918-1f3ff"],a:"1.0"},{n:["call me hand"],u:"1f919",v:["1f919-1f3fb","1f919-1f3fc","1f919-1f3fd","1f919-1f3fe","1f919-1f3ff"],a:"3.0"},{n:["point left","white left pointing backhand index"],u:"1f448",v:["1f448-1f3fb","1f448-1f3fc","1f448-1f3fd","1f448-1f3fe","1f448-1f3ff"],a:"0.6"},{n:["point right","white right pointing backhand index"],u:"1f449",v:["1f449-1f3fb","1f449-1f3fc","1f449-1f3fd","1f449-1f3fe","1f449-1f3ff"],a:"0.6"},{n:["point up 2","white up pointing backhand index"],u:"1f446",v:["1f446-1f3fb","1f446-1f3fc","1f446-1f3fd","1f446-1f3fe","1f446-1f3ff"],a:"0.6"},{n:["middle finger","reversed hand with middle finger extended"],u:"1f595",v:["1f595-1f3fb","1f595-1f3fc","1f595-1f3fd","1f595-1f3fe","1f595-1f3ff"],a:"1.0"},{n:["point down","white down pointing backhand index"],u:"1f447",v:["1f447-1f3fb","1f447-1f3fc","1f447-1f3fd","1f447-1f3fe","1f447-1f3ff"],a:"0.6"},{n:["point up","white up pointing index"],u:"261d-fe0f",v:["261d-1f3fb","261d-1f3fc","261d-1f3fd","261d-1f3fe","261d-1f3ff"],a:"0.6"},{n:["index pointing at the viewer"],u:"1faf5",v:["1faf5-1f3fb","1faf5-1f3fc","1faf5-1f3fd","1faf5-1f3fe","1faf5-1f3ff"],a:"14.0"},{n:["+1","thumbsup","thumbs up sign"],u:"1f44d",v:["1f44d-1f3fb","1f44d-1f3fc","1f44d-1f3fd","1f44d-1f3fe","1f44d-1f3ff"],a:"0.6"},{n:["-1","thumbsdown","thumbs down sign"],u:"1f44e",v:["1f44e-1f3fb","1f44e-1f3fc","1f44e-1f3fd","1f44e-1f3fe","1f44e-1f3ff"],a:"0.6"},{n:["fist","raised fist"],u:"270a",v:["270a-1f3fb","270a-1f3fc","270a-1f3fd","270a-1f3fe","270a-1f3ff"],a:"0.6"},{n:["punch","facepunch","fisted hand sign"],u:"1f44a",v:["1f44a-1f3fb","1f44a-1f3fc","1f44a-1f3fd","1f44a-1f3fe","1f44a-1f3ff"],a:"0.6"},{n:["left-facing fist"],u:"1f91b",v:["1f91b-1f3fb","1f91b-1f3fc","1f91b-1f3fd","1f91b-1f3fe","1f91b-1f3ff"],a:"3.0"},{n:["right-facing fist"],u:"1f91c",v:["1f91c-1f3fb","1f91c-1f3fc","1f91c-1f3fd","1f91c-1f3fe","1f91c-1f3ff"],a:"3.0"},{n:["clap","clapping hands sign"],u:"1f44f",v:["1f44f-1f3fb","1f44f-1f3fc","1f44f-1f3fd","1f44f-1f3fe","1f44f-1f3ff"],a:"0.6"},{n:["raised hands","person raising both hands in celebration"],u:"1f64c",v:["1f64c-1f3fb","1f64c-1f3fc","1f64c-1f3fd","1f64c-1f3fe","1f64c-1f3ff"],a:"0.6"},{n:["heart hands"],u:"1faf6",v:["1faf6-1f3fb","1faf6-1f3fc","1faf6-1f3fd","1faf6-1f3fe","1faf6-1f3ff"],a:"14.0"},{n:["open hands","open hands sign"],u:"1f450",v:["1f450-1f3fb","1f450-1f3fc","1f450-1f3fd","1f450-1f3fe","1f450-1f3ff"],a:"0.6"},{n:["palms up together"],u:"1f932",v:["1f932-1f3fb","1f932-1f3fc","1f932-1f3fd","1f932-1f3fe","1f932-1f3ff"],a:"5.0"},{n:["handshake"],u:"1f91d",v:["1f91d-1f3fb","1f91d-1f3fc","1f91d-1f3fd","1f91d-1f3fe","1f91d-1f3ff","1faf1-1f3fb-200d-1faf2-1f3fc","1faf1-1f3fb-200d-1faf2-1f3fd","1faf1-1f3fb-200d-1faf2-1f3fe","1faf1-1f3fb-200d-1faf2-1f3ff","1faf1-1f3fc-200d-1faf2-1f3fb","1faf1-1f3fc-200d-1faf2-1f3fd","1faf1-1f3fc-200d-1faf2-1f3fe","1faf1-1f3fc-200d-1faf2-1f3ff","1faf1-1f3fd-200d-1faf2-1f3fb","1faf1-1f3fd-200d-1faf2-1f3fc","1faf1-1f3fd-200d-1faf2-1f3fe","1faf1-1f3fd-200d-1faf2-1f3ff","1faf1-1f3fe-200d-1faf2-1f3fb","1faf1-1f3fe-200d-1faf2-1f3fc","1faf1-1f3fe-200d-1faf2-1f3fd","1faf1-1f3fe-200d-1faf2-1f3ff","1faf1-1f3ff-200d-1faf2-1f3fb","1faf1-1f3ff-200d-1faf2-1f3fc","1faf1-1f3ff-200d-1faf2-1f3fd","1faf1-1f3ff-200d-1faf2-1f3fe"],a:"3.0"},{n:["pray","person with folded hands"],u:"1f64f",v:["1f64f-1f3fb","1f64f-1f3fc","1f64f-1f3fd","1f64f-1f3fe","1f64f-1f3ff"],a:"0.6"},{n:["writing hand"],u:"270d-fe0f",v:["270d-1f3fb","270d-1f3fc","270d-1f3fd","270d-1f3fe","270d-1f3ff"],a:"0.7"},{n:["nail care","nail polish"],u:"1f485",v:["1f485-1f3fb","1f485-1f3fc","1f485-1f3fd","1f485-1f3fe","1f485-1f3ff"],a:"0.6"},{n:["selfie"],u:"1f933",v:["1f933-1f3fb","1f933-1f3fc","1f933-1f3fd","1f933-1f3fe","1f933-1f3ff"],a:"3.0"},{n:["muscle","flexed biceps"],u:"1f4aa",v:["1f4aa-1f3fb","1f4aa-1f3fc","1f4aa-1f3fd","1f4aa-1f3fe","1f4aa-1f3ff"],a:"0.6"},{n:["mechanical arm"],u:"1f9be",a:"12.0"},{n:["mechanical leg"],u:"1f9bf",a:"12.0"},{n:["leg"],u:"1f9b5",v:["1f9b5-1f3fb","1f9b5-1f3fc","1f9b5-1f3fd","1f9b5-1f3fe","1f9b5-1f3ff"],a:"11.0"},{n:["foot"],u:"1f9b6",v:["1f9b6-1f3fb","1f9b6-1f3fc","1f9b6-1f3fd","1f9b6-1f3fe","1f9b6-1f3ff"],a:"11.0"},{n:["ear"],u:"1f442",v:["1f442-1f3fb","1f442-1f3fc","1f442-1f3fd","1f442-1f3fe","1f442-1f3ff"],a:"0.6"},{n:["ear with hearing aid"],u:"1f9bb",v:["1f9bb-1f3fb","1f9bb-1f3fc","1f9bb-1f3fd","1f9bb-1f3fe","1f9bb-1f3ff"],a:"12.0"},{n:["nose"],u:"1f443",v:["1f443-1f3fb","1f443-1f3fc","1f443-1f3fd","1f443-1f3fe","1f443-1f3ff"],a:"0.6"},{n:["brain"],u:"1f9e0",a:"5.0"},{n:["anatomical heart"],u:"1fac0",a:"13.0"},{n:["lungs"],u:"1fac1",a:"13.0"},{n:["tooth"],u:"1f9b7",a:"11.0"},{n:["bone"],u:"1f9b4",a:"11.0"},{n:["eyes"],u:"1f440",a:"0.6"},{n:["eye"],u:"1f441-fe0f",a:"0.7"},{n:["tongue"],u:"1f445",a:"0.6"},{n:["lips","mouth"],u:"1f444",a:"0.6"},{n:["biting lip"],u:"1fae6",a:"14.0"},{n:["baby"],u:"1f476",v:["1f476-1f3fb","1f476-1f3fc","1f476-1f3fd","1f476-1f3fe","1f476-1f3ff"],a:"0.6"},{n:["child"],u:"1f9d2",v:["1f9d2-1f3fb","1f9d2-1f3fc","1f9d2-1f3fd","1f9d2-1f3fe","1f9d2-1f3ff"],a:"5.0"},{n:["boy"],u:"1f466",v:["1f466-1f3fb","1f466-1f3fc","1f466-1f3fd","1f466-1f3fe","1f466-1f3ff"],a:"0.6"},{n:["girl"],u:"1f467",v:["1f467-1f3fb","1f467-1f3fc","1f467-1f3fd","1f467-1f3fe","1f467-1f3ff"],a:"0.6"},{n:["adult"],u:"1f9d1",v:["1f9d1-1f3fb","1f9d1-1f3fc","1f9d1-1f3fd","1f9d1-1f3fe","1f9d1-1f3ff"],a:"5.0"},{n:["person with blond hair"],u:"1f471",v:["1f471-1f3fb","1f471-1f3fc","1f471-1f3fd","1f471-1f3fe","1f471-1f3ff"],a:"0.6"},{n:["man"],u:"1f468",v:["1f468-1f3fb","1f468-1f3fc","1f468-1f3fd","1f468-1f3fe","1f468-1f3ff"],a:"0.6"},{n:["bearded person"],u:"1f9d4",v:["1f9d4-1f3fb","1f9d4-1f3fc","1f9d4-1f3fd","1f9d4-1f3fe","1f9d4-1f3ff"],a:"5.0"},{n:["man: beard","man with beard"],u:"1f9d4-200d-2642-fe0f",v:["1f9d4-1f3fb-200d-2642-fe0f","1f9d4-1f3fc-200d-2642-fe0f","1f9d4-1f3fd-200d-2642-fe0f","1f9d4-1f3fe-200d-2642-fe0f","1f9d4-1f3ff-200d-2642-fe0f"],a:"13.1"},{n:["woman: beard","woman with beard"],u:"1f9d4-200d-2640-fe0f",v:["1f9d4-1f3fb-200d-2640-fe0f","1f9d4-1f3fc-200d-2640-fe0f","1f9d4-1f3fd-200d-2640-fe0f","1f9d4-1f3fe-200d-2640-fe0f","1f9d4-1f3ff-200d-2640-fe0f"],a:"13.1"},{n:["man: red hair","red haired man"],u:"1f468-200d-1f9b0",v:["1f468-1f3fb-200d-1f9b0","1f468-1f3fc-200d-1f9b0","1f468-1f3fd-200d-1f9b0","1f468-1f3fe-200d-1f9b0","1f468-1f3ff-200d-1f9b0"],a:"11.0"},{n:["man: curly hair","curly haired man"],u:"1f468-200d-1f9b1",v:["1f468-1f3fb-200d-1f9b1","1f468-1f3fc-200d-1f9b1","1f468-1f3fd-200d-1f9b1","1f468-1f3fe-200d-1f9b1","1f468-1f3ff-200d-1f9b1"],a:"11.0"},{n:["man: white hair","white haired man"],u:"1f468-200d-1f9b3",v:["1f468-1f3fb-200d-1f9b3","1f468-1f3fc-200d-1f9b3","1f468-1f3fd-200d-1f9b3","1f468-1f3fe-200d-1f9b3","1f468-1f3ff-200d-1f9b3"],a:"11.0"},{n:["bald man","man: bald"],u:"1f468-200d-1f9b2",v:["1f468-1f3fb-200d-1f9b2","1f468-1f3fc-200d-1f9b2","1f468-1f3fd-200d-1f9b2","1f468-1f3fe-200d-1f9b2","1f468-1f3ff-200d-1f9b2"],a:"11.0"},{n:["woman"],u:"1f469",v:["1f469-1f3fb","1f469-1f3fc","1f469-1f3fd","1f469-1f3fe","1f469-1f3ff"],a:"0.6"},{n:["woman: red hair","red haired woman"],u:"1f469-200d-1f9b0",v:["1f469-1f3fb-200d-1f9b0","1f469-1f3fc-200d-1f9b0","1f469-1f3fd-200d-1f9b0","1f469-1f3fe-200d-1f9b0","1f469-1f3ff-200d-1f9b0"],a:"11.0"},{n:["person: red hair","red haired person"],u:"1f9d1-200d-1f9b0",v:["1f9d1-1f3fb-200d-1f9b0","1f9d1-1f3fc-200d-1f9b0","1f9d1-1f3fd-200d-1f9b0","1f9d1-1f3fe-200d-1f9b0","1f9d1-1f3ff-200d-1f9b0"],a:"12.1"},{n:["woman: curly hair","curly haired woman"],u:"1f469-200d-1f9b1",v:["1f469-1f3fb-200d-1f9b1","1f469-1f3fc-200d-1f9b1","1f469-1f3fd-200d-1f9b1","1f469-1f3fe-200d-1f9b1","1f469-1f3ff-200d-1f9b1"],a:"11.0"},{n:["person: curly hair","curly haired person"],u:"1f9d1-200d-1f9b1",v:["1f9d1-1f3fb-200d-1f9b1","1f9d1-1f3fc-200d-1f9b1","1f9d1-1f3fd-200d-1f9b1","1f9d1-1f3fe-200d-1f9b1","1f9d1-1f3ff-200d-1f9b1"],a:"12.1"},{n:["woman: white hair","white haired woman"],u:"1f469-200d-1f9b3",v:["1f469-1f3fb-200d-1f9b3","1f469-1f3fc-200d-1f9b3","1f469-1f3fd-200d-1f9b3","1f469-1f3fe-200d-1f9b3","1f469-1f3ff-200d-1f9b3"],a:"11.0"},{n:["person: white hair","white haired person"],u:"1f9d1-200d-1f9b3",v:["1f9d1-1f3fb-200d-1f9b3","1f9d1-1f3fc-200d-1f9b3","1f9d1-1f3fd-200d-1f9b3","1f9d1-1f3fe-200d-1f9b3","1f9d1-1f3ff-200d-1f9b3"],a:"12.1"},{n:["bald woman","woman: bald"],u:"1f469-200d-1f9b2",v:["1f469-1f3fb-200d-1f9b2","1f469-1f3fc-200d-1f9b2","1f469-1f3fd-200d-1f9b2","1f469-1f3fe-200d-1f9b2","1f469-1f3ff-200d-1f9b2"],a:"11.0"},{n:["bald person","person: bald"],u:"1f9d1-200d-1f9b2",v:["1f9d1-1f3fb-200d-1f9b2","1f9d1-1f3fc-200d-1f9b2","1f9d1-1f3fd-200d-1f9b2","1f9d1-1f3fe-200d-1f9b2","1f9d1-1f3ff-200d-1f9b2"],a:"12.1"},{n:["woman: blond hair","blond-haired-woman"],u:"1f471-200d-2640-fe0f",v:["1f471-1f3fb-200d-2640-fe0f","1f471-1f3fc-200d-2640-fe0f","1f471-1f3fd-200d-2640-fe0f","1f471-1f3fe-200d-2640-fe0f","1f471-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["man: blond hair","blond-haired-man"],u:"1f471-200d-2642-fe0f",v:["1f471-1f3fb-200d-2642-fe0f","1f471-1f3fc-200d-2642-fe0f","1f471-1f3fd-200d-2642-fe0f","1f471-1f3fe-200d-2642-fe0f","1f471-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["older adult"],u:"1f9d3",v:["1f9d3-1f3fb","1f9d3-1f3fc","1f9d3-1f3fd","1f9d3-1f3fe","1f9d3-1f3ff"],a:"5.0"},{n:["older man"],u:"1f474",v:["1f474-1f3fb","1f474-1f3fc","1f474-1f3fd","1f474-1f3fe","1f474-1f3ff"],a:"0.6"},{n:["older woman"],u:"1f475",v:["1f475-1f3fb","1f475-1f3fc","1f475-1f3fd","1f475-1f3fe","1f475-1f3ff"],a:"0.6"},{n:["person frowning"],u:"1f64d",v:["1f64d-1f3fb","1f64d-1f3fc","1f64d-1f3fd","1f64d-1f3fe","1f64d-1f3ff"],a:"0.6"},{n:["man frowning","man-frowning"],u:"1f64d-200d-2642-fe0f",v:["1f64d-1f3fb-200d-2642-fe0f","1f64d-1f3fc-200d-2642-fe0f","1f64d-1f3fd-200d-2642-fe0f","1f64d-1f3fe-200d-2642-fe0f","1f64d-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman frowning","woman-frowning"],u:"1f64d-200d-2640-fe0f",v:["1f64d-1f3fb-200d-2640-fe0f","1f64d-1f3fc-200d-2640-fe0f","1f64d-1f3fd-200d-2640-fe0f","1f64d-1f3fe-200d-2640-fe0f","1f64d-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person with pouting face"],u:"1f64e",v:["1f64e-1f3fb","1f64e-1f3fc","1f64e-1f3fd","1f64e-1f3fe","1f64e-1f3ff"],a:"0.6"},{n:["man pouting","man-pouting"],u:"1f64e-200d-2642-fe0f",v:["1f64e-1f3fb-200d-2642-fe0f","1f64e-1f3fc-200d-2642-fe0f","1f64e-1f3fd-200d-2642-fe0f","1f64e-1f3fe-200d-2642-fe0f","1f64e-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman pouting","woman-pouting"],u:"1f64e-200d-2640-fe0f",v:["1f64e-1f3fb-200d-2640-fe0f","1f64e-1f3fc-200d-2640-fe0f","1f64e-1f3fd-200d-2640-fe0f","1f64e-1f3fe-200d-2640-fe0f","1f64e-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["no good","face with no good gesture"],u:"1f645",v:["1f645-1f3fb","1f645-1f3fc","1f645-1f3fd","1f645-1f3fe","1f645-1f3ff"],a:"0.6"},{n:["man gesturing no","man-gesturing-no"],u:"1f645-200d-2642-fe0f",v:["1f645-1f3fb-200d-2642-fe0f","1f645-1f3fc-200d-2642-fe0f","1f645-1f3fd-200d-2642-fe0f","1f645-1f3fe-200d-2642-fe0f","1f645-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman gesturing no","woman-gesturing-no"],u:"1f645-200d-2640-fe0f",v:["1f645-1f3fb-200d-2640-fe0f","1f645-1f3fc-200d-2640-fe0f","1f645-1f3fd-200d-2640-fe0f","1f645-1f3fe-200d-2640-fe0f","1f645-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["ok woman","face with ok gesture"],u:"1f646",v:["1f646-1f3fb","1f646-1f3fc","1f646-1f3fd","1f646-1f3fe","1f646-1f3ff"],a:"0.6"},{n:["man gesturing ok","man-gesturing-ok"],u:"1f646-200d-2642-fe0f",v:["1f646-1f3fb-200d-2642-fe0f","1f646-1f3fc-200d-2642-fe0f","1f646-1f3fd-200d-2642-fe0f","1f646-1f3fe-200d-2642-fe0f","1f646-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman gesturing ok","woman-gesturing-ok"],u:"1f646-200d-2640-fe0f",v:["1f646-1f3fb-200d-2640-fe0f","1f646-1f3fc-200d-2640-fe0f","1f646-1f3fd-200d-2640-fe0f","1f646-1f3fe-200d-2640-fe0f","1f646-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["information desk person"],u:"1f481",v:["1f481-1f3fb","1f481-1f3fc","1f481-1f3fd","1f481-1f3fe","1f481-1f3ff"],a:"0.6"},{n:["man tipping hand","man-tipping-hand"],u:"1f481-200d-2642-fe0f",v:["1f481-1f3fb-200d-2642-fe0f","1f481-1f3fc-200d-2642-fe0f","1f481-1f3fd-200d-2642-fe0f","1f481-1f3fe-200d-2642-fe0f","1f481-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman tipping hand","woman-tipping-hand"],u:"1f481-200d-2640-fe0f",v:["1f481-1f3fb-200d-2640-fe0f","1f481-1f3fc-200d-2640-fe0f","1f481-1f3fd-200d-2640-fe0f","1f481-1f3fe-200d-2640-fe0f","1f481-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["raising hand","happy person raising one hand"],u:"1f64b",v:["1f64b-1f3fb","1f64b-1f3fc","1f64b-1f3fd","1f64b-1f3fe","1f64b-1f3ff"],a:"0.6"},{n:["man raising hand","man-raising-hand"],u:"1f64b-200d-2642-fe0f",v:["1f64b-1f3fb-200d-2642-fe0f","1f64b-1f3fc-200d-2642-fe0f","1f64b-1f3fd-200d-2642-fe0f","1f64b-1f3fe-200d-2642-fe0f","1f64b-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman raising hand","woman-raising-hand"],u:"1f64b-200d-2640-fe0f",v:["1f64b-1f3fb-200d-2640-fe0f","1f64b-1f3fc-200d-2640-fe0f","1f64b-1f3fd-200d-2640-fe0f","1f64b-1f3fe-200d-2640-fe0f","1f64b-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["deaf person"],u:"1f9cf",v:["1f9cf-1f3fb","1f9cf-1f3fc","1f9cf-1f3fd","1f9cf-1f3fe","1f9cf-1f3ff"],a:"12.0"},{n:["deaf man"],u:"1f9cf-200d-2642-fe0f",v:["1f9cf-1f3fb-200d-2642-fe0f","1f9cf-1f3fc-200d-2642-fe0f","1f9cf-1f3fd-200d-2642-fe0f","1f9cf-1f3fe-200d-2642-fe0f","1f9cf-1f3ff-200d-2642-fe0f"],a:"12.0"},{n:["deaf woman"],u:"1f9cf-200d-2640-fe0f",v:["1f9cf-1f3fb-200d-2640-fe0f","1f9cf-1f3fc-200d-2640-fe0f","1f9cf-1f3fd-200d-2640-fe0f","1f9cf-1f3fe-200d-2640-fe0f","1f9cf-1f3ff-200d-2640-fe0f"],a:"12.0"},{n:["bow","person bowing deeply"],u:"1f647",v:["1f647-1f3fb","1f647-1f3fc","1f647-1f3fd","1f647-1f3fe","1f647-1f3ff"],a:"0.6"},{n:["man bowing","man-bowing"],u:"1f647-200d-2642-fe0f",v:["1f647-1f3fb-200d-2642-fe0f","1f647-1f3fc-200d-2642-fe0f","1f647-1f3fd-200d-2642-fe0f","1f647-1f3fe-200d-2642-fe0f","1f647-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman bowing","woman-bowing"],u:"1f647-200d-2640-fe0f",v:["1f647-1f3fb-200d-2640-fe0f","1f647-1f3fc-200d-2640-fe0f","1f647-1f3fd-200d-2640-fe0f","1f647-1f3fe-200d-2640-fe0f","1f647-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["face palm"],u:"1f926",v:["1f926-1f3fb","1f926-1f3fc","1f926-1f3fd","1f926-1f3fe","1f926-1f3ff"],a:"3.0"},{n:["man facepalming","man-facepalming"],u:"1f926-200d-2642-fe0f",v:["1f926-1f3fb-200d-2642-fe0f","1f926-1f3fc-200d-2642-fe0f","1f926-1f3fd-200d-2642-fe0f","1f926-1f3fe-200d-2642-fe0f","1f926-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman facepalming","woman-facepalming"],u:"1f926-200d-2640-fe0f",v:["1f926-1f3fb-200d-2640-fe0f","1f926-1f3fc-200d-2640-fe0f","1f926-1f3fd-200d-2640-fe0f","1f926-1f3fe-200d-2640-fe0f","1f926-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["shrug"],u:"1f937",v:["1f937-1f3fb","1f937-1f3fc","1f937-1f3fd","1f937-1f3fe","1f937-1f3ff"],a:"3.0"},{n:["man shrugging","man-shrugging"],u:"1f937-200d-2642-fe0f",v:["1f937-1f3fb-200d-2642-fe0f","1f937-1f3fc-200d-2642-fe0f","1f937-1f3fd-200d-2642-fe0f","1f937-1f3fe-200d-2642-fe0f","1f937-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman shrugging","woman-shrugging"],u:"1f937-200d-2640-fe0f",v:["1f937-1f3fb-200d-2640-fe0f","1f937-1f3fc-200d-2640-fe0f","1f937-1f3fd-200d-2640-fe0f","1f937-1f3fe-200d-2640-fe0f","1f937-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["health worker"],u:"1f9d1-200d-2695-fe0f",v:["1f9d1-1f3fb-200d-2695-fe0f","1f9d1-1f3fc-200d-2695-fe0f","1f9d1-1f3fd-200d-2695-fe0f","1f9d1-1f3fe-200d-2695-fe0f","1f9d1-1f3ff-200d-2695-fe0f"],a:"12.1"},{n:["male-doctor","man health worker"],u:"1f468-200d-2695-fe0f",v:["1f468-1f3fb-200d-2695-fe0f","1f468-1f3fc-200d-2695-fe0f","1f468-1f3fd-200d-2695-fe0f","1f468-1f3fe-200d-2695-fe0f","1f468-1f3ff-200d-2695-fe0f"],a:"4.0"},{n:["female-doctor","woman health worker"],u:"1f469-200d-2695-fe0f",v:["1f469-1f3fb-200d-2695-fe0f","1f469-1f3fc-200d-2695-fe0f","1f469-1f3fd-200d-2695-fe0f","1f469-1f3fe-200d-2695-fe0f","1f469-1f3ff-200d-2695-fe0f"],a:"4.0"},{n:["student"],u:"1f9d1-200d-1f393",v:["1f9d1-1f3fb-200d-1f393","1f9d1-1f3fc-200d-1f393","1f9d1-1f3fd-200d-1f393","1f9d1-1f3fe-200d-1f393","1f9d1-1f3ff-200d-1f393"],a:"12.1"},{n:["man student","male-student"],u:"1f468-200d-1f393",v:["1f468-1f3fb-200d-1f393","1f468-1f3fc-200d-1f393","1f468-1f3fd-200d-1f393","1f468-1f3fe-200d-1f393","1f468-1f3ff-200d-1f393"],a:"4.0"},{n:["woman student","female-student"],u:"1f469-200d-1f393",v:["1f469-1f3fb-200d-1f393","1f469-1f3fc-200d-1f393","1f469-1f3fd-200d-1f393","1f469-1f3fe-200d-1f393","1f469-1f3ff-200d-1f393"],a:"4.0"},{n:["teacher"],u:"1f9d1-200d-1f3eb",v:["1f9d1-1f3fb-200d-1f3eb","1f9d1-1f3fc-200d-1f3eb","1f9d1-1f3fd-200d-1f3eb","1f9d1-1f3fe-200d-1f3eb","1f9d1-1f3ff-200d-1f3eb"],a:"12.1"},{n:["man teacher","male-teacher"],u:"1f468-200d-1f3eb",v:["1f468-1f3fb-200d-1f3eb","1f468-1f3fc-200d-1f3eb","1f468-1f3fd-200d-1f3eb","1f468-1f3fe-200d-1f3eb","1f468-1f3ff-200d-1f3eb"],a:"4.0"},{n:["woman teacher","female-teacher"],u:"1f469-200d-1f3eb",v:["1f469-1f3fb-200d-1f3eb","1f469-1f3fc-200d-1f3eb","1f469-1f3fd-200d-1f3eb","1f469-1f3fe-200d-1f3eb","1f469-1f3ff-200d-1f3eb"],a:"4.0"},{n:["judge"],u:"1f9d1-200d-2696-fe0f",v:["1f9d1-1f3fb-200d-2696-fe0f","1f9d1-1f3fc-200d-2696-fe0f","1f9d1-1f3fd-200d-2696-fe0f","1f9d1-1f3fe-200d-2696-fe0f","1f9d1-1f3ff-200d-2696-fe0f"],a:"12.1"},{n:["man judge","male-judge"],u:"1f468-200d-2696-fe0f",v:["1f468-1f3fb-200d-2696-fe0f","1f468-1f3fc-200d-2696-fe0f","1f468-1f3fd-200d-2696-fe0f","1f468-1f3fe-200d-2696-fe0f","1f468-1f3ff-200d-2696-fe0f"],a:"4.0"},{n:["woman judge","female-judge"],u:"1f469-200d-2696-fe0f",v:["1f469-1f3fb-200d-2696-fe0f","1f469-1f3fc-200d-2696-fe0f","1f469-1f3fd-200d-2696-fe0f","1f469-1f3fe-200d-2696-fe0f","1f469-1f3ff-200d-2696-fe0f"],a:"4.0"},{n:["farmer"],u:"1f9d1-200d-1f33e",v:["1f9d1-1f3fb-200d-1f33e","1f9d1-1f3fc-200d-1f33e","1f9d1-1f3fd-200d-1f33e","1f9d1-1f3fe-200d-1f33e","1f9d1-1f3ff-200d-1f33e"],a:"12.1"},{n:["man farmer","male-farmer"],u:"1f468-200d-1f33e",v:["1f468-1f3fb-200d-1f33e","1f468-1f3fc-200d-1f33e","1f468-1f3fd-200d-1f33e","1f468-1f3fe-200d-1f33e","1f468-1f3ff-200d-1f33e"],a:"4.0"},{n:["woman farmer","female-farmer"],u:"1f469-200d-1f33e",v:["1f469-1f3fb-200d-1f33e","1f469-1f3fc-200d-1f33e","1f469-1f3fd-200d-1f33e","1f469-1f3fe-200d-1f33e","1f469-1f3ff-200d-1f33e"],a:"4.0"},{n:["cook"],u:"1f9d1-200d-1f373",v:["1f9d1-1f3fb-200d-1f373","1f9d1-1f3fc-200d-1f373","1f9d1-1f3fd-200d-1f373","1f9d1-1f3fe-200d-1f373","1f9d1-1f3ff-200d-1f373"],a:"12.1"},{n:["man cook","male-cook"],u:"1f468-200d-1f373",v:["1f468-1f3fb-200d-1f373","1f468-1f3fc-200d-1f373","1f468-1f3fd-200d-1f373","1f468-1f3fe-200d-1f373","1f468-1f3ff-200d-1f373"],a:"4.0"},{n:["woman cook","female-cook"],u:"1f469-200d-1f373",v:["1f469-1f3fb-200d-1f373","1f469-1f3fc-200d-1f373","1f469-1f3fd-200d-1f373","1f469-1f3fe-200d-1f373","1f469-1f3ff-200d-1f373"],a:"4.0"},{n:["mechanic"],u:"1f9d1-200d-1f527",v:["1f9d1-1f3fb-200d-1f527","1f9d1-1f3fc-200d-1f527","1f9d1-1f3fd-200d-1f527","1f9d1-1f3fe-200d-1f527","1f9d1-1f3ff-200d-1f527"],a:"12.1"},{n:["man mechanic","male-mechanic"],u:"1f468-200d-1f527",v:["1f468-1f3fb-200d-1f527","1f468-1f3fc-200d-1f527","1f468-1f3fd-200d-1f527","1f468-1f3fe-200d-1f527","1f468-1f3ff-200d-1f527"],a:"4.0"},{n:["woman mechanic","female-mechanic"],u:"1f469-200d-1f527",v:["1f469-1f3fb-200d-1f527","1f469-1f3fc-200d-1f527","1f469-1f3fd-200d-1f527","1f469-1f3fe-200d-1f527","1f469-1f3ff-200d-1f527"],a:"4.0"},{n:["factory worker"],u:"1f9d1-200d-1f3ed",v:["1f9d1-1f3fb-200d-1f3ed","1f9d1-1f3fc-200d-1f3ed","1f9d1-1f3fd-200d-1f3ed","1f9d1-1f3fe-200d-1f3ed","1f9d1-1f3ff-200d-1f3ed"],a:"12.1"},{n:["man factory worker","male-factory-worker"],u:"1f468-200d-1f3ed",v:["1f468-1f3fb-200d-1f3ed","1f468-1f3fc-200d-1f3ed","1f468-1f3fd-200d-1f3ed","1f468-1f3fe-200d-1f3ed","1f468-1f3ff-200d-1f3ed"],a:"4.0"},{n:["woman factory worker","female-factory-worker"],u:"1f469-200d-1f3ed",v:["1f469-1f3fb-200d-1f3ed","1f469-1f3fc-200d-1f3ed","1f469-1f3fd-200d-1f3ed","1f469-1f3fe-200d-1f3ed","1f469-1f3ff-200d-1f3ed"],a:"4.0"},{n:["office worker"],u:"1f9d1-200d-1f4bc",v:["1f9d1-1f3fb-200d-1f4bc","1f9d1-1f3fc-200d-1f4bc","1f9d1-1f3fd-200d-1f4bc","1f9d1-1f3fe-200d-1f4bc","1f9d1-1f3ff-200d-1f4bc"],a:"12.1"},{n:["man office worker","male-office-worker"],u:"1f468-200d-1f4bc",v:["1f468-1f3fb-200d-1f4bc","1f468-1f3fc-200d-1f4bc","1f468-1f3fd-200d-1f4bc","1f468-1f3fe-200d-1f4bc","1f468-1f3ff-200d-1f4bc"],a:"4.0"},{n:["woman office worker","female-office-worker"],u:"1f469-200d-1f4bc",v:["1f469-1f3fb-200d-1f4bc","1f469-1f3fc-200d-1f4bc","1f469-1f3fd-200d-1f4bc","1f469-1f3fe-200d-1f4bc","1f469-1f3ff-200d-1f4bc"],a:"4.0"},{n:["scientist"],u:"1f9d1-200d-1f52c",v:["1f9d1-1f3fb-200d-1f52c","1f9d1-1f3fc-200d-1f52c","1f9d1-1f3fd-200d-1f52c","1f9d1-1f3fe-200d-1f52c","1f9d1-1f3ff-200d-1f52c"],a:"12.1"},{n:["man scientist","male-scientist"],u:"1f468-200d-1f52c",v:["1f468-1f3fb-200d-1f52c","1f468-1f3fc-200d-1f52c","1f468-1f3fd-200d-1f52c","1f468-1f3fe-200d-1f52c","1f468-1f3ff-200d-1f52c"],a:"4.0"},{n:["woman scientist","female-scientist"],u:"1f469-200d-1f52c",v:["1f469-1f3fb-200d-1f52c","1f469-1f3fc-200d-1f52c","1f469-1f3fd-200d-1f52c","1f469-1f3fe-200d-1f52c","1f469-1f3ff-200d-1f52c"],a:"4.0"},{n:["technologist"],u:"1f9d1-200d-1f4bb",v:["1f9d1-1f3fb-200d-1f4bb","1f9d1-1f3fc-200d-1f4bb","1f9d1-1f3fd-200d-1f4bb","1f9d1-1f3fe-200d-1f4bb","1f9d1-1f3ff-200d-1f4bb"],a:"12.1"},{n:["man technologist","male-technologist"],u:"1f468-200d-1f4bb",v:["1f468-1f3fb-200d-1f4bb","1f468-1f3fc-200d-1f4bb","1f468-1f3fd-200d-1f4bb","1f468-1f3fe-200d-1f4bb","1f468-1f3ff-200d-1f4bb"],a:"4.0"},{n:["woman technologist","female-technologist"],u:"1f469-200d-1f4bb",v:["1f469-1f3fb-200d-1f4bb","1f469-1f3fc-200d-1f4bb","1f469-1f3fd-200d-1f4bb","1f469-1f3fe-200d-1f4bb","1f469-1f3ff-200d-1f4bb"],a:"4.0"},{n:["singer"],u:"1f9d1-200d-1f3a4",v:["1f9d1-1f3fb-200d-1f3a4","1f9d1-1f3fc-200d-1f3a4","1f9d1-1f3fd-200d-1f3a4","1f9d1-1f3fe-200d-1f3a4","1f9d1-1f3ff-200d-1f3a4"],a:"12.1"},{n:["man singer","male-singer"],u:"1f468-200d-1f3a4",v:["1f468-1f3fb-200d-1f3a4","1f468-1f3fc-200d-1f3a4","1f468-1f3fd-200d-1f3a4","1f468-1f3fe-200d-1f3a4","1f468-1f3ff-200d-1f3a4"],a:"4.0"},{n:["woman singer","female-singer"],u:"1f469-200d-1f3a4",v:["1f469-1f3fb-200d-1f3a4","1f469-1f3fc-200d-1f3a4","1f469-1f3fd-200d-1f3a4","1f469-1f3fe-200d-1f3a4","1f469-1f3ff-200d-1f3a4"],a:"4.0"},{n:["artist"],u:"1f9d1-200d-1f3a8",v:["1f9d1-1f3fb-200d-1f3a8","1f9d1-1f3fc-200d-1f3a8","1f9d1-1f3fd-200d-1f3a8","1f9d1-1f3fe-200d-1f3a8","1f9d1-1f3ff-200d-1f3a8"],a:"12.1"},{n:["man artist","male-artist"],u:"1f468-200d-1f3a8",v:["1f468-1f3fb-200d-1f3a8","1f468-1f3fc-200d-1f3a8","1f468-1f3fd-200d-1f3a8","1f468-1f3fe-200d-1f3a8","1f468-1f3ff-200d-1f3a8"],a:"4.0"},{n:["woman artist","female-artist"],u:"1f469-200d-1f3a8",v:["1f469-1f3fb-200d-1f3a8","1f469-1f3fc-200d-1f3a8","1f469-1f3fd-200d-1f3a8","1f469-1f3fe-200d-1f3a8","1f469-1f3ff-200d-1f3a8"],a:"4.0"},{n:["pilot"],u:"1f9d1-200d-2708-fe0f",v:["1f9d1-1f3fb-200d-2708-fe0f","1f9d1-1f3fc-200d-2708-fe0f","1f9d1-1f3fd-200d-2708-fe0f","1f9d1-1f3fe-200d-2708-fe0f","1f9d1-1f3ff-200d-2708-fe0f"],a:"12.1"},{n:["man pilot","male-pilot"],u:"1f468-200d-2708-fe0f",v:["1f468-1f3fb-200d-2708-fe0f","1f468-1f3fc-200d-2708-fe0f","1f468-1f3fd-200d-2708-fe0f","1f468-1f3fe-200d-2708-fe0f","1f468-1f3ff-200d-2708-fe0f"],a:"4.0"},{n:["woman pilot","female-pilot"],u:"1f469-200d-2708-fe0f",v:["1f469-1f3fb-200d-2708-fe0f","1f469-1f3fc-200d-2708-fe0f","1f469-1f3fd-200d-2708-fe0f","1f469-1f3fe-200d-2708-fe0f","1f469-1f3ff-200d-2708-fe0f"],a:"4.0"},{n:["astronaut"],u:"1f9d1-200d-1f680",v:["1f9d1-1f3fb-200d-1f680","1f9d1-1f3fc-200d-1f680","1f9d1-1f3fd-200d-1f680","1f9d1-1f3fe-200d-1f680","1f9d1-1f3ff-200d-1f680"],a:"12.1"},{n:["man astronaut","male-astronaut"],u:"1f468-200d-1f680",v:["1f468-1f3fb-200d-1f680","1f468-1f3fc-200d-1f680","1f468-1f3fd-200d-1f680","1f468-1f3fe-200d-1f680","1f468-1f3ff-200d-1f680"],a:"4.0"},{n:["woman astronaut","female-astronaut"],u:"1f469-200d-1f680",v:["1f469-1f3fb-200d-1f680","1f469-1f3fc-200d-1f680","1f469-1f3fd-200d-1f680","1f469-1f3fe-200d-1f680","1f469-1f3ff-200d-1f680"],a:"4.0"},{n:["firefighter"],u:"1f9d1-200d-1f692",v:["1f9d1-1f3fb-200d-1f692","1f9d1-1f3fc-200d-1f692","1f9d1-1f3fd-200d-1f692","1f9d1-1f3fe-200d-1f692","1f9d1-1f3ff-200d-1f692"],a:"12.1"},{n:["man firefighter","male-firefighter"],u:"1f468-200d-1f692",v:["1f468-1f3fb-200d-1f692","1f468-1f3fc-200d-1f692","1f468-1f3fd-200d-1f692","1f468-1f3fe-200d-1f692","1f468-1f3ff-200d-1f692"],a:"4.0"},{n:["woman firefighter","female-firefighter"],u:"1f469-200d-1f692",v:["1f469-1f3fb-200d-1f692","1f469-1f3fc-200d-1f692","1f469-1f3fd-200d-1f692","1f469-1f3fe-200d-1f692","1f469-1f3ff-200d-1f692"],a:"4.0"},{n:["cop","police officer"],u:"1f46e",v:["1f46e-1f3fb","1f46e-1f3fc","1f46e-1f3fd","1f46e-1f3fe","1f46e-1f3ff"],a:"0.6"},{n:["man police officer","male-police-officer"],u:"1f46e-200d-2642-fe0f",v:["1f46e-1f3fb-200d-2642-fe0f","1f46e-1f3fc-200d-2642-fe0f","1f46e-1f3fd-200d-2642-fe0f","1f46e-1f3fe-200d-2642-fe0f","1f46e-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman police officer","female-police-officer"],u:"1f46e-200d-2640-fe0f",v:["1f46e-1f3fb-200d-2640-fe0f","1f46e-1f3fc-200d-2640-fe0f","1f46e-1f3fd-200d-2640-fe0f","1f46e-1f3fe-200d-2640-fe0f","1f46e-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["detective","sleuth or spy"],u:"1f575-fe0f",v:["1f575-1f3fb","1f575-1f3fc","1f575-1f3fd","1f575-1f3fe","1f575-1f3ff"],a:"0.7"},{n:["man detective","male-detective"],u:"1f575-fe0f-200d-2642-fe0f",v:["1f575-1f3fb-200d-2642-fe0f","1f575-1f3fc-200d-2642-fe0f","1f575-1f3fd-200d-2642-fe0f","1f575-1f3fe-200d-2642-fe0f","1f575-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman detective","female-detective"],u:"1f575-fe0f-200d-2640-fe0f",v:["1f575-1f3fb-200d-2640-fe0f","1f575-1f3fc-200d-2640-fe0f","1f575-1f3fd-200d-2640-fe0f","1f575-1f3fe-200d-2640-fe0f","1f575-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["guardsman"],u:"1f482",v:["1f482-1f3fb","1f482-1f3fc","1f482-1f3fd","1f482-1f3fe","1f482-1f3ff"],a:"0.6"},{n:["man guard","male-guard"],u:"1f482-200d-2642-fe0f",v:["1f482-1f3fb-200d-2642-fe0f","1f482-1f3fc-200d-2642-fe0f","1f482-1f3fd-200d-2642-fe0f","1f482-1f3fe-200d-2642-fe0f","1f482-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman guard","female-guard"],u:"1f482-200d-2640-fe0f",v:["1f482-1f3fb-200d-2640-fe0f","1f482-1f3fc-200d-2640-fe0f","1f482-1f3fd-200d-2640-fe0f","1f482-1f3fe-200d-2640-fe0f","1f482-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["ninja"],u:"1f977",v:["1f977-1f3fb","1f977-1f3fc","1f977-1f3fd","1f977-1f3fe","1f977-1f3ff"],a:"13.0"},{n:["construction worker"],u:"1f477",v:["1f477-1f3fb","1f477-1f3fc","1f477-1f3fd","1f477-1f3fe","1f477-1f3ff"],a:"0.6"},{n:["man construction worker","male-construction-worker"],u:"1f477-200d-2642-fe0f",v:["1f477-1f3fb-200d-2642-fe0f","1f477-1f3fc-200d-2642-fe0f","1f477-1f3fd-200d-2642-fe0f","1f477-1f3fe-200d-2642-fe0f","1f477-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman construction worker","female-construction-worker"],u:"1f477-200d-2640-fe0f",v:["1f477-1f3fb-200d-2640-fe0f","1f477-1f3fc-200d-2640-fe0f","1f477-1f3fd-200d-2640-fe0f","1f477-1f3fe-200d-2640-fe0f","1f477-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person with crown"],u:"1fac5",v:["1fac5-1f3fb","1fac5-1f3fc","1fac5-1f3fd","1fac5-1f3fe","1fac5-1f3ff"],a:"14.0"},{n:["prince"],u:"1f934",v:["1f934-1f3fb","1f934-1f3fc","1f934-1f3fd","1f934-1f3fe","1f934-1f3ff"],a:"3.0"},{n:["princess"],u:"1f478",v:["1f478-1f3fb","1f478-1f3fc","1f478-1f3fd","1f478-1f3fe","1f478-1f3ff"],a:"0.6"},{n:["man with turban"],u:"1f473",v:["1f473-1f3fb","1f473-1f3fc","1f473-1f3fd","1f473-1f3fe","1f473-1f3ff"],a:"0.6"},{n:["man wearing turban","man-wearing-turban"],u:"1f473-200d-2642-fe0f",v:["1f473-1f3fb-200d-2642-fe0f","1f473-1f3fc-200d-2642-fe0f","1f473-1f3fd-200d-2642-fe0f","1f473-1f3fe-200d-2642-fe0f","1f473-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman wearing turban","woman-wearing-turban"],u:"1f473-200d-2640-fe0f",v:["1f473-1f3fb-200d-2640-fe0f","1f473-1f3fc-200d-2640-fe0f","1f473-1f3fd-200d-2640-fe0f","1f473-1f3fe-200d-2640-fe0f","1f473-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["man with gua pi mao"],u:"1f472",v:["1f472-1f3fb","1f472-1f3fc","1f472-1f3fd","1f472-1f3fe","1f472-1f3ff"],a:"0.6"},{n:["person with headscarf"],u:"1f9d5",v:["1f9d5-1f3fb","1f9d5-1f3fc","1f9d5-1f3fd","1f9d5-1f3fe","1f9d5-1f3ff"],a:"5.0"},{n:["man in tuxedo","person in tuxedo"],u:"1f935",v:["1f935-1f3fb","1f935-1f3fc","1f935-1f3fd","1f935-1f3fe","1f935-1f3ff"],a:"3.0"},{n:["man in tuxedo"],u:"1f935-200d-2642-fe0f",v:["1f935-1f3fb-200d-2642-fe0f","1f935-1f3fc-200d-2642-fe0f","1f935-1f3fd-200d-2642-fe0f","1f935-1f3fe-200d-2642-fe0f","1f935-1f3ff-200d-2642-fe0f"],a:"13.0"},{n:["woman in tuxedo"],u:"1f935-200d-2640-fe0f",v:["1f935-1f3fb-200d-2640-fe0f","1f935-1f3fc-200d-2640-fe0f","1f935-1f3fd-200d-2640-fe0f","1f935-1f3fe-200d-2640-fe0f","1f935-1f3ff-200d-2640-fe0f"],a:"13.0"},{n:["bride with veil"],u:"1f470",v:["1f470-1f3fb","1f470-1f3fc","1f470-1f3fd","1f470-1f3fe","1f470-1f3ff"],a:"0.6"},{n:["man with veil"],u:"1f470-200d-2642-fe0f",v:["1f470-1f3fb-200d-2642-fe0f","1f470-1f3fc-200d-2642-fe0f","1f470-1f3fd-200d-2642-fe0f","1f470-1f3fe-200d-2642-fe0f","1f470-1f3ff-200d-2642-fe0f"],a:"13.0"},{n:["woman with veil"],u:"1f470-200d-2640-fe0f",v:["1f470-1f3fb-200d-2640-fe0f","1f470-1f3fc-200d-2640-fe0f","1f470-1f3fd-200d-2640-fe0f","1f470-1f3fe-200d-2640-fe0f","1f470-1f3ff-200d-2640-fe0f"],a:"13.0"},{n:["pregnant woman"],u:"1f930",v:["1f930-1f3fb","1f930-1f3fc","1f930-1f3fd","1f930-1f3fe","1f930-1f3ff"],a:"3.0"},{n:["pregnant man"],u:"1fac3",v:["1fac3-1f3fb","1fac3-1f3fc","1fac3-1f3fd","1fac3-1f3fe","1fac3-1f3ff"],a:"14.0"},{n:["pregnant person"],u:"1fac4",v:["1fac4-1f3fb","1fac4-1f3fc","1fac4-1f3fd","1fac4-1f3fe","1fac4-1f3ff"],a:"14.0"},{n:["breast-feeding"],u:"1f931",v:["1f931-1f3fb","1f931-1f3fc","1f931-1f3fd","1f931-1f3fe","1f931-1f3ff"],a:"5.0"},{n:["woman feeding baby"],u:"1f469-200d-1f37c",v:["1f469-1f3fb-200d-1f37c","1f469-1f3fc-200d-1f37c","1f469-1f3fd-200d-1f37c","1f469-1f3fe-200d-1f37c","1f469-1f3ff-200d-1f37c"],a:"13.0"},{n:["man feeding baby"],u:"1f468-200d-1f37c",v:["1f468-1f3fb-200d-1f37c","1f468-1f3fc-200d-1f37c","1f468-1f3fd-200d-1f37c","1f468-1f3fe-200d-1f37c","1f468-1f3ff-200d-1f37c"],a:"13.0"},{n:["person feeding baby"],u:"1f9d1-200d-1f37c",v:["1f9d1-1f3fb-200d-1f37c","1f9d1-1f3fc-200d-1f37c","1f9d1-1f3fd-200d-1f37c","1f9d1-1f3fe-200d-1f37c","1f9d1-1f3ff-200d-1f37c"],a:"13.0"},{n:["angel","baby angel"],u:"1f47c",v:["1f47c-1f3fb","1f47c-1f3fc","1f47c-1f3fd","1f47c-1f3fe","1f47c-1f3ff"],a:"0.6"},{n:["santa","father christmas"],u:"1f385",v:["1f385-1f3fb","1f385-1f3fc","1f385-1f3fd","1f385-1f3fe","1f385-1f3ff"],a:"0.6"},{n:["mrs claus","mother christmas"],u:"1f936",v:["1f936-1f3fb","1f936-1f3fc","1f936-1f3fd","1f936-1f3fe","1f936-1f3ff"],a:"3.0"},{n:["mx claus"],u:"1f9d1-200d-1f384",v:["1f9d1-1f3fb-200d-1f384","1f9d1-1f3fc-200d-1f384","1f9d1-1f3fd-200d-1f384","1f9d1-1f3fe-200d-1f384","1f9d1-1f3ff-200d-1f384"],a:"13.0"},{n:["superhero"],u:"1f9b8",v:["1f9b8-1f3fb","1f9b8-1f3fc","1f9b8-1f3fd","1f9b8-1f3fe","1f9b8-1f3ff"],a:"11.0"},{n:["man superhero","male superhero"],u:"1f9b8-200d-2642-fe0f",v:["1f9b8-1f3fb-200d-2642-fe0f","1f9b8-1f3fc-200d-2642-fe0f","1f9b8-1f3fd-200d-2642-fe0f","1f9b8-1f3fe-200d-2642-fe0f","1f9b8-1f3ff-200d-2642-fe0f"],a:"11.0"},{n:["woman superhero","female superhero"],u:"1f9b8-200d-2640-fe0f",v:["1f9b8-1f3fb-200d-2640-fe0f","1f9b8-1f3fc-200d-2640-fe0f","1f9b8-1f3fd-200d-2640-fe0f","1f9b8-1f3fe-200d-2640-fe0f","1f9b8-1f3ff-200d-2640-fe0f"],a:"11.0"},{n:["supervillain"],u:"1f9b9",v:["1f9b9-1f3fb","1f9b9-1f3fc","1f9b9-1f3fd","1f9b9-1f3fe","1f9b9-1f3ff"],a:"11.0"},{n:["man supervillain","male supervillain"],u:"1f9b9-200d-2642-fe0f",v:["1f9b9-1f3fb-200d-2642-fe0f","1f9b9-1f3fc-200d-2642-fe0f","1f9b9-1f3fd-200d-2642-fe0f","1f9b9-1f3fe-200d-2642-fe0f","1f9b9-1f3ff-200d-2642-fe0f"],a:"11.0"},{n:["woman supervillain","female supervillain"],u:"1f9b9-200d-2640-fe0f",v:["1f9b9-1f3fb-200d-2640-fe0f","1f9b9-1f3fc-200d-2640-fe0f","1f9b9-1f3fd-200d-2640-fe0f","1f9b9-1f3fe-200d-2640-fe0f","1f9b9-1f3ff-200d-2640-fe0f"],a:"11.0"},{n:["mage"],u:"1f9d9",v:["1f9d9-1f3fb","1f9d9-1f3fc","1f9d9-1f3fd","1f9d9-1f3fe","1f9d9-1f3ff"],a:"5.0"},{n:["man mage","male mage"],u:"1f9d9-200d-2642-fe0f",v:["1f9d9-1f3fb-200d-2642-fe0f","1f9d9-1f3fc-200d-2642-fe0f","1f9d9-1f3fd-200d-2642-fe0f","1f9d9-1f3fe-200d-2642-fe0f","1f9d9-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman mage","female mage"],u:"1f9d9-200d-2640-fe0f",v:["1f9d9-1f3fb-200d-2640-fe0f","1f9d9-1f3fc-200d-2640-fe0f","1f9d9-1f3fd-200d-2640-fe0f","1f9d9-1f3fe-200d-2640-fe0f","1f9d9-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["fairy"],u:"1f9da",v:["1f9da-1f3fb","1f9da-1f3fc","1f9da-1f3fd","1f9da-1f3fe","1f9da-1f3ff"],a:"5.0"},{n:["man fairy","male fairy"],u:"1f9da-200d-2642-fe0f",v:["1f9da-1f3fb-200d-2642-fe0f","1f9da-1f3fc-200d-2642-fe0f","1f9da-1f3fd-200d-2642-fe0f","1f9da-1f3fe-200d-2642-fe0f","1f9da-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman fairy","female fairy"],u:"1f9da-200d-2640-fe0f",v:["1f9da-1f3fb-200d-2640-fe0f","1f9da-1f3fc-200d-2640-fe0f","1f9da-1f3fd-200d-2640-fe0f","1f9da-1f3fe-200d-2640-fe0f","1f9da-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["vampire"],u:"1f9db",v:["1f9db-1f3fb","1f9db-1f3fc","1f9db-1f3fd","1f9db-1f3fe","1f9db-1f3ff"],a:"5.0"},{n:["man vampire","male vampire"],u:"1f9db-200d-2642-fe0f",v:["1f9db-1f3fb-200d-2642-fe0f","1f9db-1f3fc-200d-2642-fe0f","1f9db-1f3fd-200d-2642-fe0f","1f9db-1f3fe-200d-2642-fe0f","1f9db-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman vampire","female vampire"],u:"1f9db-200d-2640-fe0f",v:["1f9db-1f3fb-200d-2640-fe0f","1f9db-1f3fc-200d-2640-fe0f","1f9db-1f3fd-200d-2640-fe0f","1f9db-1f3fe-200d-2640-fe0f","1f9db-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["merperson"],u:"1f9dc",v:["1f9dc-1f3fb","1f9dc-1f3fc","1f9dc-1f3fd","1f9dc-1f3fe","1f9dc-1f3ff"],a:"5.0"},{n:["merman"],u:"1f9dc-200d-2642-fe0f",v:["1f9dc-1f3fb-200d-2642-fe0f","1f9dc-1f3fc-200d-2642-fe0f","1f9dc-1f3fd-200d-2642-fe0f","1f9dc-1f3fe-200d-2642-fe0f","1f9dc-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["mermaid"],u:"1f9dc-200d-2640-fe0f",v:["1f9dc-1f3fb-200d-2640-fe0f","1f9dc-1f3fc-200d-2640-fe0f","1f9dc-1f3fd-200d-2640-fe0f","1f9dc-1f3fe-200d-2640-fe0f","1f9dc-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["elf"],u:"1f9dd",v:["1f9dd-1f3fb","1f9dd-1f3fc","1f9dd-1f3fd","1f9dd-1f3fe","1f9dd-1f3ff"],a:"5.0"},{n:["man elf","male elf"],u:"1f9dd-200d-2642-fe0f",v:["1f9dd-1f3fb-200d-2642-fe0f","1f9dd-1f3fc-200d-2642-fe0f","1f9dd-1f3fd-200d-2642-fe0f","1f9dd-1f3fe-200d-2642-fe0f","1f9dd-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman elf","female elf"],u:"1f9dd-200d-2640-fe0f",v:["1f9dd-1f3fb-200d-2640-fe0f","1f9dd-1f3fc-200d-2640-fe0f","1f9dd-1f3fd-200d-2640-fe0f","1f9dd-1f3fe-200d-2640-fe0f","1f9dd-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["genie"],u:"1f9de",a:"5.0"},{n:["man genie","male genie"],u:"1f9de-200d-2642-fe0f",a:"5.0"},{n:["woman genie","female genie"],u:"1f9de-200d-2640-fe0f",a:"5.0"},{n:["zombie"],u:"1f9df",a:"5.0"},{n:["man zombie","male zombie"],u:"1f9df-200d-2642-fe0f",a:"5.0"},{n:["woman zombie","female zombie"],u:"1f9df-200d-2640-fe0f",a:"5.0"},{n:["troll"],u:"1f9cc",a:"14.0"},{n:["massage","face massage"],u:"1f486",v:["1f486-1f3fb","1f486-1f3fc","1f486-1f3fd","1f486-1f3fe","1f486-1f3ff"],a:"0.6"},{n:["man getting massage","man-getting-massage"],u:"1f486-200d-2642-fe0f",v:["1f486-1f3fb-200d-2642-fe0f","1f486-1f3fc-200d-2642-fe0f","1f486-1f3fd-200d-2642-fe0f","1f486-1f3fe-200d-2642-fe0f","1f486-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman getting massage","woman-getting-massage"],u:"1f486-200d-2640-fe0f",v:["1f486-1f3fb-200d-2640-fe0f","1f486-1f3fc-200d-2640-fe0f","1f486-1f3fd-200d-2640-fe0f","1f486-1f3fe-200d-2640-fe0f","1f486-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["haircut"],u:"1f487",v:["1f487-1f3fb","1f487-1f3fc","1f487-1f3fd","1f487-1f3fe","1f487-1f3ff"],a:"0.6"},{n:["man getting haircut","man-getting-haircut"],u:"1f487-200d-2642-fe0f",v:["1f487-1f3fb-200d-2642-fe0f","1f487-1f3fc-200d-2642-fe0f","1f487-1f3fd-200d-2642-fe0f","1f487-1f3fe-200d-2642-fe0f","1f487-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman getting haircut","woman-getting-haircut"],u:"1f487-200d-2640-fe0f",v:["1f487-1f3fb-200d-2640-fe0f","1f487-1f3fc-200d-2640-fe0f","1f487-1f3fd-200d-2640-fe0f","1f487-1f3fe-200d-2640-fe0f","1f487-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["walking","pedestrian"],u:"1f6b6",v:["1f6b6-1f3fb","1f6b6-1f3fc","1f6b6-1f3fd","1f6b6-1f3fe","1f6b6-1f3ff"],a:"0.6"},{n:["man walking","man-walking"],u:"1f6b6-200d-2642-fe0f",v:["1f6b6-1f3fb-200d-2642-fe0f","1f6b6-1f3fc-200d-2642-fe0f","1f6b6-1f3fd-200d-2642-fe0f","1f6b6-1f3fe-200d-2642-fe0f","1f6b6-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman walking","woman-walking"],u:"1f6b6-200d-2640-fe0f",v:["1f6b6-1f3fb-200d-2640-fe0f","1f6b6-1f3fc-200d-2640-fe0f","1f6b6-1f3fd-200d-2640-fe0f","1f6b6-1f3fe-200d-2640-fe0f","1f6b6-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["standing person"],u:"1f9cd",v:["1f9cd-1f3fb","1f9cd-1f3fc","1f9cd-1f3fd","1f9cd-1f3fe","1f9cd-1f3ff"],a:"12.0"},{n:["man standing"],u:"1f9cd-200d-2642-fe0f",v:["1f9cd-1f3fb-200d-2642-fe0f","1f9cd-1f3fc-200d-2642-fe0f","1f9cd-1f3fd-200d-2642-fe0f","1f9cd-1f3fe-200d-2642-fe0f","1f9cd-1f3ff-200d-2642-fe0f"],a:"12.0"},{n:["woman standing"],u:"1f9cd-200d-2640-fe0f",v:["1f9cd-1f3fb-200d-2640-fe0f","1f9cd-1f3fc-200d-2640-fe0f","1f9cd-1f3fd-200d-2640-fe0f","1f9cd-1f3fe-200d-2640-fe0f","1f9cd-1f3ff-200d-2640-fe0f"],a:"12.0"},{n:["kneeling person"],u:"1f9ce",v:["1f9ce-1f3fb","1f9ce-1f3fc","1f9ce-1f3fd","1f9ce-1f3fe","1f9ce-1f3ff"],a:"12.0"},{n:["man kneeling"],u:"1f9ce-200d-2642-fe0f",v:["1f9ce-1f3fb-200d-2642-fe0f","1f9ce-1f3fc-200d-2642-fe0f","1f9ce-1f3fd-200d-2642-fe0f","1f9ce-1f3fe-200d-2642-fe0f","1f9ce-1f3ff-200d-2642-fe0f"],a:"12.0"},{n:["woman kneeling"],u:"1f9ce-200d-2640-fe0f",v:["1f9ce-1f3fb-200d-2640-fe0f","1f9ce-1f3fc-200d-2640-fe0f","1f9ce-1f3fd-200d-2640-fe0f","1f9ce-1f3fe-200d-2640-fe0f","1f9ce-1f3ff-200d-2640-fe0f"],a:"12.0"},{n:["person with white cane","person with probing cane"],u:"1f9d1-200d-1f9af",v:["1f9d1-1f3fb-200d-1f9af","1f9d1-1f3fc-200d-1f9af","1f9d1-1f3fd-200d-1f9af","1f9d1-1f3fe-200d-1f9af","1f9d1-1f3ff-200d-1f9af"],a:"12.1"},{n:["man with white cane","man with probing cane"],u:"1f468-200d-1f9af",v:["1f468-1f3fb-200d-1f9af","1f468-1f3fc-200d-1f9af","1f468-1f3fd-200d-1f9af","1f468-1f3fe-200d-1f9af","1f468-1f3ff-200d-1f9af"],a:"12.0"},{n:["woman with white cane","woman with probing cane"],u:"1f469-200d-1f9af",v:["1f469-1f3fb-200d-1f9af","1f469-1f3fc-200d-1f9af","1f469-1f3fd-200d-1f9af","1f469-1f3fe-200d-1f9af","1f469-1f3ff-200d-1f9af"],a:"12.0"},{n:["person in motorized wheelchair"],u:"1f9d1-200d-1f9bc",v:["1f9d1-1f3fb-200d-1f9bc","1f9d1-1f3fc-200d-1f9bc","1f9d1-1f3fd-200d-1f9bc","1f9d1-1f3fe-200d-1f9bc","1f9d1-1f3ff-200d-1f9bc"],a:"12.1"},{n:["man in motorized wheelchair"],u:"1f468-200d-1f9bc",v:["1f468-1f3fb-200d-1f9bc","1f468-1f3fc-200d-1f9bc","1f468-1f3fd-200d-1f9bc","1f468-1f3fe-200d-1f9bc","1f468-1f3ff-200d-1f9bc"],a:"12.0"},{n:["woman in motorized wheelchair"],u:"1f469-200d-1f9bc",v:["1f469-1f3fb-200d-1f9bc","1f469-1f3fc-200d-1f9bc","1f469-1f3fd-200d-1f9bc","1f469-1f3fe-200d-1f9bc","1f469-1f3ff-200d-1f9bc"],a:"12.0"},{n:["person in manual wheelchair"],u:"1f9d1-200d-1f9bd",v:["1f9d1-1f3fb-200d-1f9bd","1f9d1-1f3fc-200d-1f9bd","1f9d1-1f3fd-200d-1f9bd","1f9d1-1f3fe-200d-1f9bd","1f9d1-1f3ff-200d-1f9bd"],a:"12.1"},{n:["man in manual wheelchair"],u:"1f468-200d-1f9bd",v:["1f468-1f3fb-200d-1f9bd","1f468-1f3fc-200d-1f9bd","1f468-1f3fd-200d-1f9bd","1f468-1f3fe-200d-1f9bd","1f468-1f3ff-200d-1f9bd"],a:"12.0"},{n:["woman in manual wheelchair"],u:"1f469-200d-1f9bd",v:["1f469-1f3fb-200d-1f9bd","1f469-1f3fc-200d-1f9bd","1f469-1f3fd-200d-1f9bd","1f469-1f3fe-200d-1f9bd","1f469-1f3ff-200d-1f9bd"],a:"12.0"},{n:["runner","running"],u:"1f3c3",v:["1f3c3-1f3fb","1f3c3-1f3fc","1f3c3-1f3fd","1f3c3-1f3fe","1f3c3-1f3ff"],a:"0.6"},{n:["man running","man-running"],u:"1f3c3-200d-2642-fe0f",v:["1f3c3-1f3fb-200d-2642-fe0f","1f3c3-1f3fc-200d-2642-fe0f","1f3c3-1f3fd-200d-2642-fe0f","1f3c3-1f3fe-200d-2642-fe0f","1f3c3-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman running","woman-running"],u:"1f3c3-200d-2640-fe0f",v:["1f3c3-1f3fb-200d-2640-fe0f","1f3c3-1f3fc-200d-2640-fe0f","1f3c3-1f3fd-200d-2640-fe0f","1f3c3-1f3fe-200d-2640-fe0f","1f3c3-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["dancer"],u:"1f483",v:["1f483-1f3fb","1f483-1f3fc","1f483-1f3fd","1f483-1f3fe","1f483-1f3ff"],a:"0.6"},{n:["man dancing"],u:"1f57a",v:["1f57a-1f3fb","1f57a-1f3fc","1f57a-1f3fd","1f57a-1f3fe","1f57a-1f3ff"],a:"3.0"},{n:["person in suit levitating","man in business suit levitating"],u:"1f574-fe0f",v:["1f574-1f3fb","1f574-1f3fc","1f574-1f3fd","1f574-1f3fe","1f574-1f3ff"],a:"0.7"},{n:["dancers","woman with bunny ears"],u:"1f46f",a:"0.6"},{n:["men with bunny ears","men-with-bunny-ears-partying","man-with-bunny-ears-partying"],u:"1f46f-200d-2642-fe0f",a:"4.0"},{n:["women with bunny ears","women-with-bunny-ears-partying","woman-with-bunny-ears-partying"],u:"1f46f-200d-2640-fe0f",a:"4.0"},{n:["person in steamy room"],u:"1f9d6",v:["1f9d6-1f3fb","1f9d6-1f3fc","1f9d6-1f3fd","1f9d6-1f3fe","1f9d6-1f3ff"],a:"5.0"},{n:["man in steamy room"],u:"1f9d6-200d-2642-fe0f",v:["1f9d6-1f3fb-200d-2642-fe0f","1f9d6-1f3fc-200d-2642-fe0f","1f9d6-1f3fd-200d-2642-fe0f","1f9d6-1f3fe-200d-2642-fe0f","1f9d6-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman in steamy room"],u:"1f9d6-200d-2640-fe0f",v:["1f9d6-1f3fb-200d-2640-fe0f","1f9d6-1f3fc-200d-2640-fe0f","1f9d6-1f3fd-200d-2640-fe0f","1f9d6-1f3fe-200d-2640-fe0f","1f9d6-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["person climbing"],u:"1f9d7",v:["1f9d7-1f3fb","1f9d7-1f3fc","1f9d7-1f3fd","1f9d7-1f3fe","1f9d7-1f3ff"],a:"5.0"},{n:["man climbing"],u:"1f9d7-200d-2642-fe0f",v:["1f9d7-1f3fb-200d-2642-fe0f","1f9d7-1f3fc-200d-2642-fe0f","1f9d7-1f3fd-200d-2642-fe0f","1f9d7-1f3fe-200d-2642-fe0f","1f9d7-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman climbing"],u:"1f9d7-200d-2640-fe0f",v:["1f9d7-1f3fb-200d-2640-fe0f","1f9d7-1f3fc-200d-2640-fe0f","1f9d7-1f3fd-200d-2640-fe0f","1f9d7-1f3fe-200d-2640-fe0f","1f9d7-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["fencer"],u:"1f93a",a:"3.0"},{n:["horse racing"],u:"1f3c7",v:["1f3c7-1f3fb","1f3c7-1f3fc","1f3c7-1f3fd","1f3c7-1f3fe","1f3c7-1f3ff"],a:"1.0"},{n:["skier"],u:"26f7-fe0f",a:"0.7"},{n:["snowboarder"],u:"1f3c2",v:["1f3c2-1f3fb","1f3c2-1f3fc","1f3c2-1f3fd","1f3c2-1f3fe","1f3c2-1f3ff"],a:"0.6"},{n:["golfer","person golfing"],u:"1f3cc-fe0f",v:["1f3cc-1f3fb","1f3cc-1f3fc","1f3cc-1f3fd","1f3cc-1f3fe","1f3cc-1f3ff"],a:"0.7"},{n:["man golfing","man-golfing"],u:"1f3cc-fe0f-200d-2642-fe0f",v:["1f3cc-1f3fb-200d-2642-fe0f","1f3cc-1f3fc-200d-2642-fe0f","1f3cc-1f3fd-200d-2642-fe0f","1f3cc-1f3fe-200d-2642-fe0f","1f3cc-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman golfing","woman-golfing"],u:"1f3cc-fe0f-200d-2640-fe0f",v:["1f3cc-1f3fb-200d-2640-fe0f","1f3cc-1f3fc-200d-2640-fe0f","1f3cc-1f3fd-200d-2640-fe0f","1f3cc-1f3fe-200d-2640-fe0f","1f3cc-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["surfer"],u:"1f3c4",v:["1f3c4-1f3fb","1f3c4-1f3fc","1f3c4-1f3fd","1f3c4-1f3fe","1f3c4-1f3ff"],a:"0.6"},{n:["man surfing","man-surfing"],u:"1f3c4-200d-2642-fe0f",v:["1f3c4-1f3fb-200d-2642-fe0f","1f3c4-1f3fc-200d-2642-fe0f","1f3c4-1f3fd-200d-2642-fe0f","1f3c4-1f3fe-200d-2642-fe0f","1f3c4-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman surfing","woman-surfing"],u:"1f3c4-200d-2640-fe0f",v:["1f3c4-1f3fb-200d-2640-fe0f","1f3c4-1f3fc-200d-2640-fe0f","1f3c4-1f3fd-200d-2640-fe0f","1f3c4-1f3fe-200d-2640-fe0f","1f3c4-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["rowboat"],u:"1f6a3",v:["1f6a3-1f3fb","1f6a3-1f3fc","1f6a3-1f3fd","1f6a3-1f3fe","1f6a3-1f3ff"],a:"1.0"},{n:["man rowing boat","man-rowing-boat"],u:"1f6a3-200d-2642-fe0f",v:["1f6a3-1f3fb-200d-2642-fe0f","1f6a3-1f3fc-200d-2642-fe0f","1f6a3-1f3fd-200d-2642-fe0f","1f6a3-1f3fe-200d-2642-fe0f","1f6a3-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman rowing boat","woman-rowing-boat"],u:"1f6a3-200d-2640-fe0f",v:["1f6a3-1f3fb-200d-2640-fe0f","1f6a3-1f3fc-200d-2640-fe0f","1f6a3-1f3fd-200d-2640-fe0f","1f6a3-1f3fe-200d-2640-fe0f","1f6a3-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["swimmer"],u:"1f3ca",v:["1f3ca-1f3fb","1f3ca-1f3fc","1f3ca-1f3fd","1f3ca-1f3fe","1f3ca-1f3ff"],a:"0.6"},{n:["man swimming","man-swimming"],u:"1f3ca-200d-2642-fe0f",v:["1f3ca-1f3fb-200d-2642-fe0f","1f3ca-1f3fc-200d-2642-fe0f","1f3ca-1f3fd-200d-2642-fe0f","1f3ca-1f3fe-200d-2642-fe0f","1f3ca-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman swimming","woman-swimming"],u:"1f3ca-200d-2640-fe0f",v:["1f3ca-1f3fb-200d-2640-fe0f","1f3ca-1f3fc-200d-2640-fe0f","1f3ca-1f3fd-200d-2640-fe0f","1f3ca-1f3fe-200d-2640-fe0f","1f3ca-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person with ball","person bouncing ball"],u:"26f9-fe0f",v:["26f9-1f3fb","26f9-1f3fc","26f9-1f3fd","26f9-1f3fe","26f9-1f3ff"],a:"0.7"},{n:["man bouncing ball","man-bouncing-ball"],u:"26f9-fe0f-200d-2642-fe0f",v:["26f9-1f3fb-200d-2642-fe0f","26f9-1f3fc-200d-2642-fe0f","26f9-1f3fd-200d-2642-fe0f","26f9-1f3fe-200d-2642-fe0f","26f9-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman bouncing ball","woman-bouncing-ball"],u:"26f9-fe0f-200d-2640-fe0f",v:["26f9-1f3fb-200d-2640-fe0f","26f9-1f3fc-200d-2640-fe0f","26f9-1f3fd-200d-2640-fe0f","26f9-1f3fe-200d-2640-fe0f","26f9-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["weight lifter","person lifting weights"],u:"1f3cb-fe0f",v:["1f3cb-1f3fb","1f3cb-1f3fc","1f3cb-1f3fd","1f3cb-1f3fe","1f3cb-1f3ff"],a:"0.7"},{n:["man lifting weights","man-lifting-weights"],u:"1f3cb-fe0f-200d-2642-fe0f",v:["1f3cb-1f3fb-200d-2642-fe0f","1f3cb-1f3fc-200d-2642-fe0f","1f3cb-1f3fd-200d-2642-fe0f","1f3cb-1f3fe-200d-2642-fe0f","1f3cb-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman lifting weights","woman-lifting-weights"],u:"1f3cb-fe0f-200d-2640-fe0f",v:["1f3cb-1f3fb-200d-2640-fe0f","1f3cb-1f3fc-200d-2640-fe0f","1f3cb-1f3fd-200d-2640-fe0f","1f3cb-1f3fe-200d-2640-fe0f","1f3cb-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["bicyclist"],u:"1f6b4",v:["1f6b4-1f3fb","1f6b4-1f3fc","1f6b4-1f3fd","1f6b4-1f3fe","1f6b4-1f3ff"],a:"1.0"},{n:["man biking","man-biking"],u:"1f6b4-200d-2642-fe0f",v:["1f6b4-1f3fb-200d-2642-fe0f","1f6b4-1f3fc-200d-2642-fe0f","1f6b4-1f3fd-200d-2642-fe0f","1f6b4-1f3fe-200d-2642-fe0f","1f6b4-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman biking","woman-biking"],u:"1f6b4-200d-2640-fe0f",v:["1f6b4-1f3fb-200d-2640-fe0f","1f6b4-1f3fc-200d-2640-fe0f","1f6b4-1f3fd-200d-2640-fe0f","1f6b4-1f3fe-200d-2640-fe0f","1f6b4-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["mountain bicyclist"],u:"1f6b5",v:["1f6b5-1f3fb","1f6b5-1f3fc","1f6b5-1f3fd","1f6b5-1f3fe","1f6b5-1f3ff"],a:"1.0"},{n:["man mountain biking","man-mountain-biking"],u:"1f6b5-200d-2642-fe0f",v:["1f6b5-1f3fb-200d-2642-fe0f","1f6b5-1f3fc-200d-2642-fe0f","1f6b5-1f3fd-200d-2642-fe0f","1f6b5-1f3fe-200d-2642-fe0f","1f6b5-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman mountain biking","woman-mountain-biking"],u:"1f6b5-200d-2640-fe0f",v:["1f6b5-1f3fb-200d-2640-fe0f","1f6b5-1f3fc-200d-2640-fe0f","1f6b5-1f3fd-200d-2640-fe0f","1f6b5-1f3fe-200d-2640-fe0f","1f6b5-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person doing cartwheel"],u:"1f938",v:["1f938-1f3fb","1f938-1f3fc","1f938-1f3fd","1f938-1f3fe","1f938-1f3ff"],a:"3.0"},{n:["man cartwheeling","man-cartwheeling"],u:"1f938-200d-2642-fe0f",v:["1f938-1f3fb-200d-2642-fe0f","1f938-1f3fc-200d-2642-fe0f","1f938-1f3fd-200d-2642-fe0f","1f938-1f3fe-200d-2642-fe0f","1f938-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman cartwheeling","woman-cartwheeling"],u:"1f938-200d-2640-fe0f",v:["1f938-1f3fb-200d-2640-fe0f","1f938-1f3fc-200d-2640-fe0f","1f938-1f3fd-200d-2640-fe0f","1f938-1f3fe-200d-2640-fe0f","1f938-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["wrestlers"],u:"1f93c",a:"3.0"},{n:["men wrestling","man-wrestling"],u:"1f93c-200d-2642-fe0f",a:"4.0"},{n:["women wrestling","woman-wrestling"],u:"1f93c-200d-2640-fe0f",a:"4.0"},{n:["water polo"],u:"1f93d",v:["1f93d-1f3fb","1f93d-1f3fc","1f93d-1f3fd","1f93d-1f3fe","1f93d-1f3ff"],a:"3.0"},{n:["man playing water polo","man-playing-water-polo"],u:"1f93d-200d-2642-fe0f",v:["1f93d-1f3fb-200d-2642-fe0f","1f93d-1f3fc-200d-2642-fe0f","1f93d-1f3fd-200d-2642-fe0f","1f93d-1f3fe-200d-2642-fe0f","1f93d-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman playing water polo","woman-playing-water-polo"],u:"1f93d-200d-2640-fe0f",v:["1f93d-1f3fb-200d-2640-fe0f","1f93d-1f3fc-200d-2640-fe0f","1f93d-1f3fd-200d-2640-fe0f","1f93d-1f3fe-200d-2640-fe0f","1f93d-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["handball"],u:"1f93e",v:["1f93e-1f3fb","1f93e-1f3fc","1f93e-1f3fd","1f93e-1f3fe","1f93e-1f3ff"],a:"3.0"},{n:["man playing handball","man-playing-handball"],u:"1f93e-200d-2642-fe0f",v:["1f93e-1f3fb-200d-2642-fe0f","1f93e-1f3fc-200d-2642-fe0f","1f93e-1f3fd-200d-2642-fe0f","1f93e-1f3fe-200d-2642-fe0f","1f93e-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman playing handball","woman-playing-handball"],u:"1f93e-200d-2640-fe0f",v:["1f93e-1f3fb-200d-2640-fe0f","1f93e-1f3fc-200d-2640-fe0f","1f93e-1f3fd-200d-2640-fe0f","1f93e-1f3fe-200d-2640-fe0f","1f93e-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["juggling"],u:"1f939",v:["1f939-1f3fb","1f939-1f3fc","1f939-1f3fd","1f939-1f3fe","1f939-1f3ff"],a:"3.0"},{n:["man juggling","man-juggling"],u:"1f939-200d-2642-fe0f",v:["1f939-1f3fb-200d-2642-fe0f","1f939-1f3fc-200d-2642-fe0f","1f939-1f3fd-200d-2642-fe0f","1f939-1f3fe-200d-2642-fe0f","1f939-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman juggling","woman-juggling"],u:"1f939-200d-2640-fe0f",v:["1f939-1f3fb-200d-2640-fe0f","1f939-1f3fc-200d-2640-fe0f","1f939-1f3fd-200d-2640-fe0f","1f939-1f3fe-200d-2640-fe0f","1f939-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person in lotus position"],u:"1f9d8",v:["1f9d8-1f3fb","1f9d8-1f3fc","1f9d8-1f3fd","1f9d8-1f3fe","1f9d8-1f3ff"],a:"5.0"},{n:["man in lotus position"],u:"1f9d8-200d-2642-fe0f",v:["1f9d8-1f3fb-200d-2642-fe0f","1f9d8-1f3fc-200d-2642-fe0f","1f9d8-1f3fd-200d-2642-fe0f","1f9d8-1f3fe-200d-2642-fe0f","1f9d8-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman in lotus position"],u:"1f9d8-200d-2640-fe0f",v:["1f9d8-1f3fb-200d-2640-fe0f","1f9d8-1f3fc-200d-2640-fe0f","1f9d8-1f3fd-200d-2640-fe0f","1f9d8-1f3fe-200d-2640-fe0f","1f9d8-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["bath"],u:"1f6c0",v:["1f6c0-1f3fb","1f6c0-1f3fc","1f6c0-1f3fd","1f6c0-1f3fe","1f6c0-1f3ff"],a:"0.6"},{n:["sleeping accommodation"],u:"1f6cc",v:["1f6cc-1f3fb","1f6cc-1f3fc","1f6cc-1f3fd","1f6cc-1f3fe","1f6cc-1f3ff"],a:"1.0"},{n:["people holding hands"],u:"1f9d1-200d-1f91d-200d-1f9d1",v:["1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff"],a:"12.0"},{n:["women holding hands","two women holding hands"],u:"1f46d",v:["1f46d-1f3fb","1f46d-1f3fc","1f46d-1f3fd","1f46d-1f3fe","1f46d-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe"],a:"1.0"},{n:["couple","man and woman holding hands","woman and man holding hands"],u:"1f46b",v:["1f46b-1f3fb","1f46b-1f3fc","1f46b-1f3fd","1f46b-1f3fe","1f46b-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe"],a:"0.6"},{n:["men holding hands","two men holding hands"],u:"1f46c",v:["1f46c-1f3fb","1f46c-1f3fc","1f46c-1f3fd","1f46c-1f3fe","1f46c-1f3ff","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe"],a:"1.0"},{n:["kiss","couplekiss"],u:"1f48f",v:["1f48f-1f3fb","1f48f-1f3fc","1f48f-1f3fd","1f48f-1f3fe","1f48f-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe"],a:"0.6"},{n:["woman-kiss-man","kiss: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"],a:"2.0"},{n:["man-kiss-man","kiss: man, man"],u:"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"],a:"2.0"},{n:["woman-kiss-woman","kiss: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff"],a:"2.0"},{n:["couple with heart"],u:"1f491",v:["1f491-1f3fb","1f491-1f3fc","1f491-1f3fd","1f491-1f3fe","1f491-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fe"],a:"0.6"},{n:["woman-heart-man","couple with heart: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"],a:"2.0"},{n:["man-heart-man","couple with heart: man, man"],u:"1f468-200d-2764-fe0f-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"],a:"2.0"},{n:["woman-heart-woman","couple with heart: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3ff"],a:"2.0"},{n:["family"],u:"1f46a",a:"0.6"},{n:["man-woman-boy","family: man, woman, boy"],u:"1f468-200d-1f469-200d-1f466",a:"2.0"},{n:["man-woman-girl","family: man, woman, girl"],u:"1f468-200d-1f469-200d-1f467",a:"2.0"},{n:["man-woman-girl-boy","family: man, woman, girl, boy"],u:"1f468-200d-1f469-200d-1f467-200d-1f466",a:"2.0"},{n:["man-woman-boy-boy","family: man, woman, boy, boy"],u:"1f468-200d-1f469-200d-1f466-200d-1f466",a:"2.0"},{n:["man-woman-girl-girl","family: man, woman, girl, girl"],u:"1f468-200d-1f469-200d-1f467-200d-1f467",a:"2.0"},{n:["man-man-boy","family: man, man, boy"],u:"1f468-200d-1f468-200d-1f466",a:"2.0"},{n:["man-man-girl","family: man, man, girl"],u:"1f468-200d-1f468-200d-1f467",a:"2.0"},{n:["man-man-girl-boy","family: man, man, girl, boy"],u:"1f468-200d-1f468-200d-1f467-200d-1f466",a:"2.0"},{n:["man-man-boy-boy","family: man, man, boy, boy"],u:"1f468-200d-1f468-200d-1f466-200d-1f466",a:"2.0"},{n:["man-man-girl-girl","family: man, man, girl, girl"],u:"1f468-200d-1f468-200d-1f467-200d-1f467",a:"2.0"},{n:["woman-woman-boy","family: woman, woman, boy"],u:"1f469-200d-1f469-200d-1f466",a:"2.0"},{n:["woman-woman-girl","family: woman, woman, girl"],u:"1f469-200d-1f469-200d-1f467",a:"2.0"},{n:["woman-woman-girl-boy","family: woman, woman, girl, boy"],u:"1f469-200d-1f469-200d-1f467-200d-1f466",a:"2.0"},{n:["woman-woman-boy-boy","family: woman, woman, boy, boy"],u:"1f469-200d-1f469-200d-1f466-200d-1f466",a:"2.0"},{n:["woman-woman-girl-girl","family: woman, woman, girl, girl"],u:"1f469-200d-1f469-200d-1f467-200d-1f467",a:"2.0"},{n:["man-boy","family: man, boy"],u:"1f468-200d-1f466",a:"4.0"},{n:["man-boy-boy","family: man, boy, boy"],u:"1f468-200d-1f466-200d-1f466",a:"4.0"},{n:["man-girl","family: man, girl"],u:"1f468-200d-1f467",a:"4.0"},{n:["man-girl-boy","family: man, girl, boy"],u:"1f468-200d-1f467-200d-1f466",a:"4.0"},{n:["man-girl-girl","family: man, girl, girl"],u:"1f468-200d-1f467-200d-1f467",a:"4.0"},{n:["woman-boy","family: woman, boy"],u:"1f469-200d-1f466",a:"4.0"},{n:["woman-boy-boy","family: woman, boy, boy"],u:"1f469-200d-1f466-200d-1f466",a:"4.0"},{n:["woman-girl","family: woman, girl"],u:"1f469-200d-1f467",a:"4.0"},{n:["woman-girl-boy","family: woman, girl, boy"],u:"1f469-200d-1f467-200d-1f466",a:"4.0"},{n:["woman-girl-girl","family: woman, girl, girl"],u:"1f469-200d-1f467-200d-1f467",a:"4.0"},{n:["speaking head","speaking head in silhouette"],u:"1f5e3-fe0f",a:"0.7"},{n:["bust in silhouette"],u:"1f464",a:"0.6"},{n:["busts in silhouette"],u:"1f465",a:"1.0"},{n:["people hugging"],u:"1fac2",a:"13.0"},{n:["footprints"],u:"1f463",a:"0.6"}],Qn=[{n:["monkey face"],u:"1f435",a:"0.6"},{n:["monkey"],u:"1f412",a:"0.6"},{n:["gorilla"],u:"1f98d",a:"3.0"},{n:["orangutan"],u:"1f9a7",a:"12.0"},{n:["dog","dog face"],u:"1f436",a:"0.6"},{n:["dog","dog2"],u:"1f415",a:"0.7"},{n:["guide dog"],u:"1f9ae",a:"12.0"},{n:["service dog"],u:"1f415-200d-1f9ba",a:"12.0"},{n:["poodle"],u:"1f429",a:"0.6"},{n:["wolf","wolf face"],u:"1f43a",a:"0.6"},{n:["fox face"],u:"1f98a",a:"3.0"},{n:["raccoon"],u:"1f99d",a:"11.0"},{n:["cat","cat face"],u:"1f431",a:"0.6"},{n:["cat","cat2"],u:"1f408",a:"0.7"},{n:["black cat"],u:"1f408-200d-2b1b",a:"13.0"},{n:["lion face"],u:"1f981",a:"1.0"},{n:["tiger","tiger face"],u:"1f42f",a:"0.6"},{n:["tiger","tiger2"],u:"1f405",a:"1.0"},{n:["leopard"],u:"1f406",a:"1.0"},{n:["horse","horse face"],u:"1f434",a:"0.6"},{n:["horse","racehorse"],u:"1f40e",a:"0.6"},{n:["unicorn face"],u:"1f984",a:"1.0"},{n:["zebra face"],u:"1f993",a:"5.0"},{n:["deer"],u:"1f98c",a:"3.0"},{n:["bison"],u:"1f9ac",a:"13.0"},{n:["cow","cow face"],u:"1f42e",a:"0.6"},{n:["ox"],u:"1f402",a:"1.0"},{n:["water buffalo"],u:"1f403",a:"1.0"},{n:["cow","cow2"],u:"1f404",a:"1.0"},{n:["pig","pig face"],u:"1f437",a:"0.6"},{n:["pig","pig2"],u:"1f416",a:"1.0"},{n:["boar"],u:"1f417",a:"0.6"},{n:["pig nose"],u:"1f43d",a:"0.6"},{n:["ram"],u:"1f40f",a:"1.0"},{n:["sheep"],u:"1f411",a:"0.6"},{n:["goat"],u:"1f410",a:"1.0"},{n:["dromedary camel"],u:"1f42a",a:"1.0"},{n:["camel","bactrian camel"],u:"1f42b",a:"0.6"},{n:["llama"],u:"1f999",a:"11.0"},{n:["giraffe face"],u:"1f992",a:"5.0"},{n:["elephant"],u:"1f418",a:"0.6"},{n:["mammoth"],u:"1f9a3",a:"13.0"},{n:["rhinoceros"],u:"1f98f",a:"3.0"},{n:["hippopotamus"],u:"1f99b",a:"11.0"},{n:["mouse","mouse face"],u:"1f42d",a:"0.6"},{n:["mouse","mouse2"],u:"1f401",a:"1.0"},{n:["rat"],u:"1f400",a:"1.0"},{n:["hamster","hamster face"],u:"1f439",a:"0.6"},{n:["rabbit","rabbit face"],u:"1f430",a:"0.6"},{n:["rabbit","rabbit2"],u:"1f407",a:"1.0"},{n:["chipmunk"],u:"1f43f-fe0f",a:"0.7"},{n:["beaver"],u:"1f9ab",a:"13.0"},{n:["hedgehog"],u:"1f994",a:"5.0"},{n:["bat"],u:"1f987",a:"3.0"},{n:["bear","bear face"],u:"1f43b",a:"0.6"},{n:["polar bear"],u:"1f43b-200d-2744-fe0f",a:"13.0"},{n:["koala"],u:"1f428",a:"0.6"},{n:["panda face"],u:"1f43c",a:"0.6"},{n:["sloth"],u:"1f9a5",a:"12.0"},{n:["otter"],u:"1f9a6",a:"12.0"},{n:["skunk"],u:"1f9a8",a:"12.0"},{n:["kangaroo"],u:"1f998",a:"11.0"},{n:["badger"],u:"1f9a1",a:"11.0"},{n:["feet","paw prints"],u:"1f43e",a:"0.6"},{n:["turkey"],u:"1f983",a:"1.0"},{n:["chicken"],u:"1f414",a:"0.6"},{n:["rooster"],u:"1f413",a:"1.0"},{n:["hatching chick"],u:"1f423",a:"0.6"},{n:["baby chick"],u:"1f424",a:"0.6"},{n:["hatched chick","front-facing baby chick"],u:"1f425",a:"0.6"},{n:["bird"],u:"1f426",a:"0.6"},{n:["penguin"],u:"1f427",a:"0.6"},{n:["dove","dove of peace"],u:"1f54a-fe0f",a:"0.7"},{n:["eagle"],u:"1f985",a:"3.0"},{n:["duck"],u:"1f986",a:"3.0"},{n:["swan"],u:"1f9a2",a:"11.0"},{n:["owl"],u:"1f989",a:"3.0"},{n:["dodo"],u:"1f9a4",a:"13.0"},{n:["feather"],u:"1fab6",a:"13.0"},{n:["flamingo"],u:"1f9a9",a:"12.0"},{n:["peacock"],u:"1f99a",a:"11.0"},{n:["parrot"],u:"1f99c",a:"11.0"},{n:["frog","frog face"],u:"1f438",a:"0.6"},{n:["crocodile"],u:"1f40a",a:"1.0"},{n:["turtle"],u:"1f422",a:"0.6"},{n:["lizard"],u:"1f98e",a:"3.0"},{n:["snake"],u:"1f40d",a:"0.6"},{n:["dragon face"],u:"1f432",a:"0.6"},{n:["dragon"],u:"1f409",a:"1.0"},{n:["sauropod"],u:"1f995",a:"5.0"},{n:["t-rex"],u:"1f996",a:"5.0"},{n:["whale","spouting whale"],u:"1f433",a:"0.6"},{n:["whale","whale2"],u:"1f40b",a:"1.0"},{n:["dolphin","flipper"],u:"1f42c",a:"0.6"},{n:["seal"],u:"1f9ad",a:"13.0"},{n:["fish"],u:"1f41f",a:"0.6"},{n:["tropical fish"],u:"1f420",a:"0.6"},{n:["blowfish"],u:"1f421",a:"0.6"},{n:["shark"],u:"1f988",a:"3.0"},{n:["octopus"],u:"1f419",a:"0.6"},{n:["shell","spiral shell"],u:"1f41a",a:"0.6"},{n:["coral"],u:"1fab8",a:"14.0"},{n:["snail"],u:"1f40c",a:"0.6"},{n:["butterfly"],u:"1f98b",a:"3.0"},{n:["bug"],u:"1f41b",a:"0.6"},{n:["ant"],u:"1f41c",a:"0.6"},{n:["bee","honeybee"],u:"1f41d",a:"0.6"},{n:["beetle"],u:"1fab2",a:"13.0"},{n:["ladybug","lady beetle"],u:"1f41e",a:"0.6"},{n:["cricket"],u:"1f997",a:"5.0"},{n:["cockroach"],u:"1fab3",a:"13.0"},{n:["spider"],u:"1f577-fe0f",a:"0.7"},{n:["spider web"],u:"1f578-fe0f",a:"0.7"},{n:["scorpion"],u:"1f982",a:"1.0"},{n:["mosquito"],u:"1f99f",a:"11.0"},{n:["fly"],u:"1fab0",a:"13.0"},{n:["worm"],u:"1fab1",a:"13.0"},{n:["microbe"],u:"1f9a0",a:"11.0"},{n:["bouquet"],u:"1f490",a:"0.6"},{n:["cherry blossom"],u:"1f338",a:"0.6"},{n:["white flower"],u:"1f4ae",a:"0.6"},{n:["lotus"],u:"1fab7",a:"14.0"},{n:["rosette"],u:"1f3f5-fe0f",a:"0.7"},{n:["rose"],u:"1f339",a:"0.6"},{n:["wilted flower"],u:"1f940",a:"3.0"},{n:["hibiscus"],u:"1f33a",a:"0.6"},{n:["sunflower"],u:"1f33b",a:"0.6"},{n:["blossom"],u:"1f33c",a:"0.6"},{n:["tulip"],u:"1f337",a:"0.6"},{n:["seedling"],u:"1f331",a:"0.6"},{n:["potted plant"],u:"1fab4",a:"13.0"},{n:["evergreen tree"],u:"1f332",a:"1.0"},{n:["deciduous tree"],u:"1f333",a:"1.0"},{n:["palm tree"],u:"1f334",a:"0.6"},{n:["cactus"],u:"1f335",a:"0.6"},{n:["ear of rice"],u:"1f33e",a:"0.6"},{n:["herb"],u:"1f33f",a:"0.6"},{n:["shamrock"],u:"2618-fe0f",a:"1.0"},{n:["four leaf clover"],u:"1f340",a:"0.6"},{n:["maple leaf"],u:"1f341",a:"0.6"},{n:["fallen leaf"],u:"1f342",a:"0.6"},{n:["leaves","leaf fluttering in wind"],u:"1f343",a:"0.6"},{n:["empty nest"],u:"1fab9",a:"14.0"},{n:["nest with eggs"],u:"1faba",a:"14.0"}],Jn=[{n:["grapes"],u:"1f347",a:"0.6"},{n:["melon"],u:"1f348",a:"0.6"},{n:["watermelon"],u:"1f349",a:"0.6"},{n:["tangerine"],u:"1f34a",a:"0.6"},{n:["lemon"],u:"1f34b",a:"1.0"},{n:["banana"],u:"1f34c",a:"0.6"},{n:["pineapple"],u:"1f34d",a:"0.6"},{n:["mango"],u:"1f96d",a:"11.0"},{n:["apple","red apple"],u:"1f34e",a:"0.6"},{n:["green apple"],u:"1f34f",a:"0.6"},{n:["pear"],u:"1f350",a:"1.0"},{n:["peach"],u:"1f351",a:"0.6"},{n:["cherries"],u:"1f352",a:"0.6"},{n:["strawberry"],u:"1f353",a:"0.6"},{n:["blueberries"],u:"1fad0",a:"13.0"},{n:["kiwifruit"],u:"1f95d",a:"3.0"},{n:["tomato"],u:"1f345",a:"0.6"},{n:["olive"],u:"1fad2",a:"13.0"},{n:["coconut"],u:"1f965",a:"5.0"},{n:["avocado"],u:"1f951",a:"3.0"},{n:["eggplant","aubergine"],u:"1f346",a:"0.6"},{n:["potato"],u:"1f954",a:"3.0"},{n:["carrot"],u:"1f955",a:"3.0"},{n:["corn","ear of maize"],u:"1f33d",a:"0.6"},{n:["hot pepper"],u:"1f336-fe0f",a:"0.7"},{n:["bell pepper"],u:"1fad1",a:"13.0"},{n:["cucumber"],u:"1f952",a:"3.0"},{n:["leafy green"],u:"1f96c",a:"11.0"},{n:["broccoli"],u:"1f966",a:"5.0"},{n:["garlic"],u:"1f9c4",a:"12.0"},{n:["onion"],u:"1f9c5",a:"12.0"},{n:["mushroom"],u:"1f344",a:"0.6"},{n:["peanuts"],u:"1f95c",a:"3.0"},{n:["beans"],u:"1fad8",a:"14.0"},{n:["chestnut"],u:"1f330",a:"0.6"},{n:["bread"],u:"1f35e",a:"0.6"},{n:["croissant"],u:"1f950",a:"3.0"},{n:["baguette bread"],u:"1f956",a:"3.0"},{n:["flatbread"],u:"1fad3",a:"13.0"},{n:["pretzel"],u:"1f968",a:"5.0"},{n:["bagel"],u:"1f96f",a:"11.0"},{n:["pancakes"],u:"1f95e",a:"3.0"},{n:["waffle"],u:"1f9c7",a:"12.0"},{n:["cheese wedge"],u:"1f9c0",a:"1.0"},{n:["meat on bone"],u:"1f356",a:"0.6"},{n:["poultry leg"],u:"1f357",a:"0.6"},{n:["cut of meat"],u:"1f969",a:"5.0"},{n:["bacon"],u:"1f953",a:"3.0"},{n:["hamburger"],u:"1f354",a:"0.6"},{n:["fries","french fries"],u:"1f35f",a:"0.6"},{n:["pizza","slice of pizza"],u:"1f355",a:"0.6"},{n:["hotdog","hot dog"],u:"1f32d",a:"1.0"},{n:["sandwich"],u:"1f96a",a:"5.0"},{n:["taco"],u:"1f32e",a:"1.0"},{n:["burrito"],u:"1f32f",a:"1.0"},{n:["tamale"],u:"1fad4",a:"13.0"},{n:["stuffed flatbread"],u:"1f959",a:"3.0"},{n:["falafel"],u:"1f9c6",a:"12.0"},{n:["egg"],u:"1f95a",a:"3.0"},{n:["cooking","fried egg"],u:"1f373",a:"0.6"},{n:["shallow pan of food"],u:"1f958",a:"3.0"},{n:["stew","pot of food"],u:"1f372",a:"0.6"},{n:["fondue"],u:"1fad5",a:"13.0"},{n:["bowl with spoon"],u:"1f963",a:"5.0"},{n:["green salad"],u:"1f957",a:"3.0"},{n:["popcorn"],u:"1f37f",a:"1.0"},{n:["butter"],u:"1f9c8",a:"12.0"},{n:["salt","salt shaker"],u:"1f9c2",a:"11.0"},{n:["canned food"],u:"1f96b",a:"5.0"},{n:["bento","bento box"],u:"1f371",a:"0.6"},{n:["rice cracker"],u:"1f358",a:"0.6"},{n:["rice ball"],u:"1f359",a:"0.6"},{n:["rice","cooked rice"],u:"1f35a",a:"0.6"},{n:["curry","curry and rice"],u:"1f35b",a:"0.6"},{n:["ramen","steaming bowl"],u:"1f35c",a:"0.6"},{n:["spaghetti"],u:"1f35d",a:"0.6"},{n:["sweet potato","roasted sweet potato"],u:"1f360",a:"0.6"},{n:["oden"],u:"1f362",a:"0.6"},{n:["sushi"],u:"1f363",a:"0.6"},{n:["fried shrimp"],u:"1f364",a:"0.6"},{n:["fish cake","fish cake with swirl design"],u:"1f365",a:"0.6"},{n:["moon cake"],u:"1f96e",a:"11.0"},{n:["dango"],u:"1f361",a:"0.6"},{n:["dumpling"],u:"1f95f",a:"5.0"},{n:["fortune cookie"],u:"1f960",a:"5.0"},{n:["takeout box"],u:"1f961",a:"5.0"},{n:["crab"],u:"1f980",a:"1.0"},{n:["lobster"],u:"1f99e",a:"11.0"},{n:["shrimp"],u:"1f990",a:"3.0"},{n:["squid"],u:"1f991",a:"3.0"},{n:["oyster"],u:"1f9aa",a:"12.0"},{n:["icecream","soft ice cream"],u:"1f366",a:"0.6"},{n:["shaved ice"],u:"1f367",a:"0.6"},{n:["ice cream"],u:"1f368",a:"0.6"},{n:["doughnut"],u:"1f369",a:"0.6"},{n:["cookie"],u:"1f36a",a:"0.6"},{n:["birthday","birthday cake"],u:"1f382",a:"0.6"},{n:["cake","shortcake"],u:"1f370",a:"0.6"},{n:["cupcake"],u:"1f9c1",a:"11.0"},{n:["pie"],u:"1f967",a:"5.0"},{n:["chocolate bar"],u:"1f36b",a:"0.6"},{n:["candy"],u:"1f36c",a:"0.6"},{n:["lollipop"],u:"1f36d",a:"0.6"},{n:["custard"],u:"1f36e",a:"0.6"},{n:["honey pot"],u:"1f36f",a:"0.6"},{n:["baby bottle"],u:"1f37c",a:"1.0"},{n:["glass of milk"],u:"1f95b",a:"3.0"},{n:["coffee","hot beverage"],u:"2615",a:"0.6"},{n:["teapot"],u:"1fad6",a:"13.0"},{n:["tea","teacup without handle"],u:"1f375",a:"0.6"},{n:["sake","sake bottle and cup"],u:"1f376",a:"0.6"},{n:["champagne","bottle with popping cork"],u:"1f37e",a:"1.0"},{n:["wine glass"],u:"1f377",a:"0.6"},{n:["cocktail","cocktail glass"],u:"1f378",a:"0.6"},{n:["tropical drink"],u:"1f379",a:"0.6"},{n:["beer","beer mug"],u:"1f37a",a:"0.6"},{n:["beers","clinking beer mugs"],u:"1f37b",a:"0.6"},{n:["clinking glasses"],u:"1f942",a:"3.0"},{n:["tumbler glass"],u:"1f943",a:"3.0"},{n:["pouring liquid"],u:"1fad7",a:"14.0"},{n:["cup with straw"],u:"1f964",a:"5.0"},{n:["bubble tea"],u:"1f9cb",a:"13.0"},{n:["beverage box"],u:"1f9c3",a:"12.0"},{n:["mate drink"],u:"1f9c9",a:"12.0"},{n:["ice cube"],u:"1f9ca",a:"12.0"},{n:["chopsticks"],u:"1f962",a:"5.0"},{n:["knife fork plate","fork and knife with plate"],u:"1f37d-fe0f",a:"0.7"},{n:["fork and knife"],u:"1f374",a:"0.6"},{n:["spoon"],u:"1f944",a:"3.0"},{n:["hocho","knife"],u:"1f52a",a:"0.6"},{n:["jar"],u:"1fad9",a:"14.0"},{n:["amphora"],u:"1f3fa",a:"1.0"}],Xn=[{n:["earth africa","earth globe europe-africa"],u:"1f30d",a:"0.7"},{n:["earth americas","earth globe americas"],u:"1f30e",a:"0.7"},{n:["earth asia","earth globe asia-australia"],u:"1f30f",a:"0.6"},{n:["globe with meridians"],u:"1f310",a:"1.0"},{n:["world map"],u:"1f5fa-fe0f",a:"0.7"},{n:["japan","silhouette of japan"],u:"1f5fe",a:"0.6"},{n:["compass"],u:"1f9ed",a:"11.0"},{n:["snow-capped mountain","snow capped mountain"],u:"1f3d4-fe0f",a:"0.7"},{n:["mountain"],u:"26f0-fe0f",a:"0.7"},{n:["volcano"],u:"1f30b",a:"0.6"},{n:["mount fuji"],u:"1f5fb",a:"0.6"},{n:["camping"],u:"1f3d5-fe0f",a:"0.7"},{n:["beach with umbrella"],u:"1f3d6-fe0f",a:"0.7"},{n:["desert"],u:"1f3dc-fe0f",a:"0.7"},{n:["desert island"],u:"1f3dd-fe0f",a:"0.7"},{n:["national park"],u:"1f3de-fe0f",a:"0.7"},{n:["stadium"],u:"1f3df-fe0f",a:"0.7"},{n:["classical building"],u:"1f3db-fe0f",a:"0.7"},{n:["building construction"],u:"1f3d7-fe0f",a:"0.7"},{n:["brick","bricks"],u:"1f9f1",a:"11.0"},{n:["rock"],u:"1faa8",a:"13.0"},{n:["wood"],u:"1fab5",a:"13.0"},{n:["hut"],u:"1f6d6",a:"13.0"},{n:["houses","house buildings"],u:"1f3d8-fe0f",a:"0.7"},{n:["derelict house","derelict house building"],u:"1f3da-fe0f",a:"0.7"},{n:["house","house building"],u:"1f3e0",a:"0.6"},{n:["house with garden"],u:"1f3e1",a:"0.6"},{n:["office","office building"],u:"1f3e2",a:"0.6"},{n:["post office","japanese post office"],u:"1f3e3",a:"0.6"},{n:["european post office"],u:"1f3e4",a:"1.0"},{n:["hospital"],u:"1f3e5",a:"0.6"},{n:["bank"],u:"1f3e6",a:"0.6"},{n:["hotel"],u:"1f3e8",a:"0.6"},{n:["love hotel"],u:"1f3e9",a:"0.6"},{n:["convenience store"],u:"1f3ea",a:"0.6"},{n:["school"],u:"1f3eb",a:"0.6"},{n:["department store"],u:"1f3ec",a:"0.6"},{n:["factory"],u:"1f3ed",a:"0.6"},{n:["japanese castle"],u:"1f3ef",a:"0.6"},{n:["european castle"],u:"1f3f0",a:"0.6"},{n:["wedding"],u:"1f492",a:"0.6"},{n:["tokyo tower"],u:"1f5fc",a:"0.6"},{n:["statue of liberty"],u:"1f5fd",a:"0.6"},{n:["church"],u:"26ea",a:"0.6"},{n:["mosque"],u:"1f54c",a:"1.0"},{n:["hindu temple"],u:"1f6d5",a:"12.0"},{n:["synagogue"],u:"1f54d",a:"1.0"},{n:["shinto shrine"],u:"26e9-fe0f",a:"0.7"},{n:["kaaba"],u:"1f54b",a:"1.0"},{n:["fountain"],u:"26f2",a:"0.6"},{n:["tent"],u:"26fa",a:"0.6"},{n:["foggy"],u:"1f301",a:"0.6"},{n:["night with stars"],u:"1f303",a:"0.6"},{n:["cityscape"],u:"1f3d9-fe0f",a:"0.7"},{n:["sunrise over mountains"],u:"1f304",a:"0.6"},{n:["sunrise"],u:"1f305",a:"0.6"},{n:["city sunset","cityscape at dusk"],u:"1f306",a:"0.6"},{n:["city sunrise","sunset over buildings"],u:"1f307",a:"0.6"},{n:["bridge at night"],u:"1f309",a:"0.6"},{n:["hotsprings","hot springs"],u:"2668-fe0f",a:"0.6"},{n:["carousel horse"],u:"1f3a0",a:"0.6"},{n:["playground slide"],u:"1f6dd",a:"14.0"},{n:["ferris wheel"],u:"1f3a1",a:"0.6"},{n:["roller coaster"],u:"1f3a2",a:"0.6"},{n:["barber","barber pole"],u:"1f488",a:"0.6"},{n:["circus tent"],u:"1f3aa",a:"0.6"},{n:["steam locomotive"],u:"1f682",a:"1.0"},{n:["railway car"],u:"1f683",a:"0.6"},{n:["high-speed train","bullettrain side"],u:"1f684",a:"0.6"},{n:["bullettrain front","high-speed train with bullet nose"],u:"1f685",a:"0.6"},{n:["train","train2"],u:"1f686",a:"1.0"},{n:["metro"],u:"1f687",a:"0.6"},{n:["light rail"],u:"1f688",a:"1.0"},{n:["station"],u:"1f689",a:"0.6"},{n:["tram"],u:"1f68a",a:"1.0"},{n:["monorail"],u:"1f69d",a:"1.0"},{n:["mountain railway"],u:"1f69e",a:"1.0"},{n:["train","tram car"],u:"1f68b",a:"1.0"},{n:["bus"],u:"1f68c",a:"0.6"},{n:["oncoming bus"],u:"1f68d",a:"0.7"},{n:["trolleybus"],u:"1f68e",a:"1.0"},{n:["minibus"],u:"1f690",a:"1.0"},{n:["ambulance"],u:"1f691",a:"0.6"},{n:["fire engine"],u:"1f692",a:"0.6"},{n:["police car"],u:"1f693",a:"0.6"},{n:["oncoming police car"],u:"1f694",a:"0.7"},{n:["taxi"],u:"1f695",a:"0.6"},{n:["oncoming taxi"],u:"1f696",a:"1.0"},{n:["car","red car","automobile"],u:"1f697",a:"0.6"},{n:["oncoming automobile"],u:"1f698",a:"0.7"},{n:["blue car","recreational vehicle"],u:"1f699",a:"0.6"},{n:["pickup truck"],u:"1f6fb",a:"13.0"},{n:["truck","delivery truck"],u:"1f69a",a:"0.6"},{n:["articulated lorry"],u:"1f69b",a:"1.0"},{n:["tractor"],u:"1f69c",a:"1.0"},{n:["racing car"],u:"1f3ce-fe0f",a:"0.7"},{n:["motorcycle","racing motorcycle"],u:"1f3cd-fe0f",a:"0.7"},{n:["motor scooter"],u:"1f6f5",a:"3.0"},{n:["manual wheelchair"],u:"1f9bd",a:"12.0"},{n:["motorized wheelchair"],u:"1f9bc",a:"12.0"},{n:["auto rickshaw"],u:"1f6fa",a:"12.0"},{n:["bike","bicycle"],u:"1f6b2",a:"0.6"},{n:["scooter"],u:"1f6f4",a:"3.0"},{n:["skateboard"],u:"1f6f9",a:"11.0"},{n:["roller skate"],u:"1f6fc",a:"13.0"},{n:["busstop","bus stop"],u:"1f68f",a:"0.6"},{n:["motorway"],u:"1f6e3-fe0f",a:"0.7"},{n:["railway track"],u:"1f6e4-fe0f",a:"0.7"},{n:["oil drum"],u:"1f6e2-fe0f",a:"0.7"},{n:["fuelpump","fuel pump"],u:"26fd",a:"0.6"},{n:["wheel"],u:"1f6de",a:"14.0"},{n:["rotating light","police cars revolving light"],u:"1f6a8",a:"0.6"},{n:["traffic light","horizontal traffic light"],u:"1f6a5",a:"0.6"},{n:["vertical traffic light"],u:"1f6a6",a:"1.0"},{n:["octagonal sign"],u:"1f6d1",a:"3.0"},{n:["construction","construction sign"],u:"1f6a7",a:"0.6"},{n:["anchor"],u:"2693",a:"0.6"},{n:["ring buoy"],u:"1f6df",a:"14.0"},{n:["boat","sailboat"],u:"26f5",a:"0.6"},{n:["canoe"],u:"1f6f6",a:"3.0"},{n:["speedboat"],u:"1f6a4",a:"0.6"},{n:["passenger ship"],u:"1f6f3-fe0f",a:"0.7"},{n:["ferry"],u:"26f4-fe0f",a:"0.7"},{n:["motor boat"],u:"1f6e5-fe0f",a:"0.7"},{n:["ship"],u:"1f6a2",a:"0.6"},{n:["airplane"],u:"2708-fe0f",a:"0.6"},{n:["small airplane"],u:"1f6e9-fe0f",a:"0.7"},{n:["airplane departure"],u:"1f6eb",a:"1.0"},{n:["airplane arriving"],u:"1f6ec",a:"1.0"},{n:["parachute"],u:"1fa82",a:"12.0"},{n:["seat"],u:"1f4ba",a:"0.6"},{n:["helicopter"],u:"1f681",a:"1.0"},{n:["suspension railway"],u:"1f69f",a:"1.0"},{n:["mountain cableway"],u:"1f6a0",a:"1.0"},{n:["aerial tramway"],u:"1f6a1",a:"1.0"},{n:["satellite"],u:"1f6f0-fe0f",a:"0.7"},{n:["rocket"],u:"1f680",a:"0.6"},{n:["flying saucer"],u:"1f6f8",a:"5.0"},{n:["bellhop bell"],u:"1f6ce-fe0f",a:"0.7"},{n:["luggage"],u:"1f9f3",a:"11.0"},{n:["hourglass"],u:"231b",a:"0.6"},{n:["hourglass flowing sand","hourglass with flowing sand"],u:"23f3",a:"0.6"},{n:["watch"],u:"231a",a:"0.6"},{n:["alarm clock"],u:"23f0",a:"0.6"},{n:["stopwatch"],u:"23f1-fe0f",a:"1.0"},{n:["timer clock"],u:"23f2-fe0f",a:"1.0"},{n:["mantelpiece clock"],u:"1f570-fe0f",a:"0.7"},{n:["clock12","clock face twelve oclock"],u:"1f55b",a:"0.6"},{n:["clock1230","clock face twelve-thirty"],u:"1f567",a:"0.7"},{n:["clock1","clock face one oclock"],u:"1f550",a:"0.6"},{n:["clock130","clock face one-thirty"],u:"1f55c",a:"0.7"},{n:["clock2","clock face two oclock"],u:"1f551",a:"0.6"},{n:["clock230","clock face two-thirty"],u:"1f55d",a:"0.7"},{n:["clock3","clock face three oclock"],u:"1f552",a:"0.6"},{n:["clock330","clock face three-thirty"],u:"1f55e",a:"0.7"},{n:["clock4","clock face four oclock"],u:"1f553",a:"0.6"},{n:["clock430","clock face four-thirty"],u:"1f55f",a:"0.7"},{n:["clock5","clock face five oclock"],u:"1f554",a:"0.6"},{n:["clock530","clock face five-thirty"],u:"1f560",a:"0.7"},{n:["clock6","clock face six oclock"],u:"1f555",a:"0.6"},{n:["clock630","clock face six-thirty"],u:"1f561",a:"0.7"},{n:["clock7","clock face seven oclock"],u:"1f556",a:"0.6"},{n:["clock730","clock face seven-thirty"],u:"1f562",a:"0.7"},{n:["clock8","clock face eight oclock"],u:"1f557",a:"0.6"},{n:["clock830","clock face eight-thirty"],u:"1f563",a:"0.7"},{n:["clock9","clock face nine oclock"],u:"1f558",a:"0.6"},{n:["clock930","clock face nine-thirty"],u:"1f564",a:"0.7"},{n:["clock10","clock face ten oclock"],u:"1f559",a:"0.6"},{n:["clock1030","clock face ten-thirty"],u:"1f565",a:"0.7"},{n:["clock11","clock face eleven oclock"],u:"1f55a",a:"0.6"},{n:["clock1130","clock face eleven-thirty"],u:"1f566",a:"0.7"},{n:["new moon","new moon symbol"],u:"1f311",a:"0.6"},{n:["waxing crescent moon","waxing crescent moon symbol"],u:"1f312",a:"1.0"},{n:["first quarter moon","first quarter moon symbol"],u:"1f313",a:"0.6"},{n:["moon","waxing gibbous moon","waxing gibbous moon symbol"],u:"1f314",a:"0.6"},{n:["full moon","full moon symbol"],u:"1f315",a:"0.6"},{n:["waning gibbous moon","waning gibbous moon symbol"],u:"1f316",a:"1.0"},{n:["last quarter moon","last quarter moon symbol"],u:"1f317",a:"1.0"},{n:["waning crescent moon","waning crescent moon symbol"],u:"1f318",a:"1.0"},{n:["crescent moon"],u:"1f319",a:"0.6"},{n:["new moon with face"],u:"1f31a",a:"1.0"},{n:["first quarter moon with face"],u:"1f31b",a:"0.6"},{n:["last quarter moon with face"],u:"1f31c",a:"0.7"},{n:["thermometer"],u:"1f321-fe0f",a:"0.7"},{n:["sunny","black sun with rays"],u:"2600-fe0f",a:"0.6"},{n:["full moon with face"],u:"1f31d",a:"1.0"},{n:["sun with face"],u:"1f31e",a:"1.0"},{n:["ringed planet"],u:"1fa90",a:"12.0"},{n:["star","white medium star"],u:"2b50",a:"0.6"},{n:["star2","glowing star"],u:"1f31f",a:"0.6"},{n:["stars","shooting star"],u:"1f320",a:"0.6"},{n:["milky way"],u:"1f30c",a:"0.6"},{n:["cloud"],u:"2601-fe0f",a:"0.6"},{n:["partly sunny","sun behind cloud"],u:"26c5",a:"0.6"},{n:["thunder cloud and rain","cloud with lightning and rain"],u:"26c8-fe0f",a:"0.7"},{n:["mostly sunny","sun small cloud","sun behind small cloud"],u:"1f324-fe0f",a:"0.7"},{n:["barely sunny","sun behind cloud","sun behind large cloud"],u:"1f325-fe0f",a:"0.7"},{n:["partly sunny rain","sun behind rain cloud"],u:"1f326-fe0f",a:"0.7"},{n:["rain cloud","cloud with rain"],u:"1f327-fe0f",a:"0.7"},{n:["snow cloud","cloud with snow"],u:"1f328-fe0f",a:"0.7"},{n:["lightning","lightning cloud","cloud with lightning"],u:"1f329-fe0f",a:"0.7"},{n:["tornado","tornado cloud"],u:"1f32a-fe0f",a:"0.7"},{n:["fog"],u:"1f32b-fe0f",a:"0.7"},{n:["wind face","wind blowing face"],u:"1f32c-fe0f",a:"0.7"},{n:["cyclone"],u:"1f300",a:"0.6"},{n:["rainbow"],u:"1f308",a:"0.6"},{n:["closed umbrella"],u:"1f302",a:"0.6"},{n:["umbrella"],u:"2602-fe0f",a:"0.7"},{n:["umbrella with rain drops"],u:"2614",a:"0.6"},{n:["umbrella on ground"],u:"26f1-fe0f",a:"0.7"},{n:["zap","high voltage sign"],u:"26a1",a:"0.6"},{n:["snowflake"],u:"2744-fe0f",a:"0.6"},{n:["snowman"],u:"2603-fe0f",a:"0.7"},{n:["snowman without snow"],u:"26c4",a:"0.6"},{n:["comet"],u:"2604-fe0f",a:"1.0"},{n:["fire"],u:"1f525",a:"0.6"},{n:["droplet"],u:"1f4a7",a:"0.6"},{n:["ocean","water wave"],u:"1f30a",a:"0.6"}],f0=[{n:["jack-o-lantern","jack o lantern"],u:"1f383",a:"0.6"},{n:["christmas tree"],u:"1f384",a:"0.6"},{n:["fireworks"],u:"1f386",a:"0.6"},{n:["sparkler","firework sparkler"],u:"1f387",a:"0.6"},{n:["firecracker"],u:"1f9e8",a:"11.0"},{n:["sparkles"],u:"2728",a:"0.6"},{n:["balloon"],u:"1f388",a:"0.6"},{n:["tada","party popper"],u:"1f389",a:"0.6"},{n:["confetti ball"],u:"1f38a",a:"0.6"},{n:["tanabata tree"],u:"1f38b",a:"0.6"},{n:["bamboo","pine decoration"],u:"1f38d",a:"0.6"},{n:["dolls","japanese dolls"],u:"1f38e",a:"0.6"},{n:["flags","carp streamer"],u:"1f38f",a:"0.6"},{n:["wind chime"],u:"1f390",a:"0.6"},{n:["rice scene","moon viewing ceremony"],u:"1f391",a:"0.6"},{n:["red envelope","red gift envelope"],u:"1f9e7",a:"11.0"},{n:["ribbon"],u:"1f380",a:"0.6"},{n:["gift","wrapped present"],u:"1f381",a:"0.6"},{n:["reminder ribbon"],u:"1f397-fe0f",a:"0.7"},{n:["admission tickets"],u:"1f39f-fe0f",a:"0.7"},{n:["ticket"],u:"1f3ab",a:"0.6"},{n:["medal","military medal"],u:"1f396-fe0f",a:"0.7"},{n:["trophy"],u:"1f3c6",a:"0.6"},{n:["sports medal"],u:"1f3c5",a:"1.0"},{n:["first place medal"],u:"1f947",a:"3.0"},{n:["second place medal"],u:"1f948",a:"3.0"},{n:["third place medal"],u:"1f949",a:"3.0"},{n:["soccer","soccer ball"],u:"26bd",a:"0.6"},{n:["baseball"],u:"26be",a:"0.6"},{n:["softball"],u:"1f94e",a:"11.0"},{n:["basketball","basketball and hoop"],u:"1f3c0",a:"0.6"},{n:["volleyball"],u:"1f3d0",a:"1.0"},{n:["football","american football"],u:"1f3c8",a:"0.6"},{n:["rugby football"],u:"1f3c9",a:"1.0"},{n:["tennis","tennis racquet and ball"],u:"1f3be",a:"0.6"},{n:["flying disc"],u:"1f94f",a:"11.0"},{n:["bowling"],u:"1f3b3",a:"0.6"},{n:["cricket bat and ball"],u:"1f3cf",a:"1.0"},{n:["field hockey stick and ball"],u:"1f3d1",a:"1.0"},{n:["ice hockey stick and puck"],u:"1f3d2",a:"1.0"},{n:["lacrosse","lacrosse stick and ball"],u:"1f94d",a:"11.0"},{n:["table tennis paddle and ball"],u:"1f3d3",a:"1.0"},{n:["badminton racquet and shuttlecock"],u:"1f3f8",a:"1.0"},{n:["boxing glove"],u:"1f94a",a:"3.0"},{n:["martial arts uniform"],u:"1f94b",a:"3.0"},{n:["goal net"],u:"1f945",a:"3.0"},{n:["golf","flag in hole"],u:"26f3",a:"0.6"},{n:["ice skate"],u:"26f8-fe0f",a:"0.7"},{n:["fishing pole and fish"],u:"1f3a3",a:"0.6"},{n:["diving mask"],u:"1f93f",a:"12.0"},{n:["running shirt with sash"],u:"1f3bd",a:"0.6"},{n:["ski","ski and ski boot"],u:"1f3bf",a:"0.6"},{n:["sled"],u:"1f6f7",a:"5.0"},{n:["curling stone"],u:"1f94c",a:"5.0"},{n:["dart","direct hit"],u:"1f3af",a:"0.6"},{n:["yo-yo"],u:"1fa80",a:"12.0"},{n:["kite"],u:"1fa81",a:"12.0"},{n:["8ball","billiards"],u:"1f3b1",a:"0.6"},{n:["crystal ball"],u:"1f52e",a:"0.6"},{n:["magic wand"],u:"1fa84",a:"13.0"},{n:["nazar amulet"],u:"1f9ff",a:"11.0"},{n:["hamsa"],u:"1faac",a:"14.0"},{n:["video game"],u:"1f3ae",a:"0.6"},{n:["joystick"],u:"1f579-fe0f",a:"0.7"},{n:["slot machine"],u:"1f3b0",a:"0.6"},{n:["game die"],u:"1f3b2",a:"0.6"},{n:["jigsaw","jigsaw puzzle piece"],u:"1f9e9",a:"11.0"},{n:["teddy bear"],u:"1f9f8",a:"11.0"},{n:["pinata"],u:"1fa85",a:"13.0"},{n:["mirror ball"],u:"1faa9",a:"14.0"},{n:["nesting dolls"],u:"1fa86",a:"13.0"},{n:["spades","black spade suit"],u:"2660-fe0f",a:"0.6"},{n:["hearts","black heart suit"],u:"2665-fe0f",a:"0.6"},{n:["diamonds","black diamond suit"],u:"2666-fe0f",a:"0.6"},{n:["clubs","black club suit"],u:"2663-fe0f",a:"0.6"},{n:["chess pawn"],u:"265f-fe0f",a:"11.0"},{n:["black joker","playing card black joker"],u:"1f0cf",a:"0.6"},{n:["mahjong","mahjong tile red dragon"],u:"1f004",a:"0.6"},{n:["flower playing cards"],u:"1f3b4",a:"0.6"},{n:["performing arts"],u:"1f3ad",a:"0.6"},{n:["framed picture","frame with picture"],u:"1f5bc-fe0f",a:"0.7"},{n:["art","artist palette"],u:"1f3a8",a:"0.6"},{n:["thread","spool of thread"],u:"1f9f5",a:"11.0"},{n:["sewing needle"],u:"1faa1",a:"13.0"},{n:["yarn","ball of yarn"],u:"1f9f6",a:"11.0"},{n:["knot"],u:"1faa2",a:"13.0"}],e0=[{n:["eyeglasses"],u:"1f453",a:"0.6"},{n:["sunglasses","dark sunglasses"],u:"1f576-fe0f",a:"0.7"},{n:["goggles"],u:"1f97d",a:"11.0"},{n:["lab coat"],u:"1f97c",a:"11.0"},{n:["safety vest"],u:"1f9ba",a:"12.0"},{n:["necktie"],u:"1f454",a:"0.6"},{n:["shirt","tshirt","t-shirt"],u:"1f455",a:"0.6"},{n:["jeans"],u:"1f456",a:"0.6"},{n:["scarf"],u:"1f9e3",a:"5.0"},{n:["gloves"],u:"1f9e4",a:"5.0"},{n:["coat"],u:"1f9e5",a:"5.0"},{n:["socks"],u:"1f9e6",a:"5.0"},{n:["dress"],u:"1f457",a:"0.6"},{n:["kimono"],u:"1f458",a:"0.6"},{n:["sari"],u:"1f97b",a:"12.0"},{n:["one-piece swimsuit"],u:"1fa71",a:"12.0"},{n:["briefs"],u:"1fa72",a:"12.0"},{n:["shorts"],u:"1fa73",a:"12.0"},{n:["bikini"],u:"1f459",a:"0.6"},{n:["womans clothes"],u:"1f45a",a:"0.6"},{n:["purse"],u:"1f45b",a:"0.6"},{n:["handbag"],u:"1f45c",a:"0.6"},{n:["pouch"],u:"1f45d",a:"0.6"},{n:["shopping bags"],u:"1f6cd-fe0f",a:"0.7"},{n:["school satchel"],u:"1f392",a:"0.6"},{n:["thong sandal"],u:"1fa74",a:"13.0"},{n:["shoe","mans shoe"],u:"1f45e",a:"0.6"},{n:["athletic shoe"],u:"1f45f",a:"0.6"},{n:["hiking boot"],u:"1f97e",a:"11.0"},{n:["flat shoe","womans flat shoe"],u:"1f97f",a:"11.0"},{n:["high heel","high-heeled shoe"],u:"1f460",a:"0.6"},{n:["sandal","womans sandal"],u:"1f461",a:"0.6"},{n:["ballet shoes"],u:"1fa70",a:"12.0"},{n:["boot","womans boots"],u:"1f462",a:"0.6"},{n:["crown"],u:"1f451",a:"0.6"},{n:["womans hat"],u:"1f452",a:"0.6"},{n:["tophat","top hat"],u:"1f3a9",a:"0.6"},{n:["mortar board","graduation cap"],u:"1f393",a:"0.6"},{n:["billed cap"],u:"1f9e2",a:"5.0"},{n:["military helmet"],u:"1fa96",a:"13.0"},{n:["rescue worker’s helmet","helmet with white cross"],u:"26d1-fe0f",a:"0.7"},{n:["prayer beads"],u:"1f4ff",a:"1.0"},{n:["lipstick"],u:"1f484",a:"0.6"},{n:["ring"],u:"1f48d",a:"0.6"},{n:["gem","gem stone"],u:"1f48e",a:"0.6"},{n:["mute","speaker with cancellation stroke"],u:"1f507",a:"1.0"},{n:["speaker"],u:"1f508",a:"0.7"},{n:["sound","speaker with one sound wave"],u:"1f509",a:"1.0"},{n:["loud sound","speaker with three sound waves"],u:"1f50a",a:"0.6"},{n:["loudspeaker","public address loudspeaker"],u:"1f4e2",a:"0.6"},{n:["mega","cheering megaphone"],u:"1f4e3",a:"0.6"},{n:["postal horn"],u:"1f4ef",a:"1.0"},{n:["bell"],u:"1f514",a:"0.6"},{n:["no bell","bell with cancellation stroke"],u:"1f515",a:"1.0"},{n:["musical score"],u:"1f3bc",a:"0.6"},{n:["musical note"],u:"1f3b5",a:"0.6"},{n:["notes","multiple musical notes"],u:"1f3b6",a:"0.6"},{n:["studio microphone"],u:"1f399-fe0f",a:"0.7"},{n:["level slider"],u:"1f39a-fe0f",a:"0.7"},{n:["control knobs"],u:"1f39b-fe0f",a:"0.7"},{n:["microphone"],u:"1f3a4",a:"0.6"},{n:["headphone","headphones"],u:"1f3a7",a:"0.6"},{n:["radio"],u:"1f4fb",a:"0.6"},{n:["saxophone"],u:"1f3b7",a:"0.6"},{n:["accordion"],u:"1fa97",a:"13.0"},{n:["guitar"],u:"1f3b8",a:"0.6"},{n:["musical keyboard"],u:"1f3b9",a:"0.6"},{n:["trumpet"],u:"1f3ba",a:"0.6"},{n:["violin"],u:"1f3bb",a:"0.6"},{n:["banjo"],u:"1fa95",a:"12.0"},{n:["drum with drumsticks"],u:"1f941",a:"3.0"},{n:["long drum"],u:"1fa98",a:"13.0"},{n:["iphone","mobile phone"],u:"1f4f1",a:"0.6"},{n:["calling","mobile phone with rightwards arrow at left"],u:"1f4f2",a:"0.6"},{n:["phone","telephone","black telephone"],u:"260e-fe0f",a:"0.6"},{n:["telephone receiver"],u:"1f4de",a:"0.6"},{n:["pager"],u:"1f4df",a:"0.6"},{n:["fax","fax machine"],u:"1f4e0",a:"0.6"},{n:["battery"],u:"1f50b",a:"0.6"},{n:["low battery"],u:"1faab",a:"14.0"},{n:["electric plug"],u:"1f50c",a:"0.6"},{n:["computer","personal computer"],u:"1f4bb",a:"0.6"},{n:["desktop computer"],u:"1f5a5-fe0f",a:"0.7"},{n:["printer"],u:"1f5a8-fe0f",a:"0.7"},{n:["keyboard"],u:"2328-fe0f",a:"1.0"},{n:["computer mouse","three button mouse"],u:"1f5b1-fe0f",a:"0.7"},{n:["trackball"],u:"1f5b2-fe0f",a:"0.7"},{n:["minidisc"],u:"1f4bd",a:"0.6"},{n:["floppy disk"],u:"1f4be",a:"0.6"},{n:["cd","optical disc"],u:"1f4bf",a:"0.6"},{n:["dvd"],u:"1f4c0",a:"0.6"},{n:["abacus"],u:"1f9ee",a:"11.0"},{n:["movie camera"],u:"1f3a5",a:"0.6"},{n:["film frames"],u:"1f39e-fe0f",a:"0.7"},{n:["film projector"],u:"1f4fd-fe0f",a:"0.7"},{n:["clapper","clapper board"],u:"1f3ac",a:"0.6"},{n:["tv","television"],u:"1f4fa",a:"0.6"},{n:["camera"],u:"1f4f7",a:"0.6"},{n:["camera with flash"],u:"1f4f8",a:"1.0"},{n:["video camera"],u:"1f4f9",a:"0.6"},{n:["vhs","videocassette"],u:"1f4fc",a:"0.6"},{n:["mag","left-pointing magnifying glass"],u:"1f50d",a:"0.6"},{n:["mag right","right-pointing magnifying glass"],u:"1f50e",a:"0.6"},{n:["candle"],u:"1f56f-fe0f",a:"0.7"},{n:["bulb","electric light bulb"],u:"1f4a1",a:"0.6"},{n:["flashlight","electric torch"],u:"1f526",a:"0.6"},{n:["lantern","izakaya lantern"],u:"1f3ee",a:"0.6"},{n:["diya lamp"],u:"1fa94",a:"12.0"},{n:["notebook with decorative cover"],u:"1f4d4",a:"0.6"},{n:["closed book"],u:"1f4d5",a:"0.6"},{n:["book","open book"],u:"1f4d6",a:"0.6"},{n:["green book"],u:"1f4d7",a:"0.6"},{n:["blue book"],u:"1f4d8",a:"0.6"},{n:["orange book"],u:"1f4d9",a:"0.6"},{n:["books"],u:"1f4da",a:"0.6"},{n:["notebook"],u:"1f4d3",a:"0.6"},{n:["ledger"],u:"1f4d2",a:"0.6"},{n:["page with curl"],u:"1f4c3",a:"0.6"},{n:["scroll"],u:"1f4dc",a:"0.6"},{n:["page facing up"],u:"1f4c4",a:"0.6"},{n:["newspaper"],u:"1f4f0",a:"0.6"},{n:["rolled-up newspaper","rolled up newspaper"],u:"1f5de-fe0f",a:"0.7"},{n:["bookmark tabs"],u:"1f4d1",a:"0.6"},{n:["bookmark"],u:"1f516",a:"0.6"},{n:["label"],u:"1f3f7-fe0f",a:"0.7"},{n:["moneybag","money bag"],u:"1f4b0",a:"0.6"},{n:["coin"],u:"1fa99",a:"13.0"},{n:["yen","banknote with yen sign"],u:"1f4b4",a:"0.6"},{n:["dollar","banknote with dollar sign"],u:"1f4b5",a:"0.6"},{n:["euro","banknote with euro sign"],u:"1f4b6",a:"1.0"},{n:["pound","banknote with pound sign"],u:"1f4b7",a:"1.0"},{n:["money with wings"],u:"1f4b8",a:"0.6"},{n:["credit card"],u:"1f4b3",a:"0.6"},{n:["receipt"],u:"1f9fe",a:"11.0"},{n:["chart","chart with upwards trend and yen sign"],u:"1f4b9",a:"0.6"},{n:["email","envelope"],u:"2709-fe0f",a:"0.6"},{n:["e-mail","e-mail symbol"],u:"1f4e7",a:"0.6"},{n:["incoming envelope"],u:"1f4e8",a:"0.6"},{n:["envelope with arrow","envelope with downwards arrow above"],u:"1f4e9",a:"0.6"},{n:["outbox tray"],u:"1f4e4",a:"0.6"},{n:["inbox tray"],u:"1f4e5",a:"0.6"},{n:["package"],u:"1f4e6",a:"0.6"},{n:["mailbox","closed mailbox with raised flag"],u:"1f4eb",a:"0.6"},{n:["mailbox closed","closed mailbox with lowered flag"],u:"1f4ea",a:"0.6"},{n:["mailbox with mail","open mailbox with raised flag"],u:"1f4ec",a:"0.7"},{n:["mailbox with no mail","open mailbox with lowered flag"],u:"1f4ed",a:"0.7"},{n:["postbox"],u:"1f4ee",a:"0.6"},{n:["ballot box with ballot"],u:"1f5f3-fe0f",a:"0.7"},{n:["pencil","pencil2"],u:"270f-fe0f",a:"0.6"},{n:["black nib"],u:"2712-fe0f",a:"0.6"},{n:["fountain pen","lower left fountain pen"],u:"1f58b-fe0f",a:"0.7"},{n:["pen","lower left ballpoint pen"],u:"1f58a-fe0f",a:"0.7"},{n:["paintbrush","lower left paintbrush"],u:"1f58c-fe0f",a:"0.7"},{n:["crayon","lower left crayon"],u:"1f58d-fe0f",a:"0.7"},{n:["memo","pencil"],u:"1f4dd",a:"0.6"},{n:["briefcase"],u:"1f4bc",a:"0.6"},{n:["file folder"],u:"1f4c1",a:"0.6"},{n:["open file folder"],u:"1f4c2",a:"0.6"},{n:["card index dividers"],u:"1f5c2-fe0f",a:"0.7"},{n:["date","calendar"],u:"1f4c5",a:"0.6"},{n:["calendar","tear-off calendar"],u:"1f4c6",a:"0.6"},{n:["spiral notepad","spiral note pad"],u:"1f5d2-fe0f",a:"0.7"},{n:["spiral calendar","spiral calendar pad"],u:"1f5d3-fe0f",a:"0.7"},{n:["card index"],u:"1f4c7",a:"0.6"},{n:["chart with upwards trend"],u:"1f4c8",a:"0.6"},{n:["chart with downwards trend"],u:"1f4c9",a:"0.6"},{n:["bar chart"],u:"1f4ca",a:"0.6"},{n:["clipboard"],u:"1f4cb",a:"0.6"},{n:["pushpin"],u:"1f4cc",a:"0.6"},{n:["round pushpin"],u:"1f4cd",a:"0.6"},{n:["paperclip"],u:"1f4ce",a:"0.6"},{n:["linked paperclips"],u:"1f587-fe0f",a:"0.7"},{n:["straight ruler"],u:"1f4cf",a:"0.6"},{n:["triangular ruler"],u:"1f4d0",a:"0.6"},{n:["scissors","black scissors"],u:"2702-fe0f",a:"0.6"},{n:["card file box"],u:"1f5c3-fe0f",a:"0.7"},{n:["file cabinet"],u:"1f5c4-fe0f",a:"0.7"},{n:["wastebasket"],u:"1f5d1-fe0f",a:"0.7"},{n:["lock"],u:"1f512",a:"0.6"},{n:["unlock","open lock"],u:"1f513",a:"0.6"},{n:["lock with ink pen"],u:"1f50f",a:"0.6"},{n:["closed lock with key"],u:"1f510",a:"0.6"},{n:["key"],u:"1f511",a:"0.6"},{n:["old key"],u:"1f5dd-fe0f",a:"0.7"},{n:["hammer"],u:"1f528",a:"0.6"},{n:["axe"],u:"1fa93",a:"12.0"},{n:["pick"],u:"26cf-fe0f",a:"0.7"},{n:["hammer and pick"],u:"2692-fe0f",a:"1.0"},{n:["hammer and wrench"],u:"1f6e0-fe0f",a:"0.7"},{n:["dagger","dagger knife"],u:"1f5e1-fe0f",a:"0.7"},{n:["crossed swords"],u:"2694-fe0f",a:"1.0"},{n:["gun","pistol"],u:"1f52b",a:"0.6"},{n:["boomerang"],u:"1fa83",a:"13.0"},{n:["bow and arrow"],u:"1f3f9",a:"1.0"},{n:["shield"],u:"1f6e1-fe0f",a:"0.7"},{n:["carpentry saw"],u:"1fa9a",a:"13.0"},{n:["wrench"],u:"1f527",a:"0.6"},{n:["screwdriver"],u:"1fa9b",a:"13.0"},{n:["nut and bolt"],u:"1f529",a:"0.6"},{n:["gear"],u:"2699-fe0f",a:"1.0"},{n:["clamp","compression"],u:"1f5dc-fe0f",a:"0.7"},{n:["scales","balance scale"],u:"2696-fe0f",a:"1.0"},{n:["probing cane"],u:"1f9af",a:"12.0"},{n:["link","link symbol"],u:"1f517",a:"0.6"},{n:["chains"],u:"26d3-fe0f",a:"0.7"},{n:["hook"],u:"1fa9d",a:"13.0"},{n:["toolbox"],u:"1f9f0",a:"11.0"},{n:["magnet"],u:"1f9f2",a:"11.0"},{n:["ladder"],u:"1fa9c",a:"13.0"},{n:["alembic"],u:"2697-fe0f",a:"1.0"},{n:["test tube"],u:"1f9ea",a:"11.0"},{n:["petri dish"],u:"1f9eb",a:"11.0"},{n:["dna","dna double helix"],u:"1f9ec",a:"11.0"},{n:["microscope"],u:"1f52c",a:"1.0"},{n:["telescope"],u:"1f52d",a:"1.0"},{n:["satellite antenna"],u:"1f4e1",a:"0.6"},{n:["syringe"],u:"1f489",a:"0.6"},{n:["drop of blood"],u:"1fa78",a:"12.0"},{n:["pill"],u:"1f48a",a:"0.6"},{n:["adhesive bandage"],u:"1fa79",a:"12.0"},{n:["crutch"],u:"1fa7c",a:"14.0"},{n:["stethoscope"],u:"1fa7a",a:"12.0"},{n:["x-ray"],u:"1fa7b",a:"14.0"},{n:["door"],u:"1f6aa",a:"0.6"},{n:["elevator"],u:"1f6d7",a:"13.0"},{n:["mirror"],u:"1fa9e",a:"13.0"},{n:["window"],u:"1fa9f",a:"13.0"},{n:["bed"],u:"1f6cf-fe0f",a:"0.7"},{n:["couch and lamp"],u:"1f6cb-fe0f",a:"0.7"},{n:["chair"],u:"1fa91",a:"12.0"},{n:["toilet"],u:"1f6bd",a:"0.6"},{n:["plunger"],u:"1faa0",a:"13.0"},{n:["shower"],u:"1f6bf",a:"1.0"},{n:["bathtub"],u:"1f6c1",a:"1.0"},{n:["mouse trap"],u:"1faa4",a:"13.0"},{n:["razor"],u:"1fa92",a:"12.0"},{n:["lotion bottle"],u:"1f9f4",a:"11.0"},{n:["safety pin"],u:"1f9f7",a:"11.0"},{n:["broom"],u:"1f9f9",a:"11.0"},{n:["basket"],u:"1f9fa",a:"11.0"},{n:["roll of paper"],u:"1f9fb",a:"11.0"},{n:["bucket"],u:"1faa3",a:"13.0"},{n:["soap","bar of soap"],u:"1f9fc",a:"11.0"},{n:["bubbles"],u:"1fae7",a:"14.0"},{n:["toothbrush"],u:"1faa5",a:"13.0"},{n:["sponge"],u:"1f9fd",a:"11.0"},{n:["fire extinguisher"],u:"1f9ef",a:"11.0"},{n:["shopping trolley"],u:"1f6d2",a:"3.0"},{n:["smoking","smoking symbol"],u:"1f6ac",a:"0.6"},{n:["coffin"],u:"26b0-fe0f",a:"1.0"},{n:["headstone"],u:"1faa6",a:"13.0"},{n:["funeral urn"],u:"26b1-fe0f",a:"1.0"},{n:["moyai"],u:"1f5ff",a:"0.6"},{n:["placard"],u:"1faa7",a:"13.0"},{n:["identification card"],u:"1faaa",a:"14.0"}],a0=[{n:["atm","automated teller machine"],u:"1f3e7",a:"0.6"},{n:["put litter in its place","put litter in its place symbol"],u:"1f6ae",a:"1.0"},{n:["potable water","potable water symbol"],u:"1f6b0",a:"1.0"},{n:["wheelchair","wheelchair symbol"],u:"267f",a:"0.6"},{n:["mens","mens symbol"],u:"1f6b9",a:"0.6"},{n:["womens","womens symbol"],u:"1f6ba",a:"0.6"},{n:["restroom"],u:"1f6bb",a:"0.6"},{n:["baby symbol"],u:"1f6bc",a:"0.6"},{n:["wc","water closet"],u:"1f6be",a:"0.6"},{n:["passport control"],u:"1f6c2",a:"1.0"},{n:["customs"],u:"1f6c3",a:"1.0"},{n:["baggage claim"],u:"1f6c4",a:"1.0"},{n:["left luggage"],u:"1f6c5",a:"1.0"},{n:["warning","warning sign"],u:"26a0-fe0f",a:"0.6"},{n:["children crossing"],u:"1f6b8",a:"1.0"},{n:["no entry"],u:"26d4",a:"0.6"},{n:["no entry sign"],u:"1f6ab",a:"0.6"},{n:["no bicycles"],u:"1f6b3",a:"1.0"},{n:["no smoking","no smoking symbol"],u:"1f6ad",a:"0.6"},{n:["do not litter","do not litter symbol"],u:"1f6af",a:"1.0"},{n:["non-potable water","non-potable water symbol"],u:"1f6b1",a:"1.0"},{n:["no pedestrians"],u:"1f6b7",a:"1.0"},{n:["no mobile phones"],u:"1f4f5",a:"1.0"},{n:["underage","no one under eighteen symbol"],u:"1f51e",a:"0.6"},{n:["radioactive","radioactive sign"],u:"2622-fe0f",a:"1.0"},{n:["biohazard","biohazard sign"],u:"2623-fe0f",a:"1.0"},{n:["arrow up","upwards black arrow"],u:"2b06-fe0f",a:"0.6"},{n:["north east arrow","arrow upper right"],u:"2197-fe0f",a:"0.6"},{n:["arrow right","black rightwards arrow"],u:"27a1-fe0f",a:"0.6"},{n:["south east arrow","arrow lower right"],u:"2198-fe0f",a:"0.6"},{n:["arrow down","downwards black arrow"],u:"2b07-fe0f",a:"0.6"},{n:["south west arrow","arrow lower left"],u:"2199-fe0f",a:"0.6"},{n:["arrow left","leftwards black arrow"],u:"2b05-fe0f",a:"0.6"},{n:["north west arrow","arrow upper left"],u:"2196-fe0f",a:"0.6"},{n:["up down arrow","arrow up down"],u:"2195-fe0f",a:"0.6"},{n:["left right arrow"],u:"2194-fe0f",a:"0.6"},{n:["leftwards arrow with hook"],u:"21a9-fe0f",a:"0.6"},{n:["arrow right hook","rightwards arrow with hook"],u:"21aa-fe0f",a:"0.6"},{n:["arrow heading up","arrow pointing rightwards then curving upwards"],u:"2934-fe0f",a:"0.6"},{n:["arrow heading down","arrow pointing rightwards then curving downwards"],u:"2935-fe0f",a:"0.6"},{n:["arrows clockwise","clockwise downwards and upwards open circle arrows"],u:"1f503",a:"0.6"},{n:["arrows counterclockwise","anticlockwise downwards and upwards open circle arrows"],u:"1f504",a:"1.0"},{n:["back","back with leftwards arrow above"],u:"1f519",a:"0.6"},{n:["end","end with leftwards arrow above"],u:"1f51a",a:"0.6"},{n:["on","on with exclamation mark with left right arrow above"],u:"1f51b",a:"0.6"},{n:["soon","soon with rightwards arrow above"],u:"1f51c",a:"0.6"},{n:["top","top with upwards arrow above"],u:"1f51d",a:"0.6"},{n:["place of worship"],u:"1f6d0",a:"1.0"},{n:["atom symbol"],u:"269b-fe0f",a:"1.0"},{n:["om","om symbol"],u:"1f549-fe0f",a:"0.7"},{n:["star of david"],u:"2721-fe0f",a:"0.7"},{n:["wheel of dharma"],u:"2638-fe0f",a:"0.7"},{n:["yin yang"],u:"262f-fe0f",a:"0.7"},{n:["latin cross"],u:"271d-fe0f",a:"0.7"},{n:["orthodox cross"],u:"2626-fe0f",a:"1.0"},{n:["star and crescent"],u:"262a-fe0f",a:"0.7"},{n:["peace symbol"],u:"262e-fe0f",a:"1.0"},{n:["menorah with nine branches"],u:"1f54e",a:"1.0"},{n:["six pointed star","six pointed star with middle dot"],u:"1f52f",a:"0.6"},{n:["aries"],u:"2648",a:"0.6"},{n:["taurus"],u:"2649",a:"0.6"},{n:["gemini"],u:"264a",a:"0.6"},{n:["cancer"],u:"264b",a:"0.6"},{n:["leo"],u:"264c",a:"0.6"},{n:["virgo"],u:"264d",a:"0.6"},{n:["libra"],u:"264e",a:"0.6"},{n:["scorpius"],u:"264f",a:"0.6"},{n:["sagittarius"],u:"2650",a:"0.6"},{n:["capricorn"],u:"2651",a:"0.6"},{n:["aquarius"],u:"2652",a:"0.6"},{n:["pisces"],u:"2653",a:"0.6"},{n:["ophiuchus"],u:"26ce",a:"0.6"},{n:["twisted rightwards arrows"],u:"1f500",a:"1.0"},{n:["repeat","clockwise rightwards and leftwards open circle arrows"],u:"1f501",a:"1.0"},{n:["repeat one","clockwise rightwards and leftwards open circle arrows with circled one overlay"],u:"1f502",a:"1.0"},{n:["arrow forward","black right-pointing triangle"],u:"25b6-fe0f",a:"0.6"},{n:["fast forward","black right-pointing double triangle"],u:"23e9",a:"0.6"},{n:["next track button","black right pointing double triangle with vertical bar"],u:"23ed-fe0f",a:"0.7"},{n:["play or pause button","black right pointing triangle with double vertical bar"],u:"23ef-fe0f",a:"1.0"},{n:["arrow backward","black left-pointing triangle"],u:"25c0-fe0f",a:"0.6"},{n:["rewind","black left-pointing double triangle"],u:"23ea",a:"0.6"},{n:["last track button","black left pointing double triangle with vertical bar"],u:"23ee-fe0f",a:"0.7"},{n:["arrow up small","up-pointing small red triangle"],u:"1f53c",a:"0.6"},{n:["arrow double up","black up-pointing double triangle"],u:"23eb",a:"0.6"},{n:["arrow down small","down-pointing small red triangle"],u:"1f53d",a:"0.6"},{n:["arrow double down","black down-pointing double triangle"],u:"23ec",a:"0.6"},{n:["pause button","double vertical bar"],u:"23f8-fe0f",a:"0.7"},{n:["stop button","black square for stop"],u:"23f9-fe0f",a:"0.7"},{n:["record button","black circle for record"],u:"23fa-fe0f",a:"0.7"},{n:["eject","eject button"],u:"23cf-fe0f",a:"1.0"},{n:["cinema"],u:"1f3a6",a:"0.6"},{n:["low brightness","low brightness symbol"],u:"1f505",a:"1.0"},{n:["high brightness","high brightness symbol"],u:"1f506",a:"1.0"},{n:["signal strength","antenna with bars"],u:"1f4f6",a:"0.6"},{n:["vibration mode"],u:"1f4f3",a:"0.6"},{n:["mobile phone off"],u:"1f4f4",a:"0.6"},{n:["female sign"],u:"2640-fe0f",a:"4.0"},{n:["male sign"],u:"2642-fe0f",a:"4.0"},{n:["transgender symbol"],u:"26a7-fe0f",a:"13.0"},{n:["heavy multiplication x"],u:"2716-fe0f",a:"0.6"},{n:["heavy plus sign"],u:"2795",a:"0.6"},{n:["heavy minus sign"],u:"2796",a:"0.6"},{n:["heavy division sign"],u:"2797",a:"0.6"},{n:["heavy equals sign"],u:"1f7f0",a:"14.0"},{n:["infinity"],u:"267e-fe0f",a:"11.0"},{n:["bangbang","double exclamation mark"],u:"203c-fe0f",a:"0.6"},{n:["interrobang","exclamation question mark"],u:"2049-fe0f",a:"0.6"},{n:["question","black question mark ornament"],u:"2753",a:"0.6"},{n:["grey question","white question mark ornament"],u:"2754",a:"0.6"},{n:["grey exclamation","white exclamation mark ornament"],u:"2755",a:"0.6"},{n:["exclamation","heavy exclamation mark","heavy exclamation mark symbol"],u:"2757",a:"0.6"},{n:["wavy dash"],u:"3030-fe0f",a:"0.6"},{n:["currency exchange"],u:"1f4b1",a:"0.6"},{n:["heavy dollar sign"],u:"1f4b2",a:"0.6"},{n:["medical symbol","staff of aesculapius"],u:"2695-fe0f",a:"4.0"},{n:["recycle","black universal recycling symbol"],u:"267b-fe0f",a:"0.6"},{n:["fleur-de-lis","fleur de lis"],u:"269c-fe0f",a:"1.0"},{n:["trident","trident emblem"],u:"1f531",a:"0.6"},{n:["name badge"],u:"1f4db",a:"0.6"},{n:["beginner","japanese symbol for beginner"],u:"1f530",a:"0.6"},{n:["o","heavy large circle"],u:"2b55",a:"0.6"},{n:["white check mark","white heavy check mark"],u:"2705",a:"0.6"},{n:["ballot box with check"],u:"2611-fe0f",a:"0.6"},{n:["heavy check mark"],u:"2714-fe0f",a:"0.6"},{n:["x","cross mark"],u:"274c",a:"0.6"},{n:["negative squared cross mark"],u:"274e",a:"0.6"},{n:["curly loop"],u:"27b0",a:"0.6"},{n:["loop","double curly loop"],u:"27bf",a:"1.0"},{n:["part alternation mark"],u:"303d-fe0f",a:"0.6"},{n:["eight spoked asterisk"],u:"2733-fe0f",a:"0.6"},{n:["eight pointed black star"],u:"2734-fe0f",a:"0.6"},{n:["sparkle"],u:"2747-fe0f",a:"0.6"},{n:["copyright","copyright sign"],u:"00a9-fe0f",a:"0.6"},{n:["registered","registered sign"],u:"00ae-fe0f",a:"0.6"},{n:["tm","trade mark sign"],u:"2122-fe0f",a:"0.6"},{n:["hash","hash key"],u:"0023-fe0f-20e3",a:"0.6"},{n:["keycap: *","keycap star"],u:"002a-fe0f-20e3",a:"2.0"},{n:["zero","keycap 0"],u:"0030-fe0f-20e3",a:"0.6"},{n:["one","keycap 1"],u:"0031-fe0f-20e3",a:"0.6"},{n:["two","keycap 2"],u:"0032-fe0f-20e3",a:"0.6"},{n:["three","keycap 3"],u:"0033-fe0f-20e3",a:"0.6"},{n:["four","keycap 4"],u:"0034-fe0f-20e3",a:"0.6"},{n:["five","keycap 5"],u:"0035-fe0f-20e3",a:"0.6"},{n:["six","keycap 6"],u:"0036-fe0f-20e3",a:"0.6"},{n:["seven","keycap 7"],u:"0037-fe0f-20e3",a:"0.6"},{n:["eight","keycap 8"],u:"0038-fe0f-20e3",a:"0.6"},{n:["nine","keycap 9"],u:"0039-fe0f-20e3",a:"0.6"},{n:["keycap ten"],u:"1f51f",a:"0.6"},{n:["capital abcd","input symbol for latin capital letters"],u:"1f520",a:"0.6"},{n:["abcd","input symbol for latin small letters"],u:"1f521",a:"0.6"},{n:["1234","input symbol for numbers"],u:"1f522",a:"0.6"},{n:["symbols","input symbol for symbols"],u:"1f523",a:"0.6"},{n:["abc","input symbol for latin letters"],u:"1f524",a:"0.6"},{n:["a","negative squared latin capital letter a"],u:"1f170-fe0f",a:"0.6"},{n:["ab","negative squared ab"],u:"1f18e",a:"0.6"},{n:["b","negative squared latin capital letter b"],u:"1f171-fe0f",a:"0.6"},{n:["cl","squared cl"],u:"1f191",a:"0.6"},{n:["cool","squared cool"],u:"1f192",a:"0.6"},{n:["free","squared free"],u:"1f193",a:"0.6"},{n:["information source"],u:"2139-fe0f",a:"0.6"},{n:["id","squared id"],u:"1f194",a:"0.6"},{n:["m","circled latin capital letter m"],u:"24c2-fe0f",a:"0.6"},{n:["new","squared new"],u:"1f195",a:"0.6"},{n:["ng","squared ng"],u:"1f196",a:"0.6"},{n:["o2","negative squared latin capital letter o"],u:"1f17e-fe0f",a:"0.6"},{n:["ok","squared ok"],u:"1f197",a:"0.6"},{n:["parking","negative squared latin capital letter p"],u:"1f17f-fe0f",a:"0.6"},{n:["sos","squared sos"],u:"1f198",a:"0.6"},{n:["up","squared up with exclamation mark"],u:"1f199",a:"0.6"},{n:["vs","squared vs"],u:"1f19a",a:"0.6"},{n:["koko","squared katakana koko"],u:"1f201",a:"0.6"},{n:["sa","squared katakana sa"],u:"1f202-fe0f",a:"0.6"},{n:["u6708","squared cjk unified ideograph-6708"],u:"1f237-fe0f",a:"0.6"},{n:["u6709","squared cjk unified ideograph-6709"],u:"1f236",a:"0.6"},{n:["u6307","squared cjk unified ideograph-6307"],u:"1f22f",a:"0.6"},{n:["ideograph advantage","circled ideograph advantage"],u:"1f250",a:"0.6"},{n:["u5272","squared cjk unified ideograph-5272"],u:"1f239",a:"0.6"},{n:["u7121","squared cjk unified ideograph-7121"],u:"1f21a",a:"0.6"},{n:["u7981","squared cjk unified ideograph-7981"],u:"1f232",a:"0.6"},{n:["accept","circled ideograph accept"],u:"1f251",a:"0.6"},{n:["u7533","squared cjk unified ideograph-7533"],u:"1f238",a:"0.6"},{n:["u5408","squared cjk unified ideograph-5408"],u:"1f234",a:"0.6"},{n:["u7a7a","squared cjk unified ideograph-7a7a"],u:"1f233",a:"0.6"},{n:["congratulations","circled ideograph congratulation"],u:"3297-fe0f",a:"0.6"},{n:["secret","circled ideograph secret"],u:"3299-fe0f",a:"0.6"},{n:["u55b6","squared cjk unified ideograph-55b6"],u:"1f23a",a:"0.6"},{n:["u6e80","squared cjk unified ideograph-6e80"],u:"1f235",a:"0.6"},{n:["red circle","large red circle"],u:"1f534",a:"0.6"},{n:["large orange circle"],u:"1f7e0",a:"12.0"},{n:["large yellow circle"],u:"1f7e1",a:"12.0"},{n:["large green circle"],u:"1f7e2",a:"12.0"},{n:["large blue circle"],u:"1f535",a:"0.6"},{n:["large purple circle"],u:"1f7e3",a:"12.0"},{n:["large brown circle"],u:"1f7e4",a:"12.0"},{n:["black circle","medium black circle"],u:"26ab",a:"0.6"},{n:["white circle","medium white circle"],u:"26aa",a:"0.6"},{n:["large red square"],u:"1f7e5",a:"12.0"},{n:["large orange square"],u:"1f7e7",a:"12.0"},{n:["large yellow square"],u:"1f7e8",a:"12.0"},{n:["large green square"],u:"1f7e9",a:"12.0"},{n:["large blue square"],u:"1f7e6",a:"12.0"},{n:["large purple square"],u:"1f7ea",a:"12.0"},{n:["large brown square"],u:"1f7eb",a:"12.0"},{n:["black large square"],u:"2b1b",a:"0.6"},{n:["white large square"],u:"2b1c",a:"0.6"},{n:["black medium square"],u:"25fc-fe0f",a:"0.6"},{n:["white medium square"],u:"25fb-fe0f",a:"0.6"},{n:["black medium small square"],u:"25fe",a:"0.6"},{n:["white medium small square"],u:"25fd",a:"0.6"},{n:["black small square"],u:"25aa-fe0f",a:"0.6"},{n:["white small square"],u:"25ab-fe0f",a:"0.6"},{n:["large orange diamond"],u:"1f536",a:"0.6"},{n:["large blue diamond"],u:"1f537",a:"0.6"},{n:["small orange diamond"],u:"1f538",a:"0.6"},{n:["small blue diamond"],u:"1f539",a:"0.6"},{n:["small red triangle","up-pointing red triangle"],u:"1f53a",a:"0.6"},{n:["small red triangle down","down-pointing red triangle"],u:"1f53b",a:"0.6"},{n:["diamond shape with a dot inside"],u:"1f4a0",a:"0.6"},{n:["radio button"],u:"1f518",a:"0.6"},{n:["white square button"],u:"1f533",a:"0.6"},{n:["black square button"],u:"1f532",a:"0.6"}],n0=[{n:["chequered flag","checkered flag"],u:"1f3c1",a:"0.6"},{n:["triangular flag on post"],u:"1f6a9",a:"0.6"},{n:["crossed flags"],u:"1f38c",a:"0.6"},{n:["waving black flag"],u:"1f3f4",a:"1.0"},{n:["white flag","waving white flag"],u:"1f3f3-fe0f",a:"0.7"},{n:["rainbow flag","rainbow-flag"],u:"1f3f3-fe0f-200d-1f308",a:"4.0"},{n:["transgender flag"],u:"1f3f3-fe0f-200d-26a7-fe0f",a:"13.0"},{n:["pirate flag"],u:"1f3f4-200d-2620-fe0f",a:"11.0"},{n:["flag-ac","ascension island flag"],u:"1f1e6-1f1e8",a:"2.0"},{n:["flag-ad","andorra flag"],u:"1f1e6-1f1e9",a:"2.0"},{n:["flag-ae","united arab emirates flag"],u:"1f1e6-1f1ea",a:"2.0"},{n:["flag-af","afghanistan flag"],u:"1f1e6-1f1eb",a:"2.0"},{n:["flag-ag","antigua & barbuda flag"],u:"1f1e6-1f1ec",a:"2.0"},{n:["flag-ai","anguilla flag"],u:"1f1e6-1f1ee",a:"2.0"},{n:["flag-al","albania flag"],u:"1f1e6-1f1f1",a:"2.0"},{n:["flag-am","armenia flag"],u:"1f1e6-1f1f2",a:"2.0"},{n:["flag-ao","angola flag"],u:"1f1e6-1f1f4",a:"2.0"},{n:["flag-aq","antarctica flag"],u:"1f1e6-1f1f6",a:"2.0"},{n:["flag-ar","argentina flag"],u:"1f1e6-1f1f7",a:"2.0"},{n:["flag-as","american samoa flag"],u:"1f1e6-1f1f8",a:"2.0"},{n:["flag-at","austria flag"],u:"1f1e6-1f1f9",a:"2.0"},{n:["flag-au","australia flag"],u:"1f1e6-1f1fa",a:"2.0"},{n:["flag-aw","aruba flag"],u:"1f1e6-1f1fc",a:"2.0"},{n:["flag-ax","åland islands flag"],u:"1f1e6-1f1fd",a:"2.0"},{n:["flag-az","azerbaijan flag"],u:"1f1e6-1f1ff",a:"2.0"},{n:["flag-ba","bosnia & herzegovina flag"],u:"1f1e7-1f1e6",a:"2.0"},{n:["flag-bb","barbados flag"],u:"1f1e7-1f1e7",a:"2.0"},{n:["flag-bd","bangladesh flag"],u:"1f1e7-1f1e9",a:"2.0"},{n:["flag-be","belgium flag"],u:"1f1e7-1f1ea",a:"2.0"},{n:["flag-bf","burkina faso flag"],u:"1f1e7-1f1eb",a:"2.0"},{n:["flag-bg","bulgaria flag"],u:"1f1e7-1f1ec",a:"2.0"},{n:["flag-bh","bahrain flag"],u:"1f1e7-1f1ed",a:"2.0"},{n:["flag-bi","burundi flag"],u:"1f1e7-1f1ee",a:"2.0"},{n:["flag-bj","benin flag"],u:"1f1e7-1f1ef",a:"2.0"},{n:["flag-bl","st. barthélemy flag"],u:"1f1e7-1f1f1",a:"2.0"},{n:["flag-bm","bermuda flag"],u:"1f1e7-1f1f2",a:"2.0"},{n:["flag-bn","brunei flag"],u:"1f1e7-1f1f3",a:"2.0"},{n:["flag-bo","bolivia flag"],u:"1f1e7-1f1f4",a:"2.0"},{n:["flag-bq","caribbean netherlands flag"],u:"1f1e7-1f1f6",a:"2.0"},{n:["flag-br","brazil flag"],u:"1f1e7-1f1f7",a:"2.0"},{n:["flag-bs","bahamas flag"],u:"1f1e7-1f1f8",a:"2.0"},{n:["flag-bt","bhutan flag"],u:"1f1e7-1f1f9",a:"2.0"},{n:["flag-bv","bouvet island flag"],u:"1f1e7-1f1fb",a:"2.0"},{n:["flag-bw","botswana flag"],u:"1f1e7-1f1fc",a:"2.0"},{n:["flag-by","belarus flag"],u:"1f1e7-1f1fe",a:"2.0"},{n:["flag-bz","belize flag"],u:"1f1e7-1f1ff",a:"2.0"},{n:["flag-ca","canada flag"],u:"1f1e8-1f1e6",a:"2.0"},{n:["flag-cc","cocos (keeling) islands flag"],u:"1f1e8-1f1e8",a:"2.0"},{n:["flag-cd","congo - kinshasa flag"],u:"1f1e8-1f1e9",a:"2.0"},{n:["flag-cf","central african republic flag"],u:"1f1e8-1f1eb",a:"2.0"},{n:["flag-cg","congo - brazzaville flag"],u:"1f1e8-1f1ec",a:"2.0"},{n:["flag-ch","switzerland flag"],u:"1f1e8-1f1ed",a:"2.0"},{n:["flag-ci","côte d’ivoire flag"],u:"1f1e8-1f1ee",a:"2.0"},{n:["flag-ck","cook islands flag"],u:"1f1e8-1f1f0",a:"2.0"},{n:["flag-cl","chile flag"],u:"1f1e8-1f1f1",a:"2.0"},{n:["flag-cm","cameroon flag"],u:"1f1e8-1f1f2",a:"2.0"},{n:["cn","flag-cn","china flag"],u:"1f1e8-1f1f3",a:"0.6"},{n:["flag-co","colombia flag"],u:"1f1e8-1f1f4",a:"2.0"},{n:["flag-cp","clipperton island flag"],u:"1f1e8-1f1f5",a:"2.0"},{n:["flag-cr","costa rica flag"],u:"1f1e8-1f1f7",a:"2.0"},{n:["flag-cu","cuba flag"],u:"1f1e8-1f1fa",a:"2.0"},{n:["flag-cv","cape verde flag"],u:"1f1e8-1f1fb",a:"2.0"},{n:["flag-cw","curaçao flag"],u:"1f1e8-1f1fc",a:"2.0"},{n:["flag-cx","christmas island flag"],u:"1f1e8-1f1fd",a:"2.0"},{n:["flag-cy","cyprus flag"],u:"1f1e8-1f1fe",a:"2.0"},{n:["flag-cz","czechia flag"],u:"1f1e8-1f1ff",a:"2.0"},{n:["de","flag-de","germany flag"],u:"1f1e9-1f1ea",a:"0.6"},{n:["flag-dg","diego garcia flag"],u:"1f1e9-1f1ec",a:"2.0"},{n:["flag-dj","djibouti flag"],u:"1f1e9-1f1ef",a:"2.0"},{n:["flag-dk","denmark flag"],u:"1f1e9-1f1f0",a:"2.0"},{n:["flag-dm","dominica flag"],u:"1f1e9-1f1f2",a:"2.0"},{n:["flag-do","dominican republic flag"],u:"1f1e9-1f1f4",a:"2.0"},{n:["flag-dz","algeria flag"],u:"1f1e9-1f1ff",a:"2.0"},{n:["flag-ea","ceuta & melilla flag"],u:"1f1ea-1f1e6",a:"2.0"},{n:["flag-ec","ecuador flag"],u:"1f1ea-1f1e8",a:"2.0"},{n:["flag-ee","estonia flag"],u:"1f1ea-1f1ea",a:"2.0"},{n:["flag-eg","egypt flag"],u:"1f1ea-1f1ec",a:"2.0"},{n:["flag-eh","western sahara flag"],u:"1f1ea-1f1ed",a:"2.0"},{n:["flag-er","eritrea flag"],u:"1f1ea-1f1f7",a:"2.0"},{n:["es","flag-es","spain flag"],u:"1f1ea-1f1f8",a:"0.6"},{n:["flag-et","ethiopia flag"],u:"1f1ea-1f1f9",a:"2.0"},{n:["flag-eu","european union flag"],u:"1f1ea-1f1fa",a:"2.0"},{n:["flag-fi","finland flag"],u:"1f1eb-1f1ee",a:"2.0"},{n:["flag-fj","fiji flag"],u:"1f1eb-1f1ef",a:"2.0"},{n:["flag-fk","falkland islands flag"],u:"1f1eb-1f1f0",a:"2.0"},{n:["flag-fm","micronesia flag"],u:"1f1eb-1f1f2",a:"2.0"},{n:["flag-fo","faroe islands flag"],u:"1f1eb-1f1f4",a:"2.0"},{n:["fr","flag-fr","france flag"],u:"1f1eb-1f1f7",a:"0.6"},{n:["flag-ga","gabon flag"],u:"1f1ec-1f1e6",a:"2.0"},{n:["gb","uk","flag-gb","united kingdom flag"],u:"1f1ec-1f1e7",a:"0.6"},{n:["flag-gd","grenada flag"],u:"1f1ec-1f1e9",a:"2.0"},{n:["flag-ge","georgia flag"],u:"1f1ec-1f1ea",a:"2.0"},{n:["flag-gf","french guiana flag"],u:"1f1ec-1f1eb",a:"2.0"},{n:["flag-gg","guernsey flag"],u:"1f1ec-1f1ec",a:"2.0"},{n:["flag-gh","ghana flag"],u:"1f1ec-1f1ed",a:"2.0"},{n:["flag-gi","gibraltar flag"],u:"1f1ec-1f1ee",a:"2.0"},{n:["flag-gl","greenland flag"],u:"1f1ec-1f1f1",a:"2.0"},{n:["flag-gm","gambia flag"],u:"1f1ec-1f1f2",a:"2.0"},{n:["flag-gn","guinea flag"],u:"1f1ec-1f1f3",a:"2.0"},{n:["flag-gp","guadeloupe flag"],u:"1f1ec-1f1f5",a:"2.0"},{n:["flag-gq","equatorial guinea flag"],u:"1f1ec-1f1f6",a:"2.0"},{n:["flag-gr","greece flag"],u:"1f1ec-1f1f7",a:"2.0"},{n:["flag-gs","south georgia & south sandwich islands flag"],u:"1f1ec-1f1f8",a:"2.0"},{n:["flag-gt","guatemala flag"],u:"1f1ec-1f1f9",a:"2.0"},{n:["flag-gu","guam flag"],u:"1f1ec-1f1fa",a:"2.0"},{n:["flag-gw","guinea-bissau flag"],u:"1f1ec-1f1fc",a:"2.0"},{n:["flag-gy","guyana flag"],u:"1f1ec-1f1fe",a:"2.0"},{n:["flag-hk","hong kong sar china flag"],u:"1f1ed-1f1f0",a:"2.0"},{n:["flag-hm","heard & mcdonald islands flag"],u:"1f1ed-1f1f2",a:"2.0"},{n:["flag-hn","honduras flag"],u:"1f1ed-1f1f3",a:"2.0"},{n:["flag-hr","croatia flag"],u:"1f1ed-1f1f7",a:"2.0"},{n:["flag-ht","haiti flag"],u:"1f1ed-1f1f9",a:"2.0"},{n:["flag-hu","hungary flag"],u:"1f1ed-1f1fa",a:"2.0"},{n:["flag-ic","canary islands flag"],u:"1f1ee-1f1e8",a:"2.0"},{n:["flag-id","indonesia flag"],u:"1f1ee-1f1e9",a:"2.0"},{n:["flag-ie","ireland flag"],u:"1f1ee-1f1ea",a:"2.0"},{n:["flag-il","israel flag"],u:"1f1ee-1f1f1",a:"2.0"},{n:["flag-im","isle of man flag"],u:"1f1ee-1f1f2",a:"2.0"},{n:["flag-in","india flag"],u:"1f1ee-1f1f3",a:"2.0"},{n:["flag-io","british indian ocean territory flag"],u:"1f1ee-1f1f4",a:"2.0"},{n:["flag-iq","iraq flag"],u:"1f1ee-1f1f6",a:"2.0"},{n:["flag-ir","iran flag"],u:"1f1ee-1f1f7",a:"2.0"},{n:["flag-is","iceland flag"],u:"1f1ee-1f1f8",a:"2.0"},{n:["it","flag-it","italy flag"],u:"1f1ee-1f1f9",a:"0.6"},{n:["flag-je","jersey flag"],u:"1f1ef-1f1ea",a:"2.0"},{n:["flag-jm","jamaica flag"],u:"1f1ef-1f1f2",a:"2.0"},{n:["flag-jo","jordan flag"],u:"1f1ef-1f1f4",a:"2.0"},{n:["jp","flag-jp","japan flag"],u:"1f1ef-1f1f5",a:"0.6"},{n:["flag-ke","kenya flag"],u:"1f1f0-1f1ea",a:"2.0"},{n:["flag-kg","kyrgyzstan flag"],u:"1f1f0-1f1ec",a:"2.0"},{n:["flag-kh","cambodia flag"],u:"1f1f0-1f1ed",a:"2.0"},{n:["flag-ki","kiribati flag"],u:"1f1f0-1f1ee",a:"2.0"},{n:["flag-km","comoros flag"],u:"1f1f0-1f1f2",a:"2.0"},{n:["flag-kn","st. kitts & nevis flag"],u:"1f1f0-1f1f3",a:"2.0"},{n:["flag-kp","north korea flag"],u:"1f1f0-1f1f5",a:"2.0"},{n:["kr","flag-kr","south korea flag"],u:"1f1f0-1f1f7",a:"0.6"},{n:["flag-kw","kuwait flag"],u:"1f1f0-1f1fc",a:"2.0"},{n:["flag-ky","cayman islands flag"],u:"1f1f0-1f1fe",a:"2.0"},{n:["flag-kz","kazakhstan flag"],u:"1f1f0-1f1ff",a:"2.0"},{n:["flag-la","laos flag"],u:"1f1f1-1f1e6",a:"2.0"},{n:["flag-lb","lebanon flag"],u:"1f1f1-1f1e7",a:"2.0"},{n:["flag-lc","st. lucia flag"],u:"1f1f1-1f1e8",a:"2.0"},{n:["flag-li","liechtenstein flag"],u:"1f1f1-1f1ee",a:"2.0"},{n:["flag-lk","sri lanka flag"],u:"1f1f1-1f1f0",a:"2.0"},{n:["flag-lr","liberia flag"],u:"1f1f1-1f1f7",a:"2.0"},{n:["flag-ls","lesotho flag"],u:"1f1f1-1f1f8",a:"2.0"},{n:["flag-lt","lithuania flag"],u:"1f1f1-1f1f9",a:"2.0"},{n:["flag-lu","luxembourg flag"],u:"1f1f1-1f1fa",a:"2.0"},{n:["flag-lv","latvia flag"],u:"1f1f1-1f1fb",a:"2.0"},{n:["flag-ly","libya flag"],u:"1f1f1-1f1fe",a:"2.0"},{n:["flag-ma","morocco flag"],u:"1f1f2-1f1e6",a:"2.0"},{n:["flag-mc","monaco flag"],u:"1f1f2-1f1e8",a:"2.0"},{n:["flag-md","moldova flag"],u:"1f1f2-1f1e9",a:"2.0"},{n:["flag-me","montenegro flag"],u:"1f1f2-1f1ea",a:"2.0"},{n:["flag-mf","st. martin flag"],u:"1f1f2-1f1eb",a:"2.0"},{n:["flag-mg","madagascar flag"],u:"1f1f2-1f1ec",a:"2.0"},{n:["flag-mh","marshall islands flag"],u:"1f1f2-1f1ed",a:"2.0"},{n:["flag-mk","north macedonia flag"],u:"1f1f2-1f1f0",a:"2.0"},{n:["flag-ml","mali flag"],u:"1f1f2-1f1f1",a:"2.0"},{n:["flag-mm","myanmar (burma) flag"],u:"1f1f2-1f1f2",a:"2.0"},{n:["flag-mn","mongolia flag"],u:"1f1f2-1f1f3",a:"2.0"},{n:["flag-mo","macao sar china flag"],u:"1f1f2-1f1f4",a:"2.0"},{n:["flag-mp","northern mariana islands flag"],u:"1f1f2-1f1f5",a:"2.0"},{n:["flag-mq","martinique flag"],u:"1f1f2-1f1f6",a:"2.0"},{n:["flag-mr","mauritania flag"],u:"1f1f2-1f1f7",a:"2.0"},{n:["flag-ms","montserrat flag"],u:"1f1f2-1f1f8",a:"2.0"},{n:["flag-mt","malta flag"],u:"1f1f2-1f1f9",a:"2.0"},{n:["flag-mu","mauritius flag"],u:"1f1f2-1f1fa",a:"2.0"},{n:["flag-mv","maldives flag"],u:"1f1f2-1f1fb",a:"2.0"},{n:["flag-mw","malawi flag"],u:"1f1f2-1f1fc",a:"2.0"},{n:["flag-mx","mexico flag"],u:"1f1f2-1f1fd",a:"2.0"},{n:["flag-my","malaysia flag"],u:"1f1f2-1f1fe",a:"2.0"},{n:["flag-mz","mozambique flag"],u:"1f1f2-1f1ff",a:"2.0"},{n:["flag-na","namibia flag"],u:"1f1f3-1f1e6",a:"2.0"},{n:["flag-nc","new caledonia flag"],u:"1f1f3-1f1e8",a:"2.0"},{n:["flag-ne","niger flag"],u:"1f1f3-1f1ea",a:"2.0"},{n:["flag-nf","norfolk island flag"],u:"1f1f3-1f1eb",a:"2.0"},{n:["flag-ng","nigeria flag"],u:"1f1f3-1f1ec",a:"2.0"},{n:["flag-ni","nicaragua flag"],u:"1f1f3-1f1ee",a:"2.0"},{n:["flag-nl","netherlands flag"],u:"1f1f3-1f1f1",a:"2.0"},{n:["flag-no","norway flag"],u:"1f1f3-1f1f4",a:"2.0"},{n:["flag-np","nepal flag"],u:"1f1f3-1f1f5",a:"2.0"},{n:["flag-nr","nauru flag"],u:"1f1f3-1f1f7",a:"2.0"},{n:["flag-nu","niue flag"],u:"1f1f3-1f1fa",a:"2.0"},{n:["flag-nz","new zealand flag"],u:"1f1f3-1f1ff",a:"2.0"},{n:["flag-om","oman flag"],u:"1f1f4-1f1f2",a:"2.0"},{n:["flag-pa","panama flag"],u:"1f1f5-1f1e6",a:"2.0"},{n:["flag-pe","peru flag"],u:"1f1f5-1f1ea",a:"2.0"},{n:["flag-pf","french polynesia flag"],u:"1f1f5-1f1eb",a:"2.0"},{n:["flag-pg","papua new guinea flag"],u:"1f1f5-1f1ec",a:"2.0"},{n:["flag-ph","philippines flag"],u:"1f1f5-1f1ed",a:"2.0"},{n:["flag-pk","pakistan flag"],u:"1f1f5-1f1f0",a:"2.0"},{n:["flag-pl","poland flag"],u:"1f1f5-1f1f1",a:"2.0"},{n:["flag-pm","st. pierre & miquelon flag"],u:"1f1f5-1f1f2",a:"2.0"},{n:["flag-pn","pitcairn islands flag"],u:"1f1f5-1f1f3",a:"2.0"},{n:["flag-pr","puerto rico flag"],u:"1f1f5-1f1f7",a:"2.0"},{n:["flag-ps","palestinian territories flag"],u:"1f1f5-1f1f8",a:"2.0"},{n:["flag-pt","portugal flag"],u:"1f1f5-1f1f9",a:"2.0"},{n:["flag-pw","palau flag"],u:"1f1f5-1f1fc",a:"2.0"},{n:["flag-py","paraguay flag"],u:"1f1f5-1f1fe",a:"2.0"},{n:["flag-qa","qatar flag"],u:"1f1f6-1f1e6",a:"2.0"},{n:["flag-re","réunion flag"],u:"1f1f7-1f1ea",a:"2.0"},{n:["flag-ro","romania flag"],u:"1f1f7-1f1f4",a:"2.0"},{n:["flag-rs","serbia flag"],u:"1f1f7-1f1f8",a:"2.0"},{n:["ru","flag-ru","russia flag"],u:"1f1f7-1f1fa",a:"0.6"},{n:["flag-rw","rwanda flag"],u:"1f1f7-1f1fc",a:"2.0"},{n:["flag-sa","saudi arabia flag"],u:"1f1f8-1f1e6",a:"2.0"},{n:["flag-sb","solomon islands flag"],u:"1f1f8-1f1e7",a:"2.0"},{n:["flag-sc","seychelles flag"],u:"1f1f8-1f1e8",a:"2.0"},{n:["flag-sd","sudan flag"],u:"1f1f8-1f1e9",a:"2.0"},{n:["flag-se","sweden flag"],u:"1f1f8-1f1ea",a:"2.0"},{n:["flag-sg","singapore flag"],u:"1f1f8-1f1ec",a:"2.0"},{n:["flag-sh","st. helena flag"],u:"1f1f8-1f1ed",a:"2.0"},{n:["flag-si","slovenia flag"],u:"1f1f8-1f1ee",a:"2.0"},{n:["flag-sj","svalbard & jan mayen flag"],u:"1f1f8-1f1ef",a:"2.0"},{n:["flag-sk","slovakia flag"],u:"1f1f8-1f1f0",a:"2.0"},{n:["flag-sl","sierra leone flag"],u:"1f1f8-1f1f1",a:"2.0"},{n:["flag-sm","san marino flag"],u:"1f1f8-1f1f2",a:"2.0"},{n:["flag-sn","senegal flag"],u:"1f1f8-1f1f3",a:"2.0"},{n:["flag-so","somalia flag"],u:"1f1f8-1f1f4",a:"2.0"},{n:["flag-sr","suriname flag"],u:"1f1f8-1f1f7",a:"2.0"},{n:["flag-ss","south sudan flag"],u:"1f1f8-1f1f8",a:"2.0"},{n:["flag-st","são tomé & príncipe flag"],u:"1f1f8-1f1f9",a:"2.0"},{n:["flag-sv","el salvador flag"],u:"1f1f8-1f1fb",a:"2.0"},{n:["flag-sx","sint maarten flag"],u:"1f1f8-1f1fd",a:"2.0"},{n:["flag-sy","syria flag"],u:"1f1f8-1f1fe",a:"2.0"},{n:["flag-sz","eswatini flag"],u:"1f1f8-1f1ff",a:"2.0"},{n:["flag-ta","tristan da cunha flag"],u:"1f1f9-1f1e6",a:"2.0"},{n:["flag-tc","turks & caicos islands flag"],u:"1f1f9-1f1e8",a:"2.0"},{n:["flag-td","chad flag"],u:"1f1f9-1f1e9",a:"2.0"},{n:["flag-tf","french southern territories flag"],u:"1f1f9-1f1eb",a:"2.0"},{n:["flag-tg","togo flag"],u:"1f1f9-1f1ec",a:"2.0"},{n:["flag-th","thailand flag"],u:"1f1f9-1f1ed",a:"2.0"},{n:["flag-tj","tajikistan flag"],u:"1f1f9-1f1ef",a:"2.0"},{n:["flag-tk","tokelau flag"],u:"1f1f9-1f1f0",a:"2.0"},{n:["flag-tl","timor-leste flag"],u:"1f1f9-1f1f1",a:"2.0"},{n:["flag-tm","turkmenistan flag"],u:"1f1f9-1f1f2",a:"2.0"},{n:["flag-tn","tunisia flag"],u:"1f1f9-1f1f3",a:"2.0"},{n:["flag-to","tonga flag"],u:"1f1f9-1f1f4",a:"2.0"},{n:["flag-tr","turkey flag"],u:"1f1f9-1f1f7",a:"2.0"},{n:["flag-tt","trinidad & tobago flag"],u:"1f1f9-1f1f9",a:"2.0"},{n:["flag-tv","tuvalu flag"],u:"1f1f9-1f1fb",a:"2.0"},{n:["flag-tw","taiwan flag"],u:"1f1f9-1f1fc",a:"2.0"},{n:["flag-tz","tanzania flag"],u:"1f1f9-1f1ff",a:"2.0"},{n:["flag-ua","ukraine flag"],u:"1f1fa-1f1e6",a:"2.0"},{n:["flag-ug","uganda flag"],u:"1f1fa-1f1ec",a:"2.0"},{n:["flag-um","u.s. outlying islands flag"],u:"1f1fa-1f1f2",a:"2.0"},{n:["flag-un","united nations flag"],u:"1f1fa-1f1f3",a:"4.0"},{n:["us","flag-us","united states flag"],u:"1f1fa-1f1f8",a:"0.6"},{n:["flag-uy","uruguay flag"],u:"1f1fa-1f1fe",a:"2.0"},{n:["flag-uz","uzbekistan flag"],u:"1f1fa-1f1ff",a:"2.0"},{n:["flag-va","vatican city flag"],u:"1f1fb-1f1e6",a:"2.0"},{n:["flag-vc","st. vincent & grenadines flag"],u:"1f1fb-1f1e8",a:"2.0"},{n:["flag-ve","venezuela flag"],u:"1f1fb-1f1ea",a:"2.0"},{n:["flag-vg","british virgin islands flag"],u:"1f1fb-1f1ec",a:"2.0"},{n:["flag-vi","u.s. virgin islands flag"],u:"1f1fb-1f1ee",a:"2.0"},{n:["flag-vn","vietnam flag"],u:"1f1fb-1f1f3",a:"2.0"},{n:["flag-vu","vanuatu flag"],u:"1f1fb-1f1fa",a:"2.0"},{n:["flag-wf","wallis & futuna flag"],u:"1f1fc-1f1eb",a:"2.0"},{n:["flag-ws","samoa flag"],u:"1f1fc-1f1f8",a:"2.0"},{n:["flag-xk","kosovo flag"],u:"1f1fd-1f1f0",a:"2.0"},{n:["flag-ye","yemen flag"],u:"1f1fe-1f1ea",a:"2.0"},{n:["flag-yt","mayotte flag"],u:"1f1fe-1f1f9",a:"2.0"},{n:["flag-za","south africa flag"],u:"1f1ff-1f1e6",a:"2.0"},{n:["flag-zm","zambia flag"],u:"1f1ff-1f1f2",a:"2.0"},{n:["flag-zw","zimbabwe flag"],u:"1f1ff-1f1fc",a:"2.0"},{n:["england flag","flag-england"],u:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",a:"5.0"},{n:["scotland flag","flag-scotland"],u:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",a:"5.0"},{n:["wales flag","flag-wales"],u:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",a:"5.0"}],Hf={custom:Yn,smileys_people:Zn,animals_nature:Qn,food_drink:Jn,travel_places:Xn,activities:f0,objects:e0,symbols:a0,flags:n0},oe=[nf.NEUTRAL,nf.LIGHT,nf.MEDIUM_LIGHT,nf.MEDIUM,nf.MEDIUM_DARK,nf.DARK],r0=Object.entries(nf).reduce(function(f,e){var a=e[0],n=e[1];return f[n]=a,f},{}),t0=oe.reduce(function(f,e){var a;return Object.assign(f,(a={},a[e]=e,a))},{}),ff;(function(f){f.name="n",f.unified="u",f.variations="v",f.added_in="a",f.imgUrl="imgUrl"})(ff||(ff={}));var Vf={};setTimeout(function(){se.reduce(function(f,e){return Da(e),f},Vf)});function Da(f){var e=Zf(f).flat().join("").toLowerCase().replace(/[^a-zA-Z\d]/g,"").split("");e.forEach(function(a){var n;Vf[a]=(n=Vf[a])!=null?n:{},Vf[a][V(f)]=f})}function Zf(f){var e;return(e=f[ff.name])!=null?e:[]}function i0(f){return parseFloat(f[ff.added_in])}function Re(f){return f?Zf(f)[0]:""}function Oe(f){var e=f.split("-"),a=e.splice(1,1),n=a[0];return t0[n]?e.join("-"):f}function V(f,e){var a,n=f[ff.unified];return!e||!Af(f)?n:(a=d0(f,e))!=null?a:n}function o0(f){var e;return(e=Hf==null?void 0:Hf[f])!=null?e:[]}function La(f,e){return""+Wn(e)+f+".png"}function Qf(f){var e;return(e=f[ff.variations])!=null?e:[]}function Af(f){return Qf(f).length>0}function d0(f,e){return e?Qf(f).find(function(a){return a.includes(e)}):V(f)}function Gf(f){if(f){if(Sf[f])return Sf[f];var e=Oe(f);return Sf[e]}}var se=Object.values(Hf).flat();function c0(f){Hf[E.CUSTOM].length=0,f.forEach(function(e){var a=l0(e);Hf[E.CUSTOM].push(a),!Sf[a[ff.unified]]&&(se.push(a),Sf[a[ff.unified]]=a,Da(a))})}function l0(f){var e;return e={},e[ff.name]=f.names.map(function(a){return a.toLowerCase()}),e[ff.unified]=f.id.toLowerCase(),e[ff.added_in]="0",e[ff.imgUrl]=f.imgUrl,e}var Sf={};setTimeout(function(){se.reduce(function(f,e){return f[V(e)]=e,Af(e)&&Qf(e).forEach(function(a){f[a]=e}),f},Sf)});function u0(f){var e=f.split("-"),a=e[1];return oe.includes(a)?a:null}var s0=["2640-fe0f","2642-fe0f","2695-fe0f"],de="Search",g0="No results found",Ia=" found. Use up and down arrow keys to navigate.",m0="1 result"+Ia,b0="%n results"+Ia;function ra(f){var e,a;f===void 0&&(f={});var n=Oa(),r=Object.assign(n.previewConfig,(e=f.previewConfig)!=null?e:{}),t=Object.assign(n,f),d=qn(f.categories,{suggestionMode:t.suggestedEmojisMode});c0((a=t.customEmojis)!=null?a:[]);var l=t.searchDisabled?zf.PREVIEW:t.skinTonePickerLocation;return tf({},t,{categories:d,previewConfig:r,skinTonePickerLocation:l})}function Oa(){return{autoFocusSearch:!0,categories:Aa(),className:"",customEmojis:[],defaultSkinTone:nf.NEUTRAL,emojiStyle:G.APPLE,emojiVersion:null,getEmojiUrl:La,height:450,lazyLoadEmojis:!1,previewConfig:tf({},p0),searchDisabled:!1,searchPlaceHolder:de,searchPlaceholder:de,skinTonePickerLocation:zf.SEARCH,skinTonesDisabled:!1,style:{},suggestedEmojisMode:$f.FREQUENT,theme:hf.LIGHT,unicodeToHide:new Set(s0),width:350}}var p0={defaultEmoji:"1f60a",defaultCaption:"What's your mood?",showPreview:!0},h0=["children"],Fa=i.createContext(Oa());function v0(f){var e=f.children,a=Fn(f,h0),n=k0(a);return i.createElement(Fa.Provider,{value:n},e)}function k0(f){var e,a=i.useState(function(){return ra(f)}),n=a[0],r=a[1];return i.useEffect(function(){var t,d;((t=f.customEmojis)==null?void 0:t.length)!==((d=n.customEmojis)==null?void 0:d.length)&&r(ra(f))},[(e=f.customEmojis)==null?void 0:e.length]),n}function _(){return i.useContext(Fa)}var Ba=mf.createContext({});function y0(){var f=mf.useContext(Ba);return f}function w0(f){var e=mf.useRef({onEmojiClick:f.onEmojiClick||ta});return mf.useEffect(function(){e.current.onEmojiClick=f.onEmojiClick||ta},[f.onEmojiClick]),e}function ta(){}function E0(){var f,e=_(),a=e.searchPlaceHolder,n=e.searchPlaceholder;return(f=[a,n].find(function(r){return r!==de}))!=null?f:de}function x0(){var f=_(),e=f.defaultSkinTone;return e}function _a(){var f=_(),e=f.skinTonesDisabled;return e}function Nf(){var f=_(),e=f.emojiStyle;return e}function j0(){var f=_(),e=f.autoFocusSearch;return e}function Ua(){var f=_(),e=f.categories;return e}function C0(){var f=_(),e=f.customEmojis;return e}function S0(){var f=y0(),e=f.current;return e.onEmojiClick||function(){}}function Va(){var f=_(),e=f.previewConfig;return e}function R0(){var f=_(),e=f.theme;return e}function z0(){var f=_(),e=f.suggestedEmojisMode;return e}function P0(){var f=_(),e=f.lazyLoadEmojis;return e}function M0(){var f=_(),e=f.className;return e}function T0(){var f=_(),e=f.height,a=f.width,n=f.style;return tf({height:ia(e),width:ia(a)},n)}function A0(){var f=_(),e=f.emojiVersion;return e}function qa(){var f=_(),e=f.searchDisabled;return e}function $a(){var f=_(),e=f.skinTonePickerLocation;return e}function N0(){var f=_(),e=f.unicodeToHide;return e}function Df(){var f=_(),e=f.getEmojiUrl;return e}function ia(f){return typeof f=="number"?f+"px":f}function D0(f){var e=f>0,a=f>1;return e?a?b0.replace("%n",f.toString()):m0:g0}function oa(f,e){e===void 0&&(e=0);var a=i.useState(f),n=a[0],r=a[1],t=i.useRef(null);function d(l){return new Promise(function(c){var u;t.current&&clearTimeout(t.current),t.current=(u=window)==null?void 0:u.setTimeout(function(){r(l),c(l)},e)})}return[n,d]}function L0(){var f=N0();return function(e){return f.has(e)}}function Ha(){var f=i.useRef({}),e=A0();return i.useMemo(function(){var a=parseFloat(""+e);return!e||Number.isNaN(a)?f.current:se.reduce(function(n,r){return O0(r,a)&&(n[V(r)]=!0),n},f.current)},[e])}function I0(){var f=Ha(),e=L0();return function(n){var r=Oe(V(n));return!!(f[r]||e(r))}}function O0(f,e){return i0(f)>e}function F0(f){i.useEffect(function(){f(!0)},[f])}function B0(f){var e=f.children,a=Ha(),n=x0(),r=i.useRef(Vf),t=i.useRef(!1),d=i.useRef(!1),l=i.useRef(a),c=oa(Date.now(),200),u=oa("",100),s=i.useState(!1),g=i.useState(n),m=i.useState(null),p=i.useState(new Set),x=i.useState(null),v=i.useState(!1),S=v[0],w=v[1];return F0(w),i.createElement(of.Provider,{value:{activeCategoryState:m,activeSkinTone:g,disallowClickRef:t,disallowMouseRef:d,disallowedEmojisRef:l,emojiVariationPickerState:x,emojisThatFailedToLoadState:p,filterRef:r,isPastInitialLoad:S,searchTerm:u,skinToneFanOpenState:s,suggestedUpdateState:c}},e)}var of=i.createContext({activeCategoryState:[null,function(){}],activeSkinTone:[nf.NEUTRAL,function(){}],disallowClickRef:{current:!1},disallowMouseRef:{current:!1},disallowedEmojisRef:{current:{}},emojiVariationPickerState:[null,function(){}],emojisThatFailedToLoadState:[new Set,function(){}],filterRef:{current:{}},isPastInitialLoad:!0,searchTerm:["",function(){return new Promise(function(){})}],skinToneFanOpenState:[!1,function(){}],suggestedUpdateState:[Date.now(),function(){}]});function Fe(){var f=i.useContext(of),e=f.filterRef;return e}function _0(){var f=i.useContext(of),e=f.disallowClickRef;return e}function Be(){var f=i.useContext(of),e=f.disallowMouseRef;return e}function ge(){var f=i.useContext(of),e=f.searchTerm;return e}function _e(){var f=i.useContext(of),e=f.activeSkinTone;return e}function Ga(){var f=i.useContext(of),e=f.emojisThatFailedToLoadState;return e}function U0(){var f=i.useContext(of),e=f.isPastInitialLoad;return e}function Lf(){var f=i.useContext(of),e=f.emojiVariationPickerState;return e}function Jf(){var f=i.useContext(of),e=f.skinToneFanOpenState;return e}function Ka(){var f=i.useContext(of),e=f.suggestedUpdateState,a=e[0],n=e[1];return[a,function(){n(Date.now())}]}function V0(){var f=Be();return function(){f.current=!0}}function Wa(){var f=Be();return function(){f.current=!1}}function Ya(){var f=Be();return function(){return f.current}}function q0(){var f=ef(),e=Wa(),a=Ya();i.useEffect(function(){var n=f.current;n==null||n.addEventListener("mousemove",r,{passive:!0});function r(){a()&&e()}return function(){n==null||n.removeEventListener("mousemove",r)}},[f,e,a])}function Za(f,e){if(!f||!e)return 0;var a=f.getBoundingClientRect().width,n=e.getBoundingClientRect().width;return Math.floor(a/n)}function Qa(f,e){if(!f||!e)return 0;var a=e.getBoundingClientRect().width,n=e.getBoundingClientRect().left,r=f.getBoundingClientRect().left;return Math.floor((n-r)/a)}function Ja(f,e){if(!f||!e)return 0;var a=e.getBoundingClientRect().height,n=e.getBoundingClientRect().top,r=f.getBoundingClientRect().top;return Math.round((n-r)/a)}function $0(f,e){if(!f||!e)return!1;var a=e.getBoundingClientRect().height,n=e.getBoundingClientRect().top,r=f.getBoundingClientRect().top,t=f.getBoundingClientRect().height;return Math.round(n-r+a)<t}function Ue(f,e,a){if(e===-1){var n=Math.floor((f.length-1)/a),r=n*a,t=f.length-1;return f.slice(r,t+1)}return f.slice(e*a,(e+1)*a)}function H0(f,e,a){var n=e+1;return n*a>f.length?[]:Ue(f,n,a)}function Xa(f,e,a,n){var r=Ue(f,e,a);return r[n]||r[r.length-1]||null}function G0(f,e,a,n){var r=H0(f,e,a);return r[n]||r[r.length-1]||null}function K0(f,e,a,n){var r=Ue(f,e-1,a);return r[n]||r[r.length-1]||null}function W0(f,e){if(!f||!e.length)return null;var a=f.getBoundingClientRect().top,n=f.getBoundingClientRect().bottom,r=e.find(function(t){var d=t.getBoundingClientRect().top,l=t.getBoundingClientRect().bottom;return d>=a&&d<=n||l>=a&&l<=n});return r||null}function Y0(f){return!!f.nextElementSibling}var ce="button"+q(k.emoji),Z0=[ce,q(k.visible),":not("+q(k.hidden)+")"].join("");function rf(f){var e;return(e=f==null?void 0:f.closest(ce))!=null?e:null}function Ve(f){var e=r1(f),a=$e(f);if(!e)return[];var n=Gf(a??e);return n?[n,a]:[]}function Q0(f){var e;return!!(f!=null&&f.matches(ce)||!(f==null||(e=f.parentElement)==null)&&e.matches(ce))}function da(f){var e;return(e=f==null?void 0:f.clientHeight)!=null?e:0}function f1(f){if(!f)return 0;var e=rf(f),a=pf(e),n=qe(a);return ca(e)+ca(a)+n}function qe(f){var e,a;if(!f)return 0;var n=f.querySelector(q(k.categoryContent));return((e=f==null?void 0:f.clientHeight)!=null?e:0)-((a=n==null?void 0:n.clientHeight)!=null?a:0)}function J0(f){return f?a1(f)<qe(pf(f)):!1}function e1(f){return f?f.matches(q(k.scrollBody))?f:f.querySelector(q(k.scrollBody)):null}function a1(f){var e,a;return f?f1(f)-((e=(a=n1(f))==null?void 0:a.scrollTop)!=null?e:0):0}function n1(f){var e;return f&&(e=f.closest(q(k.scrollBody)))!=null?e:null}function X0(f){var e=rf(f),a=pf(e);return la(e)+la(a)}function ca(f){var e;return(e=f==null?void 0:f.offsetTop)!=null?e:0}function la(f){var e;return(e=f==null?void 0:f.offsetLeft)!=null?e:0}function $e(f){var e;return(e=fr(rf(f),"unified"))!=null?e:null}function r1(f){var e=$e(f);return e?Oe(e):null}function fr(f,e){var a;return(a=er(f)[e])!=null?a:null}function er(f){var e;return(e=f==null?void 0:f.dataset)!=null?e:{}}function He(f){return f.classList.contains(k.visible)}function t1(f){return f?f.classList.contains(k.hidden):!0}function Pf(f){return f?Array.from(f.querySelectorAll(Z0)):[]}function i1(f){if(!f)return null;var e=Pf(f),a=e.slice(-1),n=a[0];return n?He(n)?n:Ge(n):null}function o1(f){var e=f.nextElementSibling;return e?He(e)?e:o1(e):Ke(be(f))}function Ge(f){var e=f.previousElementSibling;return e?He(e)?e:Ge(e):i1(me(f))}function Ke(f){if(!f)return null;var e=Pf(f);return W0(f,e)}function me(f){var e=pf(f);if(!e)return null;var a=e.previousElementSibling;return a?t1(a)?me(a):a:null}function be(f){var e=pf(f);if(!e)return null;var a=e.nextElementSibling;return a?t1(a)?be(a):a:null}function pf(f){return f?f.closest(q(k.category)):null}function d1(f){return f?f.closest(q(k.categoryContent)):null}function c1(f){return f.split("-").map(function(e){return String.fromCodePoint(parseInt(e,16))}).join("")}var l1="epr_suggested";function u1(f){try{var e,a,n;if(!((e=window)!=null&&e.localStorage))return[];var r=JSON.parse((a=(n=window)==null?void 0:n.localStorage.getItem(l1))!=null?a:"[]");return f===$f.FREQUENT?r.sort(function(t,d){return d.count-t.count}):r}catch{return[]}}function ar(f,e){var a=u1(),n=V(f,e),r=V(f),t=a.find(function(c){var u=c.unified;return u===n}),d;t?d=[t].concat(a.filter(function(c){return c!==t})):(t={unified:n,original:r,count:0},d=[t].concat(a)),t.count++,d.length=Math.min(d.length,14);try{var l;(l=window)==null||l.localStorage.setItem(l1,JSON.stringify(d))}catch{}}function nr(f){return f.category===E.CUSTOM}function s1(f){return f.imgUrl!==void 0}function kf(){var f=Lf(),e=f[0],a=f[1],n=Jf(),r=n[0],t=n[1],d=i.useCallback(function(){e&&a(null),r&&t(!1)},[e,r,a,t]);return d}function g1(){var f=Lf(),e=f[0],a=Jf(),n=a[0];return function(){return!!e||n}}function m1(){var f=Ma(),e=Lf(),a=e[1];return function(r){var t=Ve(r),d=t[0];d&&(f(r),a(d))}}function rr(f){var e=i.useRef(),a=m1(),n=_0(),r=Lf(),t=r[1],d=kf(),l=_e(),c=l[0],u=S0(),s=Ka(),g=s[1],m=Df(),p=Nf(),x=i.useCallback(function(z){if(!n.current){d();var b=ua(z),j=b[0],C=b[1];if(!(!j||!C)){var Z=u0(C)||c;g(),ar(j,Z),u(tr(j,Z,p,m),z)}}},[c,d,n,u,g,m,p]),v=i.useCallback(function(z){var b;e.current&&clearTimeout(e.current);var j=ua(z),C=j[0];!C||!Af(C)||(e.current=(b=window)==null?void 0:b.setTimeout(function(){n.current=!0,e.current=void 0,d(),a(z.target),t(C)},500))},[n,d,a,t]),S=i.useCallback(function(){e.current?(clearTimeout(e.current),e.current=void 0):n.current&&requestAnimationFrame(function(){n.current=!1})},[n]);i.useEffect(function(){if(f.current){var w=f.current;return w.addEventListener("click",x,{passive:!0}),w.addEventListener("mousedown",v,{passive:!0}),w.addEventListener("mouseup",S,{passive:!0}),function(){w==null||w.removeEventListener("click",x),w==null||w.removeEventListener("mousedown",v),w==null||w.removeEventListener("mouseup",S)}}},[f,x,v,S])}function ua(f){var e=f==null?void 0:f.target;return Q0(e)?Ve(e):[]}function tr(f,e,a,n){var r=Zf(f);if(s1(f)){var t=V(f);return{activeSkinTone:e,emoji:t,getImageUrl:function(){return f.imgUrl},imageUrl:f.imgUrl,isCustom:!0,names:r,unified:t,unifiedWithoutSkinTone:t}}var d=V(f,e);return{activeSkinTone:e,emoji:c1(d),getImageUrl:function(c){return c===void 0&&(c=a??G.APPLE),n(d,c)},imageUrl:n(d,a??G.APPLE),isCustom:!1,names:r,unified:d,unifiedWithoutSkinTone:V(f)}}function ir(f){var e=kf();i.useEffect(function(){var a=f.current;if(!a)return;a.addEventListener("scroll",n,{passive:!0});function n(){e()}return function(){a==null||a.removeEventListener("scroll",n)}},[f,e])}function b1(f,e){e===void 0&&(e=0);var a=e1(f);a&&requestAnimationFrame(function(){a.scrollTop=e+1})}function or(f,e){var a=e1(f);a&&requestAnimationFrame(function(){a.scrollTop=a.scrollTop+e})}function dr(){var f=ef();return i.useCallback(function(e){requestAnimationFrame(function(){f.current&&(f.current.scrollTop=e)})},[f])}function pe(f){if(!(!f||!J0(f))&&!f.closest(q(k.variationPicker))){var e=n1(f),a=a1(f);or(e,-(qe(pf(f))-a))}}function yf(){var f=bf();return i.useCallback(function(){W(f.current)},[f])}function cr(){var f=De();return i.useCallback(function(){f.current&&za(f.current)},[f])}function p1(){var f=Le();return i.useCallback(function(){f.current&&za(f.current)},[f])}function lr(){var f=Fe();return function e(a){if(typeof a=="function")return e(a(f.current));f.current=a}}function h1(){var f=We(),e=bf(),a=yf();return function(){e.current&&(e.current.value=""),f(""),a()}}function ur(){var f=bf(),e=We();return function(n){f.current?(f.current.value=""+f.current.value+n,e(ze(f.current.value))):e(ze(n))}}function sr(){var f=bf(),e=Fe(),a=lr(),n=We(),r=ge(),t=r[0],d=vr(e.current,t);return{onChange:l,searchTerm:t,SearchInputRef:f,statusSearchResults:d};function l(c){var u=e.current,s=c.toLowerCase();if(u!=null&&u[s]||s.length<=1)return n(s);var g=hr(s,u);if(!g)return n(s);a(function(m){var p;return Object.assign(m,(p={},p[s]=gr(g,s),p))}),n(s)}}function We(){var f=ge(),e=f[1],a=Yf();return function(r){requestAnimationFrame(function(){e(r&&(r==null?void 0:r.toLowerCase())).then(function(){b1(a.current,0)})})}}function gr(f,e){var a={};for(var n in f){var r=f[n];mr(r,e)&&(a[n]=r)}return a}function mr(f,e){return Zf(f).some(function(a){return a.includes(e)})}function br(){var f=Fe(),e=f.current,a=ge(),n=a[0];return function(r){return pr(r,e,n)}}function pr(f,e,a){var n;return!e||!a?!1:!((n=e[a])!=null&&n[f])}function hr(f,e){if(!e)return null;if(e[f])return e[f];var a=Object.keys(e).sort(function(n,r){return r.length-n.length}).find(function(n){return f.includes(n)});return a?e[a]:null}function ze(f){return!f||typeof f!="string"?"":f.trim().toLowerCase()}function vr(f,e){var a;if(!(f!=null&&f[e]))return"";var n=((a=Object.entries(f==null?void 0:f[e]))==null?void 0:a.length)||0;return D0(n)}function kr(){var f=Ga(),e=f[0],a=br();return function(n){var r=V(n),t=e.has(r),d=a(r);return{failedToLoad:t,filteredOut:d,hidden:t||d}}}function Y(f,e){e===void 0&&(e={});var a=e.insertAt;if(!(!f||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=f:r.appendChild(document.createTextNode(f))}}var yr='.EmojiPickerReact button.epr-emoji{align-items:center;border-radius:8px;box-sizing:border-box;display:flex;height:var(--epr-emoji-fullsize);justify-content:center;max-height:var(--epr-emoji-fullsize);max-width:var(--epr-emoji-fullsize);overflow:hidden;position:relative;width:var(--epr-emoji-fullsize)}.EmojiPickerReact button.epr-emoji.epr-emoji-has-variations:after{border-bottom:4px solid var(--epr-emoji-variation-indicator-color);border-left:4px solid transparent;border-right:4px solid transparent;bottom:1px;content:"";display:block;height:0;position:absolute;right:0;transform:rotate(135deg);width:0;z-index:var(--epr-emoji-variations-indictator-z-index)}.EmojiPickerReact button.epr-emoji .epr-emoji-img{max-height:var(--epr-emoji-fullsize);max-width:var(--epr-emoji-fullsize);min-height:var(--epr-emoji-fullsize);min-width:var(--epr-emoji-fullsize);padding:var(--epr-emoji-padding)}.EmojiPickerReact button.epr-emoji .epr-emoji-native{padding:var(--epr-emoji-padding)}.EmojiPickerReact button.epr-emoji>*{align-self:center;display:block;justify-self:center}.EmojiPickerReact button.epr-emoji.epr-emoji-has-variations:hover:after{border-bottom:4px solid var(--epr-emoji-variation-indicator-color-hover)}.__EmojiPicker__.epr-emoji-img{font-size:0}.__EmojiPicker__.epr-emoji-native{align-self:center;font-family:Segoe UI Emoji,Segoe UI Symbol,Segoe UI,Apple Color Emoji,Twemoji Mozilla,Noto Color Emoji,Android Emoji,Times,Symbola,Aegyptus,Code2000,Code2001,Code2002,Musica,serif,LastResort;font-size:var(--epr-emoji-size);justify-self:center;letter-spacing:0;line-height:100%;position:relative;text-align:center}.EmojiPickerReact button.epr-emoji>*{transition:background-color .2s}.EmojiPickerReact button.epr-emoji:hover>*{background-color:var(--epr-emoji-hover-color)}.EmojiPickerReact button.epr-emoji:focus>*{background-color:var(--epr-focus-bg-color)}';Y(yr);function he(f){return i.createElement("button",Object.assign({type:"button"},f,{className:U("epr-btn",f.className)}),f.children)}function wr(f){var e,a=f.emojiNames,n=f.unified,r=f.hidden,t=f.hiddenOnSearch,d=f.showVariations,l=d===void 0?!0:d,c=f.hasVariations,u=f.children;return i.createElement(he,{className:U(k.emoji,(e={},e[k.hidden]=r,e[k.hiddenOnSearch]=t,e[k.visible]=!r&&!t,e[k.emojiHasVariations]=c&&l,e)),"data-unified":n,"aria-label":a[0],"data-full-name":a},u)}function sa(f){var e=f.emojiName,a=f.style,n=f.lazyLoad,r=n===void 0?!1:n,t=f.imgUrl,d=f.onError;return i.createElement("img",{src:t,alt:e,className:U(k.external,"epr-emoji-img"),loading:r?"lazy":"eager",onError:d,style:a})}function Er(f){var e=f.unified,a=f.style;return i.createElement("span",{className:U(k.external,"epr-emoji-native"),"data-unified":e,style:a},c1(e))}function Pe(f){var e=f.emoji,a=f.unified,n=f.emojiStyle,r=f.size,t=f.lazyLoad,d=f.getEmojiUrl,l=d===void 0?La:d,c=Ga(),u=c[1],s={};r&&(s.width=s.height=s.fontSize=r+"px");var g=e||Gf(a);if(!g)return null;if(s1(g))return i.createElement(sa,{style:s,emojiName:a,emojiStyle:G.NATIVE,lazyLoad:t,imgUrl:g.imgUrl,onError:m});return i.createElement(i.Fragment,null,n===G.NATIVE?i.createElement(Er,{unified:a,style:s}):i.createElement(sa,{style:s,emojiName:Re(g),emojiStyle:n,lazyLoad:t,imgUrl:l(a,n),onError:m}));function m(){u(function(p){return new Set(p).add(a)})}}function Ye(f){var e=f.emoji,a=f.unified,n=f.hidden,r=f.hiddenOnSearch,t=f.emojiStyle,d=f.showVariations,l=d===void 0?!0:d,c=f.size,u=f.lazyLoad,s=f.getEmojiUrl,g=Af(e);return i.createElement(wr,{hasVariations:g,showVariations:l,hidden:n,hiddenOnSearch:r,emojiNames:Zf(e),unified:a},i.createElement(Pe,{unified:a,emoji:e,size:c,emojiStyle:t,lazyLoad:u,getEmojiUrl:s}))}var xr=".EmojiPickerReact li.epr-emoji-category>.epr-emoji-category-content{grid-gap:0;display:grid;grid-template-columns:repeat(auto-fill,var(--epr-emoji-fullsize));justify-content:space-between;margin:var(--epr-category-padding);position:relative}.EmojiPickerReact li.epr-emoji-category:not(:has(.epr-visible)){display:none}.EmojiPickerReact li.epr-emoji-category>.epr-emoji-category-label{align-items:center;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background-color:var(--epr-category-label-bg-color);color:var(--epr-category-label-text-color);display:flex;font-size:16px;font-weight:700;height:var(--epr-category-label-height);margin:0;padding:var(--epr-category-label-padding);position:-webkit-sticky;position:sticky;text-transform:capitalize;top:0;width:100%;z-index:var(--epr-category-label-z-index)}";Y(xr);function v1(f){var e,a=f.categoryConfig,n=f.children,r=f.hidden,t=f.hiddenOnSearch,d=Ie(a),l=Na(a);return i.createElement("li",{className:U(k.category,(e={},e[k.hidden]=r,e[k.hiddenOnSearch]=t,e)),"data-name":d,"aria-label":l},i.createElement("h2",{className:k.label},l),i.createElement("div",{className:k.categoryContent},n))}function jr(f){var e=f.categoryConfig,a=Ka(),n=a[0],r=z0(),t=Df(),d=i.useMemo(function(){var c;return(c=u1(r))!=null?c:[]},[n,r]),l=Nf();return i.createElement(v1,{categoryConfig:e,hiddenOnSearch:!0,hidden:d.length===0},d.map(function(c){var u=Gf(c.original);return u?i.createElement(Ye,{showVariations:!1,unified:c.unified,emojiStyle:l,emoji:u,key:c.unified,getEmojiUrl:t}):null}))}var Cr=".EmojiPickerReact ul.epr-emoji-list{list-style:none;margin:0;padding:0}";Y(Cr);function Sr(){var f=Ua(),e=i.useRef(0);return i.createElement("ul",{className:k.emojiList},f.map(function(a){var n=Ie(a);return n===E.SUGGESTED?i.createElement(jr,{key:n,categoryConfig:a}):i.createElement(Rr,{key:n,category:n,categoryConfig:a,renderdCategoriesCountRef:e})}))}function Rr(f){var e=f.category,a=f.categoryConfig,n=f.renderdCategoriesCountRef,r=kr(),t=P0(),d=Nf(),l=U0(),c=_e(),u=c[0],s=I0(),g=Df(),m=!_a(),p=!l&&n.current>0?[]:o0(e);p.length>0&&n.current++;var x=0,v=p.map(function(S){var w=V(S,u),z=r(S),b=z.failedToLoad,j=z.filteredOut,C=z.hidden,Z=s(S);return(C||Z)&&x++,Z?null:i.createElement(Ye,{showVariations:m,key:w,emoji:S,unified:w,hidden:b,hiddenOnSearch:j,emojiStyle:d,lazyLoad:t,getEmojiUrl:g})});return i.createElement(v1,{categoryConfig:a,hidden:x===v.length},v)}function ve(f){var e=Ke(f);W(e),pe(e)}function zr(f){var e=Ke(f);W(e),e==null||e.click()}function Pr(f){W(i1(f))}function Mr(f){if(f){var e=o1(f);if(!e)return ve(be(f));W(e),pe(e)}}function Tr(f){if(f){var e=Ge(f);if(!e)return Pr(me(f));W(e),pe(e)}}function Ar(f,e){if(f){var a=Dr(f);if(!a)return e();W(a),pe(a)}}function Nr(f){if(f){var e=Lr(f);return W(e)}}function Dr(f){if(!f)return null;var e=d1(f),a=pf(e),n=Qa(e,f),r=Ja(e,f),t=Za(e,f);if(r===0){var d=me(a);return d?Xa(Pf(d),-1,t,n):null}return K0(Pf(e),r,t,n)}function Lr(f){if(!f)return null;var e=d1(f),a=pf(e),n=Qa(e,f),r=Ja(e,f),t=Za(e,f);if(!$0(e,f)){var d=be(a);return d?Xa(Pf(d),0,t,n):null}var l=G0(Pf(e),r,t,n);return l}var Ir=`.EmojiPickerReact .epr-emoji-variation-picker{align-items:center;background:var(--epr-emoji-variation-picker-bg-color);border:1px solid var(--epr-picker-border-color);border-radius:3px;box-shadow:0 2px 5px rgba(0,0,0,.2);display:flex;height:0;height:var(--epr-emoji-variation-picker-height);justify-content:space-around;left:15px;opacity:0;padding:5px;pointer-events:none;position:absolute;right:15px;top:0;top:-100%;transform:scale(.9);transition:transform .1s ease-out,opacity .2s ease-out;visibility:hidden;z-index:var(--epr-skin-variation-picker-z-index)}.EmojiPickerReact .epr-emoji-variation-picker.pointing-up{transform:scale(.9);transform-origin:center 0}.EmojiPickerReact .epr-emoji-variation-picker.visible{opacity:1;pointer-events:all;transform:scale(1);visibility:visible}.EmojiPickerReact .epr-emoji-variation-picker .EmojiPickerReact .epr-emoji-variation-picker button.epr-emoji:hover{background:none}.EmojiPickerReact .epr-emoji-variation-picker .epr-emoji-pointer{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='15' xml:space='preserve'%3E%3Cg stroke-miterlimit='10'%3E%3Cpath fill='%23FFF' stroke='%23E8E7E7' d='m1.86-.43 9.83 11.53c.59.69 1.56.69 2.14 0L23.66-.43'/%3E%3Cpath fill='%23010202' stroke='%23151617' d='m26.86-.43 9.83 11.53c.59.69 1.56.69 2.14 0L48.66-.43'/%3E%3C/g%3E%3C/svg%3E");background-position:0 0;background-repeat:no-repeat;background-size:50px 15px;content:"";height:15px;position:absolute;top:-10px;width:25px}.EmojiPickerReact.epr-dark-theme .epr-emoji-variation-picker .epr-emoji-pointer{background-position:-25px 0}@media (prefers-color-scheme:dark){.EmojiPickerReact.epr-auto-theme .epr-emoji-variation-picker .epr-emoji-pointer{background-position:-25px 0}}.EmojiPickerReact .epr-emoji-variation-picker .epr-emoji-pointer{top:100%;transform:translateX(-18px)}.EmojiPickerReact .epr-emoji-variation-picker.pointing-up .epr-emoji-pointer{top:0;transform:rotate(180deg) translateY(100%) translateX(18px)}`;Y(Ir);var Rf;(function(f){f[f.Up=0]="Up",f[f.Down=1]="Down"})(Rf||(Rf={}));function Or(){var f=ue(),e=In(),a=Lf(),n=a[0],r=Nf(),t=Br(e),d=t.getTop,l=t.getMenuDirection,c=Ma(),u=Fr(e),s=Df(),g=rf(f.current),m=n&&g&&Af(n)&&g.classList.contains(k.emojiHasVariations);i.useEffect(function(){m&&ve(e.current)},[e,m,f]);var p,x;return!m&&f.current?c(null):(p=d(),x=u()),i.createElement("div",{ref:e,className:U(k.variationPicker,{visible:m,"pointing-up":l()===Rf.Down}),style:{top:p}},m&&n?[V(n)].concat(Qf(n)).slice(0,6).map(function(v){return i.createElement(Ye,{key:v,emoji:n,unified:v,emojiStyle:r,showVariations:!1,getEmojiUrl:s})}):null,i.createElement("div",{className:"epr-emoji-pointer",style:x}))}function Fr(f){var e=ue();return function(){var n={};if(!f.current)return n;if(e.current){var r=rf(e.current),t=X0(r);if(!r)return n;n.left=t+(r==null?void 0:r.clientWidth)/2}return n}}function Br(f){var e=ue(),a=ef(),n=Rf.Up;return{getMenuDirection:r,getTop:t};function r(){return n}function t(){n=Rf.Up;var d=0;if(!f.current)return 0;var l=da(f.current);if(e.current){var c,u=a.current,s=rf(e.current),g=da(s);d=f1(s);var m=(c=u==null?void 0:u.scrollTop)!=null?c:0;m>d-l&&(n=Rf.Down,d+=g+l)}return d-l}}var _r=".EmojiPickerReact .epr-body{flex:1;overflow-x:hidden;overflow-y:scroll;position:relative}";Y(_r);function Ur(){var f=ef();return ir(f),rr(f),q0(),i.createElement("div",{className:k.scrollBody,ref:f},i.createElement(Or,null),i.createElement(Sr,null))}function Vr(f,e){var a=ef(),n=Ya(),r=Wa();i.useEffect(function(){if(!f)return;var t=a.current;t==null||t.addEventListener("keydown",c,{passive:!0}),t==null||t.addEventListener("mouseover",u,!0),t==null||t.addEventListener("focus",d,!0),t==null||t.addEventListener("mouseout",l,{passive:!0}),t==null||t.addEventListener("blur",l,!0);function d(s){var g=rf(s.target);if(!g)return l();var m=$e(g),p=r1(g);if(!m||!p)return l();e({unified:m,originalUnified:p})}function l(s){if(s){var g=s.relatedTarget;if(!rf(g))return e(null)}e(null)}function c(s){s.key==="Escape"&&e(null)}function u(s){if(!n()){var g=rf(s.target);g&&W(g)}}return function(){t==null||t.removeEventListener("mouseover",u),t==null||t.removeEventListener("mouseout",l),t==null||t.removeEventListener("focus",d,!0),t==null||t.removeEventListener("blur",l,!0),t==null||t.removeEventListener("keydown",c)}},[a,f,e,n,r])}function Ze(){var f=$a();return f===zf.SEARCH}function k1(){var f=$a();return f===zf.PREVIEW}var qr=".EmojiPickerReact .Flex{display:flex}.EmojiPickerReact .Flex.FlexRow{flex-direction:row}.EmojiPickerReact .Flex.FlexColumn{flex-direction:column}";Y(qr);var Me;(function(f){f.ROW="FlexRow",f.COLUMN="FlexColumn"})(Me||(Me={}));function y1(f){var e=f.children,a=f.className,n=f.style,r=n===void 0?{}:n,t=f.direction,d=t===void 0?Me.ROW:t;return i.createElement("div",{style:tf({},r),className:U("Flex",a,d)},e)}function $r(f){var e=f.className,a=f.style,n=a===void 0?{}:a;return i.createElement("div",{style:tf({flex:1},n),className:U(e)})}var Hr=".EmojiPickerReact .epr-preview{align-items:center;border-top:1px solid var(--epr-preview-border-color);height:var(--epr-preview-height);padding:0 var(--epr-horizontal-padding);position:relative;z-index:1;z-index:var(--epr-preview-z-index)}.EmojiPickerReact .epr-preview .epr-preview-emoji-label{color:var(--epr-preview-text-color);font-size:var(--epr-preview-text-size);padding:var(--epr-preview-text-padding);text-transform:capitalize}";Y(Hr);function Gr(f){var e=f.children,a=f.className,n=f.style;return i.createElement("div",{style:tf({},n,{position:"absolute"}),className:a},e)}function ke(f){var e=f.children,a=f.className,n=f.style;return i.createElement("div",{style:tf({},n,{position:"relative"}),className:a},e)}var Kr='.EmojiPickerReact .epr-skin-tones{--epr-skin-tone-size:15px;align-items:center;display:flex;justify-content:flex-end;padding:10px 0;transition:all .3s ease-in-out}.EmojiPickerReact .epr-skin-tones.epr-vertical{align-items:flex-end;border:1px solid var(--epr-bg-color);border-radius:6px;flex-direction:column;padding:5px}.EmojiPickerReact .epr-skin-tones.epr-vertical.epr-open{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:var(--epr-skin-tone-picker-menu-color);border:1px solid var(--epr-picker-border-color)}.EmojiPickerReact .epr-skin-tone-select{height:var(--epr-skin-tone-size);position:relative;width:var(--epr-skin-tone-size)}.EmojiPickerReact .epr-skin-tones.epr-open .epr-tone{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.EmojiPickerReact .epr-skin-tones:not(.epr-open) .epr-tone{opacity:0;z-index:0}.EmojiPickerReact .epr-skin-tones .epr-tone{border-radius:4px;box-shadow:0 0 0 0 var(--epr-active-skin-hover-color);cursor:pointer;display:block;height:var(--epr-skin-tone-size);position:absolute;right:0;transition:transform .3s ease-in-out,opacity .5s ease-in-out;width:var(--epr-skin-tone-size);z-index:1}.EmojiPickerReact .epr-skin-tones .epr-tone:hover{box-shadow:0 0 0 3px var(--epr-active-skin-hover-color)}.EmojiPickerReact .epr-skin-tones .epr-tone:focus{box-shadow:0 0 0 3px var(--epr-focus-bg-color)}.EmojiPickerReact .epr-skin-tones.epr-open .epr-skin-tone-select .epr-tone.epr-active:after{border:1px solid var(--epr-active-skin-tone-indicator-border-color);border-radius:5px;bottom:-2px;content:"";left:-2px;position:absolute;right:-2px;top:-2px}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-active{opacity:1;z-index:1}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-neutral{background-color:#ffd225}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fb{background-color:#ffdfbd}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fc{background-color:#e9c197}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fd{background-color:#c88e62}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3fe{background-color:#a86637}.EmojiPickerReact .epr-skin-tones .epr-tone.epr-tone-1f3ff{background-color:#60463a}';Y(Kr);var _f=28;function Wr(){return i.createElement(ke,{style:{height:_f}},i.createElement(Gr,{style:{bottom:0,right:0}},i.createElement(w1,{direction:Kf.VERTICAL})))}function w1(f){var e,a=f.direction,n=a===void 0?Kf.HORIZONTAL:a,r=De(),t=_a(),d=Jf(),l=d[0],c=d[1],u=_e(),s=u[0],g=u[1],m=kf(),p=yf();if(t)return null;var x=_f*oe.length+"px",v=l?x:_f+"px",S=n===Kf.VERTICAL;return i.createElement(ke,{className:U("epr-skin-tones",n,(e={},e[k.open]=l,e)),style:S?{flexBasis:v,height:v}:{flexBasis:v}},i.createElement("div",{className:"epr-skin-tone-select",ref:r},oe.map(function(w,z){var b,j=w===s;return i.createElement(he,{style:{transform:U(S?"translateY(-"+z*(l?_f:0)+"px)":"translateX(-"+z*(l?_f:0)+"px)",l&&j&&"scale(1.3)")},onClick:function(){l?(g(w),p()):c(!0),m()},key:w,className:U("epr-tone-"+w,"epr-tone",(b={},b[k.active]=j,b)),tabIndex:l?0:-1,"aria-pressed":j,"aria-label":"Skin tone "+r0[w]})})))}var Kf;(function(f){f.VERTICAL="epr-vertical",f.HORIZONTAL="epr-horizontal"})(Kf||(Kf={}));function Yr(){var f=Va(),e=k1();return f.showPreview?i.createElement(y1,{className:"epr-preview"},i.createElement(Zr,null),i.createElement($r,null),e?i.createElement(Wr,null):null):null}function Zr(){var f,e=Va(),a=i.useState(null),n=a[0],r=a[1],t=Nf(),d=Lf(),l=d[0],c=Df();Vr(e.showPreview,r);var u=Gf((f=n==null?void 0:n.unified)!=null?f:n==null?void 0:n.originalUnified),s=u!=null&&n!=null;return i.createElement(g,null);function g(){var m=l??Gf(e.defaultEmoji);if(!m)return null;var p=l?Re(l):e.defaultCaption;return i.createElement(i.Fragment,null,i.createElement("div",null,s?i.createElement(Pe,{unified:n==null?void 0:n.unified,emoji:u,emojiStyle:t,size:45,getEmojiUrl:c}):m?i.createElement(Pe,{unified:V(m),emoji:m,emojiStyle:t,size:45,getEmojiUrl:c}):null),s?i.createElement("div",{className:"epr-preview-emoji-label"},Re(u)):i.createElement("div",{className:"epr-preview-emoji-label"},p))}}var Qr=`.EmojiPickerReact .epr-category-nav{display:flex;flex-direction:row;justify-content:space-around;padding:var(--epr-header-padding)}.EmojiPickerReact .epr-category-nav>button.epr-cat-btn{background-size:calc(var(--epr-category-navigation-button-size)*10);display:inline-block;height:var(--epr-category-navigation-button-size);outline:none;position:relative;transition:opacity .2s ease-in-out;width:var(--epr-category-navigation-button-size)}.EmojiPickerReact .epr-category-nav>button.epr-cat-btn:focus:before{border:2px solid var(--epr-category-icon-active-color);border-radius:50%;bottom:-2px;content:"";left:-2px;position:absolute;right:-2px;top:-2px}aside.EmojiPickerReact.epr-main:has(input:not(:-moz-placeholder-shown)) .epr-category-nav{cursor:default;opacity:.3;pointer-events:none}aside.EmojiPickerReact.epr-main:has(input:not(:placeholder-shown)) .epr-category-nav{cursor:default;opacity:.3;pointer-events:none}.EmojiPickerReact.epr-search-active .epr-category-nav{cursor:default;opacity:.3;pointer-events:none}aside.EmojiPickerReact.epr-main:has(input:not(:-moz-placeholder-shown)) .epr-category-nav>button.epr-cat-btn:hover{background-position-y:var(--epr-category-navigation-button-size);opacity:1}aside.EmojiPickerReact.epr-main:has(input:not(:placeholder-shown)) .epr-category-nav>button.epr-cat-btn:hover{background-position-y:var(--epr-category-navigation-button-size);opacity:1}.EmojiPickerReact:not(.epr-search-active) .epr-category-nav>button.epr-cat-btn.epr-active,.EmojiPickerReact:not(.epr-search-active) .epr-category-nav>button.epr-cat-btn:hover{background-position-y:var(--epr-category-navigation-button-size);opacity:1}.EmojiPickerReact .epr-category-nav>button.epr-cat-btn{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='80' xml:space='preserve'%3E%3Cg fill='%233371B7' stroke='%233371B7' stroke-width='.1' stroke-miterlimit='10'%3E%3Cpath d='M12.8 29.5c.6 0 1.1-.5 1.1-1.1 0-.6-.5-1.2-1.1-1.2-.6 0-1.2.5-1.2 1.2 0 .6.6 1.1 1.2 1.1zm0-1.5c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4c0-.3.2-.4.4-.4z'/%3E%3Cpath d='M10 23c-3.8 0-7 3.1-7 7 0 3.8 3.1 7 7 7s7-3.1 7-7c0-3.8-3.2-7-7-7zm0 13.2c-3.4 0-6.2-2.8-6.2-6.2 0-3.4 2.8-6.2 6.2-6.2s6.2 2.8 6.2 6.2c0 3.4-2.8 6.2-6.2 6.2z'/%3E%3Cpath d='M14.6 31.2c-.1-.1-.2-.2-.3-.2H5.7c-.1 0-.2.1-.3.2-.1.1-.1.2 0 .4.7 2 2.5 3.3 4.6 3.3s3.9-1.3 4.6-3.3c.1-.1.1-.3 0-.4zM10 34.1c-1.6 0-3-.9-3.7-2.2h7.3c-.6 1.3-2 2.2-3.6 2.2zm-2.8-4.6c.6 0 1.2-.5 1.2-1.1 0-.6-.5-1.2-1.2-1.2-.6 0-1.1.5-1.1 1.2 0 .6.5 1.1 1.1 1.1zm0-1.5c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4c0-.3.2-.4.4-.4z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%233371B7' d='M64.1 33.4h2.3c.2 0 .4.2.4.4v2.1c0 .2-.2.4-.4.4h-2.3c-.2 0-.4-.2-.4-.4v-2.1c0-.2.1-.4.4-.4zm9.4.1h2.4c.2 0 .4.2.4.4v2c0 .2-.2.4-.4.4h-2.4c-.2 0-.4-.2-.4-.4v-2c0-.3.2-.4.4-.4zm-9.8-5.1h12.6v5H63.7v-5z'/%3E%3Cpath fill='none' stroke='%233371B7' d='M65.5 23.6h8.9c1 0 1.9.8 1.9 1.9v3.1H63.7v-3.1c0-1 .8-1.9 1.8-1.9z'/%3E%3Cellipse fill='%233371B7' cx='66.2' cy='30.9' rx='.9' ry='1'/%3E%3Cellipse fill='%233371B7' cx='73.8' cy='30.9' rx='.9' ry='1'/%3E%3Cg fill='none' stroke='%233371B7'%3E%3Cpath d='M96.4 30c0 3.6-2.9 6.5-6.4 6.5s-6.4-2.9-6.4-6.5 2.9-6.5 6.4-6.5 6.4 2.9 6.4 6.5z'/%3E%3Cpath d='M96.3 28.6v.1c-.9.1-2.9.1-4.6-1.1-1.1-.8-2-1.7-2.6-2.5-.3-.4-.6-.8-.7-1-.1-.1-.1-.1-.1-.2.5-.1 1.2-.2 2-.1 1.2 0 2.5.3 3.5 1.1s1.7 1.8 2.1 2.8c.2.2.3.6.4.9zM84 32.2v-.1c.9-.2 2.9-.4 4.7.6 1.1.7 1.9 1.5 2.4 2.3.4.5.6 1 .7 1.3-.4.1-1 .2-1.7.3-1 0-2.1-.1-3.2-.8s-1.9-1.6-2.4-2.5c-.3-.5-.4-.8-.5-1.1z'/%3E%3C/g%3E%3Cg fill='none' stroke='%233371B7'%3E%3Cpath stroke-linecap='round' d='m116.3 26.8-1.4 2-.8-.8-.6-.6v.9l-.1 8.2h-6.8l-.1-8.2v-.9l-.6.6-.8.8-1.4-2 2.6-2.9c.1-.1.2-.1.3-.1h1.3l.4.7c.7 1.3 2.6 1.3 3.3-.1l.3-.6h1.2c.1 0 .2 0 .3.1l.3-.3-.3.3 2.9 2.9z'/%3E%3Cpath d='M110.1 27.7h2v.9c0 .4-.4.7-1 .7s-1-.3-1-.7v-.9z'/%3E%3C/g%3E%3Cpath d='M126.8 34.3c0 1.2-1 2.2-2.2 2.2s-2.2-1-2.2-2.2 1-2.2 2.2-2.2 2.2 1 2.2 2.2zm10.8 0c0 1.2-1 2.2-2.2 2.2-1.2 0-2.2-1-2.2-2.2s1-2.2 2.2-2.2c1.2 0 2.2 1 2.2 2.2zm-10.8-9.9v9.9m10.9-9.9v9.9m-10.9-10.8h10.8v2.7h-10.8v-2.7z' fill='none' stroke='%233371B7'/%3E%3Cg fill='%233371B7'%3E%3Cpath d='M170.8 23.1h-.8c-2.1 0-4 1-5.3 2.5h-.1l-.1-.1-1-1.2-.3 3.4 3.4.3-1.1-1.3-.1-.1.1-.1c1.1-1.5 3-2.3 5-2.1 3.2.3 5.5 3.1 5.2 6.3-.3 3-3.1 5.3-6.1 5.1-3.1-.2-5.4-2.9-5.3-6l-1.3-.1c-.2 3.8 2.6 7.1 6.3 7.4 3.9.3 7.3-2.6 7.6-6.5.3-3.8-2.5-7.1-6.1-7.5z'/%3E%3Cpath d='M170.3 27.4c0-.3-.3-.6-.6-.6s-.6.3-.6.6v3.2c0 .2.1.3.2.4.1.1.3.2.4.2h2.4c.4 0 .6-.3.6-.6 0-.4-.3-.6-.6-.6h-1.8v-2.6z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%233371B7' d='M186.2 23.4h7.7c1.5 0 2.7 1.2 2.7 2.7v7.7c0 1.5-1.2 2.7-2.7 2.7h-7.7c-1.5 0-2.7-1.2-2.7-2.7v-7.7c-.1-1.5 1.2-2.7 2.7-2.7z'/%3E%3Ccircle fill='%233371B7' cx='186' cy='28.9' r='.7'/%3E%3Ccircle fill='%233371B7' cx='194' cy='26.7' r='.7'/%3E%3Cpath fill='none' stroke='%233371B7' stroke-linecap='round' d='m186 33.3.4-.3c.4-.3 1-.3 1.5-.1l1 .4c.5.2 1 .2 1.5-.1l.8-.5c.4-.3 1-.3 1.5-.1l1.8.8'/%3E%3Cpath fill='%233371B7' stroke='%233371B7' stroke-width='.25' stroke-miterlimit='10' d='M156 24.3c-.2-.1-.4-.1-.5 0 0 0-.2.1-.9.2-.7 0-2.4-.1-3.8-.6-.8-.3-1.7-.5-2.5-.5h-.5c-1.3 0-2.5.3-3.6 1-.2.1-.2.2-.2.4v11.6c0 .3.1.5.3.5.6 0 .5-.4.5-.6v-5.7c.7-.3 3.2-1.1 5.8-.1 1.6.6 3.5.7 4.3.7.8 0 1.3-.3 1.3-.3.2-.1.3-.2.3-.4v-5.7c-.3-.2-.4-.4-.5-.5zm-.4 5.9c-.1 0-.7.1-1 .1-.7 0-2.4-.1-3.8-.6-2.5-1-5-.5-6.2-.1v-4.9c.9-.5 2.2-.7 3.2-.7h.4c.7 0 1.5.2 2.2.4 1.6.6 3.5.7 4.3.7.2 0 .8 0 1-.1v5.2z'/%3E%3Cpath fill='none' stroke='%233371B7' d='M48.1 23.5h3.7c2.5 0 4.5 2 4.5 4.5 0 .5-.4.9-.9.9H44.5c-.5 0-.9-.4-.9-.9 0-2.5 2-4.5 4.5-4.5z'/%3E%3Cpath fill='none' stroke='%233371B7' stroke-linecap='round' d='M43.5 28.8c-.2.1-.5 1.2 0 1.5 1.4 1 8.5.8 11.3.6.8-.1 1.6-.4 1.7-1.2 0-.3-.1-.6-.6-.9'/%3E%3Cpath fill='none' stroke='%233371B7' stroke-linecap='round' d='m43.5 30.6-.2.4c-.2.5.2 1 .7.9.3-.1.5 0 .7.3l.1.2c.3.5 1 .6 1.5.2h0c.3-.2.7-.3 1-.2l.8.3c.4.2.8.1 1.2 0l.5-.2c.4-.2.9-.2 1.3 0l.5.2c.4.2.8.2 1.2 0l.2-.1c.3-.2.8-.2 1.1.1l.2.2c.3.3.8.2 1-.2l.1-.2c.1-.2 0-.3.2-.3.5 0 1.2-.3 1.1-.7l-.4-1.1'/%3E%3Cpath fill='none' stroke='%233371B7' stroke-linecap='round' d='M43.5 32.2c-.1.2-.3.8 0 1.1.3.4 3 1.1 6.4 1.1 2.2 0 4.6-.3 6-.6.5-.1.9-.5.8-.9 0-.2-.2-.5-.4-.7'/%3E%3Cpath fill='none' stroke='%233371B7' stroke-linecap='round' d='M43.5 33.3c0 .5.6 2.3 1.3 2.7 1.8.8 5.7.7 8.1.5 1.3-.1 2.5-.7 3.2-1.8.3-.5.5-1 .5-1.4'/%3E%3Cellipse fill='%233371B7' cx='51.6' cy='26.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%233371B7' cx='53' cy='25' rx='.3' ry='.4'/%3E%3Cellipse fill='%233371B7' cx='53' cy='27.2' rx='.3' ry='.4'/%3E%3Cellipse fill='%233371B7' cx='54.3' cy='26.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%233371B7' cx='50.9' cy='25' rx='.3' ry='.4'/%3E%3Cpath fill='none' stroke='%233371B7' d='M24.2 31v-7.6c.1.1.8.9 2.8 3.1 2.5-1.6 5.6-.7 6.9 0l2.4-3.1v7.1c0 1.2-.1 2.5-.9 3.4-1 1.2-2.7 2.5-5.3 2.5-2.9 0-4.5-1.5-5.3-2.9-.6-.6-.6-1.5-.6-2.5z'/%3E%3Cpath fill='none' stroke='%233371B7' stroke-linecap='round' d='m21.2 30 5.4 1.2m-5.4 2.9 5.4-1.2M38.8 30l-5.4 1.2m5.4 2.9-5.4-1.2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%233371B7' d='m29.5 32.4-.5-.7c-.2-.3 0-.6.3-.6h1.4c.3 0 .5.4.3.6l-.7 1c-.7 1.2-2.6 1.1-3.1-.3l-.1-.2c-.1-.2 0-.4.2-.5s.4 0 .5.2l.1.2c.4.7 1.2.8 1.6.3z'/%3E%3Cpath fill='none' stroke='%233371B7' stroke-linecap='round' d='m32.4 32.1-.1.2c-.4 1-1.8 1.1-2.3.2'/%3E%3Ccircle fill='%233371B7' cx='27.6' cy='29.7' r='.7'/%3E%3Ccircle fill='%233371B7' cx='32.4' cy='29.7' r='.7'/%3E%3Cg fill='%23C0C0BF' stroke='%23C0C0BF' stroke-width='.1' stroke-miterlimit='10'%3E%3Cpath d='M12.8 49.5c.6 0 1.1-.5 1.1-1.1 0-.6-.5-1.2-1.1-1.2-.6 0-1.2.5-1.2 1.2 0 .6.6 1.1 1.2 1.1zm0-1.5c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4c0-.3.2-.4.4-.4zm1.8 3.2c-.1-.1-.2-.2-.3-.2H5.7c-.1 0-.2.1-.3.2-.1.1-.1.2 0 .4.7 2 2.5 3.3 4.6 3.3s3.9-1.3 4.6-3.3c.1-.1.1-.3 0-.4zM10 54.1c-1.6 0-3-.9-3.7-2.2h7.3c-.6 1.3-2 2.2-3.6 2.2zm-2.8-4.6c.6 0 1.2-.5 1.2-1.1 0-.6-.5-1.2-1.2-1.2-.6 0-1.1.5-1.1 1.2 0 .6.5 1.1 1.1 1.1zm0-1.5c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4c0-.3.2-.4.4-.4z'/%3E%3Cpath d='M10 43c-3.8 0-7 3.1-7 7 0 3.8 3.1 7 7 7s7-3.1 7-7c0-3.8-3.2-7-7-7zm0 13.2c-3.4 0-6.2-2.8-6.2-6.2 0-3.4 2.8-6.2 6.2-6.2s6.2 2.8 6.2 6.2c0 3.4-2.8 6.2-6.2 6.2z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%23C0C0BF' d='M64.1 53.4h2.3c.2 0 .4.2.4.4v2.1c0 .2-.2.4-.4.4h-2.3c-.2 0-.4-.2-.4-.4v-2.1c0-.2.1-.4.4-.4zm9.4.1h2.4c.2 0 .4.2.4.4v2c0 .2-.2.4-.4.4h-2.4c-.2 0-.4-.2-.4-.4v-2c0-.3.2-.4.4-.4zm-9.8-5.1h12.6v5H63.7v-5z'/%3E%3Cpath fill='none' stroke='%23C0C0BF' d='M65.5 43.6h8.9c1 0 1.9.8 1.9 1.9v3.1H63.7v-3.1c0-1 .8-1.9 1.8-1.9z'/%3E%3Cellipse fill='%23C0C0BF' cx='66.2' cy='50.9' rx='.9' ry='1'/%3E%3Cellipse fill='%23C0C0BF' cx='73.8' cy='50.9' rx='.9' ry='1'/%3E%3Cg fill='none' stroke='%23C0C0BF'%3E%3Cpath d='M96.4 50c0 3.6-2.9 6.5-6.4 6.5s-6.4-2.9-6.4-6.5 2.9-6.5 6.4-6.5 6.4 2.9 6.4 6.5z'/%3E%3Cpath d='M96.3 48.6v.1c-.9.1-2.9.1-4.6-1.2-1.1-.8-2-1.7-2.6-2.5-.3-.4-.6-.8-.7-1-.1-.1-.1-.2-.1-.2.5-.1 1.2-.2 2-.2 1.2 0 2.5.3 3.5 1.1s1.7 1.8 2.1 2.8c.2.4.3.8.4 1.1zM84 52.2v-.1c.9-.2 2.9-.4 4.7.6 1.1.7 1.9 1.5 2.4 2.3.4.5.6 1 .7 1.3-.4.1-1 .2-1.7.3-1 0-2.1-.1-3.2-.8s-1.9-1.6-2.4-2.5c-.3-.5-.4-.8-.5-1.1z'/%3E%3C/g%3E%3Cg fill='none' stroke='%23C0C0BF'%3E%3Cpath stroke-linecap='round' d='m116.3 46.8-1.4 2-.8-.8-.6-.7v.9l-.1 8.2h-6.8l-.1-8.2v-.9l-.6.7-.8.8-1.4-2 2.6-2.9c.1-.1.2-.1.3-.1h1.3l.4.7c.7 1.3 2.6 1.3 3.3-.1l.3-.6h1.2c.1 0 .2 0 .3.1l.3-.3-.3.3 2.9 2.9z'/%3E%3Cpath d='M110.1 47.7h2v.9c0 .4-.4.7-1 .7s-1-.3-1-.7v-.9z'/%3E%3C/g%3E%3Cpath d='M126.8 54.3c0 1.2-1 2.2-2.2 2.2s-2.2-1-2.2-2.2 1-2.2 2.2-2.2 2.2 1 2.2 2.2zm10.8 0c0 1.2-1 2.2-2.2 2.2-1.2 0-2.2-1-2.2-2.2s1-2.2 2.2-2.2c1.2 0 2.2 1 2.2 2.2zm-10.8-9.9v9.9m10.9-9.9v9.9m-10.9-10.8h10.8v2.7h-10.8v-2.7z' fill='none' stroke='%23C0C0BF'/%3E%3Cg fill='%23C0C0BF'%3E%3Cpath d='M170.8 43.1h-.8c-2.1 0-4 1-5.3 2.5h-.1l-.1-.1-1-1.2-.3 3.4 3.4.3-1.1-1.3-.1-.1.1-.1c1.1-1.5 3-2.3 5-2.1 3.2.3 5.5 3.1 5.2 6.3-.3 3-3.1 5.3-6.1 5.1-3.1-.2-5.4-2.9-5.3-6l-1.3-.1c-.2 3.8 2.6 7.1 6.3 7.4 3.9.3 7.3-2.6 7.6-6.5.3-3.8-2.5-7.1-6.1-7.5z'/%3E%3Cpath d='M170.3 47.4c0-.3-.3-.6-.6-.6s-.6.3-.6.6v3.2c0 .2.1.3.2.4.1.1.3.2.4.2h2.4c.4 0 .6-.3.6-.6s-.3-.6-.6-.6h-1.8v-2.6z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%23C0C0BF' d='M186.2 43.4h7.7c1.5 0 2.7 1.2 2.7 2.7v7.7c0 1.5-1.2 2.7-2.7 2.7h-7.7c-1.5 0-2.7-1.2-2.7-2.7v-7.7c-.1-1.4 1.2-2.7 2.7-2.7z'/%3E%3Ccircle fill='%23C0C0BF' cx='186' cy='48.9' r='.7'/%3E%3Ccircle fill='%23C0C0BF' cx='194' cy='46.7' r='.7'/%3E%3Cpath fill='none' stroke='%23C0C0BF' stroke-linecap='round' d='m186 53.3.4-.3c.4-.3 1-.3 1.5-.1l1 .4c.5.2 1 .2 1.5-.1l.8-.5c.4-.3 1-.3 1.5-.1l1.8.8'/%3E%3Cpath fill='%23C0C0BF' stroke='%23C0C0BF' stroke-width='.25' stroke-miterlimit='10' d='M156 44.3c-.2-.1-.4-.1-.5 0 0 0-.2.1-.9.2-.7 0-2.4-.1-3.8-.6-.8-.3-1.7-.5-2.5-.5h-.5c-1.3 0-2.5.3-3.6 1-.2.1-.2.2-.2.4v11.6c0 .3.1.5.3.5.6 0 .5-.4.5-.6v-5.7c.7-.3 3.2-1.1 5.8-.1 1.6.6 3.5.7 4.3.7.8 0 1.3-.3 1.3-.3.2-.1.3-.2.3-.4v-5.7c-.3-.2-.4-.4-.5-.5zm-.4 5.9c-.1 0-.7.1-1 .1-.7 0-2.4-.1-3.8-.6-2.5-1-5-.5-6.2-.1v-4.9c.9-.5 2.2-.7 3.2-.7h.4c.7 0 1.5.2 2.2.4 1.6.6 3.5.7 4.3.7.2 0 .8 0 1-.1v5.2z'/%3E%3Cpath fill='none' stroke='%23C0C0BF' d='M48.1 43.5h3.7c2.5 0 4.5 2 4.5 4.5 0 .5-.4.9-.9.9H44.5c-.5 0-.9-.4-.9-.9 0-2.5 2-4.5 4.5-4.5z'/%3E%3Cpath fill='none' stroke='%23C0C0BF' stroke-linecap='round' d='M43.5 48.8c-.2.1-.5 1.2 0 1.5 1.4 1 8.5.8 11.3.6.8-.1 1.6-.4 1.7-1.2 0-.3-.1-.6-.6-.9'/%3E%3Cpath fill='none' stroke='%23C0C0BF' stroke-linecap='round' d='m43.5 50.6-.2.4c-.2.5.2 1 .7.9.3-.1.5 0 .7.3l.1.2c.3.5 1 .6 1.5.2h0c.3-.2.7-.3 1-.2l.8.3c.4.2.8.1 1.2 0l.5-.2c.4-.2.9-.2 1.3 0l.5.2c.4.2.8.2 1.2 0l.2-.1c.3-.2.8-.2 1.1.1l.2.2c.3.3.8.2 1-.2l.1-.2c.1-.2 0-.3.2-.3.5 0 1.2-.3 1.1-.7l-.4-1.1'/%3E%3Cpath fill='none' stroke='%23C0C0BF' stroke-linecap='round' d='M43.5 52.2c-.1.2-.3.8 0 1.1.3.4 3 1.1 6.4 1.1 2.2 0 4.6-.3 6-.6.5-.1.9-.5.8-.9 0-.2-.2-.5-.4-.7'/%3E%3Cpath fill='none' stroke='%23C0C0BF' stroke-linecap='round' d='M43.5 53.3c0 .5.6 2.3 1.3 2.7 1.8.8 5.7.7 8.1.5 1.3-.1 2.5-.7 3.2-1.8.3-.5.5-1 .5-1.4'/%3E%3Cellipse fill='%23C0C0BF' cx='51.6' cy='46.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%23C0C0BF' cx='53' cy='45' rx='.3' ry='.4'/%3E%3Cellipse fill='%23C0C0BF' cx='53' cy='47.2' rx='.3' ry='.4'/%3E%3Cellipse fill='%23C0C0BF' cx='54.3' cy='46.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%23C0C0BF' cx='50.9' cy='45' rx='.3' ry='.4'/%3E%3Cpath fill='none' stroke='%23C0C0BF' d='M24.2 51v-7.6c.1.1.8.9 2.8 3.1 2.5-1.7 5.6-.7 6.9 0l2.4-3.1v7.1c0 1.2-.1 2.5-.9 3.4-1 1.2-2.7 2.5-5.3 2.5-2.9 0-4.5-1.5-5.3-2.9-.6-.6-.6-1.5-.6-2.5z'/%3E%3Cpath fill='none' stroke='%23C0C0BF' stroke-linecap='round' d='m21.2 50 5.4 1.2m-5.4 2.9 5.4-1.2M38.8 50l-5.4 1.2m5.4 2.9-5.4-1.2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23C0C0BF' d='m29.5 52.4-.5-.7c-.2-.3 0-.6.3-.6h1.4c.3 0 .5.4.3.6l-.7 1c-.7 1.2-2.6 1.1-3.1-.3l-.1-.2c-.1-.2 0-.4.2-.5s.4 0 .5.2l.1.2c.4.7 1.2.8 1.6.3z'/%3E%3Cpath fill='none' stroke='%23C0C0BF' stroke-linecap='round' d='m32.4 52.1-.1.2c-.4 1-1.8 1.1-2.3.2'/%3E%3Ccircle fill='%23C0C0BF' cx='27.6' cy='49.7' r='.7'/%3E%3Ccircle fill='%23C0C0BF' cx='32.4' cy='49.7' r='.7'/%3E%3Cg fill='%236AA9DD' stroke='%236AA9DD' stroke-width='.1' stroke-miterlimit='10'%3E%3Cpath d='M14.6 71.2c-.1-.1-.2-.2-.3-.2H5.7c-.1 0-.2.1-.3.2-.1.1-.1.2 0 .4.7 2 2.5 3.3 4.6 3.3s3.9-1.3 4.6-3.3c.1-.1.1-.3 0-.4zM10 74.1c-1.6 0-3-.9-3.7-2.2h7.3c-.6 1.3-2 2.2-3.6 2.2zm2.8-4.6c.6 0 1.1-.5 1.1-1.1 0-.6-.5-1.2-1.1-1.2-.6 0-1.2.5-1.2 1.2 0 .6.6 1.1 1.2 1.1zm0-1.5c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4c0-.3.2-.4.4-.4zm-5.6 1.5c.6 0 1.2-.5 1.2-1.1 0-.6-.5-1.2-1.2-1.2-.6 0-1.1.5-1.1 1.2 0 .6.5 1.1 1.1 1.1zm0-1.5c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4c0-.3.2-.4.4-.4z'/%3E%3Cpath d='M10 63c-3.8 0-7 3.1-7 7 0 3.8 3.1 7 7 7s7-3.1 7-7c0-3.8-3.2-7-7-7zm0 13.2c-3.4 0-6.2-2.8-6.2-6.2 0-3.4 2.8-6.2 6.2-6.2s6.2 2.8 6.2 6.2c0 3.4-2.8 6.2-6.2 6.2z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%236AA9DD' d='M64.1 73.4h2.3c.2 0 .4.2.4.4v2.1c0 .2-.2.4-.4.4h-2.3c-.2 0-.4-.2-.4-.4v-2.1c0-.2.1-.4.4-.4zm9.4.1h2.4c.2 0 .4.2.4.4V76c0 .2-.2.4-.4.4h-2.4c-.2 0-.4-.2-.4-.4v-2.1c0-.3.2-.4.4-.4zm-9.8-5.1h12.6v5H63.7v-5z'/%3E%3Cpath fill='none' stroke='%236AA9DD' d='M65.5 63.6h8.9c1 0 1.9.8 1.9 1.9v3.1H63.7v-3.1c0-1 .8-1.9 1.8-1.9z'/%3E%3Ccircle fill='%236AA9DD' cx='66.2' cy='70.9' r='.9'/%3E%3Ccircle fill='%236AA9DD' cx='73.8' cy='70.9' r='.9'/%3E%3Cg fill='none' stroke='%236AA9DD'%3E%3Cpath d='M96.4 70c0 3.6-2.9 6.5-6.4 6.5s-6.4-2.9-6.4-6.5 2.9-6.5 6.4-6.5 6.4 2.9 6.4 6.5z'/%3E%3Cpath d='M96.3 68.6v.1c-.9.1-2.9.1-4.6-1.2-1.1-.8-2-1.7-2.6-2.5-.3-.4-.6-.8-.7-1.1-.1-.1-.1-.2-.1-.2.5-.1 1.2-.2 2-.2 1.2 0 2.5.3 3.5 1.1s1.7 1.8 2.1 2.8c.2.5.3.9.4 1.2zM84 72.2v-.1c.9-.2 2.9-.4 4.7.6 1.1.7 1.9 1.5 2.4 2.3.4.5.6 1 .7 1.3-.4.1-1 .2-1.7.3-1 0-2.1-.1-3.2-.8s-1.9-1.6-2.4-2.5c-.3-.5-.4-.9-.5-1.1z'/%3E%3C/g%3E%3Cg fill='none' stroke='%236AA9DD'%3E%3Cpath stroke-linecap='round' d='m116.3 66.8-1.4 2-.8-.8-.6-.7v.9l-.1 8.2h-6.8l-.1-8.2v-.9l-.6.7-.8.8-1.4-2 2.6-2.9c.1-.1.2-.1.3-.1h1.3l.4.7c.7 1.3 2.6 1.3 3.3-.1l.3-.6h1.2c.1 0 .2 0 .3.1l.3-.3-.3.3 2.9 2.9z'/%3E%3Cpath d='M110.1 67.7h2v.9c0 .4-.4.7-1 .7s-1-.3-1-.7v-.9z'/%3E%3C/g%3E%3Cpath d='M126.8 74.3c0 1.2-1 2.2-2.2 2.2s-2.2-1-2.2-2.2 1-2.2 2.2-2.2 2.2 1 2.2 2.2zm10.8 0c0 1.2-1 2.2-2.2 2.2-1.2 0-2.2-1-2.2-2.2s1-2.2 2.2-2.2c1.2 0 2.2 1 2.2 2.2zm-10.8-9.9v9.9m10.9-9.9v9.9m-10.9-10.8h10.8v2.7h-10.8v-2.7z' fill='none' stroke='%236AA9DD'/%3E%3Cg fill='%236AA9DD'%3E%3Cpath d='M170.8 63.1h-.8c-2.1 0-4 1-5.3 2.5h-.1l-.1-.1-1-1.2-.3 3.4 3.4.3-1.1-1.3-.1-.1.1-.1c1.1-1.4 3-2.3 5-2.1 3.2.3 5.5 3.1 5.2 6.3-.3 3-3.1 5.3-6.1 5.1-3.1-.2-5.4-2.9-5.3-6l-1.3-.1c-.2 3.8 2.6 7.1 6.3 7.4 3.9.3 7.3-2.6 7.6-6.5.3-3.8-2.5-7.1-6.1-7.5z'/%3E%3Cpath d='M170.3 67.4c0-.3-.3-.6-.6-.6s-.6.3-.6.6v3.2c0 .2.1.3.2.4.1.1.3.2.4.2h2.4c.4 0 .6-.3.6-.6s-.3-.6-.7-.6h-1.8v-.2l.1-2.4z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%236AA9DD' d='M186.2 63.4h7.7c1.5 0 2.7 1.2 2.7 2.7v7.7c0 1.5-1.2 2.7-2.7 2.7h-7.7c-1.5 0-2.7-1.2-2.7-2.7v-7.7c-.1-1.4 1.2-2.7 2.7-2.7z'/%3E%3Ccircle fill='%236AA9DD' cx='186' cy='68.9' r='.7'/%3E%3Ccircle fill='%236AA9DD' cx='194' cy='66.7' r='.7'/%3E%3Cpath fill='none' stroke='%236AA9DD' stroke-linecap='round' d='m186 73.3.4-.3c.4-.3 1-.3 1.5-.1l1 .4c.5.2 1 .2 1.5-.1l.8-.5c.4-.3 1-.3 1.5-.1l1.8.8'/%3E%3Cpath fill='%236AA9DD' stroke='%236AA9DD' stroke-width='.25' stroke-miterlimit='10' d='M156 64.3c-.2-.1-.4-.1-.5 0 0 0-.2.1-.9.2-.7 0-2.4-.1-3.8-.6-.8-.3-1.7-.5-2.5-.5h-.5c-1.3 0-2.5.3-3.6 1-.2.1-.2.2-.2.4v11.6c0 .3.1.5.3.5.6 0 .5-.4.5-.6v-5.7c.7-.3 3.2-1.1 5.8-.1 1.6.6 3.5.7 4.3.7.8 0 1.3-.3 1.3-.3.2-.1.3-.2.3-.4v-5.7c-.3-.2-.4-.4-.5-.5zm-.4 5.9c-.1 0-.7.1-1 .1-.7 0-2.4-.1-3.8-.6-2.5-1-5-.5-6.2-.1v-4.9c.9-.5 2.2-.7 3.2-.7h.4c.7 0 1.5.2 2.2.4 1.6.6 3.5.7 4.3.7.2 0 .8 0 1-.1v5.2z'/%3E%3Cpath fill='none' stroke='%236AA9DD' d='M48.1 63.5h3.7c2.5 0 4.5 2 4.5 4.5 0 .5-.4.9-.9.9H44.5c-.5 0-.9-.4-.9-.9 0-2.5 2-4.5 4.5-4.5z'/%3E%3Cpath fill='none' stroke='%236AA9DD' stroke-linecap='round' d='M43.5 68.8c-.2.1-.5 1.2 0 1.5 1.4.9 8.5.8 11.3.6.8-.1 1.6-.4 1.7-1.2 0-.3-.1-.6-.6-.9'/%3E%3Cpath fill='none' stroke='%236AA9DD' stroke-linecap='round' d='m43.5 70.6-.2.4c-.2.5.2 1 .7.9.3-.1.5.1.7.3l.1.2c.3.5 1 .6 1.5.2h0c.3-.2.7-.3 1-.2l.8.3c.4.2.8.1 1.2 0l.5-.2c.4-.2.9-.2 1.3 0l.5.2c.4.2.8.2 1.2-.1l.2-.1c.3-.2.8-.2 1.1.1l.2.2c.3.3.8.2 1-.2l.1-.2c.1-.2 0-.3.2-.3.5 0 1.2-.3 1.1-.7l-.4-1.1'/%3E%3Cpath fill='none' stroke='%236AA9DD' stroke-linecap='round' d='M43.5 72.2c-.1.2-.3.8 0 1.1.3.4 3 1.1 6.4 1.1 2.2 0 4.6-.3 6-.6.5-.1.9-.4.8-.9 0-.2-.2-.5-.4-.7'/%3E%3Cpath fill='none' stroke='%236AA9DD' stroke-linecap='round' d='M43.5 73.3c0 .5.6 2.3 1.3 2.7 1.8.8 5.7.7 8.1.5 1.3-.1 2.5-.7 3.2-1.8.3-.5.5-1 .5-1.4'/%3E%3Cellipse fill='%236AA9DD' cx='51.6' cy='66.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%236AA9DD' cx='53' cy='65' rx='.3' ry='.4'/%3E%3Cellipse fill='%236AA9DD' cx='53' cy='67.2' rx='.3' ry='.4'/%3E%3Cellipse fill='%236AA9DD' cx='54.3' cy='66.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%236AA9DD' cx='50.9' cy='65' rx='.3' ry='.4'/%3E%3Cpath fill='none' stroke='%236AA9DD' d='M24.2 71v-7.6c.1.1.8.9 2.8 3.1 2.5-1.7 5.6-.7 6.9 0l2.4-3.1v7.1c0 1.2-.1 2.5-.9 3.4-1 1.2-2.7 2.5-5.3 2.5-2.9 0-4.5-1.5-5.3-2.9-.6-.6-.6-1.5-.6-2.5z'/%3E%3Cpath fill='none' stroke='%236AA9DD' stroke-linecap='round' d='m21.2 70.1 5.4 1.2m-5.4 2.8 5.4-1.2m12.2-2.8-5.4 1.2m5.4 2.8-5.4-1.2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%236AA9DD' d='m29.5 72.4-.5-.7c-.2-.3 0-.6.3-.6h1.4c.3 0 .5.4.3.6l-.7 1c-.7 1.2-2.6 1.1-3.1-.3l-.1-.2c-.1-.2 0-.4.2-.5.2-.1.4 0 .5.2l.1.2c.4.7 1.2.8 1.6.3z'/%3E%3Cpath fill='none' stroke='%236AA9DD' stroke-linecap='round' d='m32.4 72.1-.1.2c-.4 1-1.8 1.1-2.3.2'/%3E%3Ccircle fill='%236AA9DD' cx='27.6' cy='69.7' r='.7'/%3E%3Ccircle fill='%236AA9DD' cx='32.4' cy='69.7' r='.7'/%3E%3Cg fill='%23868686' stroke='%23868686' stroke-width='.1' stroke-miterlimit='10'%3E%3Cpath d='M12.8 9.5c.6 0 1.1-.5 1.1-1.2 0-.6-.5-1.1-1.1-1.1-.6 0-1.2.5-1.2 1.1s.6 1.2 1.2 1.2zm0-1.6c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4.2-.4.4-.4zM7.2 9.5c.6 0 1.2-.5 1.2-1.2 0-.6-.5-1.1-1.2-1.1-.6 0-1.1.5-1.1 1.1s.5 1.2 1.1 1.2zm0-1.6c.2 0 .4.2.4.4s-.2.4-.4.4-.4-.2-.4-.4.2-.4.4-.4zm7.4 3.3c-.1-.1-.2-.2-.3-.2H5.7c-.1 0-.2.1-.3.2-.1.1-.1.2 0 .4.7 2 2.5 3.3 4.6 3.3s3.9-1.3 4.6-3.3c.1-.2.1-.3 0-.4zM10 14.1c-1.6 0-3-.9-3.7-2.2h7.3c-.6 1.3-2 2.2-3.6 2.2z'/%3E%3Cpath d='M10 3c-3.8 0-7 3.1-7 7s3.1 7 7 7 7-3.1 7-7-3.2-7-7-7zm0 13.2c-3.4 0-6.2-2.8-6.2-6.2S6.6 3.8 10 3.8s6.2 2.8 6.2 6.2-2.8 6.2-6.2 6.2z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%23868686' d='M64.1 13.4h2.3c.2 0 .4.2.4.4v2.1c0 .2-.2.4-.4.4h-2.3c-.2 0-.4-.2-.4-.4v-2.1c0-.2.1-.4.4-.4zm9.4 0h2.4c.2 0 .4.2.4.4v2.1c0 .2-.2.4-.4.4h-2.4c-.2 0-.4-.2-.4-.4v-2.1c0-.2.2-.4.4-.4zm-9.8-5h12.6v5H63.7v-5z'/%3E%3Cpath fill='none' stroke='%23868686' d='M65.5 3.6h8.9c1 0 1.9.8 1.9 1.9v3.1H63.7V5.5c0-1.1.8-1.9 1.8-1.9z'/%3E%3Ccircle fill='%23868686' cx='66.2' cy='10.9' r='.9'/%3E%3Ccircle fill='%23868686' cx='73.8' cy='10.9' r='.9'/%3E%3Cg fill='none' stroke='%23868686'%3E%3Cpath d='M96.4 10c0 3.6-2.9 6.5-6.4 6.5s-6.4-2.9-6.4-6.5 2.9-6.5 6.4-6.5 6.4 2.9 6.4 6.5z'/%3E%3Cpath d='M96.3 8.6v.1c-.9.1-2.9.1-4.6-1.2-1.1-.8-2-1.7-2.6-2.5-.3-.4-.6-.8-.7-1.1-.1-.1-.1-.2-.1-.2.5-.1 1.2-.2 2-.2 1.2 0 2.5.3 3.5 1.1s1.7 1.8 2.1 2.8c.2.5.3.9.4 1.2zM84 12.1V12c.9-.2 2.9-.4 4.7.6 1.1.6 1.9 1.5 2.4 2.3.4.5.6 1 .7 1.3-.4.1-1 .2-1.7.3-1 0-2.1-.1-3.2-.8-1.1-.6-1.9-1.6-2.4-2.5-.3-.4-.4-.8-.5-1.1z'/%3E%3C/g%3E%3Cg fill='none' stroke='%23868686'%3E%3Cpath stroke-linecap='round' d='m116.3 6.8-1.4 2-.8-.8-.6-.7v.9l-.1 8.2h-6.8l-.1-8.2v-.9l-.6.7-.8.8-1.4-2 2.6-2.9c.1-.1.2-.1.3-.1h1.3l.4.7c.7 1.3 2.6 1.3 3.3-.1l.3-.6h1.2c.1 0 .2 0 .3.1l.3-.3-.3.3 2.9 2.9z'/%3E%3Cpath d='M110.1 7.7h2v.9c0 .4-.4.7-1 .7s-1-.3-1-.7v-.9z'/%3E%3C/g%3E%3Cpath d='M126.8 14.3c0 1.2-1 2.2-2.2 2.2s-2.2-1-2.2-2.2 1-2.2 2.2-2.2 2.2 1 2.2 2.2zm10.8 0c0 1.2-1 2.2-2.2 2.2-1.2 0-2.2-1-2.2-2.2s1-2.2 2.2-2.2c1.2 0 2.2 1 2.2 2.2zm-10.8-9.9v9.9m10.9-9.9v9.9M126.8 3.5h10.8v2.7h-10.8V3.5z' fill='none' stroke='%23868686'/%3E%3Cg fill='%23868686'%3E%3Cpath d='M170.8 3.1h-.8c-2.1 0-4 1-5.3 2.5h-.1l-.1-.1-1-1.2-.3 3.4 3.4.3-1.1-1.3-.1-.1.1-.1c1.1-1.4 3-2.3 5-2.1 3.2.3 5.5 3.1 5.2 6.3-.3 3-3.1 5.3-6.1 5.1-3.1-.2-5.4-2.9-5.3-6l-1.3-.3c-.2 3.8 2.6 7.1 6.3 7.4 3.9.4 7.3-2.6 7.6-6.5.3-3.6-2.5-6.9-6.1-7.3z'/%3E%3Cpath d='M170.3 7.4c0-.3-.3-.6-.6-.6s-.7.3-.7.6v3.2c0 .2.1.3.2.4.1.1.3.2.4.2h2.4c.4 0 .6-.3.6-.6s-.3-.6-.6-.6h-1.8v-.2l.1-2.4z'/%3E%3C/g%3E%3Cpath fill='none' stroke='%23868686' d='M186.2 3.4h7.7c1.5 0 2.7 1.2 2.7 2.7v7.7c0 1.5-1.2 2.7-2.7 2.7h-7.7c-1.5 0-2.7-1.2-2.7-2.7V6.1c-.1-1.5 1.2-2.7 2.7-2.7z'/%3E%3Ccircle fill='%23868686' cx='186' cy='8.9' r='.7'/%3E%3Ccircle fill='%23868686' cx='194' cy='6.7' r='.7'/%3E%3Cpath fill='none' stroke='%23868686' stroke-linecap='round' d='m186 13.3.4-.3c.4-.3 1-.3 1.5-.1l1 .4c.5.2 1 .2 1.5-.1l.8-.5c.4-.3 1-.3 1.5-.1l1.8.8'/%3E%3Cpath fill='%23868686' stroke='%23868686' stroke-width='.25' stroke-miterlimit='10' d='M156 4.3c-.2-.1-.4-.1-.5 0 0 0-.2.1-.9.1s-2.4-.1-3.8-.6c-.8-.3-1.7-.5-2.5-.5h-.5c-1.3 0-2.5.3-3.6 1-.2.1-.2.2-.2.4v11.6c0 .3.1.5.3.5.6 0 .5-.4.5-.6v-5.7c.7-.3 3.2-1.1 5.8-.1 1.6.6 3.5.7 4.3.7.8 0 1.3-.3 1.3-.3.2-.1.3-.2.3-.4V4.7c-.3-.2-.4-.3-.5-.4zm-.4 5.9c-.1 0-.7.1-1 .1-.7 0-2.4-.1-3.8-.6-2.5-1-5-.5-6.2-.1V4.7c.9-.5 2.2-.7 3.2-.7h.4c.7 0 1.5.2 2.2.4 1.6.6 3.5.7 4.3.7.2 0 .8 0 1-.1v5.2z'/%3E%3Cpath fill='none' stroke='%23868686' d='M48.1 3.5h3.7c2.5 0 4.5 2 4.5 4.5 0 .5-.4.9-.9.9H44.5c-.5 0-.9-.4-.9-.9 0-2.5 2-4.5 4.5-4.5z'/%3E%3Cpath fill='none' stroke='%23868686' stroke-linecap='round' d='M43.5 8.7c-.2.1-.5 1.2 0 1.5 1.4.9 8.5.8 11.3.6.8-.1 1.6-.4 1.7-1.2 0-.3-.1-.6-.6-.9'/%3E%3Cpath fill='none' stroke='%23868686' stroke-linecap='round' d='m43.5 10.6-.2.4c-.2.5.2 1 .7.9.3-.1.5.1.7.3l.1.2c.3.5 1 .6 1.5.2h0c.3-.2.7-.3 1-.2l.8.3c.4.1.8.1 1.2 0l.5-.2c.4-.2.9-.2 1.3 0l.5.2c.4.2.8.1 1.2-.1l.2-.1c.3-.2.8-.1 1.1.1l.2.2c.3.3.8.2 1-.2l.1-.2c.1-.2 0-.3.2-.4.5 0 1.2-.3 1.1-.7l-.4-1.1'/%3E%3Cpath fill='none' stroke='%23868686' stroke-linecap='round' d='M43.5 12.1c-.1.2-.3.8 0 1.1.3.4 3 1.1 6.4 1.1 2.2 0 4.6-.3 6-.6.5-.1.9-.4.8-.9 0-.2-.2-.5-.4-.7'/%3E%3Cpath fill='none' stroke='%23868686' stroke-linecap='round' d='M43.5 13.3c0 .5.6 2.4 1.3 2.6 1.8.8 5.7.7 8.1.5 1.3-.1 2.5-.7 3.2-1.8.3-.5.5-1 .5-1.4'/%3E%3Cellipse fill='%23868686' cx='51.6' cy='6.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%23868686' cx='53' cy='4.9' rx='.3' ry='.4'/%3E%3Cellipse fill='%23868686' cx='53' cy='7.2' rx='.3' ry='.4'/%3E%3Cellipse fill='%23868686' cx='54.3' cy='6.5' rx='.3' ry='.4'/%3E%3Cellipse fill='%23868686' cx='50.9' cy='4.9' rx='.3' ry='.4'/%3E%3Cpath fill='none' stroke='%23868686' d='M24.2 11V3.5c.1.1.8.9 2.8 3.1 2.5-1.7 5.6-.7 6.9 0l2.4-3.1v7.1c0 1.2-.1 2.5-.9 3.4-1 1.2-2.7 2.5-5.3 2.5-2.9 0-4.5-1.5-5.3-2.9-.6-.7-.6-1.7-.6-2.6z'/%3E%3Cpath fill='none' stroke='%23868686' stroke-linecap='round' d='m21.2 10 5.4 1.2m-5.4 2.9 5.4-1.2M38.8 10l-5.4 1.2m5.4 2.9-5.4-1.2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23868686' d='m29.5 12.4-.5-.7c-.2-.3 0-.6.3-.6h1.4c.3 0 .5.4.3.6l-.7 1c-.7 1.2-2.6 1.1-3.1-.3l-.1-.2c-.1-.2 0-.4.2-.5s.4 0 .5.2l.1.2c.4.6 1.2.8 1.6.3z'/%3E%3Cpath fill='none' stroke='%23868686' stroke-linecap='round' d='m32.4 12.1-.1.2c-.4 1-1.8 1.1-2.3.2'/%3E%3Ccircle fill='%23868686' cx='27.6' cy='9.7' r='.7'/%3E%3Ccircle fill='%23868686' cx='32.4' cy='9.7' r='.7'/%3E%3C/svg%3E");background-position:0 0}.EmojiPickerReact.epr-dark-theme .epr-category-nav>button.epr-cat-btn{background-position-y:calc(var(--epr-category-navigation-button-size)*2)}aside.EmojiPickerReact.epr-main:has(input:-moz-placeholder-shown) .epr-category-nav{background-position-y:calc(var(--epr-category-navigation-button-size)*3)}aside.EmojiPickerReact.epr-main:has(input:placeholder-shown) .epr-category-nav{background-position-y:calc(var(--epr-category-navigation-button-size)*3)}.EmojiPickerReact.epr-dark-theme:not(.epr-search-active) .epr-category-nav>button.epr-cat-btn.epr-active,.EmojiPickerReact.epr-dark-theme:not(.epr-search-active) .epr-category-nav>button.epr-cat-btn:hover{background-position-y:calc(var(--epr-category-navigation-button-size)*3)}@media (prefers-color-scheme:dark){.EmojiPickerReact.epr-auto-theme .epr-category-nav>button.epr-cat-btn{background-position-y:calc(var(--epr-category-navigation-button-size)*2)}.EmojiPickerReact.epr-auto-theme:not(.epr-search-active) .epr-category-nav>button.epr-cat-btn.epr-active,.EmojiPickerReact.epr-auto-theme:not(.epr-search-active) .epr-category-nav>button.epr-cat-btn:hover{background-position-y:calc(var(--epr-category-navigation-button-size)*3)}}.EmojiPickerReact button.epr-cat-btn.epr-icn-suggested{background-position-x:calc(var(--epr-category-navigation-button-size)*-8)}.EmojiPickerReact button.epr-cat-btn.epr-icn-custom{background-position-x:calc(var(--epr-category-navigation-button-size)*-9)}.EmojiPickerReact button.epr-cat-btn.epr-icn-activities{background-position-x:calc(var(--epr-category-navigation-button-size)*-4)}.EmojiPickerReact button.epr-cat-btn.epr-icn-animals_nature{background-position-x:calc(var(--epr-category-navigation-button-size)*-1)}.EmojiPickerReact button.epr-cat-btn.epr-icn-flags{background-position-x:calc(var(--epr-category-navigation-button-size)*-7)}.EmojiPickerReact button.epr-cat-btn.epr-icn-food_drink{background-position-x:calc(var(--epr-category-navigation-button-size)*-2)}.EmojiPickerReact button.epr-cat-btn.epr-icn-objects{background-position-x:calc(var(--epr-category-navigation-button-size)*-5)}.EmojiPickerReact button.epr-cat-btn.epr-icn-smileys_people{background-position-x:0}.EmojiPickerReact button.epr-cat-btn.epr-icn-symbols{background-position-x:calc(var(--epr-category-navigation-button-size)*-6)}.EmojiPickerReact button.epr-cat-btn.epr-icn-travel_places{background-position-x:calc(var(--epr-category-navigation-button-size)*-3)}`;Y(Qr);function Jr(f){var e;return(e=f==null?void 0:f.getAttribute("data-name"))!=null?e:null}function Xr(f){var e=ef();i.useEffect(function(){var a=new Map,n=e.current,r=new IntersectionObserver(function(t){if(n){for(var d=_n(t),l;!(l=d()).done;){var c=l.value,u=Jr(c.target);a.set(u,c.intersectionRatio)}var s=Array.from(a),g=s[s.length-1];if(g[1]==1)return f(g[0]);for(var m=0,p=s;m<p.length;m++){var x=p[m],v=x[0],S=x[1];if(S){f(v);break}}}},{threshold:[0,1]});n==null||n.querySelectorAll(q(k.category)).forEach(function(t){r.observe(t)})},[e,f])}function ye(){var f=ge(),e=f[0];return!!e}function ft(){var f=ef(),e=Yf();return function(n){var r;if(f.current){var t=(r=f.current)==null?void 0:r.querySelector('[data-name="'+n+'"]');if(t){var d=t.offsetTop||0;b1(e.current,d)}}}}function et(){var f=C0();return f?f.length===0:!1}function at(){var f=i.useState(null),e=f[0],a=f[1],n=ft();Xr(a);var r=ye(),t=Ua(),d=Le(),l=et();return i.createElement("div",{className:"epr-category-nav",role:"tablist","aria-label":"Category navigation",id:"epr-category-nav-id",ref:d},t.map(function(c){var u,s=Ie(c),g=s===e;return nr(c)&&l?null:i.createElement(he,{tabIndex:r||g?-1:0,className:U("epr-cat-btn","epr-icn-"+s,(u={},u[k.active]=g,u)),key:s,onClick:function(){a(s),n(s)},"aria-label":Na(c),"aria-selected":g,role:"tab","aria-controls":"epr-category-nav-id"})}))}var nt=".EmojiPickerReact .epr-header .epr-header-overlay{padding:var(--epr-header-padding);z-index:var(--epr-header-overlay-z-index)}";Y(nt);var rt=`.EmojiPickerReact .epr-search-container{display:block;flex:1;min-width:0}.EmojiPickerReact .epr-search-container .epr-status-visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.EmojiPickerReact .epr-search-container input.epr-search{background-color:var(--epr-search-input-bg-color);border:1px solid var(--epr-search-input-bg-color);border-radius:var(--epr-search-input-border-radius);color:var(--epr-search-input-text-color);height:var(--epr-search-input-height);outline:none;padding:var(--epr-search-input-padding);transition:all .2s ease-in-out;width:100%}.EmojiPickerReact .epr-search-container button.epr-btn-clear-search .epr-icn-clear-search{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='80' xml:space='preserve'%3E%3Cpath fill='%23868686' d='M6.98 13.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 8c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.4a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.2-.21.54 0 .74z'/%3E%3Cpath fill='%23868686' d='M10.15 18.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3Cpath fill='%233371B7' d='M6.98 33.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 28c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.41a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.21-.21.55 0 .75z'/%3E%3Cpath fill='%233371B7' d='M10.15 38.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3Cpath fill='%23C0C0BF' d='M6.98 53.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 48c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.41a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.21-.21.55 0 .75z'/%3E%3Cpath fill='%23C0C0BF' d='M10.15 58.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3Cpath fill='%236AA9DD' d='M6.98 73.59a.53.53 0 0 0 .74 0l2.42-2.42 2.43 2.43a.53.53 0 0 0 .74 0c.21-.21.21-.54 0-.75l-2.43-2.43L13.32 68c.21-.21.21-.54 0-.75a.525.525 0 0 0-.75 0l-2.42 2.42-2.41-2.41a.525.525 0 0 0-.75 0c-.21.21-.21.54 0 .75l2.41 2.41-2.42 2.42c-.21.21-.21.55 0 .75z'/%3E%3Cpath fill='%236AA9DD' d='M10.15 78.43c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zm0-14.94c3.83 0 6.94 3.11 6.94 6.94 0 3.83-3.11 6.94-6.94 6.94-3.83 0-6.94-3.11-6.94-6.94 0-3.83 3.12-6.94 6.94-6.94z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:20px;height:20px;width:20px}.EmojiPickerReact .epr-search-container button.epr-btn-clear-search{align-items:center;border-radius:50%;display:flex;height:30px;justify-content:center;padding:0;position:absolute;right:var(--epr-search-bar-inner-padding);top:50%;transform:translateY(-50%);width:30px}.EmojiPickerReact .epr-search-container button.epr-btn-clear-search:focus .epr-icn-clear-search,.EmojiPickerReact .epr-search-container button.epr-btn-clear-search:hover .epr-icn-clear-search{background-position-y:-20px}.EmojiPickerReact .epr-search-container button.epr-btn-clear-search:focus,.EmojiPickerReact .epr-search-container button.epr-btn-clear-search:hover{background:var(--epr-hover-bg-color)}.EmojiPickerReact.epr-dark-theme .epr-search-container button.epr-btn-clear-search .epr-icn-clear-search{background-position-y:-40px}.EmojiPickerReact.epr-dark-theme .epr-search-container button.epr-btn-clear-search:hover .epr-icn-clear-search{background-position-y:-60px}@media (prefers-color-scheme:dark){.EmojiPickerReact.epr-auto-theme .epr-search-container button.epr-btn-clear-search .epr-icn-clear-search{background-position-y:-40px}.EmojiPickerReact.epr-auto-theme .epr-search-container button.epr-btn-clear-search:hover .epr-icn-clear-search{background-position-y:-60px}}.EmojiPickerReact .epr-search-container .epr-icn-search{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='40' xml:space='preserve'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23868686' d='M12 8.81c0 2.08-1.68 3.76-3.76 3.76s-3.76-1.68-3.76-3.76 1.68-3.76 3.76-3.76S12 6.73 12 8.81zm-.77 3.91c-.83.64-1.87 1.01-2.99 1.01-2.72 0-4.92-2.2-4.92-4.92 0-2.72 2.2-4.92 4.92-4.92 2.72 0 4.92 2.2 4.92 4.92 0 1.13-.38 2.16-1.01 2.99l3.94 3.93c.25.25.25.66 0 .92-.25.25-.66.25-.92 0l-3.94-3.93z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23C0C0BF' d='M12 28.81c0 2.08-1.68 3.76-3.76 3.76s-3.76-1.68-3.76-3.76 1.68-3.76 3.76-3.76S12 26.73 12 28.81zm-.77 3.91c-.83.64-1.87 1.01-2.99 1.01-2.72 0-4.92-2.2-4.92-4.92 0-2.72 2.2-4.92 4.92-4.92 2.72 0 4.92 2.2 4.92 4.92 0 1.13-.38 2.16-1.01 2.99l3.94 3.93c.25.25.25.66 0 .92-.25.25-.66.25-.92 0l-3.94-3.93z'/%3E%3C/svg%3E");background-position:0 0;background-repeat:no-repeat;background-size:20px;content:"";height:20px;left:var(--epr-search-bar-inner-padding);position:absolute;top:50%;transform:translateY(-50%);width:20px}.EmojiPickerReact.epr-dark-theme .epr-search-container .epr-icn-search{background-position-y:-20px}@media (prefers-color-scheme:dark){.EmojiPickerReact.epr-auto-theme .epr-search-container .epr-icn-search{background-position-y:-20px}}.EmojiPickerReact .epr-search-container input.epr-search::-moz-placeholder{color:var(--epr-search-input-placeholder-color)}.EmojiPickerReact .epr-search-container input.epr-search::placeholder{color:var(--epr-search-input-placeholder-color)}.EmojiPickerReact .epr-search-container input.epr-search:focus{background-color:var(--epr-search-input-bg-color-active);border:1px solid var(--epr-search-border-color)}`;Y(rt);var Ce=q(k.emojiPicker)+" "+q(k.emojiList),E1=["button",q(k.emoji)].join(""),tt=q(k.category);function it(f){var e=f.value;if(!e)return null;var a=ot(e);return i.createElement("style",null,` + `+Ce+" "+E1+` { + display: none; + } + + + `+Ce+" "+a+` { + display: flex; + } + + `+Ce+" "+tt+":not(:has("+a+`)) { + display: none; + } + `)}function ot(f){return[E1,'[data-full-name*="',ze(f),'"]'].join("")}function dt(){var f=qa(),e=Ze();return f?null:i.createElement(y1,{className:"epr-header-overlay"},i.createElement(ct,null),e?i.createElement(w1,null):null)}function ct(){var f=i.useState(0),e=f[0],a=f[1],n=kf(),r=bf(),t=h1(),d=E0(),l=j0(),c=sr(),u=c.statusSearchResults,s=c.searchTerm,g=c.onChange,m=r==null?void 0:r.current,p=m==null?void 0:m.value;return i.createElement(ke,{className:"epr-search-container"},i.createElement(it,{value:p}),i.createElement("input",{autoFocus:l,"aria-label":"Type to search for an emoji",onFocus:n,className:"epr-search",type:"text","aria-controls":"epr-search-id",placeholder:d,onChange:function(v){a(e+1),setTimeout(function(){var S,w;g((S=v==null||(w=v.target)==null?void 0:w.value)!=null?S:p)})},ref:r}),s?i.createElement("div",{role:"status",className:U("epr-status-search-results","epr-status-visually-hidden"),"aria-live":"polite",id:"epr-search-id","aria-atomic":"true"},u):null,i.createElement("div",{className:"epr-icn-search"}),i.createElement(he,{className:U("epr-btn-clear-search","epr-visible-on-search-only"),onClick:t},i.createElement("div",{className:"epr-icn-clear-search"})))}function lt(){return i.createElement(ke,{className:"epr-header"},i.createElement(dt,null),i.createElement(at,null))}function Wf(){return document.activeElement}var D;(function(f){f.ArrowDown="ArrowDown",f.ArrowUp="ArrowUp",f.ArrowLeft="ArrowLeft",f.ArrowRight="ArrowRight",f.Escape="Escape",f.Enter="Enter",f.Space=" "})(D||(D={}));function ut(){st(),gt(),mt(),bt(),pt()}function st(){var f=Yf(),e=h1(),a=dr(),n=bf(),r=yf(),t=g1(),d=V0(),l=kf(),c=i.useMemo(function(){return function(s){var g=s.key;switch(d(),g){case D.Escape:if(s.preventDefault(),t()){l();return}e(),a(0),r();break}}},[a,e,l,r,t,d]);i.useEffect(function(){var u=f.current;if(u)return u.addEventListener("keydown",c),function(){u.removeEventListener("keydown",c)}},[f,n,a,c])}function gt(){var f=cr(),e=Yf(),a=ef(),n=bf(),r=Jf(),t=r[1],d=x1(),l=Ze(),c=i.useMemo(function(){return function(s){var g=s.key;switch(g){case D.ArrowRight:if(!l)return;s.preventDefault(),t(!0),f();break;case D.ArrowDown:s.preventDefault(),d();break;case D.Enter:s.preventDefault(),zr(a.current);break}}},[f,d,t,a,l]);i.useEffect(function(){var u=n.current;if(u)return u.addEventListener("keydown",c),function(){u.removeEventListener("keydown",c)}},[e,n,c])}function mt(){var f=De(),e=yf(),a=bf(),n=x1(),r=Jf(),t=r[0],d=r[1],l=k1(),c=Ze(),u=Qe(),s=i.useMemo(function(){return function(m){var p=m.key;if(c)switch(p){case D.ArrowLeft:if(m.preventDefault(),!t)return e();ga(e);break;case D.ArrowRight:if(m.preventDefault(),!t)return e();ma();break;case D.ArrowDown:m.preventDefault(),t&&d(!1),n();break;default:u(m);break}if(l)switch(p){case D.ArrowUp:if(m.preventDefault(),!t)return e();ga(e);break;case D.ArrowDown:if(m.preventDefault(),!t)return e();ma();break;default:u(m);break}}},[t,e,d,n,u,l,c]);i.useEffect(function(){var g=f.current;if(g)return g.addEventListener("keydown",s),function(){g.removeEventListener("keydown",s)}},[f,a,t,s])}function bt(){var f=yf(),e=Le(),a=ef(),n=Qe(),r=i.useMemo(function(){return function(d){var l=d.key;switch(l){case D.ArrowUp:d.preventDefault(),f();break;case D.ArrowRight:d.preventDefault(),Ra(Wf());break;case D.ArrowLeft:d.preventDefault(),Sa(Wf());break;case D.ArrowDown:d.preventDefault(),ve(a.current);break;default:n(d);break}}},[a,f,n]);i.useEffect(function(){var t=e.current;if(t)return t.addEventListener("keydown",r),function(){t.removeEventListener("keydown",r)}},[e,a,r])}function pt(){var f=ef(),e=ht(),a=m1(),n=g1(),r=kf(),t=Qe(),d=i.useMemo(function(){return function(c){var u=c.key,s=rf(Wf());switch(u){case D.ArrowRight:c.preventDefault(),Mr(s);break;case D.ArrowLeft:c.preventDefault(),Tr(s);break;case D.ArrowDown:if(c.preventDefault(),n()){r();break}Nr(s);break;case D.ArrowUp:if(c.preventDefault(),n()){r();break}Ar(s,e);break;case D.Space:c.preventDefault(),a(c.target);break;default:t(c);break}}},[e,t,a,n,r]);i.useEffect(function(){var l=f.current;if(l)return l.addEventListener("keydown",d),function(){l.removeEventListener("keydown",d)}},[f,d])}function x1(){var f=p1(),e=ye(),a=ef();return i.useCallback(function(){return e?ve(a.current):f()},[a,f,e])}function ht(){var f=yf(),e=p1(),a=ye();return i.useCallback(function(){return a?f():e()},[f,a,e])}function ga(f){var e=Wf();e&&(Y0(e)||f(),Ra(e))}function ma(){var f=Wf();f&&Sa(f)}function Qe(){var f=ur(),e=yf(),a=qa(),n=kf();return function(t){var d=t.key;vt(t)||a||d.match(/(^[a-zA-Z0-9]$){1}/)&&(t.preventDefault(),n(),e(),f(d))}}function vt(f){var e=f.metaKey,a=f.ctrlKey,n=f.altKey;return e||a||n}function kt(f,e,a){if(e&&a!==G.NATIVE){var n=V(e);ba.has(n)||(Qf(e).forEach(function(r){var t=f(r,a);yt(t)}),ba.add(n))}}var ba=new Set;function yt(f){var e=new Image;e.src=f}function wt(){var f=ef(),e=Nf(),a=Df();i.useEffect(function(){if(e===G.NATIVE)return;var n=f.current;return n==null||n.addEventListener("focusin",r),function(){n==null||n.removeEventListener("focusin",r)};function r(t){var d=rf(t.target);if(d){var l=Ve(d),c=l[0];c&&Af(c)&&kt(a,c,e)}}},[f,e,a])}var Et="aside.EmojiPickerReact.epr-main{border-color:var(--epr-picker-border-color);border-radius:var(--epr-picker-border-radius);border-style:solid;border-width:1px;display:flex;flex-direction:column;position:relative}";Y(Et);function xt(f){var e=f.children;return i.createElement(B0,null,i.createElement(jt,null,e))}function jt(f){var e,a=f.children,n=R0(),r=ye(),t=Yf(),d=M0(),l=T0();return ut(),wt(),i.createElement("aside",{className:U(k.emojiPicker,"epr-main",(e={},e[k.searchActive]=r,e[k.darkTheme]=n===hf.DARK,e[k.autoTheme]=n===hf.AUTO,e),d),ref:t,style:l},a)}var Ct=`.EmojiPickerReact{--epr-highlight-color:#007aeb;--epr-hover-bg-color:#f1f8ff;--epr-focus-bg-color:#e0f0ff;--epr-text-color:#858585;--epr-search-input-bg-color:#f6f6f6;--epr-picker-border-color:#e7e7e7;--epr-bg-color:#fff;--epr-category-icon-active-color:#6aa8de;--epr-skin-tone-picker-menu-color:#ffffff95;--epr-horizontal-padding:10px;--epr-picker-border-radius:8px;--epr-search-border-color:var(--epr-highlight-color);--epr-header-padding:15px var(--epr-horizontal-padding);--epr-active-skin-tone-indicator-border-color:var(--epr-highlight-color);--epr-active-skin-hover-color:var(--epr-hover-bg-color);--epr-search-input-bg-color-active:var(--epr-search-input-bg-color);--epr-search-input-padding:0 30px;--epr-search-input-border-radius:8px;--epr-search-input-height:40px;--epr-search-input-text-color:var(--epr-text-color);--epr-search-input-placeholder-color:var(--epr-text-color);--epr-search-bar-inner-padding:var(--epr-horizontal-padding);--epr-category-navigation-button-size:30px;--epr-emoji-variation-picker-height:45px;--epr-emoji-variation-picker-bg-color:var(--epr-bg-color);--epr-preview-height:70px;--epr-preview-text-size:14px;--epr-preview-text-padding:0 var(--epr-horizontal-padding);--epr-preview-border-color:var(--epr-picker-border-color);--epr-preview-text-color:var(--epr-text-color);--epr-category-padding:0 var(--epr-horizontal-padding);--epr-category-label-bg-color:#ffffffe6;--epr-category-label-text-color:var(--epr-text-color);--epr-category-label-padding:0 var(--epr-horizontal-padding);--epr-category-label-height:40px;--epr-emoji-size:30px;--epr-emoji-padding:5px;--epr-emoji-fullsize:calc(var(--epr-emoji-size) + var(--epr-emoji-padding)*2);--epr-emoji-hover-color:var(--epr-hover-bg-color);--epr-emoji-variation-indicator-color:var(--epr-picker-border-color);--epr-emoji-variation-indicator-color-hover:var(--epr-text-color);--epr-header-overlay-z-index:3;--epr-emoji-variations-indictator-z-index:1;--epr-category-label-z-index:2;--epr-skin-variation-picker-z-index:5;--epr-preview-z-index:6;--epr-dark:#000;--epr-dark-emoji-variation-picker-bg-color:var(--epr-dark);--epr-dark-highlight-color:silver;--epr-dark-text-color:var(--epr-highlight-color);--epr-dark-hover-bg-color:#363636f6;--epr-dark-focus-bg-color:#474747;--epr-dark-search-input-bg-color:#333;--epr-dark-category-label-bg-color:#222222e6;--epr-dark-picker-border-color:#151617;--epr-dark-bg-color:#222;--epr-dark-search-input-bg-color-active:var(--epr-dark);--epr-dark-emoji-variation-indicator-color:#444;--epr-dark-category-icon-active-color:#3271b7;--epr-dark-skin-tone-picker-menu-color:#22222295}@media (prefers-color-scheme:dark){.EmojiPickerReact.epr-auto-theme{--epr-emoji-variation-picker-bg-color:var( + --epr-dark-emoji-variation-picker-bg-color + );--epr-highlight-color:var(--epr-dark-highlight-color);--epr-text-color:var(--epr-dark-text-color);--epr-hover-bg-color:var(--epr-dark-hover-bg-color);--epr-focus-bg-color:var(--epr-dark-focus-bg-color);--epr-search-input-bg-color:var(--epr-dark-search-input-bg-color);--epr-category-label-bg-color:var(--epr-dark-category-label-bg-color);--epr-picker-border-color:var(--epr-dark-picker-border-color);--epr-bg-color:var(--epr-dark-bg-color);--epr-search-input-bg-color-active:var( + --epr-dark-search-input-bg-color-active + );--epr-emoji-variation-indicator-color:var( + --epr-dark-emoji-variation-indicator-color + );--epr-category-icon-active-color:var( + --epr-dark-category-icon-active-color + );--epr-skin-tone-picker-menu-color:var( + --epr-dark-skin-tone-picker-menu-color + )}}.EmojiPickerReact.epr-dark-theme{--epr-emoji-variation-picker-bg-color:var( + --epr-dark-emoji-variation-picker-bg-color + );--epr-highlight-color:var(--epr-dark-highlight-color);--epr-text-color:var(--epr-dark-text-color);--epr-hover-bg-color:var(--epr-dark-hover-bg-color);--epr-focus-bg-color:var(--epr-dark-focus-bg-color);--epr-search-input-bg-color:var(--epr-dark-search-input-bg-color);--epr-category-label-bg-color:var(--epr-dark-category-label-bg-color);--epr-picker-border-color:var(--epr-dark-picker-border-color);--epr-bg-color:var(--epr-dark-bg-color);--epr-search-input-bg-color-active:var( + --epr-dark-search-input-bg-color-active + );--epr-emoji-variation-indicator-color:var( + --epr-dark-emoji-variation-indicator-color + );--epr-category-icon-active-color:var(--epr-dark-category-icon-active-color);--epr-skin-tone-picker-menu-color:var( + --epr-dark-skin-tone-picker-menu-color + )}.EmojiPickerReact{background-color:var(--epr-bg-color);overflow:hidden}.EmojiPickerReact .epr-hidden,.EmojiPickerReact.epr-search-active .epr-hidden-on-search,.EmojiPickerReact:not(.epr-search-active) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:not(:-moz-placeholder-shown)) .epr-hidden-on-search{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:not(:placeholder-shown)) .epr-hidden-on-search{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:-moz-placeholder-shown) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}aside.EmojiPickerReact.epr-main:has(input:placeholder-shown) .epr-visible-on-search-only{display:none!important;opacity:0!important;pointer-events:none!important;visibility:hidden!important}.EmojiPickerReact *{box-sizing:border-box;font-family:sans-serif}.EmojiPickerReact button.epr-btn{background:none;border:0;cursor:pointer;outline:none}`;Y(Ct);function St(f){return i.createElement(Ln,null,i.createElement(v0,Object.assign({},f),i.createElement(xt,null,i.createElement(lt,null),i.createElement(Ur,null),i.createElement(Yr,null))))}var Rt=i.memo(St,function(f,e){var a,n,r=(a=f.customEmojis)!=null?a:[],t=(n=e.customEmojis)!=null?n:[];return f.emojiVersion===e.emojiVersion&&f.searchPlaceHolder===e.searchPlaceHolder&&f.searchPlaceholder===e.searchPlaceholder&&f.defaultSkinTone===e.defaultSkinTone&&f.skinTonesDisabled===e.skinTonesDisabled&&f.autoFocusSearch===e.autoFocusSearch&&f.emojiStyle===e.emojiStyle&&f.theme===e.theme&&f.suggestedEmojisMode===e.suggestedEmojisMode&&f.lazyLoadEmojis===e.lazyLoadEmojis&&f.className===e.className&&f.height===e.height&&f.width===e.width&&f.style===e.style&&f.searchDisabled===e.searchDisabled&&f.skinTonePickerLocation===e.skinTonePickerLocation&&r.length===t.length}),zt=function(f){On(e,f);function e(n){var r;return r=f.call(this,n)||this,r.state={hasError:!1},r}e.getDerivedStateFromError=function(){return{hasError:!0}};var a=e.prototype;return a.componentDidCatch=function(r,t){console.error("Emoji Picker React failed to render:",r,t)},a.render=function(){return this.state.hasError?null:this.props.children},e}(i.Component);function Pt(f){var e=w0({onEmojiClick:f.onEmojiClick});return i.createElement(zt,null,i.createElement(Ba.Provider,{value:e},i.createElement(Rt,Object.assign({},f))))}function Mt({children:f,onUploadComplete:e,onError:a}){const n=mf.useRef(null),r=mf.useRef(null);mf.useEffect(()=>{var l;n.current=window.cloudinary,r.current=(l=n.current)==null?void 0:l.createUploadWidget({cloudName:"dvw2zx08k",uploadPreset:"u_default",folder:"media/chats"},(c,u)=>{(u==null?void 0:u.event)==="success"&&e(u.info.secure_url,u.info.resource_type),c&&a(c)})},[]);const t=()=>{r.current.open()},d=mf.cloneElement(f,{onClick:t});return o.jsx(o.Fragment,{children:d})}const Tt=i.memo(({...f})=>o.jsx(Pt,{...f}));function At(){const{messageOptions:{editMessage:f,replyTo:e},resetOptions:a}=ja(),{chatId:n}=Te(),[r,t]=i.useState(""),d=r.length>0,l=i.useRef(null),c=i.useRef(null),{textAreaRef:u}=fn({value:r}),s=i.useRef(null),g=i.useRef(null),[m,p]=i.useState(!1),[x,v]=i.useState(null),[S,w]=i.useTransition(),z=e!==null,b=f!==null,[j,C]=i.useState(null),[Z,Q]=i.useState("image"),[wf,Ef]=i.useState(!1),{theme:If}=en(),{chatList:Of,setChatList:xf}=wa(),{profile:N}=Mf(),{messages:df,setMessages:cf}=Ae(),{socket:J}=Ne(),{activeChat:y}=Tf();i.useEffect(()=>{u.current&&c.current&&(c.current.style.height=`calc(100vh - (${u.current.clientHeight}px + 27px))`)},[r]),i.useEffect(()=>{f!=null&&f.text&&t(f.text)},[f==null?void 0:f.text]);function A(M,L,I){var H,jf;if(L.length===0)return;let B=I!==void 0?I:L.length-1;const $=L[B];if($&&((H=M.data)!=null&&H.id)){$.id=(jf=M.data)==null?void 0:jf.id,$.sending=!1,$.failed=!1,cf(L);const{groupInfo:T,dmInfo:sf}=y;let O={id:n??"",isGroup:!0,name:(T==null?void 0:T.name)??"",imageUrl:(T==null?void 0:T.imageUrl)??null,description:T==null?void 0:T.description,inviteCode:T==null?void 0:T.inviteCode,privacy:(T==null?void 0:T.privacy)??null,members:(T==null?void 0:T.members)??[]};sf&&(O.name=(N==null?void 0:N.username)??"",O.avatarUrl=(N==null?void 0:N.avatar)??null,O.bio=(N==null?void 0:N.bio)??null,O.email=(N==null?void 0:N.email)??null,O.lastSeen=new Date,O.isGroup=!1);let Cf={chatInfo:O,message:{...$}};delete Cf.message.sending,delete Cf.message.failed,b?J==null||J.emit("updateMessage",Cf):J==null||J.emit("sendMessage",Cf),g.current=null}}function af(M,L){const I=df==null?void 0:df.find(H=>H.sending),B=L.findIndex(H=>H.id===n);if(B===-1)return;const $=L[B];$.message=g.current??$.message,g.current=null,I&&(b&&s&&(I.body=s.current,s.current=r),I.sending=!1,I.failed=!0,cf(M)),xf(L)}function uf(M,L){C(M),Q(L)}function Ff(M){ya.error(nn(M,"could not upload resource"))}const{mutateAsync:we}=gf({defaultMessage:"Failed to send message",method:"post",route:"/messages",displayToast:!1}),{mutateAsync:Xf}=gf({defaultMessage:"Failed to edit message",method:"patch",route:`/messages/${f==null?void 0:f.id}`,displayToast:!1}),fe=wf,ee=i.useMemo(()=>u.current?u.current.clientHeight>=80:!1,[r]);function ae(){(b||z)&&a()}function ne(){t(""),C(null),Q("image")}async function Ee(M){if(M.preventDefault(),r.length===0||!N||!n||b&&!f||!J)return;Ef(!0);const L=(df==null?void 0:df.slice())??[],I=Of.slice();try{const B=rn(N,r,n,j,Z,z,e),$=I.findIndex(O=>O.id===n);if($===-1)return;const H=I[$];if(g.current=H.message,b){const O=L[f.index];if(!O)return;s.current=O.body,O.isEditted=!0,O.body=r,O.sending=!0,H.message.id===O.id&&(H.message.body=O.body)}else H.message={id:B.id,body:B.body,createdAt:B.createdAt,readByIds:[],senderId:B.senderId,type:B.type},L.push(B);cf(L),xf(I);let jf={body:r,chatId:n,parentMessageId:(e==null?void 0:e.parentId)??null,resourceUrl:B.resourceUrl,userId:N.id,type:B.type},T={body:r,chatId:n,userId:N.id};ne();let sf;if(b?sf=await Xf(T):sf=await we(jf),!sf.data)throw new Error("message failed to send");A(sf.data,L,f==null?void 0:f.index)}catch(B){af(L,I),console.log(B)}finally{ae(),Ef(!1)}}function xe(M,L){const I=r+M.emoji;v(M),t(I)}function je(){w(()=>{p(M=>!M)})}return o.jsxs("div",{className:"bottom-0 z-[10] justify-between bg-gray-100 dark:bg-[#17191C] fixed w-full p-3 min-h-12 lg:w-[calc(100%-350px)] lg:ml-[350px] inset-x-0 border border-t ",children:[(e!==null||f!==null)&&o.jsxs("div",{className:"flex gap-x-2.5 relative mb-3",children:[o.jsx("div",{className:"text-brand-p1/80",children:e?o.jsx(dn,{className:"h-8 w-8"}):f&&o.jsx(cn,{className:"h-7 w-7"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold text-brand-p1 text-[15.5px]",children:e?`Reply to ${e.username}`:f?"Edit Message":null}),o.jsx("p",{className:"line-clamp-1 text-sm",children:(f==null?void 0:f.text)??(e==null?void 0:e.text)})]}),o.jsx(P,{onClick:()=>{ne(),ae()},size:"icon",className:"absolute h-7 w-7 top-0 right-2 dark:text-gray-200 text-gray-800",variant:"ghost",children:o.jsx(ea,{className:"h-5 w-5"})})]}),o.jsx("div",{className:qf("absolute top-[-350px] left-0 z-[50]",!m&&"hidden"),children:o.jsx(Tt,{emojiStyle:G.FACEBOOK,onEmojiClick:xe,className:"bg-background",height:350,theme:If==="dark"?hf.DARK:hf.LIGHT})}),j!==null&&o.jsx("div",{ref:c,className:"fixed top-0 h-[calc(100vh-67px)] lg:w-[calc(100%-350px)] lg:ml-[350px] left-0 right-0 p-0 w-full bg-black/50 z-[20] bg-opacity-50",children:o.jsxs("div",{className:"absolute rounded-md overflow-hidden hover:opacity-80 ease-in top-2/4 left-2/4 -translate-x-2/4 -translate-y-2/4 z-[50] h-[350px] w-[350px]",children:[o.jsx(P,{onClick:()=>C(null),size:"icon",className:"absolute h-7 w-7 top-2 right-2 dark:text-gray-200 bg-gray-800 rounded-full",variant:"ghost",children:o.jsx(ea,{className:"h-5 w-5"})}),Z==="image"?o.jsx("img",{src:j,className:"w-full h-full object-cover mx-auto"}):o.jsx("video",{src:j,className:"w-full h-full object-cover mx-auto",controls:!0})]})}),o.jsxs("form",{onSubmit:Ee,className:"flex items-center justify-between w-full relative z-[10000]",children:[o.jsx(P,{type:"button",variant:"ghost",onClick:je,disabled:S,className:"text-neutral-400 text-[20px]",children:o.jsx(kn,{})}),o.jsx("textarea",{id:"body",name:"body",ref:u,placeholder:"type a message...",value:r,onChange:M=>{t(M.target.value),u.current&&c.current&&u.current.clientHeight>u.current.scrollHeight&&(u.current.style.height="40px",c.current.style.height="calc(100vh - 70px)")},onKeyDown:M=>{M.code==="Enter"&&l.current!==null&&!fe&&l.current.click()},className:qf("w-[70%] max-sm:max-w-[300px] flex-shrink-0 outline-none focus:border-none placeholder-neutral-400 bg-transparent h-10 dark:text-gray-200 text-gray-700 resize-none max-h-20 overflow-hidden",ee&&"overflow-auto h-32")}),d?o.jsx(P,{ref:l,disabled:fe,size:"icon",className:"rounded-full p-2 shadow-md h-9 w-9 flex-shrink-0 text-[20px] bg-brand-p2 text-white hover:bg-[rgb(102,174,233)] delay-150",children:o.jsx(ln,{})}):o.jsxs("div",{className:"flex items-center gap-[0.35rem] text-[20px] text-neutral-400",children:[o.jsx(P,{type:"button",variant:"ghost",children:o.jsx(pn,{})}),o.jsx(Mt,{onUploadComplete:uf,onError:Ff,children:o.jsx(P,{type:"button",variant:"ghost",children:o.jsx(an,{})})})]})]})]})}function Lt(){const f=Tf(n=>n.activeChat),e=le(),{profile:a}=Mf();return i.useEffect(()=>{f===null&&e(`/${a==null?void 0:a.id}/chats`)},[f]),o.jsxs("div",{children:[o.jsx(Dn,{}),o.jsx(zn,{}),o.jsx(At,{})]})}export{Lt as default}; diff --git a/backend/src/public/dist/assets/Chats-4b82511c.js b/backend/src/public/dist/assets/Chats-4b82511c.js new file mode 100644 index 0000000..5c39cd6 --- /dev/null +++ b/backend/src/public/dist/assets/Chats-4b82511c.js @@ -0,0 +1 @@ +import{j as t}from"./index-d8866171.js";import{E as e}from"./empty-state-27cd4c62.js";function a(){return t.jsx(e,{})}export{a as default}; diff --git a/backend/src/public/dist/assets/ChatsRedirect-94e829b3.js b/backend/src/public/dist/assets/ChatsRedirect-94e829b3.js new file mode 100644 index 0000000..bad184f --- /dev/null +++ b/backend/src/public/dist/assets/ChatsRedirect-94e829b3.js @@ -0,0 +1 @@ +import{j as r,B as d,f as c,g as u,ai as x,r as f,P as m}from"./index-d8866171.js";import{L as g}from"./logo-loader-7d8003e8.js";function h({refetch:s,title:o="Something went wrong"}){return r.jsxs("div",{className:"bg-red-100 dark:bg-red-200 border border-red-400 mx-5 text-red-700 px-4 py-3 rounded relative",role:"alert",children:[r.jsx("h1",{className:"text-xl font-medium mb-2",children:o}),r.jsx("p",{className:"dark:text-red-800 text-red-500 mb-3",children:"An Unexpected error occured"}),r.jsx(d,{onClick:()=>s(),variant:"secondary",children:"Try Again"})]})}function j(){const s=c(),{setProfile:o}=u(),{data:t,isError:a,refetch:l}=x({enabled:!0,queryKey:["profile"],route:"/users/profile",displayToast:!1});return f.useEffect(()=>{var n,i;const e=t==null?void 0:t.data;e&&((e==null?void 0:e.user)===null||!((n=e==null?void 0:e.user)!=null&&n.isOnboarded)?(s("/onboarding"),console.log(e)):(o(e==null?void 0:e.user),s(`/${(i=e==null?void 0:e.user)==null?void 0:i.id}/chats`)))},[t]),a?r.jsx(h,{title:"Failed to load user's chats",refetch:l}):r.jsx(g,{children:r.jsx(m,{className:"text-center text-lg text-brand-p1 font-semibold mt-2",children:"Loading Up Chats..."})})}export{j as default}; diff --git a/backend/src/public/dist/assets/Discover-b210392b.js b/backend/src/public/dist/assets/Discover-b210392b.js new file mode 100644 index 0000000..661799f --- /dev/null +++ b/backend/src/public/dist/assets/Discover-b210392b.js @@ -0,0 +1 @@ +import{r as d,ai as x,j as e,b3 as g,aq as u,a9 as l,f as h,B as m,C as p,ap as f}from"./index-d8866171.js";import{E as j}from"./empty-state-27cd4c62.js";function v(){var t,n;const[a,i]=d.useState(!1);function c(s){i(s)}const{data:r,isPending:o,isError:y,refetch:b}=x({enabled:!0,queryKey:["discover"],route:"users",displayToast:!0});return e.jsxs(e.Fragment,{children:[e.jsx(g,{children:e.jsxs(e.Fragment,{children:[(n=(t=r==null?void 0:r.data)==null?void 0:t.users)==null?void 0:n.map(s=>e.jsx(u,{type:"user",avatarUrl:s.avatarUrl,id:s.id,lastSeen:s.lastSeen,username:s.username,toggleLoading:c},s.id)),o&&e.jsx("div",{className:"flex items-center h-full justify-center",children:e.jsx(l,{withBackground:!1})})]})}),a&&e.jsx(l,{})]})}function L(){const a=h();return e.jsxs("div",{children:[e.jsxs("aside",{className:"lg:w-[350px] py-6 lg:fixed lg:left-0 lg:top-0 w-full bg-gray-100 dark:bg-[#17191C] border-r min-h-screen",children:[e.jsxs("header",{className:"flex px-3 items-center h-10 gap-x-2",children:[e.jsxs(m,{onClick:()=>a(-1),variant:"ghost",className:"p-0 text-gray-500 hover:bg-transparent hover:text-gray-500",children:[e.jsx(p,{size:24}),e.jsx("span",{className:"sr-only",children:"Back"})]}),e.jsx(f,{className:"text-brand-p1 font-medium text-lg",children:"Discover People"})]}),e.jsx(v,{})]}),e.jsx("main",{className:"lg:block hidden w-full lg:ml-[350px] bg-gray-50 min-h-screen dark:bg-background lg:w-[calc(100%-350px)]",children:e.jsx(j,{})})]})}export{L as default}; diff --git a/backend/src/public/dist/assets/Image-cae88ee7.png b/backend/src/public/dist/assets/Image-cae88ee7.png new file mode 100644 index 0000000..b7d356b Binary files /dev/null and b/backend/src/public/dist/assets/Image-cae88ee7.png differ diff --git a/backend/src/public/dist/assets/InviteRedirect-d6a691ed.js b/backend/src/public/dist/assets/InviteRedirect-d6a691ed.js new file mode 100644 index 0000000..289e0ce --- /dev/null +++ b/backend/src/public/dist/assets/InviteRedirect-d6a691ed.js @@ -0,0 +1 @@ +import{K as E,g as G,r as d,a6 as L,ag as S,f as A,i as M,j as s,bd as g,P as h,B as P,be as R}from"./index-d8866171.js";import{L as p}from"./logo-loader-7d8003e8.js";function T(){const{chatId:r,inviteCode:o}=E(),{profile:e}=G(),f=["Joining Group Chat...","Redirecting to Group Chat..."],[j,y]=d.useState(0),{socket:n}=L(),[v,i]=d.useState(!1),{setActiveChat:I}=S(),b=A(),{isError:k,mutateAsync:c,isPending:C}=M({method:"post",route:"/join-via-link",displayToast:!1,noToken:!0}),N=async()=>{var u,x,l;if(!C)try{const a=await c({inviteCode:o??"",userId:(e==null?void 0:e.id)??"",chatId:r??""});console.log("the response : ",a);const t=(u=a.data)==null?void 0:u.groupChat,m=(x=a.data)==null?void 0:x.joinedMessage;if(!t||!m){i(!0);return}n==null||n.emit("joinChat",{userId:e==null?void 0:e.id,chatId:t==null?void 0:t.id}),n==null||n.emit("sendMessage",{chatInfo:t,message:m}),I({dmInfo:null,groupInfo:{...t,name:(t==null?void 0:t.name)??null,isGroup:!0}}),y(1),setTimeout(()=>{b(`/${e==null?void 0:e.id}/chats`)},1e3)}catch(a){a instanceof R&&((l=a==null?void 0:a.response)==null?void 0:l.status)===404&&i(!0)}};return d.useEffect(()=>{if(!(e!=null&&e.id)||!r||!o){i(!0);return}N()},[r,o,e==null?void 0:e.id]),v?s.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-background",children:[s.jsx(g,{className:"text-4xl font-bold mb-4 text-gray-800 dark:text-gray-200",children:"404"}),s.jsx(h,{className:"text-lg text-gray-600 dark:text-gray-400",children:"Group Chat not found"})]}):k?s.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-background",children:[s.jsx(g,{className:"text-2xl font-bold mb-4 text-gray-800 dark:text-gray-200",children:"Failed to join Group Chat"}),s.jsx(P,{onClick:()=>c({inviteCode:o??"",userId:(e==null?void 0:e.id)??"",chatId:r??""}),className:"mt-4",children:"Retry"})]}):s.jsx("div",{children:s.jsx(p,{children:s.jsx(h,{className:"text-lg text-gray-600 dark:text-gray-400",children:f[j]})})})}export{T as default}; diff --git a/backend/src/public/dist/assets/Onboarding-9be3fd6d.js b/backend/src/public/dist/assets/Onboarding-9be3fd6d.js new file mode 100644 index 0000000..0bfb0c5 --- /dev/null +++ b/backend/src/public/dist/assets/Onboarding-9be3fd6d.js @@ -0,0 +1 @@ +import{b4 as B,c as G,b5 as H,b6 as N,e as E,f as T,r as f,g as M,b7 as V,i as L,j as a,ak as $,B as C,b8 as q,b9 as K,ba as Q,n as _,af as O,aE as J,ai as W,bb as X,P as F,a9 as Y,bc as Z,aA as ee}from"./index-d8866171.js";import{L as se}from"./logo-loader-7d8003e8.js";function ae(){const n=B();return n===void 0?{isLoaded:!1,isSignedIn:void 0,user:void 0}:n===null?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:n}}const re=G("ImagePlus",[["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"31hg93"}],["line",{x1:"16",x2:"22",y1:"5",y2:"5",key:"ez7e4s"}],["line",{x1:"19",x2:"19",y1:"2",y2:"8",key:"1gkr8c"}],["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"}]]),te=H({username:N().min(5).max(40),bio:N().min(10).max(500),avatar:N()});function ie({username:n,bio:g,avatar:p,id:v,clerkId:o,email:t}){const{theme:w}=E(),l=T(),i=f.useRef(null),{setProfile:I}=M(),[k,e]=f.useState(""),[x,u]=f.useState(!1),{handleSubmit:h,register:c,formState:{errors:d}}=V({resolver:Q(te),defaultValues:{username:n,bio:g,avatar:p}});function m(r){console.log("response: ",r);const s=r.data.user;I({avatar:s.avatar,bio:s.bio,clerkId:s.clerkId,email:s.email,id:s.id,isOnboarded:s.isOnboarded,username:s.username,wallpaperType:s==null?void 0:s.wallpaperType,wallpaperUrl:s==null?void 0:s.wallpaperUrl}),l(`/${s.clerkId}/chats`),console.log(r)}const{mutate:b,isPending:y}=L({defaultMessage:"Failed to create user profile!",method:"post",route:"/users",onSuccess:m}),{mutate:j,isPending:D}=L({defaultMessage:"Failed to create user profile!",method:"patch",route:"/users",onSuccess:m});async function R(r){u(!0);try{if(k&&i.current&&i.current.files){console.log("the file: ",i.current.files[0]);const s=await _(i.current.files[0]);s&&(r.avatar=s)}u(!1),console.log("on submit data: ",r),v===""?b({...r,email:t,clerkId:o,theme:w,isOnboarded:!0}):j({...r,email:t,clerkId:o,isOnboarded:!0})}catch(s){O.error(J(s,"failed to create user profile!"))}}const P=y||D||x;function z(r){r.preventDefault();const s=new FileReader;if(r.target.files&&r.target.files.length>0){if(!r.target.files[0].type.includes("image")){O.error("only image files are allowed!");return}s.onload=async S=>{var U,A;e(((A=(U=S==null?void 0:S.target)==null?void 0:U.result)==null?void 0:A.toString())??"")},s.readAsDataURL(r.target.files[0])}}return a.jsxs("form",{className:"space-y-4 text-sm md:text-lg",onSubmit:h(R),children:[a.jsxs("figure",{className:"flex items-center gap-2 mx-auto relative h-24 w-24 text-sm flex-wrap justify-center flex-shrink-0",children:[a.jsx($,{type:"User",src:k||p,alt:"avatar preview",size:96,className:"ring-brand-p2 ring-2"}),a.jsxs(C,{type:"button",className:"absolute -bottom-2 h-9 w-9 z-[3] right-0",variant:"outline",onClick:()=>{var r;return(r=i.current)==null?void 0:r.click()},children:[a.jsx(re,{className:"h-6 w-6 flex-shrink-0"}),a.jsx("span",{className:"sr-only",children:"Upload Image"})]}),a.jsx("input",{type:"file",id:"avatar",name:"avatar",onChange:z,accept:"image/*",hidden:!0,ref:i,max:1})]}),a.jsx(q,{errors:d,id:"username",label:"username",register:c,type:"text"}),a.jsx(K,{errors:d,id:"bio",label:"bio",height:30,width:30,register:c,className:"w-full h-[100px]"}),a.jsx(C,{className:"min-w-full text-gray-100",size:"lg",disabled:P,children:P?"Creating...":"Save"})]})}function oe(){const{setProfile:n}=M(),[g,p]=f.useState(null),v=T(),{isSignedIn:o,user:t,isLoaded:w}=ae(),{data:l,isPending:i,isError:I,refetch:k}=W({enabled:o??!1,queryKey:["onboarding"],route:"/users/profile",displayToast:!1});return f.useEffect(()=>{var x,u,h,c,d,m,b,y;const e=l==null?void 0:l.data;if(e&&t){console.log(e);const j={username:((x=e==null?void 0:e.user)==null?void 0:x.username)??X(t.firstName??t.emailAddresses[0].emailAddress.split("@")[0]??""),bio:((u=e==null?void 0:e.user)==null?void 0:u.bio)??"i just joined chatly!",avatar:((h=e==null?void 0:e.user)==null?void 0:h.avatar)??t.imageUrl,id:((c=e==null?void 0:e.user)==null?void 0:c.id)??"",clerkId:t.id,isOnboarded:((d=e==null?void 0:e.user)==null?void 0:d.isOnboarded)??!1,email:((m=e==null?void 0:e.user)==null?void 0:m.email)??t.emailAddresses[0].emailAddress};n(j),(b=e==null?void 0:e.user)!=null&&b.isOnboarded?v(`/${(y=e==null?void 0:e.user)==null?void 0:y.id}/chats`):p(j)}},[l,t]),!o||!w?a.jsx(se,{children:a.jsx(F,{className:"text-center text-lg text-brand-p1 font-semibold mt-2",children:"Checking Authentication Status..."})}):i?a.jsx(Y,{}):a.jsxs("div",{className:"min-h-screen w-full pb-8",children:[a.jsx(Z,{}),a.jsxs("main",{className:"max-w-[550px] sm:w-full w-[90%] mt-24 min-h-[400px] py-7 rounded-lg bg-gray-50 dark:bg-[#17191C] ring-2 ring-[#ddd]/80 dark:ring-gray-500/80 px-8 mx-auto",children:[a.jsxs("div",{className:"mb-8 space-y-3",children:[a.jsx(ee,{className:"text-4xl",children:"Set Up Profile"}),a.jsx(F,{children:"Complete your profile by filling this form"})]}),g!==null&&a.jsx(ie,{...g})]})]})}export{oe as default}; diff --git a/backend/src/public/dist/assets/SignIn-d75c59be.js b/backend/src/public/dist/assets/SignIn-d75c59be.js new file mode 100644 index 0000000..0ed37e4 --- /dev/null +++ b/backend/src/public/dist/assets/SignIn-d75c59be.js @@ -0,0 +1 @@ +import{e,j as r,M as t}from"./index-d8866171.js";import{S as a}from"./useCustomPages-a847fb21.js";function o(){const{theme:n}=e();return r.jsx(a,{afterSignInUrl:"/chats-redirect",signUpUrl:"/sign-up",appearance:t(n),routing:"path",path:"/sign-in"})}export{o as default}; diff --git a/backend/src/public/dist/assets/SignUp-7be7bc55.js b/backend/src/public/dist/assets/SignUp-7be7bc55.js new file mode 100644 index 0000000..3b756a5 --- /dev/null +++ b/backend/src/public/dist/assets/SignUp-7be7bc55.js @@ -0,0 +1 @@ +import{e as a,j as e,M as r}from"./index-d8866171.js";import{a as i}from"./useCustomPages-a847fb21.js";function o(){const{theme:n}=a();return e.jsx(i,{afterSignUpUrl:"/onboarding",signInUrl:"/sign-in",appearance:r(n),routing:"path",path:"/sign-up"})}export{o as default}; diff --git a/backend/src/public/dist/assets/Stars-0242bce2.svg b/backend/src/public/dist/assets/Stars-0242bce2.svg new file mode 100644 index 0000000..d003d47 --- /dev/null +++ b/backend/src/public/dist/assets/Stars-0242bce2.svg @@ -0,0 +1,14 @@ +<svg width="77" height="13" viewBox="0 0 77 13" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g id="Stars" clip-path="url(#clip0_2_1263)"> +<path id="Vector" d="M12.3738 4.23335L8.62048 3.8926L7.13714 0.419814C7.02762 0.164672 6.77843 0 6.50107 0C6.22371 0 5.97442 0.164672 5.8656 0.419814L4.38226 3.8926L0.62834 4.23335C0.353159 4.25875 0.120139 4.44515 0.0340334 4.70793C-0.0515761 4.9712 0.0274862 5.25997 0.235608 5.4425L3.07282 7.93034L2.23627 11.6148C2.17506 11.8857 2.28022 12.1659 2.505 12.3284C2.62583 12.4162 2.76778 12.46 2.91023 12.46C3.03265 12.46 3.15516 12.4275 3.26458 12.362L6.50107 10.4268L9.73697 12.362C9.97436 12.5038 10.2728 12.4909 10.4971 12.3284C10.7219 12.1659 10.8271 11.8857 10.7659 11.6148L9.92932 7.93034L12.7665 5.4425C12.9746 5.25997 13.0537 4.9718 12.9681 4.70793C12.8825 4.44465 12.649 4.25825 12.3738 4.23335Z" fill="#FFC947"/> +<path id="Vector_2" d="M28.3758 4.23335L24.6224 3.8926L23.1391 0.419814C23.0296 0.164672 22.7804 0 22.503 0C22.2257 0 21.9764 0.164672 21.8676 0.419814L20.3842 3.8926L16.6303 4.23335C16.3551 4.25875 16.1221 4.44515 16.036 4.70793C15.9504 4.9712 16.0294 5.25997 16.2376 5.4425L19.0748 7.93034L18.2382 11.6148C18.177 11.8857 18.2822 12.1659 18.507 12.3284C18.6278 12.4162 18.7697 12.46 18.9122 12.46C19.0346 12.46 19.1571 12.4275 19.2665 12.362L22.503 10.4268L25.7389 12.362C25.9763 12.5038 26.2748 12.4909 26.4991 12.3284C26.7239 12.1659 26.829 11.8857 26.7678 11.6148L25.9313 7.93034L28.7685 5.4425C28.9765 5.25997 29.0557 4.9718 28.9701 4.70793C28.8845 4.44465 28.6509 4.25825 28.3758 4.23335Z" fill="#FFC947"/> +<path id="Vector_3" d="M44.3777 4.23335L40.6244 3.8926L39.141 0.419814C39.0315 0.164672 38.7823 0 38.505 0C38.2276 0 37.9783 0.164672 37.8695 0.419814L36.3862 3.8926L32.6322 4.23335C32.3571 4.25875 32.124 4.44515 32.0379 4.70793C31.9523 4.9712 32.0314 5.25997 32.2395 5.4425L35.0767 7.93034L34.2402 11.6148C34.179 11.8857 34.2841 12.1659 34.5089 12.3284C34.6297 12.4162 34.7717 12.46 34.9141 12.46C35.0366 12.46 35.1591 12.4275 35.2685 12.362L38.505 10.4268L41.7409 12.362C41.9783 12.5038 42.2768 12.4909 42.501 12.3284C42.7258 12.1659 42.831 11.8857 42.7698 11.6148L41.9332 7.93034L44.7704 5.4425C44.9785 5.25997 45.0576 4.9718 44.972 4.70793C44.8864 4.44465 44.6529 4.25825 44.3777 4.23335Z" fill="#FFC947"/> +<path id="Vector_4" d="M60.3797 4.23335L56.6263 3.8926L55.143 0.419814C55.0335 0.164672 54.7843 0 54.5069 0C54.2296 0 53.9803 0.164672 53.8715 0.419814L52.3881 3.8926L48.6342 4.23335C48.359 4.25875 48.126 4.44515 48.0399 4.70793C47.9543 4.9712 48.0333 5.25997 48.2415 5.4425L51.0787 7.93034L50.2421 11.6148C50.1809 11.8857 50.2861 12.1659 50.5109 12.3284C50.6317 12.4162 50.7736 12.46 50.9161 12.46C51.0385 12.46 51.161 12.4275 51.2704 12.362L54.5069 10.4268L57.7428 12.362C57.9802 12.5038 58.2787 12.4909 58.503 12.3284C58.7278 12.1659 58.8329 11.8857 58.7717 11.6148L57.9352 7.93034L60.7724 5.4425C60.9804 5.25997 61.0596 4.9718 60.974 4.70793C60.8884 4.44465 60.6548 4.25825 60.3797 4.23335Z" fill="#FFC947"/> +<path id="Vector_5" opacity="0.3" d="M76.3816 4.23335L72.6283 3.8926L71.145 0.419814C71.0354 0.164672 70.7862 0 70.5089 0C70.2315 0 69.9822 0.164672 69.8734 0.419814L68.3901 3.8926L64.6362 4.23335C64.361 4.25875 64.128 4.44515 64.0418 4.70793C63.9562 4.9712 64.0353 5.25997 64.2434 5.4425L67.0806 7.93034L66.2441 11.6148C66.1829 11.8857 66.288 12.1659 66.5128 12.3284C66.6336 12.4162 66.7756 12.46 66.918 12.46C67.0405 12.46 67.163 12.4275 67.2724 12.362L70.5089 10.4268L73.7448 12.362C73.9822 12.5038 74.2807 12.4909 74.505 12.3284C74.7297 12.1659 74.8349 11.8857 74.7737 11.6148L73.9371 7.93034L76.7743 5.4425C76.9824 5.25997 77.0615 4.9718 76.9759 4.70793C76.8903 4.44465 76.6568 4.25825 76.3816 4.23335Z" fill="#5B7486"/> +</g> +<defs> +<clipPath id="clip0_2_1263"> +<rect width="77.0099" height="12.46" fill="white"/> +</clipPath> +</defs> +</svg> diff --git a/backend/src/public/dist/assets/VideoChat-0e4f6606.js b/backend/src/public/dist/assets/VideoChat-0e4f6606.js new file mode 100644 index 0000000..6c64900 --- /dev/null +++ b/backend/src/public/dist/assets/VideoChat-0e4f6606.js @@ -0,0 +1,40 @@ +import{o as Dt,p as Bs,_ as Sn,q as rt,t as Ye,w as Ge,x as Dc,y as qs,z as Hn,A as Ac,E as Nc,F as Lc,G as Uc,I as Fc,J as jc,r as d,g as Vc,K as Bc,R as Jn,f as qc,j as Je,P as Wc,L as Gc}from"./index-d8866171.js";import{L as Kc}from"./logo-loader-7d8003e8.js";function zc(t,e){return e.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(i){if(i!=="default"&&!(i in t)){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}})}),Object.freeze(t)}function J(t,e){if(!t)throw new Error(e)}const Hc=34028234663852886e22,Jc=-34028234663852886e22,$c=4294967295,Qc=2147483647,Yc=-2147483648;function an(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>Qc||t<Yc)throw new Error("invalid int 32: "+t)}function gi(t){if(typeof t!="number")throw new Error("invalid uint 32: "+typeof t);if(!Number.isInteger(t)||t>$c||t<0)throw new Error("invalid uint 32: "+t)}function Ws(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>Hc||t<Jc))throw new Error("invalid float 32: "+t)}const Gs=Symbol("@bufbuild/protobuf/enum-type");function Xc(t){const e=t[Gs];return J(e,"missing enum type on enum object"),e}function Ks(t,e,n,i){t[Gs]=zs(e,n.map(r=>({no:r.no,name:r.name,localName:t[r.no]})))}function zs(t,e,n){const i=Object.create(null),r=Object.create(null),s=[];for(const a of e){const o=Hs(a);s.push(o),i[a.name]=o,r[a.no]=o}return{typeName:t,values:s,findName(a){return i[a]},findNumber(a){return r[a]}}}function Zc(t,e,n){const i={};for(const r of e){const s=Hs(r);i[s.localName]=s.no,i[s.no]=s.localName}return Ks(i,t,e),i}function Hs(t){return"localName"in t?t:Object.assign(Object.assign({},t),{localName:t.name})}class Js{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,n){const i=this.getType(),r=i.runtime.bin,s=r.makeReadOptions(n);return r.readMessage(this,s.readerFactory(e),e.byteLength,s),this}fromJson(e,n){const i=this.getType(),r=i.runtime.json,s=r.makeReadOptions(n);return r.readMessage(i,e,s,this),this}fromJsonString(e,n){let i;try{i=JSON.parse(e)}catch(r){throw new Error("cannot decode ".concat(this.getType().typeName," from JSON: ").concat(r instanceof Error?r.message:String(r)))}return this.fromJson(i,n)}toBinary(e){const n=this.getType(),i=n.runtime.bin,r=i.makeWriteOptions(e),s=r.writerFactory();return i.writeMessage(this,s,r),s.finish()}toJson(e){const n=this.getType(),i=n.runtime.json,r=i.makeWriteOptions(e);return i.writeMessage(this,r)}toJsonString(e){var n;const i=this.toJson(e);return JSON.stringify(i,null,(n=e==null?void 0:e.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function eu(t,e,n,i){var r;const s=(r=i==null?void 0:i.localName)!==null&&r!==void 0?r:e.substring(e.lastIndexOf(".")+1),a={[s]:function(o){t.util.initFields(this),t.util.initPartial(o,this)}}[s];return Object.setPrototypeOf(a.prototype,new Js),Object.assign(a,{runtime:t,typeName:e,fields:t.util.newFieldList(n),fromBinary(o,c){return new a().fromBinary(o,c)},fromJson(o,c){return new a().fromJson(o,c)},fromJsonString(o,c){return new a().fromJsonString(o,c)},equals(o,c){return t.util.equals(a,o,c)}}),a}function tu(){let t=0,e=0;for(let i=0;i<28;i+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}let n=this.buf[this.pos++];if(t|=(n&15)<<28,e=(n&112)>>4,!(n&128))return this.assertBounds(),[t,e];for(let i=3;i<=31;i+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}function $n(t,e,n){for(let s=0;s<28;s=s+7){const a=t>>>s,o=!(!(a>>>7)&&e==0),c=(o?a|128:a)&255;if(n.push(c),!o)return}const i=t>>>28&15|(e&7)<<4,r=!!(e>>3);if(n.push((r?i|128:i)&255),!!r){for(let s=3;s<31;s=s+7){const a=e>>>s,o=!!(a>>>7),c=(o?a|128:a)&255;if(n.push(c),!o)return}n.push(e>>>31&1)}}const on=4294967296;function Pr(t){const e=t[0]==="-";e&&(t=t.slice(1));const n=1e6;let i=0,r=0;function s(a,o){const c=Number(t.slice(a,o));r*=n,i=i*n+c,i>=on&&(r=r+(i/on|0),i=i%on)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),e?Qs(i,r):Qi(i,r)}function nu(t,e){let n=Qi(t,e);const i=n.hi&2147483648;i&&(n=Qs(n.lo,n.hi));const r=$s(n.lo,n.hi);return i?"-"+r:r}function $s(t,e){if({lo:t,hi:e}=iu(t,e),e<=2097151)return String(on*e+t);const n=t&16777215,i=(t>>>24|e<<8)&16777215,r=e>>16&65535;let s=n+i*6777216+r*6710656,a=i+r*8147497,o=r*2;const c=1e7;return s>=c&&(a+=Math.floor(s/c),s%=c),a>=c&&(o+=Math.floor(a/c),a%=c),o.toString()+wr(a)+wr(s)}function iu(t,e){return{lo:t>>>0,hi:e>>>0}}function Qi(t,e){return{lo:t|0,hi:e|0}}function Qs(t,e){return e=~e,t?t=~t+1:e+=1,Qi(t,e)}const wr=t=>{const e=String(t);return"0000000".slice(e.length)+e};function _r(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let n=0;n<9;n++)e.push(t&127|128),t=t>>7;e.push(1)}}function ru(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let n=5;t&128&&n<10;n++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}function su(){const t=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||{}.BUF_BIGINT_DISABLE!=="1")){const r=BigInt("-9223372036854775808"),s=BigInt("9223372036854775807"),a=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(c){const u=typeof c=="bigint"?c:BigInt(c);if(u>s||u<r)throw new Error("int64 invalid: ".concat(c));return u},uParse(c){const u=typeof c=="bigint"?c:BigInt(c);if(u>o||u<a)throw new Error("uint64 invalid: ".concat(c));return u},enc(c){return t.setBigInt64(0,this.parse(c),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(c){return t.setBigInt64(0,this.uParse(c),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(c,u){return t.setInt32(0,c,!0),t.setInt32(4,u,!0),t.getBigInt64(0,!0)},uDec(c,u){return t.setInt32(0,c,!0),t.setInt32(4,u,!0),t.getBigUint64(0,!0)}}}const n=r=>J(/^-?[0-9]+$/.test(r),"int64 invalid: ".concat(r)),i=r=>J(/^[0-9]+$/.test(r),"uint64 invalid: ".concat(r));return{zero:"0",supported:!1,parse(r){return typeof r!="string"&&(r=r.toString()),n(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),i(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),n(r),Pr(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),i(r),Pr(r)},dec(r,s){return nu(r,s)},uDec(r,s){return $s(r,s)}}}const ee=su();var P;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(P||(P={}));var Xe;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING"})(Xe||(Xe={}));function He(t,e,n){if(e===n)return!0;if(t==P.BYTES){if(!(e instanceof Uint8Array)||!(n instanceof Uint8Array)||e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==n[i])return!1;return!0}switch(t){case P.UINT64:case P.FIXED64:case P.INT64:case P.SFIXED64:case P.SINT64:return e==n}return!1}function Ct(t,e){switch(t){case P.BOOL:return!1;case P.UINT64:case P.FIXED64:case P.INT64:case P.SFIXED64:case P.SINT64:return e==0?ee.zero:"0";case P.DOUBLE:case P.FLOAT:return 0;case P.BYTES:return new Uint8Array(0);case P.STRING:return"";default:return 0}}function Ys(t,e){switch(t){case P.BOOL:return e===!1;case P.STRING:return e==="";case P.BYTES:return e instanceof Uint8Array&&!e.byteLength;default:return e==0}}var $;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})($||($={}));class au{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let r=0;r<this.chunks.length;r++)e+=this.chunks[r].length;let n=new Uint8Array(e),i=0;for(let r=0;r<this.chunks.length;r++)n.set(this.chunks[r],i),i+=this.chunks[r].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,n){return this.uint32((e<<3|n)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(gi(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return an(e),_r(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let n=this.textEncoder.encode(e);return this.uint32(n.byteLength),this.raw(n)}float(e){Ws(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)}fixed32(e){gi(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){an(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return an(e),e=(e<<1^e>>31)>>>0,_r(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),i=new DataView(n.buffer),r=ee.enc(e);return i.setInt32(0,r.lo,!0),i.setInt32(4,r.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),i=new DataView(n.buffer),r=ee.uEnc(e);return i.setInt32(0,r.lo,!0),i.setInt32(4,r.hi,!0),this.raw(n)}int64(e){let n=ee.enc(e);return $n(n.lo,n.hi,this.buf),this}sint64(e){let n=ee.enc(e),i=n.hi>>31,r=n.lo<<1^i,s=(n.hi<<1|n.lo>>>31)^i;return $n(r,s,this.buf),this}uint64(e){let n=ee.uEnc(e);return $n(n.lo,n.hi,this.buf),this}}class ou{constructor(e,n){this.varint64=tu,this.uint32=ru,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=n??new TextDecoder}tag(){let e=this.uint32(),n=e>>>3,i=e&7;if(n<=0||i<0||i>5)throw new Error("illegal tag: field no "+n+" wire type "+i);return[n,i]}skip(e,n){let i=this.pos;switch(e){case $.Varint:for(;this.buf[this.pos++]&128;);break;case $.Bit64:this.pos+=4;case $.Bit32:this.pos+=4;break;case $.LengthDelimited:let r=this.uint32();this.pos+=r;break;case $.StartGroup:for(;;){const[s,a]=this.tag();if(a===$.EndGroup){if(n!==void 0&&s!==n)throw new Error("invalid end group tag");break}this.skip(a,s)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(i,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return ee.dec(...this.varint64())}uint64(){return ee.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),i=-(e&1);return e=(e>>>1|(n&1)<<31)^i,n=n>>>1^i,ee.dec(e,n)}bool(){let[e,n]=this.varint64();return e!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ee.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ee.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)}string(){return this.textDecoder.decode(this.bytes())}}function cu(t,e,n,i){let r;return{typeName:e,extendee:n,get field(){if(!r){const s=typeof i=="function"?i():i;s.name=e.split(".").pop(),s.jsonName="[".concat(e,"]"),r=t.util.newFieldList([s]).list()[0]}return r},runtime:t}}function Xs(t){const e=t.field.localName,n=Object.create(null);return n[e]=uu(t),[n,()=>n[e]]}function uu(t){const e=t.field;if(e.repeated)return[];if(e.default!==void 0)return e.default;switch(e.kind){case"enum":return e.T.values[0].no;case"scalar":return Ct(e.T,e.L);case"message":const n=e.T,i=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(i):i;case"map":throw"map fields are not allowed to be extensions"}}function lu(t,e){if(!e.repeated&&(e.kind=="enum"||e.kind=="scalar")){for(let n=t.length-1;n>=0;--n)if(t[n].no==e.no)return[t[n]];return[]}return t.filter(n=>n.no===e.no)}let Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Nn=[];for(let t=0;t<Fe.length;t++)Nn[Fe[t].charCodeAt(0)]=t;Nn["-".charCodeAt(0)]=Fe.indexOf("+");Nn["_".charCodeAt(0)]=Fe.indexOf("/");const Zs={dec(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let n=new Uint8Array(e),i=0,r=0,s,a=0;for(let o=0;o<t.length;o++){if(s=Nn[t.charCodeAt(o)],s===void 0)switch(t[o]){case"=":r=0;case` +`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:a=s,r=1;break;case 1:n[i++]=a<<2|(s&48)>>4,a=s,r=2;break;case 2:n[i++]=(a&15)<<4|(s&60)>>2,a=s,r=3;break;case 3:n[i++]=(a&3)<<6|s,r=0;break}}if(r==1)throw Error("invalid base64 string.");return n.subarray(0,i)},enc(t){let e="",n=0,i,r=0;for(let s=0;s<t.length;s++)switch(i=t[s],n){case 0:e+=Fe[i>>2],r=(i&3)<<4,n=1;break;case 1:e+=Fe[r|i>>4],r=(i&15)<<2,n=2;break;case 2:e+=Fe[r|i>>6],e+=Fe[i&63],n=0;break}return n&&(e+=Fe[r],e+="=",n==1&&(e+="=")),e}};function du(t,e,n){ta(e,t);const i=e.runtime.bin.makeReadOptions(n),r=lu(t.getType().runtime.bin.listUnknownFields(t),e.field),[s,a]=Xs(e);for(const o of r)e.runtime.bin.readField(s,i.readerFactory(o.data),e.field,o.wireType,i);return a()}function hu(t,e,n,i){ta(e,t);const r=e.runtime.bin.makeReadOptions(i),s=e.runtime.bin.makeWriteOptions(i);if(ea(t,e)){const u=t.getType().runtime.bin.listUnknownFields(t).filter(l=>l.no!=e.field.no);t.getType().runtime.bin.discardUnknownFields(t);for(const l of u)t.getType().runtime.bin.onUnknownField(t,l.no,l.wireType,l.data)}const a=s.writerFactory();let o=e.field;!o.opt&&!o.repeated&&(o.kind=="enum"||o.kind=="scalar")&&(o=Object.assign(Object.assign({},e.field),{opt:!0})),e.runtime.bin.writeField(o,n,a,s);const c=r.readerFactory(a.finish());for(;c.pos<c.len;){const[u,l]=c.tag(),h=c.skip(l,u);t.getType().runtime.bin.onUnknownField(t,u,l,h)}}function ea(t,e){const n=t.getType();return e.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(t).find(i=>i.no==e.field.no)}function ta(t,e){J(t.extendee.typeName==e.getType().typeName,"extension ".concat(t.typeName," can only be applied to message ").concat(t.extendee.typeName))}function na(t,e){const n=t.localName;if(t.repeated)return e[n].length>0;if(t.oneof)return e[t.oneof.localName].case===n;switch(t.kind){case"enum":case"scalar":return t.opt||t.req?e[n]!==void 0:t.kind=="enum"?e[n]!==t.T.values[0].no:!Ys(t.T,e[n]);case"message":return e[n]!==void 0;case"map":return Object.keys(e[n]).length>0}}function Rr(t,e){const n=t.localName,i=!t.opt&&!t.req;if(t.repeated)e[n]=[];else if(t.oneof)e[t.oneof.localName]={case:void 0};else switch(t.kind){case"map":e[n]={};break;case"enum":e[n]=i?t.T.values[0].no:void 0;break;case"scalar":e[n]=i?Ct(t.T,t.L):void 0;break;case"message":e[n]=void 0;break}}function tt(t,e){if(t===null||typeof t!="object"||!Object.getOwnPropertyNames(Js.prototype).every(i=>i in t&&typeof t[i]=="function"))return!1;const n=t.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:e===void 0?!0:n.typeName==e.typeName}function ia(t,e){return tt(e)||!t.fieldWrapper?e:t.fieldWrapper.wrapField(e)}P.DOUBLE,P.FLOAT,P.INT64,P.UINT64,P.INT32,P.UINT32,P.BOOL,P.STRING,P.BYTES;const Ir={ignoreUnknownFields:!1},Mr={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function fu(t){return t?Object.assign(Object.assign({},Ir),t):Ir}function pu(t){return t?Object.assign(Object.assign({},Mr),t):Mr}const Cn=Symbol(),cn=Symbol();function mu(){return{makeReadOptions:fu,makeWriteOptions:pu,readMessage(t,e,n,i){if(e==null||Array.isArray(e)||typeof e!="object")throw new Error("cannot decode message ".concat(t.typeName," from JSON: ").concat(xe(e)));i=i??new t;const r=new Map,s=n.typeRegistry;for(const[a,o]of Object.entries(e)){const c=t.fields.findJsonName(a);if(c){if(c.oneof){if(o===null&&c.kind=="scalar")continue;const u=r.get(c.oneof);if(u!==void 0)throw new Error("cannot decode message ".concat(t.typeName,' from JSON: multiple keys for oneof "').concat(c.oneof.name,'" present: "').concat(u,'", "').concat(a,'"'));r.set(c.oneof,a)}xr(i,o,c,n,t)}else{let u=!1;if(s!=null&&s.findExtension&&a.startsWith("[")&&a.endsWith("]")){const l=s.findExtension(a.substring(1,a.length-1));if(l&&l.extendee.typeName==t.typeName){u=!0;const[h,f]=Xs(l);xr(h,o,l.field,n,l),hu(i,l,f(),n)}}if(!u&&!n.ignoreUnknownFields)throw new Error("cannot decode message ".concat(t.typeName,' from JSON: key "').concat(a,'" is unknown'))}}return i},writeMessage(t,e){const n=t.getType(),i={};let r;try{for(r of n.fields.byNumber()){if(!na(r,t)){if(r.req)throw"required field not set";if(!e.emitDefaultValues||!vu(r))continue}const a=r.oneof?t[r.oneof.localName].value:t[r.localName],o=Or(r,a,e);o!==void 0&&(i[e.useProtoFieldName?r.name:r.jsonName]=o)}const s=e.typeRegistry;if(s!=null&&s.findExtensionFor)for(const a of n.runtime.bin.listUnknownFields(t)){const o=s.findExtensionFor(n.typeName,a.no);if(o&&ea(t,o)){const c=du(t,o,e),u=Or(o.field,c,e);u!==void 0&&(i[o.field.jsonName]=u)}}}catch(s){const a=r?"cannot encode field ".concat(n.typeName,".").concat(r.name," to JSON"):"cannot encode message ".concat(n.typeName," to JSON"),o=s instanceof Error?s.message:String(s);throw new Error(a+(o.length>0?": ".concat(o):""))}return i},readScalar(t,e,n){return Lt(t,e,n??Xe.BIGINT,!0)},writeScalar(t,e,n){if(e!==void 0&&(n||Ys(t,e)))return un(t,e)},debug:xe}}function xe(t){if(t===null)return"null";switch(typeof t){case"object":return Array.isArray(t)?"array":"object";case"string":return t.length>100?"string":'"'.concat(t.split('"').join('\\"'),'"');default:return String(t)}}function xr(t,e,n,i,r){let s=n.localName;if(n.repeated){if(J(n.kind!="map"),e===null)return;if(!Array.isArray(e))throw new Error("cannot decode field ".concat(r.typeName,".").concat(n.name," from JSON: ").concat(xe(e)));const a=t[s];for(const o of e){if(o===null)throw new Error("cannot decode field ".concat(r.typeName,".").concat(n.name," from JSON: ").concat(xe(o)));switch(n.kind){case"message":a.push(n.T.fromJson(o,i));break;case"enum":const c=Qn(n.T,o,i.ignoreUnknownFields,!0);c!==cn&&a.push(c);break;case"scalar":try{a.push(Lt(n.T,o,n.L,!0))}catch(u){let l="cannot decode field ".concat(r.typeName,".").concat(n.name," from JSON: ").concat(xe(o));throw u instanceof Error&&u.message.length>0&&(l+=": ".concat(u.message)),new Error(l)}break}}}else if(n.kind=="map"){if(e===null)return;if(typeof e!="object"||Array.isArray(e))throw new Error("cannot decode field ".concat(r.typeName,".").concat(n.name," from JSON: ").concat(xe(e)));const a=t[s];for(const[o,c]of Object.entries(e)){if(c===null)throw new Error("cannot decode field ".concat(r.typeName,".").concat(n.name," from JSON: map value null"));let u;try{u=gu(n.K,o)}catch(l){let h="cannot decode map key for field ".concat(r.typeName,".").concat(n.name," from JSON: ").concat(xe(e));throw l instanceof Error&&l.message.length>0&&(h+=": ".concat(l.message)),new Error(h)}switch(n.V.kind){case"message":a[u]=n.V.T.fromJson(c,i);break;case"enum":const l=Qn(n.V.T,c,i.ignoreUnknownFields,!0);l!==cn&&(a[u]=l);break;case"scalar":try{a[u]=Lt(n.V.T,c,Xe.BIGINT,!0)}catch(h){let f="cannot decode map value for field ".concat(r.typeName,".").concat(n.name," from JSON: ").concat(xe(e));throw h instanceof Error&&h.message.length>0&&(f+=": ".concat(h.message)),new Error(f)}break}}}else switch(n.oneof&&(t=t[n.oneof.localName]={case:s},s="value"),n.kind){case"message":const a=n.T;if(e===null&&a.typeName!="google.protobuf.Value")return;let o=t[s];tt(o)?o.fromJson(e,i):(t[s]=o=a.fromJson(e,i),a.fieldWrapper&&!n.oneof&&(t[s]=a.fieldWrapper.unwrapField(o)));break;case"enum":const c=Qn(n.T,e,i.ignoreUnknownFields,!1);switch(c){case Cn:Rr(n,t);break;case cn:break;default:t[s]=c;break}break;case"scalar":try{const u=Lt(n.T,e,n.L,!1);switch(u){case Cn:Rr(n,t);break;default:t[s]=u;break}}catch(u){let l="cannot decode field ".concat(r.typeName,".").concat(n.name," from JSON: ").concat(xe(e));throw u instanceof Error&&u.message.length>0&&(l+=": ".concat(u.message)),new Error(l)}break}}function gu(t,e){if(t===P.BOOL)switch(e){case"true":e=!0;break;case"false":e=!1;break}return Lt(t,e,Xe.BIGINT,!0).toString()}function Lt(t,e,n,i){if(e===null)return i?Ct(t,n):Cn;switch(t){case P.DOUBLE:case P.FLOAT:if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const r=Number(e);if(Number.isNaN(r)||!Number.isFinite(r))break;return t==P.FLOAT&&Ws(r),r;case P.INT32:case P.FIXED32:case P.SFIXED32:case P.SINT32:case P.UINT32:let s;if(typeof e=="number"?s=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(s=Number(e)),s===void 0)break;return t==P.UINT32||t==P.FIXED32?gi(s):an(s),s;case P.INT64:case P.SFIXED64:case P.SINT64:if(typeof e!="number"&&typeof e!="string")break;const a=ee.parse(e);return n?a.toString():a;case P.FIXED64:case P.UINT64:if(typeof e!="number"&&typeof e!="string")break;const o=ee.uParse(e);return n?o.toString():o;case P.BOOL:if(typeof e!="boolean")break;return e;case P.STRING:if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case P.BYTES:if(e==="")return new Uint8Array(0);if(typeof e!="string")break;return Zs.dec(e)}throw new Error}function Qn(t,e,n,i){if(e===null)return t.typeName=="google.protobuf.NullValue"?0:i?t.values[0].no:Cn;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const r=t.findName(e);if(r!==void 0)return r.no;if(n)return cn;break}throw new Error("cannot decode enum ".concat(t.typeName," from JSON: ").concat(xe(e)))}function vu(t){return t.repeated||t.kind=="map"?!0:!(t.oneof||t.kind=="message"||t.opt||t.req)}function Or(t,e,n){if(t.kind=="map"){J(typeof e=="object"&&e!=null);const i={},r=Object.entries(e);switch(t.V.kind){case"scalar":for(const[a,o]of r)i[a.toString()]=un(t.V.T,o);break;case"message":for(const[a,o]of r)i[a.toString()]=o.toJson(n);break;case"enum":const s=t.V.T;for(const[a,o]of r)i[a.toString()]=Yn(s,o,n.enumAsInteger);break}return n.emitDefaultValues||r.length>0?i:void 0}if(t.repeated){J(Array.isArray(e));const i=[];switch(t.kind){case"scalar":for(let r=0;r<e.length;r++)i.push(un(t.T,e[r]));break;case"enum":for(let r=0;r<e.length;r++)i.push(Yn(t.T,e[r],n.enumAsInteger));break;case"message":for(let r=0;r<e.length;r++)i.push(e[r].toJson(n));break}return n.emitDefaultValues||i.length>0?i:void 0}switch(t.kind){case"scalar":return un(t.T,e);case"enum":return Yn(t.T,e,n.enumAsInteger);case"message":return ia(t.T,e).toJson(n)}}function Yn(t,e,n){var i;if(J(typeof e=="number"),t.typeName=="google.protobuf.NullValue")return null;if(n)return e;const r=t.findNumber(e);return(i=r==null?void 0:r.name)!==null&&i!==void 0?i:e}function un(t,e){switch(t){case P.INT32:case P.SFIXED32:case P.SINT32:case P.FIXED32:case P.UINT32:return J(typeof e=="number"),e;case P.FLOAT:case P.DOUBLE:return J(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e;case P.STRING:return J(typeof e=="string"),e;case P.BOOL:return J(typeof e=="boolean"),e;case P.UINT64:case P.FIXED64:case P.INT64:case P.SFIXED64:case P.SINT64:return J(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),e.toString();case P.BYTES:return J(e instanceof Uint8Array),Zs.enc(e)}}const ut=Symbol("@bufbuild/protobuf/unknown-fields"),Dr={readUnknownFields:!0,readerFactory:t=>new ou(t)},Ar={writeUnknownFields:!0,writerFactory:()=>new au};function bu(t){return t?Object.assign(Object.assign({},Dr),t):Dr}function yu(t){return t?Object.assign(Object.assign({},Ar),t):Ar}function ku(){return{makeReadOptions:bu,makeWriteOptions:yu,listUnknownFields(t){var e;return(e=t[ut])!==null&&e!==void 0?e:[]},discardUnknownFields(t){delete t[ut]},writeUnknownFields(t,e){const i=t[ut];if(i)for(const r of i)e.tag(r.no,r.wireType).raw(r.data)},onUnknownField(t,e,n,i){const r=t;Array.isArray(r[ut])||(r[ut]=[]),r[ut].push({no:e,wireType:n,data:i})},readMessage(t,e,n,i,r){const s=t.getType(),a=r?e.len:e.pos+n;let o,c;for(;e.pos<a&&([o,c]=e.tag(),!(r===!0&&c==$.EndGroup));){const u=s.fields.find(o);if(!u){const l=e.skip(c,o);i.readUnknownFields&&this.onUnknownField(t,o,c,l);continue}Nr(t,e,u,c,i)}if(r&&(c!=$.EndGroup||o!==n))throw new Error("invalid end group tag")},readField:Nr,writeMessage(t,e,n){const i=t.getType();for(const r of i.fields.byNumber()){if(!na(r,t)){if(r.req)throw new Error("cannot encode field ".concat(i.typeName,".").concat(r.name," to binary: required field not set"));continue}const s=r.oneof?t[r.oneof.localName].value:t[r.localName];Lr(r,s,e,n)}return n.writeUnknownFields&&this.writeUnknownFields(t,e),e},writeField(t,e,n,i){e!==void 0&&Lr(t,e,n,i)}}}function Nr(t,e,n,i,r){let{repeated:s,localName:a}=n;switch(n.oneof&&(t=t[n.oneof.localName],t.case!=a&&delete t.value,t.case=a,a="value"),n.kind){case"scalar":case"enum":const o=n.kind=="enum"?P.INT32:n.T;let c=Tn;if(n.kind=="scalar"&&n.L>0&&(c=Cu),s){let f=t[a];if(i==$.LengthDelimited&&o!=P.STRING&&o!=P.BYTES){let g=e.uint32()+e.pos;for(;e.pos<g;)f.push(c(e,o))}else f.push(c(e,o))}else t[a]=c(e,o);break;case"message":const u=n.T;s?t[a].push(ln(e,new u,r,n)):tt(t[a])?ln(e,t[a],r,n):(t[a]=ln(e,new u,r,n),u.fieldWrapper&&!n.oneof&&!n.repeated&&(t[a]=u.fieldWrapper.unwrapField(t[a])));break;case"map":let[l,h]=Su(n,e,r);t[a][l]=h;break}}function ln(t,e,n,i){const r=e.getType().runtime.bin,s=i==null?void 0:i.delimited;return r.readMessage(e,t,s?i.no:t.uint32(),n,s),e}function Su(t,e,n){const i=e.uint32(),r=e.pos+i;let s,a;for(;e.pos<r;){const[o]=e.tag();switch(o){case 1:s=Tn(e,t.K);break;case 2:switch(t.V.kind){case"scalar":a=Tn(e,t.V.T);break;case"enum":a=e.int32();break;case"message":a=ln(e,new t.V.T,n,void 0);break}break}}if(s===void 0&&(s=Ct(t.K,Xe.BIGINT)),typeof s!="string"&&typeof s!="number"&&(s=s.toString()),a===void 0)switch(t.V.kind){case"scalar":a=Ct(t.V.T,Xe.BIGINT);break;case"enum":a=t.V.T.values[0].no;break;case"message":a=new t.V.T;break}return[s,a]}function Cu(t,e){const n=Tn(t,e);return typeof n=="bigint"?n.toString():n}function Tn(t,e){switch(e){case P.STRING:return t.string();case P.BOOL:return t.bool();case P.DOUBLE:return t.double();case P.FLOAT:return t.float();case P.INT32:return t.int32();case P.INT64:return t.int64();case P.UINT64:return t.uint64();case P.FIXED64:return t.fixed64();case P.BYTES:return t.bytes();case P.FIXED32:return t.fixed32();case P.SFIXED32:return t.sfixed32();case P.SFIXED64:return t.sfixed64();case P.SINT64:return t.sint64();case P.UINT32:return t.uint32();case P.SINT32:return t.sint32()}}function Lr(t,e,n,i){J(e!==void 0);const r=t.repeated;switch(t.kind){case"scalar":case"enum":let s=t.kind=="enum"?P.INT32:t.T;if(r)if(J(Array.isArray(e)),t.packed)Eu(n,s,t.no,e);else for(const a of e)Ut(n,s,t.no,a);else Ut(n,s,t.no,e);break;case"message":if(r){J(Array.isArray(e));for(const a of e)Ur(n,i,t,a)}else Ur(n,i,t,e);break;case"map":J(typeof e=="object"&&e!=null);for(const[a,o]of Object.entries(e))Tu(n,i,t,a,o);break}}function Tu(t,e,n,i,r){t.tag(n.no,$.LengthDelimited),t.fork();let s=i;switch(n.K){case P.INT32:case P.FIXED32:case P.UINT32:case P.SFIXED32:case P.SINT32:s=Number.parseInt(i);break;case P.BOOL:J(i=="true"||i=="false"),s=i=="true";break}switch(Ut(t,n.K,1,s),n.V.kind){case"scalar":Ut(t,n.V.T,2,r);break;case"enum":Ut(t,P.INT32,2,r);break;case"message":J(r!==void 0),t.tag(2,$.LengthDelimited).bytes(r.toBinary(e));break}t.join()}function Ur(t,e,n,i){const r=ia(n.T,i);n.delimited?t.tag(n.no,$.StartGroup).raw(r.toBinary(e)).tag(n.no,$.EndGroup):t.tag(n.no,$.LengthDelimited).bytes(r.toBinary(e))}function Ut(t,e,n,i){J(i!==void 0);let[r,s]=ra(e);t.tag(n,r)[s](i)}function Eu(t,e,n,i){if(!i.length)return;t.tag(n,$.LengthDelimited).fork();let[,r]=ra(e);for(let s=0;s<i.length;s++)t[r](i[s]);t.join()}function ra(t){let e=$.Varint;switch(t){case P.BYTES:case P.STRING:e=$.LengthDelimited;break;case P.DOUBLE:case P.FIXED64:case P.SFIXED64:e=$.Bit64;break;case P.FIXED32:case P.SFIXED32:case P.FLOAT:e=$.Bit32;break}const n=P[t].toLowerCase();return[e,n]}function Pu(){return{setEnumType:Ks,initPartial(t,e){if(t===void 0)return;const n=e.getType();for(const i of n.fields.byMember()){const r=i.localName,s=e,a=t;if(a[r]!=null)switch(i.kind){case"oneof":const o=a[r].case;if(o===void 0)continue;const c=i.findField(o);let u=a[r].value;c&&c.kind=="message"&&!tt(u,c.T)?u=new c.T(u):c&&c.kind==="scalar"&&c.T===P.BYTES&&(u=_t(u)),s[r]={case:o,value:u};break;case"scalar":case"enum":let l=a[r];i.T===P.BYTES&&(l=i.repeated?l.map(_t):_t(l)),s[r]=l;break;case"map":switch(i.V.kind){case"scalar":case"enum":if(i.V.T===P.BYTES)for(const[p,g]of Object.entries(a[r]))s[r][p]=_t(g);else Object.assign(s[r],a[r]);break;case"message":const f=i.V.T;for(const p of Object.keys(a[r])){let g=a[r][p];f.fieldWrapper||(g=new f(g)),s[r][p]=g}break}break;case"message":const h=i.T;if(i.repeated)s[r]=a[r].map(f=>tt(f,h)?f:new h(f));else{const f=a[r];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?s[r]=_t(f):s[r]=f:s[r]=tt(f,h)?f:new h(f)}break}}},equals(t,e,n){return e===n?!0:!e||!n?!1:t.fields.byMember().every(i=>{const r=e[i.localName],s=n[i.localName];if(i.repeated){if(r.length!==s.length)return!1;switch(i.kind){case"message":return r.every((a,o)=>i.T.equals(a,s[o]));case"scalar":return r.every((a,o)=>He(i.T,a,s[o]));case"enum":return r.every((a,o)=>He(P.INT32,a,s[o]))}throw new Error("repeated cannot contain ".concat(i.kind))}switch(i.kind){case"message":return i.T.equals(r,s);case"enum":return He(P.INT32,r,s);case"scalar":return He(i.T,r,s);case"oneof":if(r.case!==s.case)return!1;const a=i.findField(r.case);if(a===void 0)return!0;switch(a.kind){case"message":return a.T.equals(r.value,s.value);case"enum":return He(P.INT32,r.value,s.value);case"scalar":return He(a.T,r.value,s.value)}throw new Error("oneof cannot contain ".concat(a.kind));case"map":const o=Object.keys(r).concat(Object.keys(s));switch(i.V.kind){case"message":const c=i.V.T;return o.every(l=>c.equals(r[l],s[l]));case"enum":return o.every(l=>He(P.INT32,r[l],s[l]));case"scalar":const u=i.V.T;return o.every(l=>He(u,r[l],s[l]))}break}})},clone(t){const e=t.getType(),n=new e,i=n;for(const r of e.fields.byMember()){const s=t[r.localName];let a;if(r.repeated)a=s.map(tn);else if(r.kind=="map"){a=i[r.localName];for(const[o,c]of Object.entries(s))a[o]=tn(c)}else r.kind=="oneof"?a=r.findField(s.case)?{case:s.case,value:tn(s.value)}:{case:void 0}:a=tn(s);i[r.localName]=a}for(const r of e.runtime.bin.listUnknownFields(t))e.runtime.bin.onUnknownField(i,r.no,r.wireType,r.data);return n}}}function tn(t){if(t===void 0)return t;if(tt(t))return t.clone();if(t instanceof Uint8Array){const e=new Uint8Array(t.byteLength);return e.set(t),e}return t}function _t(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function wu(t,e,n){return{syntax:t,json:mu(),bin:ku(),util:Object.assign(Object.assign({},Pu()),{newFieldList:e,initFields:n}),makeMessageType(i,r,s){return eu(this,i,r,s)},makeEnum:Zc,makeEnumType:zs,getEnumType:Xc,makeExtension(i,r,s){return cu(this,i,r,s)}}}class _u{constructor(e,n){this._fields=e,this._normalizer=n}findJsonName(e){if(!this.jsonNames){const n={};for(const i of this.list())n[i.jsonName]=n[i.name]=i;this.jsonNames=n}return this.jsonNames[e]}find(e){if(!this.numbers){const n={};for(const i of this.list())n[i.no]=i;this.numbers=n}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,n)=>e.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let n;for(const i of this.list())i.oneof?i.oneof!==n&&(n=i.oneof,e.push(n)):e.push(i)}return this.members}}function sa(t,e){const n=aa(t);return e?n:Du(Ou(n))}function Ru(t){return sa(t,!1)}const Iu=aa;function aa(t){let e=!1;const n=[];for(let i=0;i<t.length;i++){let r=t.charAt(i);switch(r){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(r),e=!1;break;default:e&&(e=!1,r=r.toUpperCase()),n.push(r);break}}return n.join("")}const Mu=new Set(["constructor","toString","toJSON","valueOf"]),xu=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),oa=t=>"".concat(t,"$"),Ou=t=>xu.has(t)?oa(t):t,Du=t=>Mu.has(t)?oa(t):t;class Au{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=Ru(e)}addField(e){J(e.oneof===this,"field ".concat(e.name," not one of ").concat(this.name)),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[e]}}function Nu(t,e){var n,i,r,s,a,o;const c=[];let u;for(const l of typeof t=="function"?t():t){const h=l;if(h.localName=sa(l.name,l.oneof!==void 0),h.jsonName=(n=l.jsonName)!==null&&n!==void 0?n:Iu(l.name),h.repeated=(i=l.repeated)!==null&&i!==void 0?i:!1,l.kind=="scalar"&&(h.L=(r=l.L)!==null&&r!==void 0?r:Xe.BIGINT),h.delimited=(s=l.delimited)!==null&&s!==void 0?s:!1,h.req=(a=l.req)!==null&&a!==void 0?a:!1,h.opt=(o=l.opt)!==null&&o!==void 0?o:!1,l.packed===void 0&&(h.packed=l.kind=="enum"||l.kind=="scalar"&&l.T!=P.BYTES&&l.T!=P.STRING),l.oneof!==void 0){const f=typeof l.oneof=="string"?l.oneof:l.oneof.name;(!u||u.name!=f)&&(u=new Au(f)),h.oneof=u,u.addField(h)}c.push(h)}return c}const C=wu("proto3",t=>new _u(t,e=>Nu(e)),t=>{for(const e of t.getType().fields.byMember()){if(e.opt)continue;const n=e.localName,i=t;if(e.repeated){i[n]=[];continue}switch(e.kind){case"oneof":i[n]={case:void 0};break;case"enum":i[n]=0;break;case"map":i[n]={};break;case"scalar":i[n]=Ct(e.T,e.L);break}}}),Lu=C.makeMessageType("livekit.MetricsBatch",()=>[{no:1,name:"str_data",kind:"scalar",T:9,repeated:!0},{no:2,name:"time_series",kind:"message",T:Uu,repeated:!0},{no:3,name:"events",kind:"message",T:ju,repeated:!0}]),Uu=C.makeMessageType("livekit.TimeSeriesMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"start_timestamp",kind:"scalar",T:3},{no:5,name:"end_timestamp",kind:"scalar",T:3},{no:6,name:"samples",kind:"message",T:Fu,repeated:!0}]),Fu=C.makeMessageType("livekit.MetricSample",()=>[{no:1,name:"timestamp",kind:"scalar",T:3},{no:2,name:"value",kind:"scalar",T:2}]),ju=C.makeMessageType("livekit.EventMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"start_timestamp",kind:"scalar",T:3},{no:5,name:"end_timestamp",kind:"scalar",T:3,opt:!0},{no:6,name:"metadata",kind:"scalar",T:9}]),Pe=C.makeEnum("livekit.TrackType",[{no:0,name:"AUDIO"},{no:1,name:"VIDEO"},{no:2,name:"DATA"}]),ae=C.makeEnum("livekit.TrackSource",[{no:0,name:"UNKNOWN"},{no:1,name:"CAMERA"},{no:2,name:"MICROPHONE"},{no:3,name:"SCREEN_SHARE"},{no:4,name:"SCREEN_SHARE_AUDIO"}]),Yi=C.makeEnum("livekit.VideoQuality",[{no:0,name:"LOW"},{no:1,name:"MEDIUM"},{no:2,name:"HIGH"},{no:3,name:"OFF"}]),At=C.makeEnum("livekit.ConnectionQuality",[{no:0,name:"POOR"},{no:1,name:"GOOD"},{no:2,name:"EXCELLENT"},{no:3,name:"LOST"}]),Bt=C.makeEnum("livekit.ClientConfigSetting",[{no:0,name:"UNSET"},{no:1,name:"DISABLED"},{no:2,name:"ENABLED"}]),mt=C.makeEnum("livekit.DisconnectReason",[{no:0,name:"UNKNOWN_REASON"},{no:1,name:"CLIENT_INITIATED"},{no:2,name:"DUPLICATE_IDENTITY"},{no:3,name:"SERVER_SHUTDOWN"},{no:4,name:"PARTICIPANT_REMOVED"},{no:5,name:"ROOM_DELETED"},{no:6,name:"STATE_MISMATCH"},{no:7,name:"JOIN_FAILURE"},{no:8,name:"MIGRATION"},{no:9,name:"SIGNAL_CLOSE"},{no:10,name:"ROOM_CLOSED"}]),lt=C.makeEnum("livekit.ReconnectReason",[{no:0,name:"RR_UNKNOWN"},{no:1,name:"RR_SIGNAL_DISCONNECTED"},{no:2,name:"RR_PUBLISHER_FAILED"},{no:3,name:"RR_SUBSCRIBER_FAILED"},{no:4,name:"RR_SWITCH_CANDIDATE"}]),Vu=C.makeEnum("livekit.SubscriptionError",[{no:0,name:"SE_UNKNOWN"},{no:1,name:"SE_CODEC_UNSUPPORTED"},{no:2,name:"SE_TRACK_NOTFOUND"}]),Oe=C.makeEnum("livekit.AudioTrackFeature",[{no:0,name:"TF_STEREO"},{no:1,name:"TF_NO_DTX"},{no:2,name:"TF_AUTO_GAIN_CONTROL"},{no:3,name:"TF_ECHO_CANCELLATION"},{no:4,name:"TF_NOISE_SUPPRESSION"},{no:5,name:"TF_ENHANCED_NOISE_CANCELLATION"}]),Xi=C.makeMessageType("livekit.Room",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"empty_timeout",kind:"scalar",T:13},{no:14,name:"departure_timeout",kind:"scalar",T:13},{no:4,name:"max_participants",kind:"scalar",T:13},{no:5,name:"creation_time",kind:"scalar",T:3},{no:6,name:"turn_password",kind:"scalar",T:9},{no:7,name:"enabled_codecs",kind:"message",T:En,repeated:!0},{no:8,name:"metadata",kind:"scalar",T:9},{no:9,name:"num_participants",kind:"scalar",T:13},{no:11,name:"num_publishers",kind:"scalar",T:13},{no:10,name:"active_recording",kind:"scalar",T:8},{no:13,name:"version",kind:"message",T:ma}]),En=C.makeMessageType("livekit.Codec",()=>[{no:1,name:"mime",kind:"scalar",T:9},{no:2,name:"fmtp_line",kind:"scalar",T:9}]),Bu=C.makeMessageType("livekit.ParticipantPermission",()=>[{no:1,name:"can_subscribe",kind:"scalar",T:8},{no:2,name:"can_publish",kind:"scalar",T:8},{no:3,name:"can_publish_data",kind:"scalar",T:8},{no:9,name:"can_publish_sources",kind:"enum",T:C.getEnumType(ae),repeated:!0},{no:7,name:"hidden",kind:"scalar",T:8},{no:8,name:"recorder",kind:"scalar",T:8},{no:10,name:"can_update_metadata",kind:"scalar",T:8},{no:11,name:"agent",kind:"scalar",T:8},{no:12,name:"can_subscribe_metrics",kind:"scalar",T:8}]),qt=C.makeMessageType("livekit.ParticipantInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"identity",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:C.getEnumType(vi)},{no:4,name:"tracks",kind:"message",T:ft,repeated:!0},{no:5,name:"metadata",kind:"scalar",T:9},{no:6,name:"joined_at",kind:"scalar",T:3},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"version",kind:"scalar",T:13},{no:11,name:"permission",kind:"message",T:Bu},{no:12,name:"region",kind:"scalar",T:9},{no:13,name:"is_publisher",kind:"scalar",T:8},{no:14,name:"kind",kind:"enum",T:C.getEnumType(Pn)},{no:15,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:16,name:"disconnect_reason",kind:"enum",T:C.getEnumType(mt)}]),vi=C.makeEnum("livekit.ParticipantInfo.State",[{no:0,name:"JOINING"},{no:1,name:"JOINED"},{no:2,name:"ACTIVE"},{no:3,name:"DISCONNECTED"}]),Pn=C.makeEnum("livekit.ParticipantInfo.Kind",[{no:0,name:"STANDARD"},{no:1,name:"INGRESS"},{no:2,name:"EGRESS"},{no:3,name:"SIP"},{no:4,name:"AGENT"}]),me=C.makeEnum("livekit.Encryption.Type",[{no:0,name:"NONE"},{no:1,name:"GCM"},{no:2,name:"CUSTOM"}]),qu=C.makeMessageType("livekit.SimulcastCodecInfo",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"mid",kind:"scalar",T:9},{no:3,name:"cid",kind:"scalar",T:9},{no:4,name:"layers",kind:"message",T:nt,repeated:!0}]),ft=C.makeMessageType("livekit.TrackInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:C.getEnumType(Pe)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"muted",kind:"scalar",T:8},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"simulcast",kind:"scalar",T:8},{no:8,name:"disable_dtx",kind:"scalar",T:8},{no:9,name:"source",kind:"enum",T:C.getEnumType(ae)},{no:10,name:"layers",kind:"message",T:nt,repeated:!0},{no:11,name:"mime_type",kind:"scalar",T:9},{no:12,name:"mid",kind:"scalar",T:9},{no:13,name:"codecs",kind:"message",T:qu,repeated:!0},{no:14,name:"stereo",kind:"scalar",T:8},{no:15,name:"disable_red",kind:"scalar",T:8},{no:16,name:"encryption",kind:"enum",T:C.getEnumType(me)},{no:17,name:"stream",kind:"scalar",T:9},{no:18,name:"version",kind:"message",T:ma},{no:19,name:"audio_features",kind:"enum",T:C.getEnumType(Oe),repeated:!0}]),nt=C.makeMessageType("livekit.VideoLayer",()=>[{no:1,name:"quality",kind:"enum",T:C.getEnumType(Yi)},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13},{no:4,name:"bitrate",kind:"scalar",T:13},{no:5,name:"ssrc",kind:"scalar",T:13}]),ca=C.makeMessageType("livekit.DataPacket",()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(ue)},{no:4,name:"participant_identity",kind:"scalar",T:9},{no:5,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:2,name:"user",kind:"message",T:la,oneof:"value"},{no:3,name:"speaker",kind:"message",T:Wu,oneof:"value"},{no:6,name:"sip_dtmf",kind:"message",T:Gu,oneof:"value"},{no:7,name:"transcription",kind:"message",T:Ku,oneof:"value"},{no:8,name:"metrics",kind:"message",T:Lu,oneof:"value"}]),ue=C.makeEnum("livekit.DataPacket.Kind",[{no:0,name:"RELIABLE"},{no:1,name:"LOSSY"}]),Wu=C.makeMessageType("livekit.ActiveSpeakerUpdate",()=>[{no:1,name:"speakers",kind:"message",T:ua,repeated:!0}]),ua=C.makeMessageType("livekit.SpeakerInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:2},{no:3,name:"active",kind:"scalar",T:8}]),la=C.makeMessageType("livekit.UserPacket",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:5,name:"participant_identity",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:12},{no:3,name:"destination_sids",kind:"scalar",T:9,repeated:!0},{no:6,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:4,name:"topic",kind:"scalar",T:9,opt:!0},{no:8,name:"id",kind:"scalar",T:9,opt:!0},{no:9,name:"start_time",kind:"scalar",T:4,opt:!0},{no:10,name:"end_time",kind:"scalar",T:4,opt:!0}]),Gu=C.makeMessageType("livekit.SipDTMF",()=>[{no:3,name:"code",kind:"scalar",T:13},{no:4,name:"digit",kind:"scalar",T:9}]),Ku=C.makeMessageType("livekit.Transcription",()=>[{no:2,name:"transcribed_participant_identity",kind:"scalar",T:9},{no:3,name:"track_id",kind:"scalar",T:9},{no:4,name:"segments",kind:"message",T:zu,repeated:!0}]),zu=C.makeMessageType("livekit.TranscriptionSegment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:4},{no:4,name:"end_time",kind:"scalar",T:4},{no:5,name:"final",kind:"scalar",T:8},{no:6,name:"language",kind:"scalar",T:9}]),da=C.makeMessageType("livekit.ParticipantTracks",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sids",kind:"scalar",T:9,repeated:!0}]),Hu=C.makeMessageType("livekit.ServerInfo",()=>[{no:1,name:"edition",kind:"enum",T:C.getEnumType(ha)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"region",kind:"scalar",T:9},{no:5,name:"node_id",kind:"scalar",T:9},{no:6,name:"debug_info",kind:"scalar",T:9},{no:7,name:"agent_protocol",kind:"scalar",T:5}]),ha=C.makeEnum("livekit.ServerInfo.Edition",[{no:0,name:"Standard"},{no:1,name:"Cloud"}]),Ju=C.makeMessageType("livekit.ClientInfo",()=>[{no:1,name:"sdk",kind:"enum",T:C.getEnumType(fa)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"os",kind:"scalar",T:9},{no:5,name:"os_version",kind:"scalar",T:9},{no:6,name:"device_model",kind:"scalar",T:9},{no:7,name:"browser",kind:"scalar",T:9},{no:8,name:"browser_version",kind:"scalar",T:9},{no:9,name:"address",kind:"scalar",T:9},{no:10,name:"network",kind:"scalar",T:9}]),fa=C.makeEnum("livekit.ClientInfo.SDK",[{no:0,name:"UNKNOWN"},{no:1,name:"JS"},{no:2,name:"SWIFT"},{no:3,name:"ANDROID"},{no:4,name:"FLUTTER"},{no:5,name:"GO"},{no:6,name:"UNITY"},{no:7,name:"REACT_NATIVE"},{no:8,name:"RUST"},{no:9,name:"PYTHON"},{no:10,name:"CPP"}]),pa=C.makeMessageType("livekit.ClientConfiguration",()=>[{no:1,name:"video",kind:"message",T:Fr},{no:2,name:"screen",kind:"message",T:Fr},{no:3,name:"resume_connection",kind:"enum",T:C.getEnumType(Bt)},{no:4,name:"disabled_codecs",kind:"message",T:$u},{no:5,name:"force_relay",kind:"enum",T:C.getEnumType(Bt)}]),Fr=C.makeMessageType("livekit.VideoConfiguration",()=>[{no:1,name:"hardware_encoder",kind:"enum",T:C.getEnumType(Bt)}]),$u=C.makeMessageType("livekit.DisabledCodecs",()=>[{no:1,name:"codecs",kind:"message",T:En,repeated:!0},{no:2,name:"publish",kind:"message",T:En,repeated:!0}]),ma=C.makeMessageType("livekit.TimedVersion",()=>[{no:1,name:"unix_micro",kind:"scalar",T:3},{no:2,name:"ticks",kind:"scalar",T:5}]),we=C.makeEnum("livekit.SignalTarget",[{no:0,name:"PUBLISHER"},{no:1,name:"SUBSCRIBER"}]),bi=C.makeEnum("livekit.StreamState",[{no:0,name:"ACTIVE"},{no:1,name:"PAUSED"}]),Qu=C.makeEnum("livekit.CandidateProtocol",[{no:0,name:"UDP"},{no:1,name:"TCP"},{no:2,name:"TLS"}]),Yu=C.makeMessageType("livekit.SignalRequest",()=>[{no:1,name:"offer",kind:"message",T:st,oneof:"message"},{no:2,name:"answer",kind:"message",T:st,oneof:"message"},{no:3,name:"trickle",kind:"message",T:Zi,oneof:"message"},{no:4,name:"add_track",kind:"message",T:ki,oneof:"message"},{no:5,name:"mute",kind:"message",T:er,oneof:"message"},{no:6,name:"subscription",kind:"message",T:Ln,oneof:"message"},{no:7,name:"track_setting",kind:"message",T:ga,oneof:"message"},{no:8,name:"leave",kind:"message",T:Un,oneof:"message"},{no:10,name:"update_layers",kind:"message",T:ba,oneof:"message"},{no:11,name:"subscription_permission",kind:"message",T:Ca,oneof:"message"},{no:12,name:"sync_state",kind:"message",T:Ta,oneof:"message"},{no:13,name:"simulate",kind:"message",T:Me,oneof:"message"},{no:14,name:"ping",kind:"scalar",T:3,oneof:"message"},{no:15,name:"update_metadata",kind:"message",T:ya,oneof:"message"},{no:16,name:"ping_req",kind:"message",T:Pa,oneof:"message"},{no:17,name:"update_audio_track",kind:"message",T:va,oneof:"message"},{no:18,name:"update_video_track",kind:"message",T:nl,oneof:"message"}]),jr=C.makeMessageType("livekit.SignalResponse",()=>[{no:1,name:"join",kind:"message",T:Xu,oneof:"message"},{no:2,name:"answer",kind:"message",T:st,oneof:"message"},{no:3,name:"offer",kind:"message",T:st,oneof:"message"},{no:4,name:"trickle",kind:"message",T:Zi,oneof:"message"},{no:5,name:"update",kind:"message",T:tl,oneof:"message"},{no:6,name:"track_published",kind:"message",T:tr,oneof:"message"},{no:8,name:"leave",kind:"message",T:Un,oneof:"message"},{no:9,name:"mute",kind:"message",T:er,oneof:"message"},{no:10,name:"speakers_changed",kind:"message",T:il,oneof:"message"},{no:11,name:"room_update",kind:"message",T:rl,oneof:"message"},{no:12,name:"connection_quality",kind:"message",T:al,oneof:"message"},{no:13,name:"stream_state_update",kind:"message",T:cl,oneof:"message"},{no:14,name:"subscribed_quality_update",kind:"message",T:ll,oneof:"message"},{no:15,name:"subscription_permission_update",kind:"message",T:dl,oneof:"message"},{no:16,name:"refresh_token",kind:"scalar",T:9,oneof:"message"},{no:17,name:"track_unpublished",kind:"message",T:el,oneof:"message"},{no:18,name:"pong",kind:"scalar",T:3,oneof:"message"},{no:19,name:"reconnect",kind:"message",T:Zu,oneof:"message"},{no:20,name:"pong_resp",kind:"message",T:hl,oneof:"message"},{no:21,name:"subscription_response",kind:"message",T:ml,oneof:"message"},{no:22,name:"request_response",kind:"message",T:gl,oneof:"message"},{no:23,name:"track_subscribed",kind:"message",T:vl,oneof:"message"}]),yi=C.makeMessageType("livekit.SimulcastCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"cid",kind:"scalar",T:9}]),ki=C.makeMessageType("livekit.AddTrackRequest",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:C.getEnumType(Pe)},{no:4,name:"width",kind:"scalar",T:13},{no:5,name:"height",kind:"scalar",T:13},{no:6,name:"muted",kind:"scalar",T:8},{no:7,name:"disable_dtx",kind:"scalar",T:8},{no:8,name:"source",kind:"enum",T:C.getEnumType(ae)},{no:9,name:"layers",kind:"message",T:nt,repeated:!0},{no:10,name:"simulcast_codecs",kind:"message",T:yi,repeated:!0},{no:11,name:"sid",kind:"scalar",T:9},{no:12,name:"stereo",kind:"scalar",T:8},{no:13,name:"disable_red",kind:"scalar",T:8},{no:14,name:"encryption",kind:"enum",T:C.getEnumType(me)},{no:15,name:"stream",kind:"scalar",T:9}]),Zi=C.makeMessageType("livekit.TrickleRequest",()=>[{no:1,name:"candidateInit",kind:"scalar",T:9},{no:2,name:"target",kind:"enum",T:C.getEnumType(we)},{no:3,name:"final",kind:"scalar",T:8}]),er=C.makeMessageType("livekit.MuteTrackRequest",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"muted",kind:"scalar",T:8}]),Xu=C.makeMessageType("livekit.JoinResponse",()=>[{no:1,name:"room",kind:"message",T:Xi},{no:2,name:"participant",kind:"message",T:qt},{no:3,name:"other_participants",kind:"message",T:qt,repeated:!0},{no:4,name:"server_version",kind:"scalar",T:9},{no:5,name:"ice_servers",kind:"message",T:ka,repeated:!0},{no:6,name:"subscriber_primary",kind:"scalar",T:8},{no:7,name:"alternative_url",kind:"scalar",T:9},{no:8,name:"client_configuration",kind:"message",T:pa},{no:9,name:"server_region",kind:"scalar",T:9},{no:10,name:"ping_timeout",kind:"scalar",T:5},{no:11,name:"ping_interval",kind:"scalar",T:5},{no:12,name:"server_info",kind:"message",T:Hu},{no:13,name:"sif_trailer",kind:"scalar",T:12},{no:14,name:"enabled_publish_codecs",kind:"message",T:En,repeated:!0},{no:15,name:"fast_publish",kind:"scalar",T:8}]),Zu=C.makeMessageType("livekit.ReconnectResponse",()=>[{no:1,name:"ice_servers",kind:"message",T:ka,repeated:!0},{no:2,name:"client_configuration",kind:"message",T:pa}]),tr=C.makeMessageType("livekit.TrackPublishedResponse",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"track",kind:"message",T:ft}]),el=C.makeMessageType("livekit.TrackUnpublishedResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]),st=C.makeMessageType("livekit.SessionDescription",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"sdp",kind:"scalar",T:9}]),tl=C.makeMessageType("livekit.ParticipantUpdate",()=>[{no:1,name:"participants",kind:"message",T:qt,repeated:!0}]),Ln=C.makeMessageType("livekit.UpdateSubscription",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:2,name:"subscribe",kind:"scalar",T:8},{no:3,name:"participant_tracks",kind:"message",T:da,repeated:!0}]),ga=C.makeMessageType("livekit.UpdateTrackSettings",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:3,name:"disabled",kind:"scalar",T:8},{no:4,name:"quality",kind:"enum",T:C.getEnumType(Yi)},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"fps",kind:"scalar",T:13},{no:8,name:"priority",kind:"scalar",T:13}]),va=C.makeMessageType("livekit.UpdateLocalAudioTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"features",kind:"enum",T:C.getEnumType(Oe),repeated:!0}]),nl=C.makeMessageType("livekit.UpdateLocalVideoTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13}]),Un=C.makeMessageType("livekit.LeaveRequest",()=>[{no:1,name:"can_reconnect",kind:"scalar",T:8},{no:2,name:"reason",kind:"enum",T:C.getEnumType(mt)},{no:3,name:"action",kind:"enum",T:C.getEnumType(gt)},{no:4,name:"regions",kind:"message",T:fl}]),gt=C.makeEnum("livekit.LeaveRequest.Action",[{no:0,name:"DISCONNECT"},{no:1,name:"RESUME"},{no:2,name:"RECONNECT"}]),ba=C.makeMessageType("livekit.UpdateVideoLayers",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"layers",kind:"message",T:nt,repeated:!0}]),ya=C.makeMessageType("livekit.UpdateParticipantMetadata",()=>[{no:1,name:"metadata",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:4,name:"request_id",kind:"scalar",T:13}]),ka=C.makeMessageType("livekit.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),il=C.makeMessageType("livekit.SpeakersChanged",()=>[{no:1,name:"speakers",kind:"message",T:ua,repeated:!0}]),rl=C.makeMessageType("livekit.RoomUpdate",()=>[{no:1,name:"room",kind:"message",T:Xi}]),sl=C.makeMessageType("livekit.ConnectionQualityInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"quality",kind:"enum",T:C.getEnumType(At)},{no:3,name:"score",kind:"scalar",T:2}]),al=C.makeMessageType("livekit.ConnectionQualityUpdate",()=>[{no:1,name:"updates",kind:"message",T:sl,repeated:!0}]),ol=C.makeMessageType("livekit.StreamStateInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:C.getEnumType(bi)}]),cl=C.makeMessageType("livekit.StreamStateUpdate",()=>[{no:1,name:"stream_states",kind:"message",T:ol,repeated:!0}]),nr=C.makeMessageType("livekit.SubscribedQuality",()=>[{no:1,name:"quality",kind:"enum",T:C.getEnumType(Yi)},{no:2,name:"enabled",kind:"scalar",T:8}]),ul=C.makeMessageType("livekit.SubscribedCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"qualities",kind:"message",T:nr,repeated:!0}]),ll=C.makeMessageType("livekit.SubscribedQualityUpdate",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribed_qualities",kind:"message",T:nr,repeated:!0},{no:3,name:"subscribed_codecs",kind:"message",T:ul,repeated:!0}]),Sa=C.makeMessageType("livekit.TrackPermission",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"all_tracks",kind:"scalar",T:8},{no:3,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:4,name:"participant_identity",kind:"scalar",T:9}]),Ca=C.makeMessageType("livekit.SubscriptionPermission",()=>[{no:1,name:"all_participants",kind:"scalar",T:8},{no:2,name:"track_permissions",kind:"message",T:Sa,repeated:!0}]),dl=C.makeMessageType("livekit.SubscriptionPermissionUpdate",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"allowed",kind:"scalar",T:8}]),Ta=C.makeMessageType("livekit.SyncState",()=>[{no:1,name:"answer",kind:"message",T:st},{no:2,name:"subscription",kind:"message",T:Ln},{no:3,name:"publish_tracks",kind:"message",T:tr,repeated:!0},{no:4,name:"data_channels",kind:"message",T:Ea,repeated:!0},{no:5,name:"offer",kind:"message",T:st},{no:6,name:"track_sids_disabled",kind:"scalar",T:9,repeated:!0}]),Ea=C.makeMessageType("livekit.DataChannelInfo",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:13},{no:3,name:"target",kind:"enum",T:C.getEnumType(we)}]),Me=C.makeMessageType("livekit.SimulateScenario",()=>[{no:1,name:"speaker_update",kind:"scalar",T:5,oneof:"scenario"},{no:2,name:"node_failure",kind:"scalar",T:8,oneof:"scenario"},{no:3,name:"migration",kind:"scalar",T:8,oneof:"scenario"},{no:4,name:"server_leave",kind:"scalar",T:8,oneof:"scenario"},{no:5,name:"switch_candidate_protocol",kind:"enum",T:C.getEnumType(Qu),oneof:"scenario"},{no:6,name:"subscriber_bandwidth",kind:"scalar",T:3,oneof:"scenario"},{no:7,name:"disconnect_signal_on_resume",kind:"scalar",T:8,oneof:"scenario"},{no:8,name:"disconnect_signal_on_resume_no_messages",kind:"scalar",T:8,oneof:"scenario"},{no:9,name:"leave_request_full_reconnect",kind:"scalar",T:8,oneof:"scenario"}]),Pa=C.makeMessageType("livekit.Ping",()=>[{no:1,name:"timestamp",kind:"scalar",T:3},{no:2,name:"rtt",kind:"scalar",T:3}]),hl=C.makeMessageType("livekit.Pong",()=>[{no:1,name:"last_ping_timestamp",kind:"scalar",T:3},{no:2,name:"timestamp",kind:"scalar",T:3}]),fl=C.makeMessageType("livekit.RegionSettings",()=>[{no:1,name:"regions",kind:"message",T:pl,repeated:!0}]),pl=C.makeMessageType("livekit.RegionInfo",()=>[{no:1,name:"region",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"distance",kind:"scalar",T:3}]),ml=C.makeMessageType("livekit.SubscriptionResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"err",kind:"enum",T:C.getEnumType(Vu)}]),gl=C.makeMessageType("livekit.RequestResponse",()=>[{no:1,name:"request_id",kind:"scalar",T:13},{no:2,name:"reason",kind:"enum",T:C.getEnumType(wa)},{no:3,name:"message",kind:"scalar",T:9}]),wa=C.makeEnum("livekit.RequestResponse.Reason",[{no:0,name:"OK"},{no:1,name:"NOT_FOUND"},{no:2,name:"NOT_ALLOWED"},{no:3,name:"LIMIT_EXCEEDED"}]),vl=C.makeMessageType("livekit.TrackSubscribed",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]);var bl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _a={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(bl,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],s={},a=null;function o(b,v){var m=b[v];if(typeof m.bind=="function")return m.bind(b);try{return Function.prototype.bind.call(m,b)}catch{return function(){return Function.prototype.apply.apply(m,[b,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(b){return b==="debug"&&(b="log"),typeof console===n?!1:b==="trace"&&i?c:console[b]!==void 0?o(console,b):console.log!==void 0?o(console,"log"):e}function l(){for(var b=this.getLevel(),v=0;v<r.length;v++){var m=r[v];this[m]=v<b?e:this.methodFactory(m,b,this.name)}if(this.log=this.debug,typeof console===n&&b<this.levels.SILENT)return"No console available for logging"}function h(b){return function(){typeof console!==n&&(l.call(this),this[b].apply(this,arguments))}}function f(b,v,m){return u(b)||h.apply(this,arguments)}function p(b,v){var m=this,E,O,I,w="loglevel";typeof b=="string"?w+=":"+b:typeof b=="symbol"&&(w=void 0);function M(N){var V=(r[N]||"silent").toUpperCase();if(!(typeof window===n||!w)){try{window.localStorage[w]=V;return}catch{}try{window.document.cookie=encodeURIComponent(w)+"="+V+";"}catch{}}}function D(){var N;if(!(typeof window===n||!w)){try{N=window.localStorage[w]}catch{}if(typeof N===n)try{var V=window.document.cookie,Ce=encodeURIComponent(w),et=V.indexOf(Ce+"=");et!==-1&&(N=/^([^;]+)/.exec(V.slice(et+Ce.length+1))[1])}catch{}return m.levels[N]===void 0&&(N=void 0),N}}function A(){if(!(typeof window===n||!w)){try{window.localStorage.removeItem(w)}catch{}try{window.document.cookie=encodeURIComponent(w)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function L(N){var V=N;if(typeof V=="string"&&m.levels[V.toUpperCase()]!==void 0&&(V=m.levels[V.toUpperCase()]),typeof V=="number"&&V>=0&&V<=m.levels.SILENT)return V;throw new TypeError("log.setLevel() called with invalid level: "+N)}m.name=b,m.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},m.methodFactory=v||f,m.getLevel=function(){return I??O??E},m.setLevel=function(N,V){return I=L(N),V!==!1&&M(I),l.call(m)},m.setDefaultLevel=function(N){O=L(N),D()||m.setLevel(N,!1)},m.resetLevel=function(){I=null,A(),l.call(m)},m.enableAll=function(N){m.setLevel(m.levels.TRACE,N)},m.disableAll=function(N){m.setLevel(m.levels.SILENT,N)},m.rebuild=function(){if(a!==m&&(E=L(a.getLevel())),l.call(m),a===m)for(var N in s)s[N].rebuild()},E=L(a?a.getLevel():"WARN");var Se=D();Se!=null&&(I=L(Se)),l.call(m)}a=new p,a.getLogger=function(v){if(typeof v!="symbol"&&typeof v!="string"||v==="")throw new TypeError("You must supply a name when creating a logger.");var m=s[v];return m||(m=s[v]=new p(v,a.methodFactory)),m};var g=typeof window!==n?window.log:void 0;return a.noConflict=function(){return typeof window!==n&&window.log===a&&(window.log=g),a},a.getLoggers=function(){return s},a.default=a,a})})(_a);var Fn=_a.exports,Si;(function(t){t[t.trace=0]="trace",t[t.debug=1]="debug",t[t.info=2]="info",t[t.warn=3]="warn",t[t.error=4]="error",t[t.silent=5]="silent"})(Si||(Si={}));var _e;(function(t){t.Default="livekit",t.Room="livekit-room",t.Participant="livekit-participant",t.Track="livekit-track",t.Publication="livekit-track-publication",t.Engine="livekit-engine",t.Signal="livekit-signal",t.PCManager="livekit-pc-manager",t.PCTransport="livekit-pc-transport",t.E2EE="lk-e2ee"})(_e||(_e={}));let j=Fn.getLogger("livekit");Object.values(_e).map(t=>Fn.getLogger(t));j.setDefaultLevel(Si.info);function Be(t){const e=Fn.getLogger(t);return e.setDefaultLevel(j.getLevel()),e}const kl=Fn.getLogger("lk-e2ee"),Rt=7e3,Sl=[0,300,2*2*300,3*3*300,4*4*300,Rt,Rt,Rt,Rt,Rt];class Cl{constructor(e){this._retryDelays=e!==void 0?[...e]:Sl}nextRetryDelayInMs(e){if(e.retryCount>=this._retryDelays.length)return null;const n=this._retryDelays[e.retryCount];return e.retryCount<=1?n:n+Math.random()*1e3}}function y(t,e,n,i){function r(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{u(i.next(l))}catch(h){a(h)}}function c(l){try{u(i.throw(l))}catch(h){a(h)}}function u(l){l.done?s(l.value):r(l.value).then(o,c)}u((i=i.apply(t,e||[])).next())})}function Vr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ht(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Vr=="function"?Vr(t):t[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(s){n[s]=t[s]&&function(a){return new Promise(function(o,c){a=t[s](a),r(o,c,a.done,a.value)})}}function r(s,a,o,c){Promise.resolve(c).then(function(u){s({value:u,done:o})},a)}}var ir={exports:{}},vt=typeof Reflect=="object"?Reflect:null,Br=vt&&typeof vt.apply=="function"?vt.apply:function(e,n,i){return Function.prototype.apply.call(e,n,i)},dn;vt&&typeof vt.ownKeys=="function"?dn=vt.ownKeys:Object.getOwnPropertySymbols?dn=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:dn=function(e){return Object.getOwnPropertyNames(e)};function Tl(t){console&&console.warn&&console.warn(t)}var Ra=Number.isNaN||function(e){return e!==e};function q(){q.init.call(this)}ir.exports=q;ir.exports.once=_l;q.EventEmitter=q;q.prototype._events=void 0;q.prototype._eventsCount=0;q.prototype._maxListeners=void 0;var qr=10;function jn(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(q,"defaultMaxListeners",{enumerable:!0,get:function(){return qr},set:function(t){if(typeof t!="number"||t<0||Ra(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");qr=t}});q.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};q.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Ra(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Ia(t){return t._maxListeners===void 0?q.defaultMaxListeners:t._maxListeners}q.prototype.getMaxListeners=function(){return Ia(this)};q.prototype.emit=function(e){for(var n=[],i=1;i<arguments.length;i++)n.push(arguments[i]);var r=e==="error",s=this._events;if(s!==void 0)r=r&&s.error===void 0;else if(!r)return!1;if(r){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var c=s[e];if(c===void 0)return!1;if(typeof c=="function")Br(c,this,n);else for(var u=c.length,l=Aa(c,u),i=0;i<u;++i)Br(l[i],this,n);return!0};function Ma(t,e,n,i){var r,s,a;if(jn(n),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),s=t._events),a=s[e]),a===void 0)a=s[e]=n,++t._eventsCount;else if(typeof a=="function"?a=s[e]=i?[n,a]:[a,n]:i?a.unshift(n):a.push(n),r=Ia(t),r>0&&a.length>r&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=t,o.type=e,o.count=a.length,Tl(o)}return t}q.prototype.addListener=function(e,n){return Ma(this,e,n,!1)};q.prototype.on=q.prototype.addListener;q.prototype.prependListener=function(e,n){return Ma(this,e,n,!0)};function El(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function xa(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},r=El.bind(i);return r.listener=n,i.wrapFn=r,r}q.prototype.once=function(e,n){return jn(n),this.on(e,xa(this,e,n)),this};q.prototype.prependOnceListener=function(e,n){return jn(n),this.prependListener(e,xa(this,e,n)),this};q.prototype.removeListener=function(e,n){var i,r,s,a,o;if(jn(n),r=this._events,r===void 0)return this;if(i=r[e],i===void 0)return this;if(i===n||i.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||n));else if(typeof i!="function"){for(s=-1,a=i.length-1;a>=0;a--)if(i[a]===n||i[a].listener===n){o=i[a].listener,s=a;break}if(s<0)return this;s===0?i.shift():Pl(i,s),i.length===1&&(r[e]=i[0]),r.removeListener!==void 0&&this.emit("removeListener",e,o||n)}return this};q.prototype.off=q.prototype.removeListener;q.prototype.removeAllListeners=function(e){var n,i,r;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var s=Object.keys(i),a;for(r=0;r<s.length;++r)a=s[r],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=i[e],typeof n=="function")this.removeListener(e,n);else if(n!==void 0)for(r=n.length-1;r>=0;r--)this.removeListener(e,n[r]);return this};function Oa(t,e,n){var i=t._events;if(i===void 0)return[];var r=i[e];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?wl(r):Aa(r,r.length)}q.prototype.listeners=function(e){return Oa(this,e,!0)};q.prototype.rawListeners=function(e){return Oa(this,e,!1)};q.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Da.call(t,e)};q.prototype.listenerCount=Da;function Da(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}q.prototype.eventNames=function(){return this._eventsCount>0?dn(this._events):[]};function Aa(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}function Pl(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function wl(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function _l(t,e){return new Promise(function(n,i){function r(a){t.removeListener(e,s),i(a)}function s(){typeof t.removeListener=="function"&&t.removeListener("error",r),n([].slice.call(arguments))}Na(t,e,s,{once:!0}),e!=="error"&&Rl(t,r,{once:!0})})}function Rl(t,e,n){typeof t.on=="function"&&Na(t,"error",e,n)}function Na(t,e,n,i){if(typeof t.on=="function")i.once?t.once(e,n):t.on(e,n);else if(typeof t.addEventListener=="function")t.addEventListener(e,function r(s){i.once&&t.removeEventListener(e,r),n(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Ne=ir.exports;let La=!0,Ua=!0;function hn(t,e,n){const i=t.match(e);return i&&i.length>=n&&parseInt(i[n],10)}function ot(t,e,n){if(!t.RTCPeerConnection)return;const i=t.RTCPeerConnection.prototype,r=i.addEventListener;i.addEventListener=function(a,o){if(a!==e)return r.apply(this,arguments);const c=u=>{const l=n(u);l&&(o.handleEvent?o.handleEvent(l):o(l))};return this._eventMap=this._eventMap||{},this._eventMap[e]||(this._eventMap[e]=new Map),this._eventMap[e].set(o,c),r.apply(this,[a,c])};const s=i.removeEventListener;i.removeEventListener=function(a,o){if(a!==e||!this._eventMap||!this._eventMap[e])return s.apply(this,arguments);if(!this._eventMap[e].has(o))return s.apply(this,arguments);const c=this._eventMap[e].get(o);return this._eventMap[e].delete(o),this._eventMap[e].size===0&&delete this._eventMap[e],Object.keys(this._eventMap).length===0&&delete this._eventMap,s.apply(this,[a,c])},Object.defineProperty(i,"on"+e,{get(){return this["_on"+e]},set(a){this["_on"+e]&&(this.removeEventListener(e,this["_on"+e]),delete this["_on"+e]),a&&this.addEventListener(e,this["_on"+e]=a)},enumerable:!0,configurable:!0})}function Il(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(La=t,t?"adapter.js logging disabled":"adapter.js logging enabled")}function Ml(t){return typeof t!="boolean"?new Error("Argument type: "+typeof t+". Please use a boolean."):(Ua=!t,"adapter.js deprecation warnings "+(t?"disabled":"enabled"))}function Fa(){if(typeof window=="object"){if(La)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function rr(t,e){Ua&&console.warn(t+" is deprecated, please use "+e+" instead.")}function xl(t){const e={browser:null,version:null};if(typeof t>"u"||!t.navigator||!t.navigator.userAgent)return e.browser="Not a browser.",e;const{navigator:n}=t;if(n.userAgentData&&n.userAgentData.brands){const i=n.userAgentData.brands.find(r=>r.brand==="Chromium");if(i)return{browser:"chrome",version:parseInt(i.version,10)}}if(n.mozGetUserMedia)e.browser="firefox",e.version=hn(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||t.isSecureContext===!1&&t.webkitRTCPeerConnection)e.browser="chrome",e.version=hn(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))e.browser="safari",e.version=hn(n.userAgent,/AppleWebKit\/(\d+)\./,1),e.supportsUnifiedPlan=t.RTCRtpTransceiver&&"currentDirection"in t.RTCRtpTransceiver.prototype;else return e.browser="Not a supported browser.",e;return e}function Wr(t){return Object.prototype.toString.call(t)==="[object Object]"}function ja(t){return Wr(t)?Object.keys(t).reduce(function(e,n){const i=Wr(t[n]),r=i?ja(t[n]):t[n],s=i&&!Object.keys(r).length;return r===void 0||s?e:Object.assign(e,{[n]:r})},{}):t}function Ci(t,e,n){!e||n.has(e.id)||(n.set(e.id,e),Object.keys(e).forEach(i=>{i.endsWith("Id")?Ci(t,t.get(e[i]),n):i.endsWith("Ids")&&e[i].forEach(r=>{Ci(t,t.get(r),n)})}))}function Gr(t,e,n){const i=n?"outbound-rtp":"inbound-rtp",r=new Map;if(e===null)return r;const s=[];return t.forEach(a=>{a.type==="track"&&a.trackIdentifier===e.id&&s.push(a)}),s.forEach(a=>{t.forEach(o=>{o.type===i&&o.trackId===a.id&&Ci(t,o,r)})}),r}const Kr=Fa;function Va(t,e){const n=t&&t.navigator;if(!n.mediaDevices)return;const i=function(o){if(typeof o!="object"||o.mandatory||o.optional)return o;const c={};return Object.keys(o).forEach(u=>{if(u==="require"||u==="advanced"||u==="mediaSource")return;const l=typeof o[u]=="object"?o[u]:{ideal:o[u]};l.exact!==void 0&&typeof l.exact=="number"&&(l.min=l.max=l.exact);const h=function(f,p){return f?f+p.charAt(0).toUpperCase()+p.slice(1):p==="deviceId"?"sourceId":p};if(l.ideal!==void 0){c.optional=c.optional||[];let f={};typeof l.ideal=="number"?(f[h("min",u)]=l.ideal,c.optional.push(f),f={},f[h("max",u)]=l.ideal,c.optional.push(f)):(f[h("",u)]=l.ideal,c.optional.push(f))}l.exact!==void 0&&typeof l.exact!="number"?(c.mandatory=c.mandatory||{},c.mandatory[h("",u)]=l.exact):["min","max"].forEach(f=>{l[f]!==void 0&&(c.mandatory=c.mandatory||{},c.mandatory[h(f,u)]=l[f])})}),o.advanced&&(c.optional=(c.optional||[]).concat(o.advanced)),c},r=function(o,c){if(e.version>=61)return c(o);if(o=JSON.parse(JSON.stringify(o)),o&&typeof o.audio=="object"){const u=function(l,h,f){h in l&&!(f in l)&&(l[f]=l[h],delete l[h])};o=JSON.parse(JSON.stringify(o)),u(o.audio,"autoGainControl","googAutoGainControl"),u(o.audio,"noiseSuppression","googNoiseSuppression"),o.audio=i(o.audio)}if(o&&typeof o.video=="object"){let u=o.video.facingMode;u=u&&(typeof u=="object"?u:{ideal:u});const l=e.version<66;if(u&&(u.exact==="user"||u.exact==="environment"||u.ideal==="user"||u.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!l)){delete o.video.facingMode;let h;if(u.exact==="environment"||u.ideal==="environment"?h=["back","rear"]:(u.exact==="user"||u.ideal==="user")&&(h=["front"]),h)return n.mediaDevices.enumerateDevices().then(f=>{f=f.filter(g=>g.kind==="videoinput");let p=f.find(g=>h.some(b=>g.label.toLowerCase().includes(b)));return!p&&f.length&&h.includes("back")&&(p=f[f.length-1]),p&&(o.video.deviceId=u.exact?{exact:p.deviceId}:{ideal:p.deviceId}),o.video=i(o.video),Kr("chrome: "+JSON.stringify(o)),c(o)})}o.video=i(o.video)}return Kr("chrome: "+JSON.stringify(o)),c(o)},s=function(o){return e.version>=64?o:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[o.name]||o.name,message:o.message,constraint:o.constraint||o.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},a=function(o,c,u){r(o,l=>{n.webkitGetUserMedia(l,c,h=>{u&&u(s(h))})})};if(n.getUserMedia=a.bind(n),n.mediaDevices.getUserMedia){const o=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(c){return r(c,u=>o(u).then(l=>{if(u.audio&&!l.getAudioTracks().length||u.video&&!l.getVideoTracks().length)throw l.getTracks().forEach(h=>{h.stop()}),new DOMException("","NotFoundError");return l},l=>Promise.reject(s(l))))}}}function Ba(t){t.MediaStream=t.MediaStream||t.webkitMediaStream}function qa(t){if(typeof t=="object"&&t.RTCPeerConnection&&!("ontrack"in t.RTCPeerConnection.prototype)){Object.defineProperty(t.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(n){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=n)},enumerable:!0,configurable:!0});const e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=i=>{i.stream.addEventListener("addtrack",r=>{let s;t.RTCPeerConnection.prototype.getReceivers?s=this.getReceivers().find(o=>o.track&&o.track.id===r.track.id):s={track:r.track};const a=new Event("track");a.track=r.track,a.receiver=s,a.transceiver={receiver:s},a.streams=[i.stream],this.dispatchEvent(a)}),i.stream.getTracks().forEach(r=>{let s;t.RTCPeerConnection.prototype.getReceivers?s=this.getReceivers().find(o=>o.track&&o.track.id===r.id):s={track:r};const a=new Event("track");a.track=r,a.receiver=s,a.transceiver={receiver:s},a.streams=[i.stream],this.dispatchEvent(a)})},this.addEventListener("addstream",this._ontrackpoly)),e.apply(this,arguments)}}else ot(t,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function Wa(t){if(typeof t=="object"&&t.RTCPeerConnection&&!("getSenders"in t.RTCPeerConnection.prototype)&&"createDTMFSender"in t.RTCPeerConnection.prototype){const e=function(r,s){return{track:s,get dtmf(){return this._dtmf===void 0&&(s.kind==="audio"?this._dtmf=r.createDTMFSender(s):this._dtmf=null),this._dtmf},_pc:r}};if(!t.RTCPeerConnection.prototype.getSenders){t.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const r=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(o,c){let u=r.apply(this,arguments);return u||(u=e(this,o),this._senders.push(u)),u};const s=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(o){s.apply(this,arguments);const c=this._senders.indexOf(o);c!==-1&&this._senders.splice(c,1)}}const n=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(s){this._senders=this._senders||[],n.apply(this,[s]),s.getTracks().forEach(a=>{this._senders.push(e(this,a))})};const i=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(s){this._senders=this._senders||[],i.apply(this,[s]),s.getTracks().forEach(a=>{const o=this._senders.find(c=>c.track===a);o&&this._senders.splice(this._senders.indexOf(o),1)})}}else if(typeof t=="object"&&t.RTCPeerConnection&&"getSenders"in t.RTCPeerConnection.prototype&&"createDTMFSender"in t.RTCPeerConnection.prototype&&t.RTCRtpSender&&!("dtmf"in t.RTCRtpSender.prototype)){const e=t.RTCPeerConnection.prototype.getSenders;t.RTCPeerConnection.prototype.getSenders=function(){const i=e.apply(this,[]);return i.forEach(r=>r._pc=this),i},Object.defineProperty(t.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Ga(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender&&t.RTCRtpReceiver))return;if(!("getStats"in t.RTCRtpSender.prototype)){const n=t.RTCPeerConnection.prototype.getSenders;n&&(t.RTCPeerConnection.prototype.getSenders=function(){const s=n.apply(this,[]);return s.forEach(a=>a._pc=this),s});const i=t.RTCPeerConnection.prototype.addTrack;i&&(t.RTCPeerConnection.prototype.addTrack=function(){const s=i.apply(this,arguments);return s._pc=this,s}),t.RTCRtpSender.prototype.getStats=function(){const s=this;return this._pc.getStats().then(a=>Gr(a,s.track,!0))}}if(!("getStats"in t.RTCRtpReceiver.prototype)){const n=t.RTCPeerConnection.prototype.getReceivers;n&&(t.RTCPeerConnection.prototype.getReceivers=function(){const r=n.apply(this,[]);return r.forEach(s=>s._pc=this),r}),ot(t,"track",i=>(i.receiver._pc=i.srcElement,i)),t.RTCRtpReceiver.prototype.getStats=function(){const r=this;return this._pc.getStats().then(s=>Gr(s,r.track,!1))}}if(!("getStats"in t.RTCRtpSender.prototype&&"getStats"in t.RTCRtpReceiver.prototype))return;const e=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof t.MediaStreamTrack){const i=arguments[0];let r,s,a;return this.getSenders().forEach(o=>{o.track===i&&(r?a=!0:r=o)}),this.getReceivers().forEach(o=>(o.track===i&&(s?a=!0:s=o),o.track===i)),a||r&&s?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):r?r.getStats():s?s.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return e.apply(this,arguments)}}function Ka(t){t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(a=>this._shimmedLocalStreams[a][0])};const e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(a,o){if(!o)return e.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const c=e.apply(this,arguments);return this._shimmedLocalStreams[o.id]?this._shimmedLocalStreams[o.id].indexOf(c)===-1&&this._shimmedLocalStreams[o.id].push(c):this._shimmedLocalStreams[o.id]=[o,c],c};const n=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(a){this._shimmedLocalStreams=this._shimmedLocalStreams||{},a.getTracks().forEach(u=>{if(this.getSenders().find(h=>h.track===u))throw new DOMException("Track already exists.","InvalidAccessError")});const o=this.getSenders();n.apply(this,arguments);const c=this.getSenders().filter(u=>o.indexOf(u)===-1);this._shimmedLocalStreams[a.id]=[a].concat(c)};const i=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[a.id],i.apply(this,arguments)};const r=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},a&&Object.keys(this._shimmedLocalStreams).forEach(o=>{const c=this._shimmedLocalStreams[o].indexOf(a);c!==-1&&this._shimmedLocalStreams[o].splice(c,1),this._shimmedLocalStreams[o].length===1&&delete this._shimmedLocalStreams[o]}),r.apply(this,arguments)}}function za(t,e){if(!t.RTCPeerConnection)return;if(t.RTCPeerConnection.prototype.addTrack&&e.version>=65)return Ka(t);const n=t.RTCPeerConnection.prototype.getLocalStreams;t.RTCPeerConnection.prototype.getLocalStreams=function(){const l=n.apply(this);return this._reverseStreams=this._reverseStreams||{},l.map(h=>this._reverseStreams[h.id])};const i=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(l){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},l.getTracks().forEach(h=>{if(this.getSenders().find(p=>p.track===h))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[l.id]){const h=new t.MediaStream(l.getTracks());this._streams[l.id]=h,this._reverseStreams[h.id]=l,l=h}i.apply(this,[l])};const r=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(l){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},r.apply(this,[this._streams[l.id]||l]),delete this._reverseStreams[this._streams[l.id]?this._streams[l.id].id:l.id],delete this._streams[l.id]},t.RTCPeerConnection.prototype.addTrack=function(l,h){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const f=[].slice.call(arguments,1);if(f.length!==1||!f[0].getTracks().find(b=>b===l))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(b=>b.track===l))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const g=this._streams[h.id];if(g)g.addTrack(l),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const b=new t.MediaStream([l]);this._streams[h.id]=b,this._reverseStreams[b.id]=h,this.addStream(b)}return this.getSenders().find(b=>b.track===l)};function s(u,l){let h=l.sdp;return Object.keys(u._reverseStreams||[]).forEach(f=>{const p=u._reverseStreams[f],g=u._streams[p.id];h=h.replace(new RegExp(g.id,"g"),p.id)}),new RTCSessionDescription({type:l.type,sdp:h})}function a(u,l){let h=l.sdp;return Object.keys(u._reverseStreams||[]).forEach(f=>{const p=u._reverseStreams[f],g=u._streams[p.id];h=h.replace(new RegExp(p.id,"g"),g.id)}),new RTCSessionDescription({type:l.type,sdp:h})}["createOffer","createAnswer"].forEach(function(u){const l=t.RTCPeerConnection.prototype[u],h={[u](){const f=arguments;return arguments.length&&typeof arguments[0]=="function"?l.apply(this,[g=>{const b=s(this,g);f[0].apply(null,[b])},g=>{f[1]&&f[1].apply(null,g)},arguments[2]]):l.apply(this,arguments).then(g=>s(this,g))}};t.RTCPeerConnection.prototype[u]=h[u]});const o=t.RTCPeerConnection.prototype.setLocalDescription;t.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?o.apply(this,arguments):(arguments[0]=a(this,arguments[0]),o.apply(this,arguments))};const c=Object.getOwnPropertyDescriptor(t.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(t.RTCPeerConnection.prototype,"localDescription",{get(){const u=c.get.apply(this);return u.type===""?u:s(this,u)}}),t.RTCPeerConnection.prototype.removeTrack=function(l){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!l._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(l._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let f;Object.keys(this._streams).forEach(p=>{this._streams[p].getTracks().find(b=>l.track===b)&&(f=this._streams[p])}),f&&(f.getTracks().length===1?this.removeStream(this._reverseStreams[f.id]):f.removeTrack(l.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Ti(t,e){!t.RTCPeerConnection&&t.webkitRTCPeerConnection&&(t.RTCPeerConnection=t.webkitRTCPeerConnection),t.RTCPeerConnection&&e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){const i=t.RTCPeerConnection.prototype[n],r={[n](){return arguments[0]=new(n==="addIceCandidate"?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),i.apply(this,arguments)}};t.RTCPeerConnection.prototype[n]=r[n]})}function Ha(t,e){ot(t,"negotiationneeded",n=>{const i=n.target;if(!((e.version<72||i.getConfiguration&&i.getConfiguration().sdpSemantics==="plan-b")&&i.signalingState!=="stable"))return n})}var zr=Object.freeze({__proto__:null,fixNegotiationNeeded:Ha,shimAddTrackRemoveTrack:za,shimAddTrackRemoveTrackWithNative:Ka,shimGetSendersWithDtmf:Wa,shimGetUserMedia:Va,shimMediaStream:Ba,shimOnTrack:qa,shimPeerConnection:Ti,shimSenderReceiverGetStats:Ga});function Ja(t,e){const n=t&&t.navigator,i=t&&t.MediaStreamTrack;if(n.getUserMedia=function(r,s,a){rr("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(r).then(s,a)},!(e.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const r=function(a,o,c){o in a&&!(c in a)&&(a[c]=a[o],delete a[o])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(a){return typeof a=="object"&&typeof a.audio=="object"&&(a=JSON.parse(JSON.stringify(a)),r(a.audio,"autoGainControl","mozAutoGainControl"),r(a.audio,"noiseSuppression","mozNoiseSuppression")),s(a)},i&&i.prototype.getSettings){const a=i.prototype.getSettings;i.prototype.getSettings=function(){const o=a.apply(this,arguments);return r(o,"mozAutoGainControl","autoGainControl"),r(o,"mozNoiseSuppression","noiseSuppression"),o}}if(i&&i.prototype.applyConstraints){const a=i.prototype.applyConstraints;i.prototype.applyConstraints=function(o){return this.kind==="audio"&&typeof o=="object"&&(o=JSON.parse(JSON.stringify(o)),r(o,"autoGainControl","mozAutoGainControl"),r(o,"noiseSuppression","mozNoiseSuppression")),a.apply(this,[o])}}}}function Ol(t,e){t.navigator.mediaDevices&&"getDisplayMedia"in t.navigator.mediaDevices||t.navigator.mediaDevices&&(t.navigator.mediaDevices.getDisplayMedia=function(i){if(!(i&&i.video)){const r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return i.video===!0?i.video={mediaSource:e}:i.video.mediaSource=e,t.navigator.mediaDevices.getUserMedia(i)})}function $a(t){typeof t=="object"&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Ei(t,e){if(typeof t!="object"||!(t.RTCPeerConnection||t.mozRTCPeerConnection))return;!t.RTCPeerConnection&&t.mozRTCPeerConnection&&(t.RTCPeerConnection=t.mozRTCPeerConnection),e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){const s=t.RTCPeerConnection.prototype[r],a={[r](){return arguments[0]=new(r==="addIceCandidate"?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),s.apply(this,arguments)}};t.RTCPeerConnection.prototype[r]=a[r]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},i=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(){const[s,a,o]=arguments;return i.apply(this,[s||null]).then(c=>{if(e.version<53&&!a)try{c.forEach(u=>{u.type=n[u.type]||u.type})}catch(u){if(u.name!=="TypeError")throw u;c.forEach((l,h)=>{c.set(h,Object.assign({},l,{type:n[l.type]||l.type}))})}return c}).then(a,o)}}function Qa(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender)||t.RTCRtpSender&&"getStats"in t.RTCRtpSender.prototype)return;const e=t.RTCPeerConnection.prototype.getSenders;e&&(t.RTCPeerConnection.prototype.getSenders=function(){const r=e.apply(this,[]);return r.forEach(s=>s._pc=this),r});const n=t.RTCPeerConnection.prototype.addTrack;n&&(t.RTCPeerConnection.prototype.addTrack=function(){const r=n.apply(this,arguments);return r._pc=this,r}),t.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function Ya(t){if(!(typeof t=="object"&&t.RTCPeerConnection&&t.RTCRtpSender)||t.RTCRtpSender&&"getStats"in t.RTCRtpReceiver.prototype)return;const e=t.RTCPeerConnection.prototype.getReceivers;e&&(t.RTCPeerConnection.prototype.getReceivers=function(){const i=e.apply(this,[]);return i.forEach(r=>r._pc=this),i}),ot(t,"track",n=>(n.receiver._pc=n.srcElement,n)),t.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function Xa(t){!t.RTCPeerConnection||"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){rr("removeStream","removeTrack"),this.getSenders().forEach(i=>{i.track&&n.getTracks().includes(i.track)&&this.removeTrack(i)})})}function Za(t){t.DataChannel&&!t.RTCDataChannel&&(t.RTCDataChannel=t.DataChannel)}function eo(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.addTransceiver;e&&(t.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let i=arguments[1]&&arguments[1].sendEncodings;i===void 0&&(i=[]),i=[...i];const r=i.length>0;r&&i.forEach(a=>{if("rid"in a&&!/^[a-z0-9]{0,16}$/i.test(a.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in a&&!(parseFloat(a.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in a&&!(parseFloat(a.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const s=e.apply(this,arguments);if(r){const{sender:a}=s,o=a.getParameters();(!("encodings"in o)||o.encodings.length===1&&Object.keys(o.encodings[0]).length===0)&&(o.encodings=i,a.sendEncodings=i,this.setParametersPromises.push(a.setParameters(o).then(()=>{delete a.sendEncodings}).catch(()=>{delete a.sendEncodings})))}return s})}function to(t){if(!(typeof t=="object"&&t.RTCRtpSender))return;const e=t.RTCRtpSender.prototype.getParameters;e&&(t.RTCRtpSender.prototype.getParameters=function(){const i=e.apply(this,arguments);return"encodings"in i||(i.encodings=[].concat(this.sendEncodings||[{}])),i})}function no(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>e.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):e.apply(this,arguments)}}function io(t){if(!(typeof t=="object"&&t.RTCPeerConnection))return;const e=t.RTCPeerConnection.prototype.createAnswer;t.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>e.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):e.apply(this,arguments)}}var Hr=Object.freeze({__proto__:null,shimAddTransceiver:eo,shimCreateAnswer:io,shimCreateOffer:no,shimGetDisplayMedia:Ol,shimGetParameters:to,shimGetUserMedia:Ja,shimOnTrack:$a,shimPeerConnection:Ei,shimRTCDataChannel:Za,shimReceiverGetStats:Ya,shimRemoveStream:Xa,shimSenderGetStats:Qa});function ro(t){if(!(typeof t!="object"||!t.RTCPeerConnection)){if("getLocalStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in t.RTCPeerConnection.prototype)){const e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addStream=function(i){this._localStreams||(this._localStreams=[]),this._localStreams.includes(i)||this._localStreams.push(i),i.getAudioTracks().forEach(r=>e.call(this,r,i)),i.getVideoTracks().forEach(r=>e.call(this,r,i))},t.RTCPeerConnection.prototype.addTrack=function(i){for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];return s&&s.forEach(o=>{this._localStreams?this._localStreams.includes(o)||this._localStreams.push(o):this._localStreams=[o]}),e.apply(this,arguments)}}"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(n){this._localStreams||(this._localStreams=[]);const i=this._localStreams.indexOf(n);if(i===-1)return;this._localStreams.splice(i,1);const r=n.getTracks();this.getSenders().forEach(s=>{r.includes(s.track)&&this.removeTrack(s)})})}}function so(t){if(!(typeof t!="object"||!t.RTCPeerConnection)&&("getRemoteStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in t.RTCPeerConnection.prototype))){Object.defineProperty(t.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(n){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=n),this.addEventListener("track",this._onaddstreampoly=i=>{i.streams.forEach(r=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(r))return;this._remoteStreams.push(r);const s=new Event("addstream");s.stream=r,this.dispatchEvent(s)})})}});const e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){const i=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(r){r.streams.forEach(s=>{if(i._remoteStreams||(i._remoteStreams=[]),i._remoteStreams.indexOf(s)>=0)return;i._remoteStreams.push(s);const a=new Event("addstream");a.stream=s,i.dispatchEvent(a)})}),e.apply(i,arguments)}}}function ao(t){if(typeof t!="object"||!t.RTCPeerConnection)return;const e=t.RTCPeerConnection.prototype,n=e.createOffer,i=e.createAnswer,r=e.setLocalDescription,s=e.setRemoteDescription,a=e.addIceCandidate;e.createOffer=function(u,l){const h=arguments.length>=2?arguments[2]:arguments[0],f=n.apply(this,[h]);return l?(f.then(u,l),Promise.resolve()):f},e.createAnswer=function(u,l){const h=arguments.length>=2?arguments[2]:arguments[0],f=i.apply(this,[h]);return l?(f.then(u,l),Promise.resolve()):f};let o=function(c,u,l){const h=r.apply(this,[c]);return l?(h.then(u,l),Promise.resolve()):h};e.setLocalDescription=o,o=function(c,u,l){const h=s.apply(this,[c]);return l?(h.then(u,l),Promise.resolve()):h},e.setRemoteDescription=o,o=function(c,u,l){const h=a.apply(this,[c]);return l?(h.then(u,l),Promise.resolve()):h},e.addIceCandidate=o}function oo(t){const e=t&&t.navigator;if(e.mediaDevices&&e.mediaDevices.getUserMedia){const n=e.mediaDevices,i=n.getUserMedia.bind(n);e.mediaDevices.getUserMedia=r=>i(co(r))}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=(function(i,r,s){e.mediaDevices.getUserMedia(i).then(r,s)}).bind(e))}function co(t){return t&&t.video!==void 0?Object.assign({},t,{video:ja(t.video)}):t}function uo(t){if(!t.RTCPeerConnection)return;const e=t.RTCPeerConnection;t.RTCPeerConnection=function(i,r){if(i&&i.iceServers){const s=[];for(let a=0;a<i.iceServers.length;a++){let o=i.iceServers[a];o.urls===void 0&&o.url?(rr("RTCIceServer.url","RTCIceServer.urls"),o=JSON.parse(JSON.stringify(o)),o.urls=o.url,delete o.url,s.push(o)):s.push(i.iceServers[a])}i.iceServers=s}return new e(i,r)},t.RTCPeerConnection.prototype=e.prototype,"generateCertificate"in e&&Object.defineProperty(t.RTCPeerConnection,"generateCertificate",{get(){return e.generateCertificate}})}function lo(t){typeof t=="object"&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function ho(t){const e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(i){if(i){typeof i.offerToReceiveAudio<"u"&&(i.offerToReceiveAudio=!!i.offerToReceiveAudio);const r=this.getTransceivers().find(a=>a.receiver.track.kind==="audio");i.offerToReceiveAudio===!1&&r?r.direction==="sendrecv"?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":r.direction==="recvonly"&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):i.offerToReceiveAudio===!0&&!r&&this.addTransceiver("audio",{direction:"recvonly"}),typeof i.offerToReceiveVideo<"u"&&(i.offerToReceiveVideo=!!i.offerToReceiveVideo);const s=this.getTransceivers().find(a=>a.receiver.track.kind==="video");i.offerToReceiveVideo===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):i.offerToReceiveVideo===!0&&!s&&this.addTransceiver("video",{direction:"recvonly"})}return e.apply(this,arguments)}}function fo(t){typeof t!="object"||t.AudioContext||(t.AudioContext=t.webkitAudioContext)}var Jr=Object.freeze({__proto__:null,shimAudioContext:fo,shimCallbacksAPI:ao,shimConstraints:co,shimCreateOfferLegacy:ho,shimGetUserMedia:oo,shimLocalStreamsAPI:ro,shimRTCIceServerUrls:uo,shimRemoteStreamsAPI:so,shimTrackEventTransceiver:lo}),po={exports:{}};(function(t){const e={};e.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},e.localCName=e.generateIdentifier(),e.splitLines=function(n){return n.trim().split(` +`).map(i=>i.trim())},e.splitSections=function(n){return n.split(` +m=`).map((r,s)=>(s>0?"m="+r:r).trim()+`\r +`)},e.getDescription=function(n){const i=e.splitSections(n);return i&&i[0]},e.getMediaSections=function(n){const i=e.splitSections(n);return i.shift(),i},e.matchPrefix=function(n,i){return e.splitLines(n).filter(r=>r.indexOf(i)===0)},e.parseCandidate=function(n){let i;n.indexOf("a=candidate:")===0?i=n.substring(12).split(" "):i=n.substring(10).split(" ");const r={foundation:i[0],component:{1:"rtp",2:"rtcp"}[i[1]]||i[1],protocol:i[2].toLowerCase(),priority:parseInt(i[3],10),ip:i[4],address:i[4],port:parseInt(i[5],10),type:i[7]};for(let s=8;s<i.length;s+=2)switch(i[s]){case"raddr":r.relatedAddress=i[s+1];break;case"rport":r.relatedPort=parseInt(i[s+1],10);break;case"tcptype":r.tcpType=i[s+1];break;case"ufrag":r.ufrag=i[s+1],r.usernameFragment=i[s+1];break;default:r[i[s]]===void 0&&(r[i[s]]=i[s+1]);break}return r},e.writeCandidate=function(n){const i=[];i.push(n.foundation);const r=n.component;r==="rtp"?i.push(1):r==="rtcp"?i.push(2):i.push(r),i.push(n.protocol.toUpperCase()),i.push(n.priority),i.push(n.address||n.ip),i.push(n.port);const s=n.type;return i.push("typ"),i.push(s),s!=="host"&&n.relatedAddress&&n.relatedPort&&(i.push("raddr"),i.push(n.relatedAddress),i.push("rport"),i.push(n.relatedPort)),n.tcpType&&n.protocol.toLowerCase()==="tcp"&&(i.push("tcptype"),i.push(n.tcpType)),(n.usernameFragment||n.ufrag)&&(i.push("ufrag"),i.push(n.usernameFragment||n.ufrag)),"candidate:"+i.join(" ")},e.parseIceOptions=function(n){return n.substring(14).split(" ")},e.parseRtpMap=function(n){let i=n.substring(9).split(" ");const r={payloadType:parseInt(i.shift(),10)};return i=i[0].split("/"),r.name=i[0],r.clockRate=parseInt(i[1],10),r.channels=i.length===3?parseInt(i[2],10):1,r.numChannels=r.channels,r},e.writeRtpMap=function(n){let i=n.payloadType;n.preferredPayloadType!==void 0&&(i=n.preferredPayloadType);const r=n.channels||n.numChannels||1;return"a=rtpmap:"+i+" "+n.name+"/"+n.clockRate+(r!==1?"/"+r:"")+`\r +`},e.parseExtmap=function(n){const i=n.substring(9).split(" ");return{id:parseInt(i[0],10),direction:i[0].indexOf("/")>0?i[0].split("/")[1]:"sendrecv",uri:i[1],attributes:i.slice(2).join(" ")}},e.writeExtmap=function(n){return"a=extmap:"+(n.id||n.preferredId)+(n.direction&&n.direction!=="sendrecv"?"/"+n.direction:"")+" "+n.uri+(n.attributes?" "+n.attributes:"")+`\r +`},e.parseFmtp=function(n){const i={};let r;const s=n.substring(n.indexOf(" ")+1).split(";");for(let a=0;a<s.length;a++)r=s[a].trim().split("="),i[r[0].trim()]=r[1];return i},e.writeFmtp=function(n){let i="",r=n.payloadType;if(n.preferredPayloadType!==void 0&&(r=n.preferredPayloadType),n.parameters&&Object.keys(n.parameters).length){const s=[];Object.keys(n.parameters).forEach(a=>{n.parameters[a]!==void 0?s.push(a+"="+n.parameters[a]):s.push(a)}),i+="a=fmtp:"+r+" "+s.join(";")+`\r +`}return i},e.parseRtcpFb=function(n){const i=n.substring(n.indexOf(" ")+1).split(" ");return{type:i.shift(),parameter:i.join(" ")}},e.writeRtcpFb=function(n){let i="",r=n.payloadType;return n.preferredPayloadType!==void 0&&(r=n.preferredPayloadType),n.rtcpFeedback&&n.rtcpFeedback.length&&n.rtcpFeedback.forEach(s=>{i+="a=rtcp-fb:"+r+" "+s.type+(s.parameter&&s.parameter.length?" "+s.parameter:"")+`\r +`}),i},e.parseSsrcMedia=function(n){const i=n.indexOf(" "),r={ssrc:parseInt(n.substring(7,i),10)},s=n.indexOf(":",i);return s>-1?(r.attribute=n.substring(i+1,s),r.value=n.substring(s+1)):r.attribute=n.substring(i+1),r},e.parseSsrcGroup=function(n){const i=n.substring(13).split(" ");return{semantics:i.shift(),ssrcs:i.map(r=>parseInt(r,10))}},e.getMid=function(n){const i=e.matchPrefix(n,"a=mid:")[0];if(i)return i.substring(6)},e.parseFingerprint=function(n){const i=n.substring(14).split(" ");return{algorithm:i[0].toLowerCase(),value:i[1].toUpperCase()}},e.getDtlsParameters=function(n,i){return{role:"auto",fingerprints:e.matchPrefix(n+i,"a=fingerprint:").map(e.parseFingerprint)}},e.writeDtlsParameters=function(n,i){let r="a=setup:"+i+`\r +`;return n.fingerprints.forEach(s=>{r+="a=fingerprint:"+s.algorithm+" "+s.value+`\r +`}),r},e.parseCryptoLine=function(n){const i=n.substring(9).split(" ");return{tag:parseInt(i[0],10),cryptoSuite:i[1],keyParams:i[2],sessionParams:i.slice(3)}},e.writeCryptoLine=function(n){return"a=crypto:"+n.tag+" "+n.cryptoSuite+" "+(typeof n.keyParams=="object"?e.writeCryptoKeyParams(n.keyParams):n.keyParams)+(n.sessionParams?" "+n.sessionParams.join(" "):"")+`\r +`},e.parseCryptoKeyParams=function(n){if(n.indexOf("inline:")!==0)return null;const i=n.substring(7).split("|");return{keyMethod:"inline",keySalt:i[0],lifeTime:i[1],mkiValue:i[2]?i[2].split(":")[0]:void 0,mkiLength:i[2]?i[2].split(":")[1]:void 0}},e.writeCryptoKeyParams=function(n){return n.keyMethod+":"+n.keySalt+(n.lifeTime?"|"+n.lifeTime:"")+(n.mkiValue&&n.mkiLength?"|"+n.mkiValue+":"+n.mkiLength:"")},e.getCryptoParameters=function(n,i){return e.matchPrefix(n+i,"a=crypto:").map(e.parseCryptoLine)},e.getIceParameters=function(n,i){const r=e.matchPrefix(n+i,"a=ice-ufrag:")[0],s=e.matchPrefix(n+i,"a=ice-pwd:")[0];return r&&s?{usernameFragment:r.substring(12),password:s.substring(10)}:null},e.writeIceParameters=function(n){let i="a=ice-ufrag:"+n.usernameFragment+`\r +a=ice-pwd:`+n.password+`\r +`;return n.iceLite&&(i+=`a=ice-lite\r +`),i},e.parseRtpParameters=function(n){const i={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},s=e.splitLines(n)[0].split(" ");i.profile=s[2];for(let o=3;o<s.length;o++){const c=s[o],u=e.matchPrefix(n,"a=rtpmap:"+c+" ")[0];if(u){const l=e.parseRtpMap(u),h=e.matchPrefix(n,"a=fmtp:"+c+" ");switch(l.parameters=h.length?e.parseFmtp(h[0]):{},l.rtcpFeedback=e.matchPrefix(n,"a=rtcp-fb:"+c+" ").map(e.parseRtcpFb),i.codecs.push(l),l.name.toUpperCase()){case"RED":case"ULPFEC":i.fecMechanisms.push(l.name.toUpperCase());break}}}e.matchPrefix(n,"a=extmap:").forEach(o=>{i.headerExtensions.push(e.parseExtmap(o))});const a=e.matchPrefix(n,"a=rtcp-fb:* ").map(e.parseRtcpFb);return i.codecs.forEach(o=>{a.forEach(c=>{o.rtcpFeedback.find(l=>l.type===c.type&&l.parameter===c.parameter)||o.rtcpFeedback.push(c)})}),i},e.writeRtpDescription=function(n,i){let r="";r+="m="+n+" ",r+=i.codecs.length>0?"9":"0",r+=" "+(i.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=i.codecs.map(a=>a.preferredPayloadType!==void 0?a.preferredPayloadType:a.payloadType).join(" ")+`\r +`,r+=`c=IN IP4 0.0.0.0\r +`,r+=`a=rtcp:9 IN IP4 0.0.0.0\r +`,i.codecs.forEach(a=>{r+=e.writeRtpMap(a),r+=e.writeFmtp(a),r+=e.writeRtcpFb(a)});let s=0;return i.codecs.forEach(a=>{a.maxptime>s&&(s=a.maxptime)}),s>0&&(r+="a=maxptime:"+s+`\r +`),i.headerExtensions&&i.headerExtensions.forEach(a=>{r+=e.writeExtmap(a)}),r},e.parseRtpEncodingParameters=function(n){const i=[],r=e.parseRtpParameters(n),s=r.fecMechanisms.indexOf("RED")!==-1,a=r.fecMechanisms.indexOf("ULPFEC")!==-1,o=e.matchPrefix(n,"a=ssrc:").map(f=>e.parseSsrcMedia(f)).filter(f=>f.attribute==="cname"),c=o.length>0&&o[0].ssrc;let u;const l=e.matchPrefix(n,"a=ssrc-group:FID").map(f=>f.substring(17).split(" ").map(g=>parseInt(g,10)));l.length>0&&l[0].length>1&&l[0][0]===c&&(u=l[0][1]),r.codecs.forEach(f=>{if(f.name.toUpperCase()==="RTX"&&f.parameters.apt){let p={ssrc:c,codecPayloadType:parseInt(f.parameters.apt,10)};c&&u&&(p.rtx={ssrc:u}),i.push(p),s&&(p=JSON.parse(JSON.stringify(p)),p.fec={ssrc:c,mechanism:a?"red+ulpfec":"red"},i.push(p))}}),i.length===0&&c&&i.push({ssrc:c});let h=e.matchPrefix(n,"b=");return h.length&&(h[0].indexOf("b=TIAS:")===0?h=parseInt(h[0].substring(7),10):h[0].indexOf("b=AS:")===0?h=parseInt(h[0].substring(5),10)*1e3*.95-50*40*8:h=void 0,i.forEach(f=>{f.maxBitrate=h})),i},e.parseRtcpParameters=function(n){const i={},r=e.matchPrefix(n,"a=ssrc:").map(o=>e.parseSsrcMedia(o)).filter(o=>o.attribute==="cname")[0];r&&(i.cname=r.value,i.ssrc=r.ssrc);const s=e.matchPrefix(n,"a=rtcp-rsize");i.reducedSize=s.length>0,i.compound=s.length===0;const a=e.matchPrefix(n,"a=rtcp-mux");return i.mux=a.length>0,i},e.writeRtcpParameters=function(n){let i="";return n.reducedSize&&(i+=`a=rtcp-rsize\r +`),n.mux&&(i+=`a=rtcp-mux\r +`),n.ssrc!==void 0&&n.cname&&(i+="a=ssrc:"+n.ssrc+" cname:"+n.cname+`\r +`),i},e.parseMsid=function(n){let i;const r=e.matchPrefix(n,"a=msid:");if(r.length===1)return i=r[0].substring(7).split(" "),{stream:i[0],track:i[1]};const s=e.matchPrefix(n,"a=ssrc:").map(a=>e.parseSsrcMedia(a)).filter(a=>a.attribute==="msid");if(s.length>0)return i=s[0].value.split(" "),{stream:i[0],track:i[1]}},e.parseSctpDescription=function(n){const i=e.parseMLine(n),r=e.matchPrefix(n,"a=max-message-size:");let s;r.length>0&&(s=parseInt(r[0].substring(19),10)),isNaN(s)&&(s=65536);const a=e.matchPrefix(n,"a=sctp-port:");if(a.length>0)return{port:parseInt(a[0].substring(12),10),protocol:i.fmt,maxMessageSize:s};const o=e.matchPrefix(n,"a=sctpmap:");if(o.length>0){const c=o[0].substring(10).split(" ");return{port:parseInt(c[0],10),protocol:c[1],maxMessageSize:s}}},e.writeSctpDescription=function(n,i){let r=[];return n.protocol!=="DTLS/SCTP"?r=["m="+n.kind+" 9 "+n.protocol+" "+i.protocol+`\r +`,`c=IN IP4 0.0.0.0\r +`,"a=sctp-port:"+i.port+`\r +`]:r=["m="+n.kind+" 9 "+n.protocol+" "+i.port+`\r +`,`c=IN IP4 0.0.0.0\r +`,"a=sctpmap:"+i.port+" "+i.protocol+` 65535\r +`],i.maxMessageSize!==void 0&&r.push("a=max-message-size:"+i.maxMessageSize+`\r +`),r.join("")},e.generateSessionId=function(){return Math.random().toString().substr(2,22)},e.writeSessionBoilerplate=function(n,i,r){let s;const a=i!==void 0?i:2;return n?s=n:s=e.generateSessionId(),`v=0\r +o=`+(r||"thisisadapterortc")+" "+s+" "+a+` IN IP4 127.0.0.1\r +s=-\r +t=0 0\r +`},e.getDirection=function(n,i){const r=e.splitLines(n);for(let s=0;s<r.length;s++)switch(r[s]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[s].substring(2)}return i?e.getDirection(i):"sendrecv"},e.getKind=function(n){return e.splitLines(n)[0].split(" ")[0].substring(2)},e.isRejected=function(n){return n.split(" ",2)[1]==="0"},e.parseMLine=function(n){const r=e.splitLines(n)[0].substring(2).split(" ");return{kind:r[0],port:parseInt(r[1],10),protocol:r[2],fmt:r.slice(3).join(" ")}},e.parseOLine=function(n){const r=e.matchPrefix(n,"o=")[0].substring(2).split(" ");return{username:r[0],sessionId:r[1],sessionVersion:parseInt(r[2],10),netType:r[3],addressType:r[4],address:r[5]}},e.isValidSDP=function(n){if(typeof n!="string"||n.length===0)return!1;const i=e.splitLines(n);for(let r=0;r<i.length;r++)if(i[r].length<2||i[r].charAt(1)!=="=")return!1;return!0},t.exports=e})(po);var mo=po.exports,bt=yl(mo),Dl=zc({__proto__:null,default:bt},[mo]);function fn(t){if(!t.RTCIceCandidate||t.RTCIceCandidate&&"foundation"in t.RTCIceCandidate.prototype)return;const e=t.RTCIceCandidate;t.RTCIceCandidate=function(i){if(typeof i=="object"&&i.candidate&&i.candidate.indexOf("a=")===0&&(i=JSON.parse(JSON.stringify(i)),i.candidate=i.candidate.substring(2)),i.candidate&&i.candidate.length){const r=new e(i),s=bt.parseCandidate(i.candidate);for(const a in s)a in r||Object.defineProperty(r,a,{value:s[a]});return r.toJSON=function(){return{candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment}},r}return new e(i)},t.RTCIceCandidate.prototype=e.prototype,ot(t,"icecandidate",n=>(n.candidate&&Object.defineProperty(n,"candidate",{value:new t.RTCIceCandidate(n.candidate),writable:"false"}),n))}function Pi(t){!t.RTCIceCandidate||t.RTCIceCandidate&&"relayProtocol"in t.RTCIceCandidate.prototype||ot(t,"icecandidate",e=>{if(e.candidate){const n=bt.parseCandidate(e.candidate.candidate);n.type==="relay"&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[n.priority>>24])}return e})}function pn(t,e){if(!t.RTCPeerConnection)return;"sctp"in t.RTCPeerConnection.prototype||Object.defineProperty(t.RTCPeerConnection.prototype,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp}});const n=function(o){if(!o||!o.sdp)return!1;const c=bt.splitSections(o.sdp);return c.shift(),c.some(u=>{const l=bt.parseMLine(u);return l&&l.kind==="application"&&l.protocol.indexOf("SCTP")!==-1})},i=function(o){const c=o.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(c===null||c.length<2)return-1;const u=parseInt(c[1],10);return u!==u?-1:u},r=function(o){let c=65536;return e.browser==="firefox"&&(e.version<57?o===-1?c=16384:c=2147483637:e.version<60?c=e.version===57?65535:65536:c=2147483637),c},s=function(o,c){let u=65536;e.browser==="firefox"&&e.version===57&&(u=65535);const l=bt.matchPrefix(o.sdp,"a=max-message-size:");return l.length>0?u=parseInt(l[0].substring(19),10):e.browser==="firefox"&&c!==-1&&(u=2147483637),u},a=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,e.browser==="chrome"&&e.version>=76){const{sdpSemantics:c}=this.getConfiguration();c==="plan-b"&&Object.defineProperty(this,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){const c=i(arguments[0]),u=r(c),l=s(arguments[0],c);let h;u===0&&l===0?h=Number.POSITIVE_INFINITY:u===0||l===0?h=Math.max(u,l):h=Math.min(u,l);const f={};Object.defineProperty(f,"maxMessageSize",{get(){return h}}),this._sctp=f}return a.apply(this,arguments)}}function mn(t){if(!(t.RTCPeerConnection&&"createDataChannel"in t.RTCPeerConnection.prototype))return;function e(i,r){const s=i.send;i.send=function(){const o=arguments[0],c=o.length||o.size||o.byteLength;if(i.readyState==="open"&&r.sctp&&c>r.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+r.sctp.maxMessageSize+" bytes)");return s.apply(i,arguments)}}const n=t.RTCPeerConnection.prototype.createDataChannel;t.RTCPeerConnection.prototype.createDataChannel=function(){const r=n.apply(this,arguments);return e(r,this),r},ot(t,"datachannel",i=>(e(i.channel,i.target),i))}function wi(t){if(!t.RTCPeerConnection||"connectionState"in t.RTCPeerConnection.prototype)return;const e=t.RTCPeerConnection.prototype;Object.defineProperty(e,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(e,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(n){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),n&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=n)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(n=>{const i=e[n];e[n]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=r=>{const s=r.target;if(s._lastConnectionState!==s.connectionState){s._lastConnectionState=s.connectionState;const a=new Event("connectionstatechange",r);s.dispatchEvent(a)}return r},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),i.apply(this,arguments)}})}function _i(t,e){if(!t.RTCPeerConnection||e.browser==="chrome"&&e.version>=71||e.browser==="safari"&&e.version>=605)return;const n=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(r){if(r&&r.sdp&&r.sdp.indexOf(` +a=extmap-allow-mixed`)!==-1){const s=r.sdp.split(` +`).filter(a=>a.trim()!=="a=extmap-allow-mixed").join(` +`);t.RTCSessionDescription&&r instanceof t.RTCSessionDescription?arguments[0]=new t.RTCSessionDescription({type:r.type,sdp:s}):r.sdp=s}return n.apply(this,arguments)}}function gn(t,e){if(!(t.RTCPeerConnection&&t.RTCPeerConnection.prototype))return;const n=t.RTCPeerConnection.prototype.addIceCandidate;!n||n.length===0||(t.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(e.browser==="chrome"&&e.version<78||e.browser==="firefox"&&e.version<68||e.browser==="safari")&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function vn(t,e){if(!(t.RTCPeerConnection&&t.RTCPeerConnection.prototype))return;const n=t.RTCPeerConnection.prototype.setLocalDescription;!n||n.length===0||(t.RTCPeerConnection.prototype.setLocalDescription=function(){let r=arguments[0]||{};if(typeof r!="object"||r.type&&r.sdp)return n.apply(this,arguments);if(r={type:r.type,sdp:r.sdp},!r.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":r.type="offer";break;default:r.type="answer";break}return r.sdp||r.type!=="offer"&&r.type!=="answer"?n.apply(this,[r]):(r.type==="offer"?this.createOffer:this.createAnswer).apply(this).then(a=>n.apply(this,[a]))})}var Al=Object.freeze({__proto__:null,removeExtmapAllowMixed:_i,shimAddIceCandidateNullOrEmpty:gn,shimConnectionState:wi,shimMaxMessageSize:pn,shimParameterlessSetLocalDescription:vn,shimRTCIceCandidate:fn,shimRTCIceCandidateRelayProtocol:Pi,shimSendThrowTypeError:mn});function Nl(){let{window:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0};const n=Fa,i=xl(t),r={browserDetails:i,commonShim:Al,extractVersion:hn,disableLog:Il,disableWarnings:Ml,sdp:Dl};switch(i.browser){case"chrome":if(!zr||!Ti||!e.shimChrome)return n("Chrome shim is not included in this adapter release."),r;if(i.version===null)return n("Chrome shim can not determine version, not shimming."),r;n("adapter.js shimming chrome."),r.browserShim=zr,gn(t,i),vn(t),Va(t,i),Ba(t),Ti(t,i),qa(t),za(t,i),Wa(t),Ga(t),Ha(t,i),fn(t),Pi(t),wi(t),pn(t,i),mn(t),_i(t,i);break;case"firefox":if(!Hr||!Ei||!e.shimFirefox)return n("Firefox shim is not included in this adapter release."),r;n("adapter.js shimming firefox."),r.browserShim=Hr,gn(t,i),vn(t),Ja(t,i),Ei(t,i),$a(t),Xa(t),Qa(t),Ya(t),Za(t),eo(t),to(t),no(t),io(t),fn(t),wi(t),pn(t,i),mn(t);break;case"safari":if(!Jr||!e.shimSafari)return n("Safari shim is not included in this adapter release."),r;n("adapter.js shimming safari."),r.browserShim=Jr,gn(t,i),vn(t),uo(t),ho(t),ao(t),ro(t),so(t),lo(t),oo(t),fo(t),fn(t),Pi(t),pn(t,i),mn(t),_i(t,i);break;default:n("Unsupported browser!");break}return r}Nl({window:typeof window>"u"?void 0:window});const Ll=10,nn="lk_e2ee",Ul="LKFrameEncryptionKey",Fl={sharedKey:!1,ratchetSalt:Ul,ratchetWindowSize:8,failureTolerance:Ll,keyringSize:16};var Qe;(function(t){t.SetKey="setKey",t.RatchetRequest="ratchetRequest",t.KeyRatcheted="keyRatcheted"})(Qe||(Qe={}));var $r;(function(t){t.KeyRatcheted="keyRatcheted"})($r||($r={}));var $e;(function(t){t.ParticipantEncryptionStatusChanged="participantEncryptionStatusChanged",t.EncryptionError="encryptionError"})($e||($e={}));var Qr;(function(t){t.Error="cryptorError"})(Qr||(Qr={}));function jl(){return Vl()||Ri()}function Ri(){return typeof window.RTCRtpScriptTransform<"u"}function Vl(){return typeof window.RTCRtpSender<"u"&&typeof window.RTCRtpSender.prototype.createEncodedStreams<"u"}class av extends Ne.EventEmitter{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this.onKeyRatcheted=(n,i)=>{j.debug("key ratcheted event received",{material:n,keyIndex:i})},this.keyInfoMap=new Map,this.options=Object.assign(Object.assign({},Fl),e),this.on(Qe.KeyRatcheted,this.onKeyRatcheted)}onSetEncryptionKey(e,n,i){const r={key:e,participantIdentity:n,keyIndex:i};if(!this.options.sharedKey&&!n)throw new Error("participant identity needs to be passed for encryption key if sharedKey option is false");this.keyInfoMap.set("".concat(n??"shared","-").concat(i??0),r),this.emit(Qe.SetKey,r)}getKeys(){return Array.from(this.keyInfoMap.values())}getOptions(){return this.options}ratchetKey(e,n){this.emit(Qe.RatchetRequest,e,n)}}class ct extends Error{constructor(e,n){super(n||"an error has occured"),this.code=e}}class G extends ct{constructor(e,n,i){super(1,e),this.status=i,this.reason=n}}class sr extends ct{constructor(e){super(21,e??"device is unsupported")}}class De extends ct{constructor(e){super(20,e??"track is invalid")}}class Bl extends ct{constructor(e){super(10,e??"unsupported server")}}class Y extends ct{constructor(e){super(12,e??"unexpected connection state")}}class Ii extends ct{constructor(e){super(13,e??"unable to negotiate")}}class Yr extends ct{constructor(e,n){super(15,e),this.reason=n}}var Wt;(function(t){t.PermissionDenied="PermissionDenied",t.NotFound="NotFound",t.DeviceInUse="DeviceInUse",t.Other="Other"})(Wt||(Wt={}));(function(t){function e(n){if(n&&"name"in n)return n.name==="NotFoundError"||n.name==="DevicesNotFoundError"?t.NotFound:n.name==="NotAllowedError"||n.name==="PermissionDeniedError"?t.PermissionDenied:n.name==="NotReadableError"||n.name==="TrackStartError"?t.DeviceInUse:t.Other}t.getFailure=e})(Wt||(Wt={}));var Xr;(function(t){t[t.InvalidKey=0]="InvalidKey",t[t.MissingKey=1]="MissingKey",t[t.InternalError=2]="InternalError"})(Xr||(Xr={}));var S;(function(t){t.Connected="connected",t.Reconnecting="reconnecting",t.SignalReconnecting="signalReconnecting",t.Reconnected="reconnected",t.Disconnected="disconnected",t.ConnectionStateChanged="connectionStateChanged",t.MediaDevicesChanged="mediaDevicesChanged",t.ParticipantConnected="participantConnected",t.ParticipantDisconnected="participantDisconnected",t.TrackPublished="trackPublished",t.TrackSubscribed="trackSubscribed",t.TrackSubscriptionFailed="trackSubscriptionFailed",t.TrackUnpublished="trackUnpublished",t.TrackUnsubscribed="trackUnsubscribed",t.TrackMuted="trackMuted",t.TrackUnmuted="trackUnmuted",t.LocalTrackPublished="localTrackPublished",t.LocalTrackUnpublished="localTrackUnpublished",t.LocalAudioSilenceDetected="localAudioSilenceDetected",t.ActiveSpeakersChanged="activeSpeakersChanged",t.ParticipantMetadataChanged="participantMetadataChanged",t.ParticipantNameChanged="participantNameChanged",t.ParticipantAttributesChanged="participantAttributesChanged",t.RoomMetadataChanged="roomMetadataChanged",t.DataReceived="dataReceived",t.SipDTMFReceived="sipDTMFReceived",t.TranscriptionReceived="transcriptionReceived",t.ConnectionQualityChanged="connectionQualityChanged",t.TrackStreamStateChanged="trackStreamStateChanged",t.TrackSubscriptionPermissionChanged="trackSubscriptionPermissionChanged",t.TrackSubscriptionStatusChanged="trackSubscriptionStatusChanged",t.AudioPlaybackStatusChanged="audioPlaybackChanged",t.VideoPlaybackStatusChanged="videoPlaybackChanged",t.MediaDevicesError="mediaDevicesError",t.ParticipantPermissionsChanged="participantPermissionsChanged",t.SignalConnected="signalConnected",t.RecordingStatusChanged="recordingStatusChanged",t.ParticipantEncryptionStatusChanged="participantEncryptionStatusChanged",t.EncryptionError="encryptionError",t.DCBufferStatusChanged="dcBufferStatusChanged",t.ActiveDeviceChanged="activeDeviceChanged",t.LocalTrackSubscribed="localTrackSubscribed"})(S||(S={}));var T;(function(t){t.TrackPublished="trackPublished",t.TrackSubscribed="trackSubscribed",t.TrackSubscriptionFailed="trackSubscriptionFailed",t.TrackUnpublished="trackUnpublished",t.TrackUnsubscribed="trackUnsubscribed",t.TrackMuted="trackMuted",t.TrackUnmuted="trackUnmuted",t.LocalTrackPublished="localTrackPublished",t.LocalTrackUnpublished="localTrackUnpublished",t.ParticipantMetadataChanged="participantMetadataChanged",t.ParticipantNameChanged="participantNameChanged",t.DataReceived="dataReceived",t.SipDTMFReceived="sipDTMFReceived",t.TranscriptionReceived="transcriptionReceived",t.IsSpeakingChanged="isSpeakingChanged",t.ConnectionQualityChanged="connectionQualityChanged",t.TrackStreamStateChanged="trackStreamStateChanged",t.TrackSubscriptionPermissionChanged="trackSubscriptionPermissionChanged",t.TrackSubscriptionStatusChanged="trackSubscriptionStatusChanged",t.MediaDevicesError="mediaDevicesError",t.AudioStreamAcquired="audioStreamAcquired",t.ParticipantPermissionsChanged="participantPermissionsChanged",t.PCTrackAdded="pcTrackAdded",t.AttributesChanged="attributesChanged",t.LocalTrackSubscribed="localTrackSubscribed"})(T||(T={}));var R;(function(t){t.TransportsCreated="transportsCreated",t.Connected="connected",t.Disconnected="disconnected",t.Resuming="resuming",t.Resumed="resumed",t.Restarting="restarting",t.Restarted="restarted",t.SignalResumed="signalResumed",t.SignalRestarted="signalRestarted",t.Closing="closing",t.MediaTrackAdded="mediaTrackAdded",t.ActiveSpeakersUpdate="activeSpeakersUpdate",t.DataPacketReceived="dataPacketReceived",t.RTPVideoMapUpdate="rtpVideoMapUpdate",t.DCBufferStatusChanged="dcBufferStatusChanged",t.ParticipantUpdate="participantUpdate",t.RoomUpdate="roomUpdate",t.SpeakersChanged="speakersChanged",t.StreamStateChanged="streamStateChanged",t.ConnectionQualityUpdate="connectionQualityUpdate",t.SubscriptionError="subscriptionError",t.SubscriptionPermissionUpdate="subscriptionPermissionUpdate",t.RemoteMute="remoteMute",t.SubscribedQualityUpdate="subscribedQualityUpdate",t.LocalTrackUnpublished="localTrackUnpublished",t.LocalTrackSubscribed="localTrackSubscribed",t.Offline="offline",t.SignalRequestResponse="signalRequestResponse"})(R||(R={}));var _;(function(t){t.Message="message",t.Muted="muted",t.Unmuted="unmuted",t.Restarted="restarted",t.Ended="ended",t.Subscribed="subscribed",t.Unsubscribed="unsubscribed",t.UpdateSettings="updateSettings",t.UpdateSubscription="updateSubscription",t.AudioPlaybackStarted="audioPlaybackStarted",t.AudioPlaybackFailed="audioPlaybackFailed",t.AudioSilenceDetected="audioSilenceDetected",t.VisibilityChanged="visibilityChanged",t.VideoDimensionsChanged="videoDimensionsChanged",t.VideoPlaybackStarted="videoPlaybackStarted",t.VideoPlaybackFailed="videoPlaybackFailed",t.ElementAttached="elementAttached",t.ElementDetached="elementDetached",t.UpstreamPaused="upstreamPaused",t.UpstreamResumed="upstreamResumed",t.SubscriptionPermissionChanged="subscriptionPermissionChanged",t.SubscriptionStatusChanged="subscriptionStatusChanged",t.SubscriptionFailed="subscriptionFailed",t.TrackProcessorUpdate="trackProcessorUpdate",t.AudioTrackFeatureUpdate="audioTrackFeatureUpdate",t.TranscriptionReceived="transcriptionReceived",t.TimeSyncUpdate="timeSyncUpdate"})(_||(_={}));function ar(t,e,n){var i,r,s;e===void 0&&(e=50),n===void 0&&(n={});var a=(i=n.isImmediate)!=null&&i,o=(r=n.callback)!=null&&r,c=n.maxWait,u=Date.now(),l=[];function h(){if(c!==void 0){var p=Date.now()-u;if(p+e>=c)return c-p}return e}var f=function(){var p=[].slice.call(arguments),g=this;return new Promise(function(b,v){var m=a&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,u=Date.now(),!a){var O=t.apply(g,p);o&&o(O),l.forEach(function(I){return(0,I.resolve)(O)}),l=[]}},h()),m){var E=t.apply(g,p);return o&&o(E),b(E)}l.push({resolve:b,reject:v})})};return f.cancel=function(p){s!==void 0&&clearTimeout(s),l.forEach(function(g){return(0,g.reject)(p)}),l=[]},f}const ql=/version\/(\d+(\.?_?\d+)+)/i;let Xn;function qe(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(typeof t>"u"&&typeof navigator>"u")return;const n=(t??navigator.userAgent).toLowerCase();if(Xn===void 0||e){const i=Wl.find(r=>{let{test:s}=r;return s.test(n)});Xn=i==null?void 0:i.describe(n)}return Xn}const Wl=[{test:/firefox|iceweasel|fxios/i,describe(t){return{name:"Firefox",version:bn(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t),os:t.toLowerCase().includes("fxios")?"iOS":void 0,osVersion:Zn(t)}}},{test:/chrom|crios|crmo/i,describe(t){return{name:"Chrome",version:bn(/(?:chrome|chromium|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t),os:t.toLowerCase().includes("crios")?"iOS":void 0,osVersion:Zn(t)}}},{test:/safari|applewebkit/i,describe(t){return{name:"Safari",version:bn(ql,t),os:t.includes("mobile/")?"iOS":"macOS",osVersion:Zn(t)}}}];function bn(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const i=e.match(t);return i&&i.length>=n&&i[n]||""}function Zn(t){return t.includes("mac os")?bn(/\(.+?(\d+_\d+(:?_\d+)?)/,t,1).replace(/_/g,"."):void 0}var Gl="2.5.1";const Kl=Gl,zl=15;class ie{}ie.setTimeout=function(){return setTimeout(...arguments)};ie.setInterval=function(){return setInterval(...arguments)};ie.clearTimeout=function(){return clearTimeout(...arguments)};ie.clearInterval=function(){return clearInterval(...arguments)};class B{constructor(e,n,i,r,s){if(typeof e=="object")this.width=e.width,this.height=e.height,this.aspectRatio=e.aspectRatio,this.encoding={maxBitrate:e.maxBitrate,maxFramerate:e.maxFramerate,priority:e.priority};else if(n!==void 0&&i!==void 0)this.width=e,this.height=n,this.aspectRatio=e/n,this.encoding={maxBitrate:i,maxFramerate:r,priority:s};else throw new TypeError("Unsupported options: provide at least width, height and maxBitrate")}get resolution(){return{width:this.width,height:this.height,frameRate:this.encoding.maxFramerate,aspectRatio:this.aspectRatio}}}const Hl=["vp8","h264"],go=["vp8","h264","vp9","av1"];function Jl(t){return!!Hl.find(e=>e===t)}var Mi;(function(t){t.telephone={maxBitrate:12e3},t.speech={maxBitrate:2e4},t.music={maxBitrate:32e3},t.musicStereo={maxBitrate:48e3},t.musicHighQuality={maxBitrate:64e3},t.musicHighQualityStereo={maxBitrate:96e3}})(Mi||(Mi={}));const Gt={h90:new B(160,90,9e4,20),h180:new B(320,180,16e4,20),h216:new B(384,216,18e4,20),h360:new B(640,360,45e4,20),h540:new B(960,540,8e5,25),h720:new B(1280,720,17e5,30),h1080:new B(1920,1080,3e6,30),h1440:new B(2560,1440,5e6,30),h2160:new B(3840,2160,8e6,30)},xi={h120:new B(160,120,7e4,20),h180:new B(240,180,125e3,20),h240:new B(320,240,14e4,20),h360:new B(480,360,33e4,20),h480:new B(640,480,5e5,20),h540:new B(720,540,6e5,25),h720:new B(960,720,13e5,30),h1080:new B(1440,1080,23e5,30),h1440:new B(1920,1440,38e5,30)},or={h360fps3:new B(640,360,2e5,3,"medium"),h360fps15:new B(640,360,4e5,15,"medium"),h720fps5:new B(1280,720,8e5,5,"medium"),h720fps15:new B(1280,720,15e5,15,"medium"),h720fps30:new B(1280,720,2e6,30,"medium"),h1080fps15:new B(1920,1080,25e5,15,"medium"),h1080fps30:new B(1920,1080,5e6,30,"medium"),original:new B(0,0,7e6,30,"medium")};function $l(t){if(!(typeof t>"u"))return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}const Ql=5e3,It=[];var ve;(function(t){t[t.LOW=0]="LOW",t[t.MEDIUM=1]="MEDIUM",t[t.HIGH=2]="HIGH"})(ve||(ve={}));class k extends Ne.EventEmitter{constructor(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r;super(),this.attachedElements=[],this.isMuted=!1,this.streamState=k.StreamState.Active,this.isInBackground=!1,this._currentBitrate=0,this.log=j,this.appVisibilityChangedListener=()=>{this.backgroundTimeout&&clearTimeout(this.backgroundTimeout),document.visibilityState==="hidden"?this.backgroundTimeout=setTimeout(()=>this.handleAppVisibilityChanged(),Ql):this.handleAppVisibilityChanged()},this.log=Be((r=i.loggerName)!==null&&r!==void 0?r:_e.Track),this.loggerContextCb=i.loggerContextCb,this.setMaxListeners(100),this.kind=n,this._mediaStreamTrack=e,this._mediaStreamID=e.id,this.source=k.Source.Unknown}get logContext(){var e;return Object.assign(Object.assign({},(e=this.loggerContextCb)===null||e===void 0?void 0:e.call(this)),W(this))}get currentBitrate(){return this._currentBitrate}get mediaStreamTrack(){return this._mediaStreamTrack}get mediaStreamID(){return this._mediaStreamID}attach(e){let n="audio";this.kind===k.Kind.Video&&(n="video"),this.attachedElements.length===0&&this.kind===k.Kind.Video&&this.addAppVisibilityListener(),e||(n==="audio"&&(It.forEach(s=>{s.parentElement===null&&!e&&(e=s)}),e&&It.splice(It.indexOf(e),1)),e||(e=document.createElement(n))),this.attachedElements.includes(e)||this.attachedElements.push(e),pt(this.mediaStreamTrack,e);const i=e.srcObject.getTracks(),r=i.some(s=>s.kind==="audio");return e.play().then(()=>{this.emit(r?_.AudioPlaybackStarted:_.VideoPlaybackStarted)}).catch(s=>{s.name==="NotAllowedError"?this.emit(r?_.AudioPlaybackFailed:_.VideoPlaybackFailed,s):s.name==="AbortError"?j.debug("".concat(r?"audio":"video"," playback aborted, likely due to new play request")):j.warn("could not playback ".concat(r?"audio":"video"),s),r&&e&&i.some(a=>a.kind==="video")&&s.name==="NotAllowedError"&&(e.muted=!0,e.play().catch(()=>{}))}),this.emit(_.ElementAttached,e),e}detach(e){try{if(e){yt(this.mediaStreamTrack,e);const i=this.attachedElements.indexOf(e);return i>=0&&(this.attachedElements.splice(i,1),this.recycleElement(e),this.emit(_.ElementDetached,e)),e}const n=[];return this.attachedElements.forEach(i=>{yt(this.mediaStreamTrack,i),n.push(i),this.recycleElement(i),this.emit(_.ElementDetached,i)}),this.attachedElements=[],n}finally{this.attachedElements.length===0&&this.removeAppVisibilityListener()}}stop(){this.stopMonitor(),this._mediaStreamTrack.stop()}enable(){this._mediaStreamTrack.enabled=!0}disable(){this._mediaStreamTrack.enabled=!1}stopMonitor(){this.monitorInterval&&clearInterval(this.monitorInterval),this.timeSyncHandle&&cancelAnimationFrame(this.timeSyncHandle)}updateLoggerOptions(e){e.loggerName&&(this.log=Be(e.loggerName)),e.loggerContextCb&&(this.loggerContextCb=e.loggerContextCb)}recycleElement(e){if(e instanceof HTMLAudioElement){let n=!0;e.pause(),It.forEach(i=>{i.parentElement||(n=!1)}),n&&It.push(e)}}handleAppVisibilityChanged(){return y(this,void 0,void 0,function*(){this.isInBackground=document.visibilityState==="hidden",!this.isInBackground&&this.kind===k.Kind.Video&&setTimeout(()=>this.attachedElements.forEach(e=>e.play().catch(()=>{})),0)})}addAppVisibilityListener(){fe()?(this.isInBackground=document.visibilityState==="hidden",document.addEventListener("visibilitychange",this.appVisibilityChangedListener)):this.isInBackground=!1}removeAppVisibilityListener(){fe()&&document.removeEventListener("visibilitychange",this.appVisibilityChangedListener)}}function pt(t,e){let n;e.srcObject instanceof MediaStream?n=e.srcObject:n=new MediaStream;let i;t.kind==="audio"?i=n.getAudioTracks():i=n.getVideoTracks(),i.includes(t)||(i.forEach(r=>{n.removeTrack(r)}),n.addTrack(t)),(!at()||!(e instanceof HTMLVideoElement))&&(e.autoplay=!0),e.muted=n.getAudioTracks().length===0,e instanceof HTMLVideoElement&&(e.playsInline=!0),e.srcObject!==n&&(e.srcObject=n,(at()||Tt())&&e instanceof HTMLVideoElement&&setTimeout(()=>{e.srcObject=n,e.play().catch(()=>{})},0))}function yt(t,e){if(e.srcObject instanceof MediaStream){const n=e.srcObject;n.removeTrack(t),n.getTracks().length>0?e.srcObject=n:e.srcObject=null}}(function(t){let e;(function(u){u.Audio="audio",u.Video="video",u.Unknown="unknown"})(e=t.Kind||(t.Kind={}));let n;(function(u){u.Camera="camera",u.Microphone="microphone",u.ScreenShare="screen_share",u.ScreenShareAudio="screen_share_audio",u.Unknown="unknown"})(n=t.Source||(t.Source={}));let i;(function(u){u.Active="active",u.Paused="paused",u.Unknown="unknown"})(i=t.StreamState||(t.StreamState={}));function r(u){switch(u){case e.Audio:return Pe.AUDIO;case e.Video:return Pe.VIDEO;default:return Pe.DATA}}t.kindToProto=r;function s(u){switch(u){case Pe.AUDIO:return e.Audio;case Pe.VIDEO:return e.Video;default:return e.Unknown}}t.kindFromProto=s;function a(u){switch(u){case n.Camera:return ae.CAMERA;case n.Microphone:return ae.MICROPHONE;case n.ScreenShare:return ae.SCREEN_SHARE;case n.ScreenShareAudio:return ae.SCREEN_SHARE_AUDIO;default:return ae.UNKNOWN}}t.sourceToProto=a;function o(u){switch(u){case ae.CAMERA:return n.Camera;case ae.MICROPHONE:return n.Microphone;case ae.SCREEN_SHARE:return n.ScreenShare;case ae.SCREEN_SHARE_AUDIO:return n.ScreenShareAudio;default:return n.Unknown}}t.sourceFromProto=o;function c(u){switch(u){case bi.ACTIVE:return i.Active;case bi.PAUSED:return i.Paused;default:return i.Unknown}}t.streamStateFromProto=c})(k||(k={}));function vo(t,e,n){var i;const r=(i=$l(t))!==null&&i!==void 0?i:{};return r.audio===!0&&(r.audio={}),r.video===!0&&(r.video={}),r.audio&&Oi(r.audio,e),r.video&&Oi(r.video,n),r}function Oi(t,e){return Object.keys(e).forEach(n=>{t[n]===void 0&&(t[n]=e[n])}),t}function Vn(t){const e={};if(t.video)if(typeof t.video=="object"){const n={},i=n,r=t.video;Object.keys(r).forEach(s=>{switch(s){case"resolution":Oi(i,r.resolution);break;default:i[s]=r[s]}}),e.video=n}else e.video=t.video;else e.video=!1;return t.audio?typeof t.audio=="object"?e.audio=t.audio:e.audio=!0:e.audio=!1,e}function Yl(t){return y(this,arguments,void 0,function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:200;return function*(){const i=bo();if(i){const r=i.createAnalyser();r.fftSize=2048;const s=r.frequencyBinCount,a=new Uint8Array(s);i.createMediaStreamSource(new MediaStream([e.mediaStreamTrack])).connect(r),yield Ae(n),r.getByteTimeDomainData(a);const c=a.some(u=>u!==128&&u!==0);return i.close(),!c}return!1}()})}function bo(){const t=typeof window<"u"&&(window.AudioContext||window.webkitAudioContext);if(t)return new t({latencyHint:"interactive"})}function Xl(t){return t===k.Source.Microphone?"audioinput":t===k.Source.Camera?"videoinput":void 0}function Zl(t){var e,n;let i=(e=t.video)!==null&&e!==void 0?e:!0;return t.resolution&&t.resolution.width>0&&t.resolution.height>0&&(i=typeof i=="boolean"?{}:i,at()?i=Object.assign(Object.assign({},i),{width:{max:t.resolution.width},height:{max:t.resolution.height},frameRate:t.resolution.frameRate}):i=Object.assign(Object.assign({},i),{width:{ideal:t.resolution.width},height:{ideal:t.resolution.height},frameRate:t.resolution.frameRate})),{audio:(n=t.audio)!==null&&n!==void 0?n:!1,video:i,controller:t.controller,selfBrowserSurface:t.selfBrowserSurface,surfaceSwitching:t.surfaceSwitching,systemAudio:t.systemAudio,preferCurrentTab:t.preferCurrentTab}}function yn(t){const e=t.split("/")[1].toLowerCase();if(!go.includes(e))throw Error("Video codec not supported: ".concat(e));return e}function ed(t){const e=[];return t.forEach(n=>{n.track!==void 0&&e.push(new tr({cid:n.track.mediaStreamID,track:n.trackInfo}))}),e}function W(t){return t instanceof k?{trackID:t.sid,source:t.source,muted:t.isMuted,enabled:t.mediaStreamTrack.enabled,kind:t.kind,streamID:t.mediaStreamID,streamTrackID:t.mediaStreamTrack.id}:{trackID:t.trackSid,enabled:t.isEnabled,muted:t.isMuted,trackInfo:Object.assign({mimeType:t.mimeType,name:t.trackName,encrypted:t.isEncrypted,kind:t.kind,source:t.source},t.track?W(t.track):{})}}function td(){return typeof RTCRtpReceiver<"u"&&"getSynchronizationSources"in RTCRtpReceiver}function nd(t,e){var n;t===void 0&&(t={}),e===void 0&&(e={});const i=[...Object.keys(e),...Object.keys(t)],r={};for(const s of i)t[s]!==e[s]&&(r[s]=(n=e[s])!==null&&n!==void 0?n:"");return r}const id="|",Zr="https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension";function rd(t){const e=t.split(id);return e.length>1?[e[0],t.substr(e[0].length+1)]:[t,""]}function Ae(t){return y(this,void 0,void 0,function*(){return new Promise(e=>ie.setTimeout(e,t))})}function Di(){return"addTransceiver"in RTCPeerConnection.prototype}function Ai(){return"addTrack"in RTCPeerConnection.prototype}function sd(){if(!("getCapabilities"in RTCRtpSender)||at())return!1;const t=RTCRtpSender.getCapabilities("video");let e=!1;if(t){for(const n of t.codecs)if(n.mimeType==="video/AV1"){e=!0;break}}return e}function ad(){if(!("getCapabilities"in RTCRtpSender)||Tt())return!1;if(at()){const n=qe();if(n!=null&&n.version&&Kt(n.version,"16")<0)return!1}const t=RTCRtpSender.getCapabilities("video");let e=!1;if(t){for(const n of t.codecs)if(n.mimeType==="video/VP9"){e=!0;break}}return e}function Ft(t){return t==="av1"||t==="vp9"}function Ni(t){return document?(t||(t=document.createElement("audio")),"setSinkId"in t):!1}function od(){return typeof RTCPeerConnection>"u"?!1:Di()||Ai()}function Tt(){var t;return((t=qe())===null||t===void 0?void 0:t.name)==="Firefox"}function at(){var t;return((t=qe())===null||t===void 0?void 0:t.name)==="Safari"}function cd(){const t=qe();return(t==null?void 0:t.name)==="Safari"&&t.version.startsWith("17.")}function yo(){var t,e;return fe()?(e=(t=navigator.userAgentData)===null||t===void 0?void 0:t.mobile)!==null&&e!==void 0?e:/Tablet|iPad|Mobile|Android|BlackBerry/.test(navigator.userAgent):!1}function ud(){const t=qe(),e="17.2";if(t)return t.name!=="Safari"&&t.os!=="iOS"||t.os==="iOS"&&t.osVersion&&Kt(e,t.osVersion)>=0?!0:t.name==="Safari"&&Kt(e,t.version)>=0}function fe(){return typeof document<"u"}function We(){return navigator.product=="ReactNative"}function Li(t){return t.hostname.endsWith(".livekit.cloud")||t.hostname.endsWith(".livekit.run")}function ko(){if(global&&global.LiveKitReactNativeGlobal)return global.LiveKitReactNativeGlobal}function So(){if(!We())return;let t=ko();if(t)return t.platform}function es(){if(fe())return window.devicePixelRatio;if(We()){let t=ko();if(t)return t.devicePixelRatio}return 1}function Kt(t,e){const n=t.split("."),i=e.split("."),r=Math.min(n.length,i.length);for(let s=0;s<r;++s){const a=parseInt(n[s],10),o=parseInt(i[s],10);if(a>o)return 1;if(a<o)return-1;if(s===r-1&&a===o)return 0}return t===""&&e!==""?-1:e===""?1:n.length==i.length?0:n.length<i.length?-1:1}function ld(t){for(const e of t)e.target.handleResize(e)}function dd(t){for(const e of t)e.target.handleVisibilityChanged(e)}let ei=null;const ts=()=>(ei||(ei=new ResizeObserver(ld)),ei);let ti=null;const ns=()=>(ti||(ti=new IntersectionObserver(dd,{root:null,rootMargin:"0px"})),ti);function hd(){var t;const e=new Ju({sdk:fa.JS,protocol:zl,version:Kl});return We()&&(e.os=(t=So())!==null&&t!==void 0?t:""),e}function is(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:16,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;const r=document.createElement("canvas");r.width=t,r.height=e;const s=r.getContext("2d");s==null||s.fillRect(0,0,r.width,r.height),i&&s&&(s.beginPath(),s.arc(t/2,e/2,50,0,Math.PI*2,!0),s.closePath(),s.fillStyle="grey",s.fill());const a=r.captureStream(),[o]=a.getTracks();if(!o)throw Error("Could not get empty media stream video track");return o.enabled=n,o}let Mt;function ni(){if(!Mt){const t=new AudioContext,e=t.createOscillator(),n=t.createGain();n.gain.setValueAtTime(0,0);const i=t.createMediaStreamDestination();if(e.connect(n),n.connect(i),e.start(),[Mt]=i.stream.getAudioTracks(),!Mt)throw Error("Could not get empty media stream audio track");Mt.enabled=!1}return Mt.clone()}class Co{constructor(e,n){this.onFinally=n,this.promise=new Promise((i,r)=>y(this,void 0,void 0,function*(){this.resolve=i,this.reject=r,e&&(yield e(i,r))})).finally(()=>{var i;return(i=this.onFinally)===null||i===void 0?void 0:i.call(this)})}}class be{constructor(){this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let e;const n=new Promise(r=>e=()=>{this._locks-=1,r()}),i=this._locking.then(()=>e);return this._locking=this._locking.then(()=>n),i}}function fd(t){return go.includes(t)}function je(t){if(typeof t=="string"||typeof t=="number")return t;if(Array.isArray(t))return t[0];if(t.exact)return Array.isArray(t.exact)?t.exact[0]:t.exact;if(t.ideal)return Array.isArray(t.ideal)?t.ideal[0]:t.ideal;throw Error("could not unwrap constraint")}function pd(t){return t.startsWith("http")?t.replace(/^(http)/,"ws"):t}function rs(t){return t.startsWith("ws")?t.replace(/^(ws)/,"http"):t}function md(t,e){return t.segments.map(n=>{let{id:i,text:r,language:s,startTime:a,endTime:o,final:c}=n;var u;const l=(u=e.get(i))!==null&&u!==void 0?u:Date.now(),h=Date.now();return c?e.delete(i):e.set(i,l),{id:i,text:r,startTime:Number.parseInt(a.toString()),endTime:Number.parseInt(o.toString()),final:c,language:s,firstReceivedTime:l,lastReceivedTime:h}})}const ii="default";class ce{static getInstance(){return this.instance===void 0&&(this.instance=new ce),this.instance}getDevices(e){return y(this,arguments,void 0,function(n){var i=this;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return function*(){var s;if(((s=ce.userMediaPromiseMap)===null||s===void 0?void 0:s.size)>0){j.debug("awaiting getUserMedia promise");try{n?yield ce.userMediaPromiseMap.get(n):yield Promise.all(ce.userMediaPromiseMap.values())}catch{j.warn("error waiting for media permissons")}}let a=yield navigator.mediaDevices.enumerateDevices();if(r&&!(at()&&i.hasDeviceInUse(n))&&(a.filter(c=>c.kind===n).length===0||a.some(c=>{const u=c.label==="",l=n?c.kind===n:!0;return u&&l}))){const c={video:n!=="audioinput"&&n!=="audiooutput",audio:n!=="videoinput"},u=yield navigator.mediaDevices.getUserMedia(c);a=yield navigator.mediaDevices.enumerateDevices(),u.getTracks().forEach(l=>{l.stop()})}return n&&(a=a.filter(o=>o.kind===n)),a}()})}normalizeDeviceId(e,n,i){return y(this,void 0,void 0,function*(){if(n!==ii)return n;const r=yield this.getDevices(e),s=r.find(o=>o.deviceId===ii);if(!s){j.warn("could not reliably determine default device");return}const a=r.find(o=>o.deviceId!==ii&&o.groupId===(i??s.groupId));if(!a){j.warn("could not reliably determine default device");return}return a==null?void 0:a.deviceId})}hasDeviceInUse(e){return e?ce.userMediaPromiseMap.has(e):ce.userMediaPromiseMap.size>0}}ce.mediaDeviceKinds=["audioinput","audiooutput","videoinput"];ce.userMediaPromiseMap=new Map;const gd=1e3;class it extends k{get sender(){return this._sender}set sender(e){this._sender=e}get constraints(){return this._constraints}constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=arguments.length>4?arguments[4]:void 0;super(e,n,s),this.manuallyStopped=!1,this._isUpstreamPaused=!1,this.handleTrackMuteEvent=()=>this.debouncedTrackMuteHandler().catch(()=>this.log.debug("track mute bounce got cancelled by an unmute event",this.logContext)),this.debouncedTrackMuteHandler=ar(()=>y(this,void 0,void 0,function*(){yield this.pauseUpstream()}),5e3),this.handleTrackUnmuteEvent=()=>y(this,void 0,void 0,function*(){this.debouncedTrackMuteHandler.cancel("unmute"),yield this.resumeUpstream()}),this.handleEnded=()=>{this.isInBackground&&(this.reacquireTrack=!0),this._mediaStreamTrack.removeEventListener("mute",this.handleTrackMuteEvent),this._mediaStreamTrack.removeEventListener("unmute",this.handleTrackUnmuteEvent),this.emit(_.Ended,this)},this.reacquireTrack=!1,this.providedByUser=r,this.muteLock=new be,this.pauseUpstreamLock=new be,this.processorLock=new be,this.restartLock=new be,this.setMediaStreamTrack(e,!0),this._constraints=e.getConstraints(),i&&(this._constraints=i)}get id(){return this._mediaStreamTrack.id}get dimensions(){if(this.kind!==k.Kind.Video)return;const{width:e,height:n}=this._mediaStreamTrack.getSettings();if(e&&n)return{width:e,height:n}}get isUpstreamPaused(){return this._isUpstreamPaused}get isUserProvided(){return this.providedByUser}get mediaStreamTrack(){var e,n;return(n=(e=this.processor)===null||e===void 0?void 0:e.processedTrack)!==null&&n!==void 0?n:this._mediaStreamTrack}setMediaStreamTrack(e,n){return y(this,void 0,void 0,function*(){if(e===this._mediaStreamTrack&&!n)return;this._mediaStreamTrack&&(this.attachedElements.forEach(r=>{yt(this._mediaStreamTrack,r)}),this.debouncedTrackMuteHandler.cancel("new-track"),this._mediaStreamTrack.removeEventListener("ended",this.handleEnded),this._mediaStreamTrack.removeEventListener("mute",this.handleTrackMuteEvent),this._mediaStreamTrack.removeEventListener("unmute",this.handleTrackUnmuteEvent)),this.mediaStream=new MediaStream([e]),e&&(e.addEventListener("ended",this.handleEnded),e.addEventListener("mute",this.handleTrackMuteEvent),e.addEventListener("unmute",this.handleTrackUnmuteEvent),this._constraints=e.getConstraints());let i;if(this.processor&&e){const r=yield this.processorLock.lock();try{if(this.log.debug("restarting processor",this.logContext),this.kind==="unknown")throw TypeError("cannot set processor on track of unknown kind");this.processorElement&&(pt(e,this.processorElement),this.processorElement.muted=!0),yield this.processor.restart({track:e,kind:this.kind,element:this.processorElement}),i=this.processor.processedTrack}finally{r()}}this.sender&&(yield this.sender.replaceTrack(i??e)),!this.providedByUser&&this._mediaStreamTrack!==e&&this._mediaStreamTrack.stop(),this._mediaStreamTrack=e,e&&(this._mediaStreamTrack.enabled=!this.isMuted,yield this.resumeUpstream(),this.attachedElements.forEach(r=>{pt(i??e,r)}))})}waitForDimensions(){return y(this,arguments,void 0,function(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gd;return function*(){var i;if(e.kind===k.Kind.Audio)throw new Error("cannot get dimensions for audio tracks");((i=qe())===null||i===void 0?void 0:i.os)==="iOS"&&(yield Ae(10));const r=Date.now();for(;Date.now()-r<n;){const s=e.dimensions;if(s)return s;yield Ae(50)}throw new De("unable to get track dimensions after timeout")}()})}getDeviceId(){return y(this,void 0,void 0,function*(){if(this.source===k.Source.ScreenShare)return;const{deviceId:e,groupId:n}=this._mediaStreamTrack.getSettings(),i=this.kind===k.Kind.Audio?"audioinput":"videoinput";return ce.getInstance().normalizeDeviceId(i,e,n)})}mute(){return y(this,void 0,void 0,function*(){return this.setTrackMuted(!0),this})}unmute(){return y(this,void 0,void 0,function*(){return this.setTrackMuted(!1),this})}replaceTrack(e,n){return y(this,void 0,void 0,function*(){if(!this.sender)throw new De("unable to replace an unpublished track");let i,r;return typeof n=="boolean"?i=n:n!==void 0&&(i=n.userProvidedTrack,r=n.stopProcessor),this.providedByUser=i??!0,this.log.debug("replace MediaStreamTrack",this.logContext),yield this.setMediaStreamTrack(e),r&&this.processor&&(yield this.stopProcessor()),this})}restart(e){return y(this,void 0,void 0,function*(){this.manuallyStopped=!1;const n=yield this.restartLock.lock();try{e||(e=this._constraints),this.log.debug("restarting track with constraints",Object.assign(Object.assign({},this.logContext),{constraints:e}));const i={audio:!1,video:!1};this.kind===k.Kind.Video?i.video=e:i.audio=e,this.attachedElements.forEach(a=>{yt(this.mediaStreamTrack,a)}),this._mediaStreamTrack.removeEventListener("ended",this.handleEnded),this._mediaStreamTrack.stop();const s=(yield navigator.mediaDevices.getUserMedia(i)).getTracks()[0];return s.addEventListener("ended",this.handleEnded),this.log.debug("re-acquired MediaStreamTrack",this.logContext),yield this.setMediaStreamTrack(s),this._constraints=e,this.emit(_.Restarted,this),this.manuallyStopped&&(this.log.warn("track was stopped during a restart, stopping restarted track",this.logContext),this.stop()),this}finally{n()}})}setTrackMuted(e){this.log.debug("setting ".concat(this.kind," track ").concat(e?"muted":"unmuted"),this.logContext),!(this.isMuted===e&&this._mediaStreamTrack.enabled!==e)&&(this.isMuted=e,this._mediaStreamTrack.enabled=!e,this.emit(e?_.Muted:_.Unmuted,this))}get needsReAcquisition(){return this._mediaStreamTrack.readyState!=="live"||this._mediaStreamTrack.muted||!this._mediaStreamTrack.enabled||this.reacquireTrack}handleAppVisibilityChanged(){const e=Object.create(null,{handleAppVisibilityChanged:{get:()=>super.handleAppVisibilityChanged}});return y(this,void 0,void 0,function*(){yield e.handleAppVisibilityChanged.call(this),yo()&&(this.log.debug("visibility changed, is in Background: ".concat(this.isInBackground),this.logContext),!this.isInBackground&&this.needsReAcquisition&&!this.isUserProvided&&!this.isMuted&&(this.log.debug("track needs to be reacquired, restarting ".concat(this.source),this.logContext),yield this.restart(),this.reacquireTrack=!1))})}stop(){var e;this.manuallyStopped=!0,super.stop(),this._mediaStreamTrack.removeEventListener("ended",this.handleEnded),this._mediaStreamTrack.removeEventListener("mute",this.handleTrackMuteEvent),this._mediaStreamTrack.removeEventListener("unmute",this.handleTrackUnmuteEvent),(e=this.processor)===null||e===void 0||e.destroy(),this.processor=void 0}pauseUpstream(){return y(this,void 0,void 0,function*(){const e=yield this.pauseUpstreamLock.lock();try{if(this._isUpstreamPaused===!0)return;if(!this.sender){this.log.warn("unable to pause upstream for an unpublished track",this.logContext);return}this._isUpstreamPaused=!0,this.emit(_.UpstreamPaused,this);const n=qe();if((n==null?void 0:n.name)==="Safari"&&Kt(n.version,"12.0")<0)throw new sr("pauseUpstream is not supported on Safari < 12.");yield this.sender.replaceTrack(null)}finally{e()}})}resumeUpstream(){return y(this,void 0,void 0,function*(){const e=yield this.pauseUpstreamLock.lock();try{if(this._isUpstreamPaused===!1)return;if(!this.sender){this.log.warn("unable to resume upstream for an unpublished track",this.logContext);return}this._isUpstreamPaused=!1,this.emit(_.UpstreamResumed,this),yield this.sender.replaceTrack(this.mediaStreamTrack)}finally{e()}})}getRTCStatsReport(){return y(this,void 0,void 0,function*(){var e;return!((e=this.sender)===null||e===void 0)&&e.getStats?yield this.sender.getStats():void 0})}setProcessor(e){return y(this,arguments,void 0,function(n){var i=this;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return function*(){var s;const a=yield i.processorLock.lock();try{i.log.debug("setting up processor",i.logContext);const o=document.createElement(i.kind),c={kind:i.kind,track:i._mediaStreamTrack,element:o,audioContext:i.audioContext};if(yield n.init(c),i.log.debug("processor initialized",i.logContext),i.processor&&(yield i.stopProcessor()),i.kind==="unknown")throw TypeError("cannot set processor on track of unknown kind");if(pt(i._mediaStreamTrack,o),o.muted=!0,o.play().catch(u=>i.log.error("failed to play processor element",Object.assign(Object.assign({},i.logContext),{error:u}))),i.processor=n,i.processorElement=o,i.processor.processedTrack){for(const u of i.attachedElements)u!==i.processorElement&&r&&(yt(i._mediaStreamTrack,u),pt(i.processor.processedTrack,u));yield(s=i.sender)===null||s===void 0?void 0:s.replaceTrack(i.processor.processedTrack)}i.emit(_.TrackProcessorUpdate,i.processor)}finally{a()}}()})}getProcessor(){return this.processor}stopProcessor(){return y(this,arguments,void 0,function(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function*(){var i,r;e.processor&&(e.log.debug("stopping processor",e.logContext),(i=e.processor.processedTrack)===null||i===void 0||i.stop(),yield e.processor.destroy(),e.processor=void 0,n||((r=e.processorElement)===null||r===void 0||r.remove(),e.processorElement=void 0),yield e._mediaStreamTrack.applyConstraints(e._constraints),yield e.setMediaStreamTrack(e._mediaStreamTrack,!0),e.emit(_.TrackProcessorUpdate))}()})}}class vd extends Ne.EventEmitter{constructor(e){super(),this.onWorkerMessage=n=>{var i,r;const{kind:s,data:a}=n.data;switch(s){case"error":j.error(a.error.message),this.emit($e.EncryptionError,a.error);break;case"initAck":a.enabled&&this.keyProvider.getKeys().forEach(o=>{this.postKey(o)});break;case"enable":if(this.encryptionEnabled!==a.enabled&&a.participantIdentity===((i=this.room)===null||i===void 0?void 0:i.localParticipant.identity))this.emit($e.ParticipantEncryptionStatusChanged,a.enabled,this.room.localParticipant),this.encryptionEnabled=a.enabled;else if(a.participantIdentity){const o=(r=this.room)===null||r===void 0?void 0:r.getParticipantByIdentity(a.participantIdentity);if(!o)throw TypeError("couldn't set encryption status, participant not found".concat(a.participantIdentity));this.emit($e.ParticipantEncryptionStatusChanged,a.enabled,o)}this.encryptionEnabled&&this.keyProvider.getKeys().forEach(o=>{this.postKey(o)});break;case"ratchetKey":this.keyProvider.emit(Qe.KeyRatcheted,a.material,a.keyIndex);break}},this.onWorkerError=n=>{j.error("e2ee worker encountered an error:",{error:n.error}),this.emit($e.EncryptionError,n.error)},this.keyProvider=e.keyProvider,this.worker=e.worker,this.encryptionEnabled=!1}setup(e){if(!jl())throw new sr("tried to setup end-to-end encryption on an unsupported browser");if(j.info("setting up e2ee"),e!==this.room){this.room=e,this.setupEventListeners(e,this.keyProvider);const n={kind:"init",data:{keyProviderOptions:this.keyProvider.getOptions(),loglevel:kl.getLevel()}};this.worker&&(j.info("initializing worker",{worker:this.worker}),this.worker.onmessage=this.onWorkerMessage,this.worker.onerror=this.onWorkerError,this.worker.postMessage(n))}}setParticipantCryptorEnabled(e,n){j.debug("set e2ee to ".concat(e," for participant ").concat(n)),this.postEnable(e,n)}setSifTrailer(e){!e||e.length===0?j.warn("ignoring server sent trailer as it's empty"):this.postSifTrailer(e)}setupEngine(e){e.on(R.RTPVideoMapUpdate,n=>{this.postRTPMap(n)})}setupEventListeners(e,n){e.on(S.TrackPublished,(i,r)=>this.setParticipantCryptorEnabled(i.trackInfo.encryption!==me.NONE,r.identity)),e.on(S.ConnectionStateChanged,i=>{i===F.Connected&&e.remoteParticipants.forEach(r=>{r.trackPublications.forEach(s=>{this.setParticipantCryptorEnabled(s.trackInfo.encryption!==me.NONE,r.identity)})})}).on(S.TrackUnsubscribed,(i,r,s)=>{var a;const o={kind:"removeTransform",data:{participantIdentity:s.identity,trackId:i.mediaStreamID}};(a=this.worker)===null||a===void 0||a.postMessage(o)}).on(S.TrackSubscribed,(i,r,s)=>{this.setupE2EEReceiver(i,s.identity,r.trackInfo)}).on(S.SignalConnected,()=>{if(!this.room)throw new TypeError("expected room to be present on signal connect");this.setParticipantCryptorEnabled(this.room.localParticipant.isE2EEEnabled,this.room.localParticipant.identity),n.getKeys().forEach(i=>{this.postKey(i)})}),e.localParticipant.on(T.LocalTrackPublished,i=>y(this,void 0,void 0,function*(){this.setupE2EESender(i.track,i.track.sender)})),n.on(Qe.SetKey,i=>this.postKey(i)).on(Qe.RatchetRequest,(i,r)=>this.postRatchetRequest(i,r))}postRatchetRequest(e,n){if(!this.worker)throw Error("could not ratchet key, worker is missing");const i={kind:"ratchetRequest",data:{participantIdentity:e,keyIndex:n}};this.worker.postMessage(i)}postKey(e){let{key:n,participantIdentity:i,keyIndex:r}=e;var s;if(!this.worker)throw Error("could not set key, worker is missing");const a={kind:"setKey",data:{participantIdentity:i,isPublisher:i===((s=this.room)===null||s===void 0?void 0:s.localParticipant.identity),key:n,keyIndex:r}};this.worker.postMessage(a)}postEnable(e,n){if(this.worker){const i={kind:"enable",data:{enabled:e,participantIdentity:n}};this.worker.postMessage(i)}else throw new ReferenceError("failed to enable e2ee, worker is not ready")}postRTPMap(e){var n;if(!this.worker)throw TypeError("could not post rtp map, worker is missing");if(!(!((n=this.room)===null||n===void 0)&&n.localParticipant.identity))throw TypeError("could not post rtp map, local participant identity is missing");const i={kind:"setRTPMap",data:{map:e,participantIdentity:this.room.localParticipant.identity}};this.worker.postMessage(i)}postSifTrailer(e){if(!this.worker)throw Error("could not post SIF trailer, worker is missing");const n={kind:"setSifTrailer",data:{trailer:e}};this.worker.postMessage(n)}setupE2EEReceiver(e,n,i){if(e.receiver){if(!(i!=null&&i.mimeType)||i.mimeType==="")throw new TypeError("MimeType missing from trackInfo, cannot set up E2EE cryptor");this.handleReceiver(e.receiver,e.mediaStreamID,n,e.kind==="video"?yn(i.mimeType):void 0)}}setupE2EESender(e,n){if(!(e instanceof it)||!n){n||j.warn("early return because sender is not ready");return}this.handleSender(n,e.mediaStreamID,void 0)}handleReceiver(e,n,i,r){return y(this,void 0,void 0,function*(){if(this.worker){if(Ri()){const s={kind:"decode",participantIdentity:i,trackId:n,codec:r};e.transform=new RTCRtpScriptTransform(this.worker,s)}else{if(nn in e&&r){const c={kind:"updateCodec",data:{trackId:n,codec:r,participantIdentity:i}};this.worker.postMessage(c);return}let s=e.writableStream,a=e.readableStream;if(!s||!a){const c=e.createEncodedStreams();e.writableStream=c.writable,s=c.writable,e.readableStream=c.readable,a=c.readable}const o={kind:"decode",data:{readableStream:a,writableStream:s,trackId:n,codec:r,participantIdentity:i}};this.worker.postMessage(o,[a,s])}e[nn]=!0}})}handleSender(e,n,i){var r;if(!(nn in e||!this.worker)){if(!(!((r=this.room)===null||r===void 0)&&r.localParticipant.identity)||this.room.localParticipant.identity==="")throw TypeError("local identity needs to be known in order to set up encrypted sender");if(Ri()){j.info("initialize script transform");const s={kind:"encode",participantIdentity:this.room.localParticipant.identity,trackId:n,codec:i};e.transform=new RTCRtpScriptTransform(this.worker,s)}else{j.info("initialize encoded streams");const s=e.createEncodedStreams(),a={kind:"encode",data:{readableStream:s.readable,writableStream:s.writable,codec:i,trackId:n,participantIdentity:this.room.localParticipant.identity}};this.worker.postMessage(a,[s.readable,s.writable])}e[nn]=!0}}}var jt;(function(t){t[t.WAITING=0]="WAITING",t[t.RUNNING=1]="RUNNING",t[t.COMPLETED=2]="COMPLETED"})(jt||(jt={}));class bd{constructor(){this.pendingTasks=new Map,this.taskMutex=new be,this.nextTaskIndex=0}run(e){return y(this,void 0,void 0,function*(){const n={id:this.nextTaskIndex++,enqueuedAt:Date.now(),status:jt.WAITING};this.pendingTasks.set(n.id,n);const i=yield this.taskMutex.lock();try{return n.executedAt=Date.now(),n.status=jt.RUNNING,yield e()}finally{n.status=jt.COMPLETED,this.pendingTasks.delete(n.id),i()}})}flush(){return y(this,void 0,void 0,function*(){return this.run(()=>y(this,void 0,void 0,function*(){}))})}snapshot(){return Array.from(this.pendingTasks.values())}}const yd=["syncState","trickle","offer","answer","simulate","leave"];function kd(t){const e=yd.indexOf(t.case)>=0;return j.trace("request allowed to bypass queue:",{canPass:e,req:t}),e}var z;(function(t){t[t.CONNECTING=0]="CONNECTING",t[t.CONNECTED=1]="CONNECTED",t[t.RECONNECTING=2]="RECONNECTING",t[t.DISCONNECTING=3]="DISCONNECTING",t[t.DISCONNECTED=4]="DISCONNECTED"})(z||(z={}));class cr{get currentState(){return this.state}get isDisconnected(){return this.state===z.DISCONNECTING||this.state===z.DISCONNECTED}get isEstablishingConnection(){return this.state===z.CONNECTING||this.state===z.RECONNECTING}getNextRequestId(){return this._requestId+=1,this._requestId}constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var i;this.rtt=0,this.state=z.DISCONNECTED,this.log=j,this._requestId=0,this.resetCallbacks=()=>{this.onAnswer=void 0,this.onLeave=void 0,this.onLocalTrackPublished=void 0,this.onLocalTrackUnpublished=void 0,this.onNegotiateRequested=void 0,this.onOffer=void 0,this.onRemoteMuteChanged=void 0,this.onSubscribedQualityUpdate=void 0,this.onTokenRefresh=void 0,this.onTrickle=void 0,this.onClose=void 0},this.log=Be((i=n.loggerName)!==null&&i!==void 0?i:_e.Signal),this.loggerContextCb=n.loggerContextCb,this.useJSON=e,this.requestQueue=new bd,this.queuedRequests=[],this.closingLock=new be,this.connectionLock=new be,this.state=z.DISCONNECTED}get logContext(){var e,n;return(n=(e=this.loggerContextCb)===null||e===void 0?void 0:e.call(this))!==null&&n!==void 0?n:{}}join(e,n,i,r){return y(this,void 0,void 0,function*(){return this.state=z.CONNECTING,this.options=i,yield this.connect(e,n,i,r)})}reconnect(e,n,i,r){return y(this,void 0,void 0,function*(){if(!this.options){this.log.warn("attempted to reconnect without signal options being set, ignoring",this.logContext);return}return this.state=z.RECONNECTING,this.clearPingInterval(),yield this.connect(e,n,Object.assign(Object.assign({},this.options),{reconnect:!0,sid:i,reconnectReason:r}))})}connect(e,n,i,r){this.connectOptions=i,e=pd(e),e=e.replace(/\/$/,""),e+="/rtc";const s=hd(),a=Sd(n,s,i);return new Promise((o,c)=>y(this,void 0,void 0,function*(){const u=yield this.connectionLock.lock();try{const l=()=>y(this,void 0,void 0,function*(){this.close(),clearTimeout(h),c(new G("room connection has been cancelled (signal)"))}),h=setTimeout(()=>{this.close(),c(new G("room connection has timed out (signal)"))},i.websocketTimeout);r!=null&&r.aborted&&l(),r==null||r.addEventListener("abort",l),this.log.debug("connecting to ".concat(e+a),this.logContext),this.ws&&(yield this.close(!1)),this.ws=new WebSocket(e+a),this.ws.binaryType="arraybuffer",this.ws.onopen=()=>{clearTimeout(h)},this.ws.onerror=f=>y(this,void 0,void 0,function*(){if(this.state!==z.CONNECTED){this.state=z.DISCONNECTED,clearTimeout(h);try{const p=yield fetch("http".concat(e.substring(2),"/validate").concat(a));if(p.status.toFixed(0).startsWith("4")){const g=yield p.text();c(new G(g,0,p.status))}else c(new G("Internal error",2,p.status))}catch{c(new G("server was not reachable",1))}return}this.handleWSError(f)}),this.ws.onmessage=f=>y(this,void 0,void 0,function*(){var p,g,b;let v;if(typeof f.data=="string"){const m=JSON.parse(f.data);v=jr.fromJson(m,{ignoreUnknownFields:!0})}else if(f.data instanceof ArrayBuffer)v=jr.fromBinary(new Uint8Array(f.data));else{this.log.error("could not decode websocket message: ".concat(typeof f.data),this.logContext);return}if(this.state!==z.CONNECTED){let m=!1;if(((p=v.message)===null||p===void 0?void 0:p.case)==="join"?(this.state=z.CONNECTED,r==null||r.removeEventListener("abort",l),this.pingTimeoutDuration=v.message.value.pingTimeout,this.pingIntervalDuration=v.message.value.pingInterval,this.pingTimeoutDuration&&this.pingTimeoutDuration>0&&(this.log.debug("ping config",Object.assign(Object.assign({},this.logContext),{timeout:this.pingTimeoutDuration,interval:this.pingIntervalDuration})),this.startPingInterval()),o(v.message.value)):this.state===z.RECONNECTING&&v.message.case!=="leave"?(this.state=z.CONNECTED,r==null||r.removeEventListener("abort",l),this.startPingInterval(),((g=v.message)===null||g===void 0?void 0:g.case)==="reconnect"?o(v.message.value):(this.log.debug("declaring signal reconnected without reconnect response received",this.logContext),o(void 0),m=!0)):this.isEstablishingConnection&&v.message.case==="leave"?c(new G("Received leave request while trying to (re)connect",4)):i.reconnect||c(new G("did not receive join response, got ".concat((b=v.message)===null||b===void 0?void 0:b.case," instead"))),!m)return}this.signalLatency&&(yield Ae(this.signalLatency)),this.handleSignalResponse(v)}),this.ws.onclose=f=>{this.isEstablishingConnection&&c(new G("Websocket got closed during a (re)connection attempt")),this.log.warn("websocket closed",Object.assign(Object.assign({},this.logContext),{reason:f.reason,code:f.code,wasClean:f.wasClean,state:this.state})),this.handleOnClose(f.reason)}}finally{u()}}))}close(){return y(this,arguments,void 0,function(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function*(){const i=yield e.closingLock.lock();try{if(e.clearPingInterval(),n&&(e.state=z.DISCONNECTING),e.ws){e.ws.onmessage=null,e.ws.onopen=null,e.ws.onclose=null;const r=new Promise(s=>{e.ws?e.ws.onclose=()=>{s()}:s()});e.ws.readyState<e.ws.CLOSING&&(e.ws.close(),yield Promise.race([r,Ae(250)])),e.ws=void 0}}finally{n&&(e.state=z.DISCONNECTED),i()}}()})}sendOffer(e){this.log.debug("sending offer",Object.assign(Object.assign({},this.logContext),{offerSdp:e.sdp})),this.sendRequest({case:"offer",value:wn(e)})}sendAnswer(e){return this.log.debug("sending answer",Object.assign(Object.assign({},this.logContext),{answerSdp:e.sdp})),this.sendRequest({case:"answer",value:wn(e)})}sendIceCandidate(e,n){return this.log.trace("sending ice candidate",Object.assign(Object.assign({},this.logContext),{candidate:e})),this.sendRequest({case:"trickle",value:new Zi({candidateInit:JSON.stringify(e),target:n})})}sendMuteTrack(e,n){return this.sendRequest({case:"mute",value:new er({sid:e,muted:n})})}sendAddTrack(e){return this.sendRequest({case:"addTrack",value:e})}sendUpdateLocalMetadata(e,n){return y(this,arguments,void 0,function(i,r){var s=this;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){const o=s.getNextRequestId();return yield s.sendRequest({case:"updateMetadata",value:new ya({requestId:o,metadata:i,name:r,attributes:a})}),o}()})}sendUpdateTrackSettings(e){this.sendRequest({case:"trackSetting",value:e})}sendUpdateSubscription(e){return this.sendRequest({case:"subscription",value:e})}sendSyncState(e){return this.sendRequest({case:"syncState",value:e})}sendUpdateVideoLayers(e,n){return this.sendRequest({case:"updateLayers",value:new ba({trackSid:e,layers:n})})}sendUpdateSubscriptionPermissions(e,n){return this.sendRequest({case:"subscriptionPermission",value:new Ca({allParticipants:e,trackPermissions:n})})}sendSimulateScenario(e){return this.sendRequest({case:"simulate",value:e})}sendPing(){return Promise.all([this.sendRequest({case:"ping",value:ee.parse(Date.now())}),this.sendRequest({case:"pingReq",value:new Pa({timestamp:ee.parse(Date.now()),rtt:ee.parse(this.rtt)})})])}sendUpdateLocalAudioTrack(e,n){return this.sendRequest({case:"updateAudioTrack",value:new va({trackSid:e,features:n})})}sendLeave(){return this.sendRequest({case:"leave",value:new Un({reason:mt.CLIENT_INITIATED,action:gt.DISCONNECT})})}sendRequest(e){return y(this,arguments,void 0,function(n){var i=this;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return function*(){if(!r&&!kd(n)&&i.state===z.RECONNECTING){i.queuedRequests.push(()=>y(i,void 0,void 0,function*(){yield this.sendRequest(n,!0)}));return}if(r||(yield i.requestQueue.flush()),i.signalLatency&&(yield Ae(i.signalLatency)),!i.ws||i.ws.readyState!==i.ws.OPEN){i.log.error("cannot send signal request before connected, type: ".concat(n==null?void 0:n.case),i.logContext);return}const a=new Yu({message:n});try{i.useJSON?i.ws.send(a.toJsonString()):i.ws.send(a.toBinary())}catch(o){i.log.error("error sending signal message",Object.assign(Object.assign({},i.logContext),{error:o}))}}()})}handleSignalResponse(e){var n,i;const r=e.message;if(r==null){this.log.debug("received unsupported message",this.logContext);return}let s=!1;if(r.case==="answer"){const a=ss(r.value);this.onAnswer&&this.onAnswer(a)}else if(r.case==="offer"){const a=ss(r.value);this.onOffer&&this.onOffer(a)}else if(r.case==="trickle"){const a=JSON.parse(r.value.candidateInit);this.onTrickle&&this.onTrickle(a,r.value.target)}else r.case==="update"?this.onParticipantUpdate&&this.onParticipantUpdate((n=r.value.participants)!==null&&n!==void 0?n:[]):r.case==="trackPublished"?this.onLocalTrackPublished&&this.onLocalTrackPublished(r.value):r.case==="speakersChanged"?this.onSpeakersChanged&&this.onSpeakersChanged((i=r.value.speakers)!==null&&i!==void 0?i:[]):r.case==="leave"?this.onLeave&&this.onLeave(r.value):r.case==="mute"?this.onRemoteMuteChanged&&this.onRemoteMuteChanged(r.value.sid,r.value.muted):r.case==="roomUpdate"?this.onRoomUpdate&&r.value.room&&this.onRoomUpdate(r.value.room):r.case==="connectionQuality"?this.onConnectionQuality&&this.onConnectionQuality(r.value):r.case==="streamStateUpdate"?this.onStreamStateUpdate&&this.onStreamStateUpdate(r.value):r.case==="subscribedQualityUpdate"?this.onSubscribedQualityUpdate&&this.onSubscribedQualityUpdate(r.value):r.case==="subscriptionPermissionUpdate"?this.onSubscriptionPermissionUpdate&&this.onSubscriptionPermissionUpdate(r.value):r.case==="refreshToken"?this.onTokenRefresh&&this.onTokenRefresh(r.value):r.case==="trackUnpublished"?this.onLocalTrackUnpublished&&this.onLocalTrackUnpublished(r.value):r.case==="subscriptionResponse"?this.onSubscriptionError&&this.onSubscriptionError(r.value):r.case==="pong"||(r.case==="pongResp"?(this.rtt=Date.now()-Number.parseInt(r.value.lastPingTimestamp.toString()),this.resetPingTimeout(),s=!0):r.case==="requestResponse"?this.onRequestResponse&&this.onRequestResponse(r.value):r.case==="trackSubscribed"?this.onLocalTrackSubscribed&&this.onLocalTrackSubscribed(r.value.trackSid):this.log.debug("unsupported message",Object.assign(Object.assign({},this.logContext),{msgCase:r.case})));s||this.resetPingTimeout()}setReconnected(){for(;this.queuedRequests.length>0;){const e=this.queuedRequests.shift();e&&this.requestQueue.run(e)}}handleOnClose(e){return y(this,void 0,void 0,function*(){if(this.state===z.DISCONNECTED)return;const n=this.onClose;yield this.close(),this.log.debug("websocket connection closed: ".concat(e),Object.assign(Object.assign({},this.logContext),{reason:e})),n&&n(e)})}handleWSError(e){this.log.error("websocket error",Object.assign(Object.assign({},this.logContext),{error:e}))}resetPingTimeout(){if(this.clearPingTimeout(),!this.pingTimeoutDuration){this.log.warn("ping timeout duration not set",this.logContext);return}this.pingTimeout=ie.setTimeout(()=>{this.log.warn("ping timeout triggered. last pong received at: ".concat(new Date(Date.now()-this.pingTimeoutDuration*1e3).toUTCString()),this.logContext),this.handleOnClose("ping timeout")},this.pingTimeoutDuration*1e3)}clearPingTimeout(){this.pingTimeout&&ie.clearTimeout(this.pingTimeout)}startPingInterval(){if(this.clearPingInterval(),this.resetPingTimeout(),!this.pingIntervalDuration){this.log.warn("ping interval duration not set",this.logContext);return}this.log.debug("start ping interval",this.logContext),this.pingInterval=ie.setInterval(()=>{this.sendPing()},this.pingIntervalDuration*1e3)}clearPingInterval(){this.log.debug("clearing ping interval",this.logContext),this.clearPingTimeout(),this.pingInterval&&ie.clearInterval(this.pingInterval)}}function ss(t){const e={type:"offer",sdp:t.sdp};switch(t.type){case"answer":case"offer":case"pranswer":case"rollback":e.type=t.type;break}return e}function wn(t){return new st({sdp:t.sdp,type:t.type})}function Sd(t,e,n){var i;const r=new URLSearchParams;return r.set("access_token",t),n.reconnect&&(r.set("reconnect","1"),n.sid&&r.set("sid",n.sid)),r.set("auto_subscribe",n.autoSubscribe?"1":"0"),r.set("sdk",We()?"reactnative":"js"),r.set("version",e.version),r.set("protocol",e.protocol.toString()),e.deviceModel&&r.set("device_model",e.deviceModel),e.os&&r.set("os",e.os),e.osVersion&&r.set("os_version",e.osVersion),e.browser&&r.set("browser",e.browser),e.browserVersion&&r.set("browser_version",e.browserVersion),n.adaptiveStream&&r.set("adaptive_stream","1"),n.reconnectReason&&r.set("reconnect_reason",n.reconnectReason.toString()),!((i=navigator.connection)===null||i===void 0)&&i.type&&r.set("network",navigator.connection.type),"?".concat(r.toString())}var To={},Eo={exports:{}},as=Eo.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(t){return t.encoding?"rtpmap:%d %s/%s/%s":t.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(t){return t.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(t){return t.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(t){return"extmap:%d"+(t.direction?"/%s":"%v")+(t["encrypt-uri"]?" %s":"%v")+" %s"+(t.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(t){return t.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(t){var e="candidate:%s %d %s %d %s %d typ %s";return e+=t.raddr!=null?" raddr %s rport %d":"%v%v",e+=t.tcptype!=null?" tcptype %s":"%v",t.generation!=null&&(e+=" generation %d"),e+=t["network-id"]!=null?" network-id %d":"%v",e+=t["network-cost"]!=null?" network-cost %d":"%v",e}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(t){var e="ssrc:%d";return t.attribute!=null&&(e+=" %s",t.value!=null&&(e+=":%s")),e}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(t){return t.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(t){return t.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(t){return"imageattr:%s %s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(t){return"simulcast:%s %s"+(t.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(t){return"ts-refclk:%s"+(t.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(t){var e="mediaclk:";return e+=t.id!=null?"id=%s %s":"%v%s",e+=t.mediaClockValue!=null?"=%s":"",e+=t.rateNumerator!=null?" rate=%s":"",e+=t.rateDenominator!=null?"/%s":"",e}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(as).forEach(function(t){var e=as[t];e.forEach(function(n){n.reg||(n.reg=/(.*)/),n.format||(n.format="%s")})});var Po=Eo.exports;(function(t){var e=function(o){return String(Number(o))===o?Number(o):o},n=function(o,c,u,l){if(l&&!u)c[l]=e(o[1]);else for(var h=0;h<u.length;h+=1)o[h+1]!=null&&(c[u[h]]=e(o[h+1]))},i=function(o,c,u){var l=o.name&&o.names;o.push&&!c[o.push]?c[o.push]=[]:l&&!c[o.name]&&(c[o.name]={});var h=o.push?{}:l?c[o.name]:c;n(u.match(o.reg),h,o.names,o.name),o.push&&c[o.push].push(h)},r=Po,s=RegExp.prototype.test.bind(/^([a-z])=(.*)/);t.parse=function(o){var c={},u=[],l=c;return o.split(/(\r\n|\r|\n)/).filter(s).forEach(function(h){var f=h[0],p=h.slice(2);f==="m"&&(u.push({rtp:[],fmtp:[]}),l=u[u.length-1]);for(var g=0;g<(r[f]||[]).length;g+=1){var b=r[f][g];if(b.reg.test(p))return i(b,l,p)}}),c.media=u,c};var a=function(o,c){var u=c.split(/=(.+)/,2);return u.length===2?o[u[0]]=e(u[1]):u.length===1&&c.length>1&&(o[u[0]]=void 0),o};t.parseParams=function(o){return o.split(/;\s?/).reduce(a,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(o){return o.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(o){for(var c=[],u=o.split(" ").map(e),l=0;l<u.length;l+=3)c.push({component:u[l],ip:u[l+1],port:u[l+2]});return c},t.parseImageAttributes=function(o){return o.split(" ").map(function(c){return c.substring(1,c.length-1).split(",").reduce(a,{})})},t.parseSimulcastStreamList=function(o){return o.split(";").map(function(c){return c.split(",").map(function(u){var l,h=!1;return u[0]!=="~"?l=e(u):(l=e(u.substring(1,u.length)),h=!0),{scid:l,paused:h}})})}})(To);var ri=Po,Cd=/%[sdv%]/g,Td=function(t){var e=1,n=arguments,i=n.length;return t.replace(Cd,function(r){if(e>=i)return r;var s=n[e];switch(e+=1,r){case"%%":return"%";case"%s":return String(s);case"%d":return Number(s);case"%v":return""}})},xt=function(t,e,n){var i=e.format instanceof Function?e.format(e.push?n:n[e.name]):e.format,r=[t+"="+i];if(e.names)for(var s=0;s<e.names.length;s+=1){var a=e.names[s];e.name?r.push(n[e.name][a]):r.push(n[e.names[s]])}else r.push(n[e.name]);return Td.apply(null,r)},Ed=["v","o","s","i","u","e","p","c","b","t","r","z","a"],Pd=["i","c","b","a"],wd=function(t,e){e=e||{},t.version==null&&(t.version=0),t.name==null&&(t.name=" "),t.media.forEach(function(s){s.payloads==null&&(s.payloads="")});var n=e.outerOrder||Ed,i=e.innerOrder||Pd,r=[];return n.forEach(function(s){ri[s].forEach(function(a){a.name in t&&t[a.name]!=null?r.push(xt(s,a,t)):a.push in t&&t[a.push]!=null&&t[a.push].forEach(function(o){r.push(xt(s,a,o))})})}),t.media.forEach(function(s){r.push(xt("m",ri.m[0],s)),i.forEach(function(a){ri[a].forEach(function(o){o.name in s&&s[o.name]!=null?r.push(xt(a,o,s)):o.push in s&&s[o.push]!=null&&s[o.push].forEach(function(c){r.push(xt(a,o,c))})})})}),r.join(`\r +`)+`\r +`},_d=To,Rd=wd,si=Rd,Nt=_d.parse;const Id=.7,Md=20,kt={NegotiationStarted:"negotiationStarted",NegotiationComplete:"negotiationComplete",RTPVideoPayloadTypes:"rtpVideoPayloadTypes"};class os extends Ne.EventEmitter{get pc(){return this._pc||(this._pc=this.createPC()),this._pc}constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var i;super(),this.log=j,this.pendingCandidates=[],this.restartingIce=!1,this.renegotiate=!1,this.trackBitrates=[],this.remoteStereoMids=[],this.remoteNackMids=[],this.negotiate=ar(r=>y(this,void 0,void 0,function*(){this.emit(kt.NegotiationStarted);try{yield this.createAndSendOffer()}catch(s){if(r)r(s);else throw s}}),Md),this.close=()=>{this._pc&&(this._pc.close(),this._pc.onconnectionstatechange=null,this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.ondatachannel=null,this._pc.onnegotiationneeded=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ondatachannel=null,this._pc.ontrack=null,this._pc.onconnectionstatechange=null,this._pc.oniceconnectionstatechange=null,this._pc=null)},this.log=Be((i=n.loggerName)!==null&&i!==void 0?i:_e.PCTransport),this.loggerOptions=n,this.config=e,this._pc=this.createPC()}createPC(){const e=new RTCPeerConnection(this.config);return e.onicecandidate=n=>{var i;n.candidate&&((i=this.onIceCandidate)===null||i===void 0||i.call(this,n.candidate))},e.onicecandidateerror=n=>{var i;(i=this.onIceCandidateError)===null||i===void 0||i.call(this,n)},e.oniceconnectionstatechange=()=>{var n;(n=this.onIceConnectionStateChange)===null||n===void 0||n.call(this,e.iceConnectionState)},e.onsignalingstatechange=()=>{var n;(n=this.onSignalingStatechange)===null||n===void 0||n.call(this,e.signalingState)},e.onconnectionstatechange=()=>{var n;(n=this.onConnectionStateChange)===null||n===void 0||n.call(this,e.connectionState)},e.ondatachannel=n=>{var i;(i=this.onDataChannel)===null||i===void 0||i.call(this,n)},e.ontrack=n=>{var i;(i=this.onTrack)===null||i===void 0||i.call(this,n)},e}get logContext(){var e,n;return Object.assign({},(n=(e=this.loggerOptions).loggerContextCb)===null||n===void 0?void 0:n.call(e))}get isICEConnected(){return this._pc!==null&&(this.pc.iceConnectionState==="connected"||this.pc.iceConnectionState==="completed")}addIceCandidate(e){return y(this,void 0,void 0,function*(){if(this.pc.remoteDescription&&!this.restartingIce)return this.pc.addIceCandidate(e);this.pendingCandidates.push(e)})}setRemoteDescription(e){return y(this,void 0,void 0,function*(){var n;let i;if(e.type==="offer"){let{stereoMids:r,nackMids:s}=Od(e);this.remoteStereoMids=r,this.remoteNackMids=s}else if(e.type==="answer"){const r=Nt((n=e.sdp)!==null&&n!==void 0?n:"");r.media.forEach(s=>{s.type==="audio"&&this.trackBitrates.some(a=>{if(!a.transceiver||s.mid!=a.transceiver.mid)return!1;let o=0;if(s.rtp.some(u=>u.codec.toUpperCase()===a.codec.toUpperCase()?(o=u.payload,!0):!1),o===0)return!0;let c=!1;for(const u of s.fmtp)if(u.payload===o){u.config=u.config.split(";").filter(l=>!l.includes("maxaveragebitrate")).join(";"),a.maxbr>0&&(u.config+=";maxaveragebitrate=".concat(a.maxbr*1e3)),c=!0;break}return c||a.maxbr>0&&s.fmtp.push({payload:o,config:"maxaveragebitrate=".concat(a.maxbr*1e3)}),!0})}),i=si(r)}yield this.setMungedSDP(e,i,!0),this.pendingCandidates.forEach(r=>{this.pc.addIceCandidate(r)}),this.pendingCandidates=[],this.restartingIce=!1,this.renegotiate?(this.renegotiate=!1,yield this.createAndSendOffer()):e.type==="answer"&&(this.emit(kt.NegotiationComplete),e.sdp&&Nt(e.sdp).media.forEach(s=>{s.type==="video"&&this.emit(kt.RTPVideoPayloadTypes,s.rtp)}))})}createAndSendOffer(e){return y(this,void 0,void 0,function*(){var n;if(this.onOffer===void 0)return;if(e!=null&&e.iceRestart&&(this.log.debug("restarting ICE",this.logContext),this.restartingIce=!0),this._pc&&this._pc.signalingState==="have-local-offer"){const s=this._pc.remoteDescription;if(e!=null&&e.iceRestart&&s)yield this._pc.setRemoteDescription(s);else{this.renegotiate=!0;return}}else if(!this._pc||this._pc.signalingState==="closed"){this.log.warn("could not createOffer with closed peer connection",this.logContext);return}this.log.debug("starting to negotiate",this.logContext);const i=yield this.pc.createOffer(e);this.log.debug("original offer",Object.assign({sdp:i.sdp},this.logContext));const r=Nt((n=i.sdp)!==null&&n!==void 0?n:"");r.media.forEach(s=>{s.type==="audio"?cs(s,[],[]):s.type==="video"&&this.trackBitrates.some(a=>{if(!s.msid||!a.cid||!s.msid.includes(a.cid))return!1;let o=0;if(s.rtp.some(u=>u.codec.toUpperCase()===a.codec.toUpperCase()?(o=u.payload,!0):!1),o===0||(Ft(a.codec)&&xd(s),a.codec!=="av1"))return!0;const c=Math.round(a.maxbr*Id);for(const u of s.fmtp)if(u.payload===o){u.config.includes("x-google-start-bitrate")||(u.config+=";x-google-start-bitrate=".concat(c));break}return!0})}),yield this.setMungedSDP(i,si(r)),this.onOffer(i)})}createAndSetAnswer(){return y(this,void 0,void 0,function*(){var e;const n=yield this.pc.createAnswer(),i=Nt((e=n.sdp)!==null&&e!==void 0?e:"");return i.media.forEach(r=>{r.type==="audio"&&cs(r,this.remoteStereoMids,this.remoteNackMids)}),yield this.setMungedSDP(n,si(i)),n})}createDataChannel(e,n){return this.pc.createDataChannel(e,n)}addTransceiver(e,n){return this.pc.addTransceiver(e,n)}addTrack(e){if(!this._pc)throw new Y("PC closed, cannot add track");return this._pc.addTrack(e)}setTrackCodecBitrate(e){this.trackBitrates.push(e)}setConfiguration(e){var n;if(!this._pc)throw new Y("PC closed, cannot configure");return(n=this._pc)===null||n===void 0?void 0:n.setConfiguration(e)}canRemoveTrack(){var e;return!!(!((e=this._pc)===null||e===void 0)&&e.removeTrack)}removeTrack(e){var n;return(n=this._pc)===null||n===void 0?void 0:n.removeTrack(e)}getConnectionState(){var e,n;return(n=(e=this._pc)===null||e===void 0?void 0:e.connectionState)!==null&&n!==void 0?n:"closed"}getICEConnectionState(){var e,n;return(n=(e=this._pc)===null||e===void 0?void 0:e.iceConnectionState)!==null&&n!==void 0?n:"closed"}getSignallingState(){var e,n;return(n=(e=this._pc)===null||e===void 0?void 0:e.signalingState)!==null&&n!==void 0?n:"closed"}getTransceivers(){var e,n;return(n=(e=this._pc)===null||e===void 0?void 0:e.getTransceivers())!==null&&n!==void 0?n:[]}getSenders(){var e,n;return(n=(e=this._pc)===null||e===void 0?void 0:e.getSenders())!==null&&n!==void 0?n:[]}getLocalDescription(){var e;return(e=this._pc)===null||e===void 0?void 0:e.localDescription}getRemoteDescription(){var e;return(e=this.pc)===null||e===void 0?void 0:e.remoteDescription}getStats(){return this.pc.getStats()}getConnectedAddress(){return y(this,void 0,void 0,function*(){var e;if(!this._pc)return;let n="";const i=new Map,r=new Map;if((yield this._pc.getStats()).forEach(o=>{switch(o.type){case"transport":n=o.selectedCandidatePairId;break;case"candidate-pair":n===""&&o.selected&&(n=o.id),i.set(o.id,o);break;case"remote-candidate":r.set(o.id,"".concat(o.address,":").concat(o.port));break}}),n==="")return;const a=(e=i.get(n))===null||e===void 0?void 0:e.remoteCandidateId;if(a!==void 0)return r.get(a)})}setMungedSDP(e,n,i){return y(this,void 0,void 0,function*(){if(n){const r=e.sdp;e.sdp=n;try{this.log.debug("setting munged ".concat(i?"remote":"local"," description"),this.logContext),i?yield this.pc.setRemoteDescription(e):yield this.pc.setLocalDescription(e);return}catch(s){this.log.warn("not able to set ".concat(e.type,", falling back to unmodified sdp"),Object.assign(Object.assign({},this.logContext),{error:s,sdp:n})),e.sdp=r}}try{i?yield this.pc.setRemoteDescription(e):yield this.pc.setLocalDescription(e)}catch(r){let s="unknown error";r instanceof Error?s=r.message:typeof r=="string"&&(s=r);const a={error:s,sdp:e.sdp};throw!i&&this.pc.remoteDescription&&(a.remoteSdp=this.pc.remoteDescription),this.log.error("unable to set ".concat(e.type),Object.assign(Object.assign({},this.logContext),{fields:a})),new Ii(s)}})}}function cs(t,e,n){let i=0;t.rtp.some(r=>r.codec==="opus"?(i=r.payload,!0):!1),i>0&&(t.rtcpFb||(t.rtcpFb=[]),n.includes(t.mid)&&!t.rtcpFb.some(r=>r.payload===i&&r.type==="nack")&&t.rtcpFb.push({payload:i,type:"nack"}),e.includes(t.mid)&&t.fmtp.some(r=>r.payload===i?(r.config.includes("stereo=1")||(r.config+=";stereo=1"),!0):!1))}function xd(t){var e,n;let i=0;((e=t.ext)===null||e===void 0?void 0:e.some(s=>s.uri===Zr?!0:(s.value>i&&(i=s.value),!1)))||(n=t.ext)===null||n===void 0||n.push({value:i+1,uri:Zr})}function Od(t){var e;const n=[],i=[],r=Nt((e=t.sdp)!==null&&e!==void 0?e:"");let s=0;return r.media.forEach(a=>{var o;a.type==="audio"&&(a.rtp.some(c=>c.codec==="opus"?(s=c.payload,!0):!1),!((o=a.rtcpFb)===null||o===void 0)&&o.some(c=>c.payload===s&&c.type==="nack")&&i.push(a.mid),a.fmtp.some(c=>c.payload===s?(c.config.includes("sprop-stereo=1")&&n.push(a.mid),!0):!1))}),{stereoMids:n,nackMids:i}}const Ui="vp8",Dd={audioPreset:Mi.music,dtx:!0,red:!0,forceStereo:!1,simulcast:!0,screenShareEncoding:or.h1080fps15.encoding,stopMicTrackOnMute:!1,videoCodec:Ui,backupCodec:!0},wo={autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0},_o={resolution:Gt.h720.resolution},Ad={adaptiveStream:!1,dynacast:!1,stopLocalTrackOnUnpublish:!0,reconnectPolicy:new Cl,disconnectOnPageLeave:!0,webAudioMix:!1},ur={autoSubscribe:!0,maxRetries:1,peerConnectionTimeout:15e3,websocketTimeout:15e3};var H;(function(t){t[t.NEW=0]="NEW",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t[t.FAILED=3]="FAILED",t[t.CLOSING=4]="CLOSING",t[t.CLOSED=5]="CLOSED"})(H||(H={}));class Nd{get needsPublisher(){return this.isPublisherConnectionRequired}get needsSubscriber(){return this.isSubscriberConnectionRequired}get currentState(){return this.state}constructor(e,n,i){var r;this.peerConnectionTimeout=ur.peerConnectionTimeout,this.log=j,this.updateState=()=>{var s;const a=this.state,o=this.requiredTransports.map(c=>c.getConnectionState());o.every(c=>c==="connected")?this.state=H.CONNECTED:o.some(c=>c==="failed")?this.state=H.FAILED:o.some(c=>c==="connecting")?this.state=H.CONNECTING:o.every(c=>c==="closed")?this.state=H.CLOSED:o.some(c=>c==="closed")?this.state=H.CLOSING:o.every(c=>c==="new")&&(this.state=H.NEW),a!==this.state&&(this.log.debug("pc state change: from ".concat(H[a]," to ").concat(H[this.state]),this.logContext),(s=this.onStateChange)===null||s===void 0||s.call(this,this.state,this.publisher.getConnectionState(),this.subscriber.getConnectionState()))},this.log=Be((r=i.loggerName)!==null&&r!==void 0?r:_e.PCManager),this.loggerOptions=i,this.isPublisherConnectionRequired=!n,this.isSubscriberConnectionRequired=n,this.publisher=new os(e,i),this.subscriber=new os(e,i),this.publisher.onConnectionStateChange=this.updateState,this.subscriber.onConnectionStateChange=this.updateState,this.publisher.onIceConnectionStateChange=this.updateState,this.subscriber.onIceConnectionStateChange=this.updateState,this.publisher.onSignalingStatechange=this.updateState,this.subscriber.onSignalingStatechange=this.updateState,this.publisher.onIceCandidate=s=>{var a;(a=this.onIceCandidate)===null||a===void 0||a.call(this,s,we.PUBLISHER)},this.subscriber.onIceCandidate=s=>{var a;(a=this.onIceCandidate)===null||a===void 0||a.call(this,s,we.SUBSCRIBER)},this.subscriber.onDataChannel=s=>{var a;(a=this.onDataChannel)===null||a===void 0||a.call(this,s)},this.subscriber.onTrack=s=>{var a;(a=this.onTrack)===null||a===void 0||a.call(this,s)},this.publisher.onOffer=s=>{var a;(a=this.onPublisherOffer)===null||a===void 0||a.call(this,s)},this.state=H.NEW,this.connectionLock=new be}get logContext(){var e,n;return Object.assign({},(n=(e=this.loggerOptions).loggerContextCb)===null||n===void 0?void 0:n.call(e))}requirePublisher(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isPublisherConnectionRequired=e,this.updateState()}requireSubscriber(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isSubscriberConnectionRequired=e,this.updateState()}createAndSendPublisherOffer(e){return this.publisher.createAndSendOffer(e)}setPublisherAnswer(e){return this.publisher.setRemoteDescription(e)}removeTrack(e){return this.publisher.removeTrack(e)}close(){return y(this,void 0,void 0,function*(){if(this.publisher&&this.publisher.getSignallingState()!=="closed"){const e=this.publisher;for(const n of e.getSenders())try{e.canRemoveTrack()&&e.removeTrack(n)}catch(i){this.log.warn("could not removeTrack",Object.assign(Object.assign({},this.logContext),{error:i}))}}yield Promise.all([this.publisher.close(),this.subscriber.close()]),this.updateState()})}triggerIceRestart(){return y(this,void 0,void 0,function*(){this.subscriber.restartingIce=!0,this.needsPublisher&&(yield this.createAndSendPublisherOffer({iceRestart:!0}))})}addIceCandidate(e,n){return y(this,void 0,void 0,function*(){n===we.PUBLISHER?yield this.publisher.addIceCandidate(e):yield this.subscriber.addIceCandidate(e)})}createSubscriberAnswerFromOffer(e){return y(this,void 0,void 0,function*(){return this.log.debug("received server offer",Object.assign(Object.assign({},this.logContext),{RTCSdpType:e.type,sdp:e.sdp,signalingState:this.subscriber.getSignallingState().toString()})),yield this.subscriber.setRemoteDescription(e),yield this.subscriber.createAndSetAnswer()})}updateConfiguration(e,n){this.publisher.setConfiguration(e),this.subscriber.setConfiguration(e),n&&this.triggerIceRestart()}ensurePCTransportConnection(e,n){return y(this,void 0,void 0,function*(){var i;const r=yield this.connectionLock.lock();try{this.isPublisherConnectionRequired&&this.publisher.getConnectionState()!=="connected"&&this.publisher.getConnectionState()!=="connecting"&&(this.log.debug("negotiation required, start negotiating",this.logContext),this.publisher.negotiate()),yield Promise.all((i=this.requiredTransports)===null||i===void 0?void 0:i.map(s=>this.ensureTransportConnected(s,e,n)))}finally{r()}})}negotiate(e){return y(this,void 0,void 0,function*(){return new Promise((n,i)=>y(this,void 0,void 0,function*(){const r=setTimeout(()=>{i("negotiation timed out")},this.peerConnectionTimeout),s=()=>{clearTimeout(r),i("negotiation aborted")};e.signal.addEventListener("abort",s),this.publisher.once(kt.NegotiationStarted,()=>{e.signal.aborted||this.publisher.once(kt.NegotiationComplete,()=>{clearTimeout(r),n()})}),yield this.publisher.negotiate(a=>{clearTimeout(r),i(a)})}))})}addPublisherTransceiver(e,n){return this.publisher.addTransceiver(e,n)}addPublisherTrack(e){return this.publisher.addTrack(e)}createPublisherDataChannel(e,n){return this.publisher.createDataChannel(e,n)}getConnectedAddress(e){return e===we.PUBLISHER?this.publisher.getConnectedAddress():e===we.SUBSCRIBER?this.publisher.getConnectedAddress():this.requiredTransports[0].getConnectedAddress()}get requiredTransports(){const e=[];return this.isPublisherConnectionRequired&&e.push(this.publisher),this.isSubscriberConnectionRequired&&e.push(this.subscriber),e}ensureTransportConnected(e,n){return y(this,arguments,void 0,function(i,r){var s=this;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.peerConnectionTimeout;return function*(){if(i.getConnectionState()!=="connected")return new Promise((c,u)=>y(s,void 0,void 0,function*(){const l=()=>{this.log.warn("abort transport connection",this.logContext),ie.clearTimeout(h),u(new G("room connection has been cancelled",3))};r!=null&&r.signal.aborted&&l(),r==null||r.signal.addEventListener("abort",l);const h=ie.setTimeout(()=>{r==null||r.signal.removeEventListener("abort",l),u(new G("could not establish pc connection"))},a);for(;this.state!==H.CONNECTED;)if(yield Ae(50),r!=null&&r.signal.aborted){u(new G("room connection has been cancelled",3));return}ie.clearTimeout(h),r==null||r.signal.removeEventListener("abort",l),c()}))}()})}}const lr=2e3;function Bn(t,e){if(!e)return 0;let n,i;return"bytesReceived"in t?(n=t.bytesReceived,i=e.bytesReceived):"bytesSent"in t&&(n=t.bytesSent,i=e.bytesSent),n===void 0||i===void 0||t.timestamp===void 0||e.timestamp===void 0?0:(n-i)*8*1e3/(t.timestamp-e.timestamp)}class oe extends it{get enhancedNoiseCancellation(){return this.isKrispNoiseFilterEnabled}constructor(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;super(e,k.Kind.Audio,n,i,s),this.stopOnMute=!1,this.isKrispNoiseFilterEnabled=!1,this.monitorSender=()=>y(this,void 0,void 0,function*(){if(!this.sender){this._currentBitrate=0;return}let a;try{a=yield this.getSenderStats()}catch(o){this.log.error("could not get audio sender stats",Object.assign(Object.assign({},this.logContext),{error:o}));return}a&&this.prevStats&&(this._currentBitrate=Bn(a,this.prevStats)),this.prevStats=a}),this.handleKrispNoiseFilterEnable=()=>{this.isKrispNoiseFilterEnabled=!0,this.log.debug("Krisp noise filter enabled",this.logContext),this.emit(_.AudioTrackFeatureUpdate,this,Oe.TF_ENHANCED_NOISE_CANCELLATION,!0)},this.handleKrispNoiseFilterDisable=()=>{this.isKrispNoiseFilterEnabled=!1,this.log.debug("Krisp noise filter disabled",this.logContext),this.emit(_.AudioTrackFeatureUpdate,this,Oe.TF_ENHANCED_NOISE_CANCELLATION,!1)},this.audioContext=r,this.checkForSilence()}setDeviceId(e){return y(this,void 0,void 0,function*(){return this._constraints.deviceId===e&&this._mediaStreamTrack.getSettings().deviceId===je(e)?!0:(this._constraints.deviceId=e,this.isMuted||(yield this.restartTrack()),this.isMuted||je(e)===this._mediaStreamTrack.getSettings().deviceId)})}mute(){const e=Object.create(null,{mute:{get:()=>super.mute}});return y(this,void 0,void 0,function*(){const n=yield this.muteLock.lock();try{return this.isMuted?(this.log.debug("Track already muted",this.logContext),this):(this.source===k.Source.Microphone&&this.stopOnMute&&!this.isUserProvided&&(this.log.debug("stopping mic track",this.logContext),this._mediaStreamTrack.stop()),yield e.mute.call(this),this)}finally{n()}})}unmute(){const e=Object.create(null,{unmute:{get:()=>super.unmute}});return y(this,void 0,void 0,function*(){const n=yield this.muteLock.lock();try{if(!this.isMuted)return this.log.debug("Track already unmuted",this.logContext),this;const i=this._constraints.deviceId&&this._mediaStreamTrack.getSettings().deviceId!==je(this._constraints.deviceId);return this.source===k.Source.Microphone&&(this.stopOnMute||this._mediaStreamTrack.readyState==="ended"||i)&&!this.isUserProvided&&(this.log.debug("reacquiring mic track",this.logContext),yield this.restartTrack()),yield e.unmute.call(this),this}finally{n()}})}restartTrack(e){return y(this,void 0,void 0,function*(){let n;if(e){const i=Vn({audio:e});typeof i.audio!="boolean"&&(n=i.audio)}yield this.restart(n)})}restart(e){const n=Object.create(null,{restart:{get:()=>super.restart}});return y(this,void 0,void 0,function*(){const i=yield n.restart.call(this,e);return this.checkForSilence(),i})}startMonitor(){fe()&&(this.monitorInterval||(this.monitorInterval=setInterval(()=>{this.monitorSender()},lr)))}setProcessor(e){return y(this,void 0,void 0,function*(){var n;const i=yield this.processorLock.lock();try{if(!this.audioContext)throw Error("Audio context needs to be set on LocalAudioTrack in order to enable processors");this.processor&&(yield this.stopProcessor());const r={kind:this.kind,track:this._mediaStreamTrack,audioContext:this.audioContext};this.log.debug("setting up audio processor ".concat(e.name),this.logContext),yield e.init(r),this.processor=e,this.processor.processedTrack&&(yield(n=this.sender)===null||n===void 0?void 0:n.replaceTrack(this.processor.processedTrack),this.processor.processedTrack.addEventListener("enable-lk-krisp-noise-filter",this.handleKrispNoiseFilterEnable),this.processor.processedTrack.addEventListener("disable-lk-krisp-noise-filter",this.handleKrispNoiseFilterDisable)),this.emit(_.TrackProcessorUpdate,this.processor)}finally{i()}})}setAudioContext(e){this.audioContext=e}getSenderStats(){return y(this,void 0,void 0,function*(){var e;if(!(!((e=this.sender)===null||e===void 0)&&e.getStats))return;const n=yield this.sender.getStats();let i;return n.forEach(r=>{r.type==="outbound-rtp"&&(i={type:"audio",streamId:r.id,packetsSent:r.packetsSent,packetsLost:r.packetsLost,bytesSent:r.bytesSent,timestamp:r.timestamp,roundTripTime:r.roundTripTime,jitter:r.jitter})}),i})}checkForSilence(){return y(this,void 0,void 0,function*(){const e=yield Yl(this);return e&&(this.isMuted||this.log.warn("silence detected on local audio track",this.logContext),this.emit(_.AudioSilenceDetected)),e})}}function Ro(t,e,n){switch(t.kind){case"audio":return new oe(t,e,!1,void 0,n);case"video":return new le(t,e,!1,n);default:throw new De("unsupported track type: ".concat(t.kind))}}const Ld=Object.values(Gt),Ud=Object.values(xi),Fd=Object.values(or),jd=[Gt.h180,Gt.h360],Vd=[xi.h180,xi.h360],Bd=t=>[{scaleResolutionDownBy:2,fps:t.encoding.maxFramerate}].map(n=>{var i,r;return new B(Math.floor(t.width/n.scaleResolutionDownBy),Math.floor(t.height/n.scaleResolutionDownBy),Math.max(15e4,Math.floor(t.encoding.maxBitrate/(Math.pow(n.scaleResolutionDownBy,2)*(((i=t.encoding.maxFramerate)!==null&&i!==void 0?i:30)/((r=n.fps)!==null&&r!==void 0?r:30))))),n.fps,t.encoding.priority)}),Fi=["q","h","f"];function ji(t,e,n,i){var r,s;let a=i==null?void 0:i.videoEncoding;t&&(a=i==null?void 0:i.screenShareEncoding);const o=i==null?void 0:i.simulcast,c=i==null?void 0:i.scalabilityMode,u=i==null?void 0:i.videoCodec;if(!a&&!o&&!c||!e||!n)return[{}];a||(a=Wd(t,e,n,u),j.debug("using video encoding",a));const l=new B(e,n,a.maxBitrate,a.maxFramerate,a.priority);if(c&&Ft(u)){const p=new Io(c),g=[];if(p.spatial>3)throw new Error("unsupported scalabilityMode: ".concat(c));const b=qe();if(at()||We()||(b==null?void 0:b.name)==="Chrome"&&Kt(b==null?void 0:b.version,"113")<0){const v=p.suffix=="h"?2:3;for(let m=0;m<p.spatial;m+=1)g.push({rid:Fi[2-m],maxBitrate:a.maxBitrate/Math.pow(v,m),maxFramerate:l.encoding.maxFramerate});g[0].scalabilityMode=c}else g.push({maxBitrate:a.maxBitrate,maxFramerate:l.encoding.maxFramerate,scalabilityMode:c});return l.encoding.priority&&(g[0].priority=l.encoding.priority,g[0].networkPriority=l.encoding.priority),j.debug("using svc encoding",{encodings:g}),g}if(!o)return[a];let h=[];t?h=(r=ls(i==null?void 0:i.screenShareSimulcastLayers))!==null&&r!==void 0?r:us(t,l):h=(s=ls(i==null?void 0:i.videoSimulcastLayers))!==null&&s!==void 0?s:us(t,l);let f;if(h.length>0){const p=h[0];h.length>1&&([,f]=h);const g=Math.max(e,n);if(g>=960&&f)return ai(e,n,[p,f,l]);if(g>=480)return ai(e,n,[p,l])}return ai(e,n,[l])}function qd(t,e,n){var i,r,s,a;if(!n.backupCodec||n.backupCodec===!0||n.backupCodec.codec===n.videoCodec)return;e!==n.backupCodec.codec&&j.warn("requested a different codec than specified as backup",{serverRequested:e,backup:n.backupCodec.codec}),n.videoCodec=e,n.videoEncoding=n.backupCodec.encoding;const o=t.mediaStreamTrack.getSettings(),c=(i=o.width)!==null&&i!==void 0?i:(r=t.dimensions)===null||r===void 0?void 0:r.width,u=(s=o.height)!==null&&s!==void 0?s:(a=t.dimensions)===null||a===void 0?void 0:a.height;return ji(t.source===k.Source.ScreenShare,c,u,n)}function Wd(t,e,n,i){const r=Gd(t,e,n);let{encoding:s}=r[0];const a=Math.max(e,n);for(let o=0;o<r.length;o+=1){const c=r[o];if(s=c.encoding,c.width>=a)break}if(i)switch(i){case"av1":s=Object.assign({},s),s.maxBitrate=s.maxBitrate*.7;break;case"vp9":s=Object.assign({},s),s.maxBitrate=s.maxBitrate*.85;break}return s}function Gd(t,e,n){if(t)return Fd;const i=e>n?e/n:n/e;return Math.abs(i-16/9)<Math.abs(i-4/3)?Ld:Ud}function us(t,e){if(t)return Bd(e);const{width:n,height:i}=e,r=n>i?n/i:i/n;return Math.abs(r-16/9)<Math.abs(r-4/3)?jd:Vd}function ai(t,e,n){const i=[];if(n.forEach((r,s)=>{if(s>=Fi.length)return;const a=Math.min(t,e),c={rid:Fi[s],scaleResolutionDownBy:Math.max(1,a/Math.min(r.width,r.height)),maxBitrate:r.encoding.maxBitrate};r.encoding.maxFramerate&&(c.maxFramerate=r.encoding.maxFramerate);const u=Tt()||s===0;r.encoding.priority&&u&&(c.priority=r.encoding.priority,c.networkPriority=r.encoding.priority),i.push(c)}),We()&&So()==="ios"){let r;i.forEach(a=>{r?a.maxFramerate&&a.maxFramerate>r&&(r=a.maxFramerate):r=a.maxFramerate});let s=!0;i.forEach(a=>{var o;a.maxFramerate!=r&&(s&&(s=!1,j.info("Simulcast on iOS React-Native requires all encodings to share the same framerate.")),j.info('Setting framerate of encoding "'.concat((o=a.rid)!==null&&o!==void 0?o:"",'" to ').concat(r)),a.maxFramerate=r)})}return i}function ls(t){if(t)return t.sort((e,n)=>{const{encoding:i}=e,{encoding:r}=n;return i.maxBitrate>r.maxBitrate?1:i.maxBitrate<r.maxBitrate?-1:i.maxBitrate===r.maxBitrate&&i.maxFramerate&&r.maxFramerate?i.maxFramerate>r.maxFramerate?1:-1:0})}class Io{constructor(e){const n=e.match(/^L(\d)T(\d)(h|_KEY|_KEY_SHIFT){0,1}$/);if(!n)throw new Error("invalid scalability mode");if(this.spatial=parseInt(n[1]),this.temporal=parseInt(n[2]),n.length>3)switch(n[3]){case"h":case"_KEY":case"_KEY_SHIFT":this.suffix=n[3]}}toString(){var e;return"L".concat(this.spatial,"T").concat(this.temporal).concat((e=this.suffix)!==null&&e!==void 0?e:"")}}function Kd(t){return t.source===k.Source.ScreenShare||t.constraints.height&&je(t.constraints.height)>=1080?"maintain-resolution":"balanced"}const zd=5e3;class le extends it{get sender(){return this._sender}set sender(e){this._sender=e,this.degradationPreference&&this.setDegradationPreference(this.degradationPreference)}constructor(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=arguments.length>3?arguments[3]:void 0;super(e,k.Kind.Video,n,i,r),this.simulcastCodecs=new Map,this.degradationPreference="balanced",this.monitorSender=()=>y(this,void 0,void 0,function*(){if(!this.sender){this._currentBitrate=0;return}let s;try{s=yield this.getSenderStats()}catch(o){this.log.error("could not get audio sender stats",Object.assign(Object.assign({},this.logContext),{error:o}));return}const a=new Map(s.map(o=>[o.rid,o]));if(this.prevStats){let o=0;a.forEach((c,u)=>{var l;const h=(l=this.prevStats)===null||l===void 0?void 0:l.get(u);o+=Bn(c,h)}),this._currentBitrate=o}this.prevStats=a}),this.senderLock=new be}get isSimulcast(){return!!(this.sender&&this.sender.getParameters().encodings.length>1)}startMonitor(e){var n;if(this.signalClient=e,!fe())return;const i=(n=this.sender)===null||n===void 0?void 0:n.getParameters();i&&(this.encodings=i.encodings),!this.monitorInterval&&(this.monitorInterval=setInterval(()=>{this.monitorSender()},lr))}stop(){this._mediaStreamTrack.getConstraints(),this.simulcastCodecs.forEach(e=>{e.mediaStreamTrack.stop()}),super.stop()}pauseUpstream(){const e=Object.create(null,{pauseUpstream:{get:()=>super.pauseUpstream}});return y(this,void 0,void 0,function*(){var n,i,r,s,a;yield e.pauseUpstream.call(this);try{for(var o=!0,c=ht(this.simulcastCodecs.values()),u;u=yield c.next(),n=u.done,!n;o=!0)s=u.value,o=!1,yield(a=s.sender)===null||a===void 0?void 0:a.replaceTrack(null)}catch(l){i={error:l}}finally{try{!o&&!n&&(r=c.return)&&(yield r.call(c))}finally{if(i)throw i.error}}})}resumeUpstream(){const e=Object.create(null,{resumeUpstream:{get:()=>super.resumeUpstream}});return y(this,void 0,void 0,function*(){var n,i,r,s,a;yield e.resumeUpstream.call(this);try{for(var o=!0,c=ht(this.simulcastCodecs.values()),u;u=yield c.next(),n=u.done,!n;o=!0){s=u.value,o=!1;const l=s;yield(a=l.sender)===null||a===void 0?void 0:a.replaceTrack(l.mediaStreamTrack)}}catch(l){i={error:l}}finally{try{!o&&!n&&(r=c.return)&&(yield r.call(c))}finally{if(i)throw i.error}}})}mute(){const e=Object.create(null,{mute:{get:()=>super.mute}});return y(this,void 0,void 0,function*(){const n=yield this.muteLock.lock();try{return this.isMuted?(this.log.debug("Track already muted",this.logContext),this):(this.source===k.Source.Camera&&!this.isUserProvided&&(this.log.debug("stopping camera track",this.logContext),this._mediaStreamTrack.stop()),yield e.mute.call(this),this)}finally{n()}})}unmute(){const e=Object.create(null,{unmute:{get:()=>super.unmute}});return y(this,void 0,void 0,function*(){const n=yield this.muteLock.lock();try{return this.isMuted?(this.source===k.Source.Camera&&!this.isUserProvided&&(this.log.debug("reacquiring camera track",this.logContext),yield this.restartTrack()),yield e.unmute.call(this),this):(this.log.debug("Track already unmuted",this.logContext),this)}finally{n()}})}setTrackMuted(e){super.setTrackMuted(e);for(const n of this.simulcastCodecs.values())n.mediaStreamTrack.enabled=!e}getSenderStats(){return y(this,void 0,void 0,function*(){var e;if(!(!((e=this.sender)===null||e===void 0)&&e.getStats))return[];const n=[],i=yield this.sender.getStats();return i.forEach(r=>{var s;if(r.type==="outbound-rtp"){const a={type:"video",streamId:r.id,frameHeight:r.frameHeight,frameWidth:r.frameWidth,framesPerSecond:r.framesPerSecond,framesSent:r.framesSent,firCount:r.firCount,pliCount:r.pliCount,nackCount:r.nackCount,packetsSent:r.packetsSent,bytesSent:r.bytesSent,qualityLimitationReason:r.qualityLimitationReason,qualityLimitationDurations:r.qualityLimitationDurations,qualityLimitationResolutionChanges:r.qualityLimitationResolutionChanges,rid:(s=r.rid)!==null&&s!==void 0?s:r.id,retransmittedPacketsSent:r.retransmittedPacketsSent,targetBitrate:r.targetBitrate,timestamp:r.timestamp},o=i.get(r.remoteId);o&&(a.jitter=o.jitter,a.packetsLost=o.packetsLost,a.roundTripTime=o.roundTripTime),n.push(a)}}),n.sort((r,s)=>{var a,o;return((a=s.frameWidth)!==null&&a!==void 0?a:0)-((o=r.frameWidth)!==null&&o!==void 0?o:0)}),n})}setPublishingQuality(e){const n=[];for(let i=ve.LOW;i<=ve.HIGH;i+=1)n.push(new nr({quality:i,enabled:i<=e}));this.log.debug("setting publishing quality. max quality ".concat(e),this.logContext),this.setPublishingLayers(n)}setDeviceId(e){return y(this,void 0,void 0,function*(){return this._constraints.deviceId===e&&this._mediaStreamTrack.getSettings().deviceId===je(e)?!0:(this._constraints.deviceId=e,this.isMuted||(yield this.restartTrack()),this.isMuted||je(e)===this._mediaStreamTrack.getSettings().deviceId)})}restartTrack(e){return y(this,void 0,void 0,function*(){var n,i,r,s;let a;if(e){const l=Vn({video:e});typeof l.video!="boolean"&&(a=l.video)}yield this.restart(a);try{for(var o=!0,c=ht(this.simulcastCodecs.values()),u;u=yield c.next(),n=u.done,!n;o=!0){s=u.value,o=!1;const l=s;l.sender&&(l.mediaStreamTrack=this.mediaStreamTrack.clone(),yield l.sender.replaceTrack(l.mediaStreamTrack))}}catch(l){i={error:l}}finally{try{!o&&!n&&(r=c.return)&&(yield r.call(c))}finally{if(i)throw i.error}}})}setProcessor(e){const n=Object.create(null,{setProcessor:{get:()=>super.setProcessor}});return y(this,arguments,void 0,function(i){var r=this;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return function*(){var a,o,c,u,l,h;if(yield n.setProcessor.call(r,i,s),!((l=r.processor)===null||l===void 0)&&l.processedTrack)try{for(var f=!0,p=ht(r.simulcastCodecs.values()),g;g=yield p.next(),a=g.done,!a;f=!0)u=g.value,f=!1,yield(h=u.sender)===null||h===void 0?void 0:h.replaceTrack(r.processor.processedTrack)}catch(b){o={error:b}}finally{try{!f&&!a&&(c=p.return)&&(yield c.call(p))}finally{if(o)throw o.error}}}()})}setDegradationPreference(e){return y(this,void 0,void 0,function*(){if(this.degradationPreference=e,this.sender)try{this.log.debug("setting degradationPreference to ".concat(e),this.logContext);const n=this.sender.getParameters();n.degradationPreference=e,this.sender.setParameters(n)}catch(n){this.log.warn("failed to set degradationPreference",Object.assign({error:n},this.logContext))}})}addSimulcastTrack(e,n){if(this.simulcastCodecs.has(e)){this.log.error("".concat(e," already added, skipping adding simulcast codec"),this.logContext);return}const i={codec:e,mediaStreamTrack:this.mediaStreamTrack.clone(),sender:void 0,encodings:n};return this.simulcastCodecs.set(e,i),i}setSimulcastTrackSender(e,n){const i=this.simulcastCodecs.get(e);i&&(i.sender=n,setTimeout(()=>{this.subscribedCodecs&&this.setPublishingCodecs(this.subscribedCodecs)},zd))}setPublishingCodecs(e){return y(this,void 0,void 0,function*(){var n,i,r,s,a,o,c;if(this.log.debug("setting publishing codecs",Object.assign(Object.assign({},this.logContext),{codecs:e,currentCodec:this.codec})),!this.codec&&e.length>0)return yield this.setPublishingLayers(e[0].qualities),[];this.subscribedCodecs=e;const u=[];try{for(n=!0,i=ht(e);r=yield i.next(),s=r.done,!s;n=!0){c=r.value,n=!1;const l=c;if(!this.codec||this.codec===l.codec)yield this.setPublishingLayers(l.qualities);else{const h=this.simulcastCodecs.get(l.codec);if(this.log.debug("try setPublishingCodec for ".concat(l.codec),Object.assign(Object.assign({},this.logContext),{simulcastCodecInfo:h})),!h||!h.sender){for(const f of l.qualities)if(f.enabled){u.push(l.codec);break}}else h.encodings&&(this.log.debug("try setPublishingLayersForSender ".concat(l.codec),this.logContext),yield ds(h.sender,h.encodings,l.qualities,this.senderLock,this.log,this.logContext))}}}catch(l){a={error:l}}finally{try{!n&&!s&&(o=i.return)&&(yield o.call(i))}finally{if(a)throw a.error}}return u})}setPublishingLayers(e){return y(this,void 0,void 0,function*(){this.log.debug("setting publishing layers",Object.assign(Object.assign({},this.logContext),{qualities:e})),!(!this.sender||!this.encodings)&&(yield ds(this.sender,this.encodings,e,this.senderLock,this.log,this.logContext))})}handleAppVisibilityChanged(){const e=Object.create(null,{handleAppVisibilityChanged:{get:()=>super.handleAppVisibilityChanged}});return y(this,void 0,void 0,function*(){yield e.handleAppVisibilityChanged.call(this),yo()&&this.isInBackground&&this.source===k.Source.Camera&&(this._mediaStreamTrack.enabled=!1)})}}function ds(t,e,n,i,r,s){return y(this,void 0,void 0,function*(){const a=yield i.lock();r.debug("setPublishingLayersForSender",Object.assign(Object.assign({},s),{sender:t,qualities:n,senderEncodings:e}));try{const o=t.getParameters(),{encodings:c}=o;if(!c)return;if(c.length!==e.length){r.warn("cannot set publishing layers, encodings mismatch",Object.assign(Object.assign({},s),{encodings:c,senderEncodings:e}));return}let u=!1;!1&&c[0].scalabilityMode||c.forEach((h,f)=>{var p;let g=(p=h.rid)!==null&&p!==void 0?p:"";g===""&&(g="q");const b=Mo(g),v=n.find(m=>m.quality===b);v&&h.active!==v.enabled&&(u=!0,h.active=v.enabled,r.debug("setting layer ".concat(v.quality," to ").concat(h.active?"enabled":"disabled"),s),Tt()&&(v.enabled?(h.scaleResolutionDownBy=e[f].scaleResolutionDownBy,h.maxBitrate=e[f].maxBitrate,h.maxFrameRate=e[f].maxFrameRate):(h.scaleResolutionDownBy=4,h.maxBitrate=10,h.maxFrameRate=2)))}),u&&(o.encodings=c,r.debug("setting encodings",Object.assign(Object.assign({},s),{encodings:o.encodings})),yield t.setParameters(o))}finally{a()}})}function Mo(t){switch(t){case"f":return ve.HIGH;case"h":return ve.MEDIUM;case"q":return ve.LOW;default:return ve.HIGH}}function hs(t,e,n,i){if(!n)return[new nt({quality:ve.HIGH,width:t,height:e,bitrate:0,ssrc:0})];if(i){const r=n[0].scalabilityMode,s=new Io(r),a=[],o=s.suffix=="h"?1.5:2,c=s.suffix=="h"?2:3;for(let u=0;u<s.spatial;u+=1)a.push(new nt({quality:Math.min(ve.HIGH,s.spatial-1)-u,width:Math.ceil(t/Math.pow(o,u)),height:Math.ceil(e/Math.pow(o,u)),bitrate:n[0].maxBitrate?Math.ceil(n[0].maxBitrate/Math.pow(c,u)):0,ssrc:0}));return a}return n.map(r=>{var s,a,o;const c=(s=r.scaleResolutionDownBy)!==null&&s!==void 0?s:1;let u=Mo((a=r.rid)!==null&&a!==void 0?a:"");return new nt({quality:u,width:Math.ceil(t/c),height:Math.ceil(e/c),bitrate:(o=r.maxBitrate)!==null&&o!==void 0?o:0,ssrc:0})})}const fs="_lossy",ps="_reliable",Hd=2*1e3,oi="leave-reconnect";var Te;(function(t){t[t.New=0]="New",t[t.Connected=1]="Connected",t[t.Disconnected=2]="Disconnected",t[t.Reconnecting=3]="Reconnecting",t[t.Closed=4]="Closed"})(Te||(Te={}));class Jd extends Ne.EventEmitter{get isClosed(){return this._isClosed}get pendingReconnect(){return!!this.reconnectTimeout}constructor(e){var n;super(),this.options=e,this.rtcConfig={},this.peerConnectionTimeout=ur.peerConnectionTimeout,this.fullReconnectOnNext=!1,this.subscriberPrimary=!1,this.pcState=Te.New,this._isClosed=!0,this.pendingTrackResolvers={},this.reconnectAttempts=0,this.reconnectStart=0,this.attemptingReconnect=!1,this.joinAttempts=0,this.maxJoinAttempts=1,this.shouldFailNext=!1,this.log=j,this.handleDataChannel=i=>y(this,[i],void 0,function(r){var s=this;let{channel:a}=r;return function*(){if(a){if(a.label===ps)s.reliableDCSub=a;else if(a.label===fs)s.lossyDCSub=a;else return;s.log.debug("on data channel ".concat(a.id,", ").concat(a.label),s.logContext),a.onmessage=s.handleDataMessage}}()}),this.handleDataMessage=i=>y(this,void 0,void 0,function*(){var r,s;const a=yield this.dataProcessLock.lock();try{let o;if(i.data instanceof ArrayBuffer)o=i.data;else if(i.data instanceof Blob)o=yield i.data.arrayBuffer();else{this.log.error("unsupported data type",Object.assign(Object.assign({},this.logContext),{data:i.data}));return}const c=ca.fromBinary(new Uint8Array(o));((r=c.value)===null||r===void 0?void 0:r.case)==="speaker"?this.emit(R.ActiveSpeakersUpdate,c.value.value.speakers):(((s=c.value)===null||s===void 0?void 0:s.case)==="user"&&Qd(c,c.value.value),this.emit(R.DataPacketReceived,c))}finally{a()}}),this.handleDataError=i=>{const s=i.currentTarget.maxRetransmits===0?"lossy":"reliable";if(i instanceof ErrorEvent&&i.error){const{error:a}=i.error;this.log.error("DataChannel error on ".concat(s,": ").concat(i.message),Object.assign(Object.assign({},this.logContext),{error:a}))}else this.log.error("Unknown DataChannel error on ".concat(s),Object.assign(Object.assign({},this.logContext),{event:i}))},this.handleBufferedAmountLow=i=>{const s=i.currentTarget.maxRetransmits===0?ue.LOSSY:ue.RELIABLE;this.updateAndEmitDCBufferStatus(s)},this.handleDisconnect=(i,r)=>{if(this._isClosed)return;this.log.warn("".concat(i," disconnected"),this.logContext),this.reconnectAttempts===0&&(this.reconnectStart=Date.now());const s=c=>{this.log.warn("could not recover connection after ".concat(this.reconnectAttempts," attempts, ").concat(c,"ms. giving up"),this.logContext),this.emit(R.Disconnected),this.close()},a=Date.now()-this.reconnectStart;let o=this.getNextRetryDelay({elapsedMs:a,retryCount:this.reconnectAttempts});if(o===null){s(a);return}i===oi&&(o=0),this.log.debug("reconnecting in ".concat(o,"ms"),this.logContext),this.clearReconnectTimeout(),this.token&&this.regionUrlProvider&&this.regionUrlProvider.updateToken(this.token),this.reconnectTimeout=ie.setTimeout(()=>this.attemptReconnect(r).finally(()=>this.reconnectTimeout=void 0),o)},this.waitForRestarted=()=>new Promise((i,r)=>{this.pcState===Te.Connected&&i();const s=()=>{this.off(R.Disconnected,a),i()},a=()=>{this.off(R.Restarted,s),r()};this.once(R.Restarted,s),this.once(R.Disconnected,a)}),this.updateAndEmitDCBufferStatus=i=>{const r=this.isBufferStatusLow(i);typeof r<"u"&&r!==this.dcBufferStatus.get(i)&&(this.dcBufferStatus.set(i,r),this.emit(R.DCBufferStatusChanged,r,i))},this.isBufferStatusLow=i=>{const r=this.dataChannelForKind(i);if(r)return r.bufferedAmount<=r.bufferedAmountLowThreshold},this.handleBrowserOnLine=()=>{this.client.currentState===z.RECONNECTING&&(this.clearReconnectTimeout(),this.attemptReconnect(lt.RR_SIGNAL_DISCONNECTED))},this.log=Be((n=e.loggerName)!==null&&n!==void 0?n:_e.Engine),this.loggerOptions={loggerName:e.loggerName,loggerContextCb:()=>this.logContext},this.client=new cr(void 0,this.loggerOptions),this.client.signalLatency=this.options.expSignalLatency,this.reconnectPolicy=this.options.reconnectPolicy,this.registerOnLineListener(),this.closingLock=new be,this.dataProcessLock=new be,this.dcBufferStatus=new Map([[ue.LOSSY,!0],[ue.RELIABLE,!0]]),this.client.onParticipantUpdate=i=>this.emit(R.ParticipantUpdate,i),this.client.onConnectionQuality=i=>this.emit(R.ConnectionQualityUpdate,i),this.client.onRoomUpdate=i=>this.emit(R.RoomUpdate,i),this.client.onSubscriptionError=i=>this.emit(R.SubscriptionError,i),this.client.onSubscriptionPermissionUpdate=i=>this.emit(R.SubscriptionPermissionUpdate,i),this.client.onSpeakersChanged=i=>this.emit(R.SpeakersChanged,i),this.client.onStreamStateUpdate=i=>this.emit(R.StreamStateChanged,i),this.client.onRequestResponse=i=>this.emit(R.SignalRequestResponse,i)}get logContext(){var e,n,i,r,s,a,o,c;return{room:(n=(e=this.latestJoinResponse)===null||e===void 0?void 0:e.room)===null||n===void 0?void 0:n.name,roomID:(r=(i=this.latestJoinResponse)===null||i===void 0?void 0:i.room)===null||r===void 0?void 0:r.sid,participant:(a=(s=this.latestJoinResponse)===null||s===void 0?void 0:s.participant)===null||a===void 0?void 0:a.identity,pID:(c=(o=this.latestJoinResponse)===null||o===void 0?void 0:o.participant)===null||c===void 0?void 0:c.sid}}join(e,n,i,r){return y(this,void 0,void 0,function*(){this.url=e,this.token=n,this.signalOpts=i,this.maxJoinAttempts=i.maxRetries;try{this.joinAttempts+=1,this.setupSignalClientCallbacks();const s=yield this.client.join(e,n,i,r);return this._isClosed=!1,this.latestJoinResponse=s,this.subscriberPrimary=s.subscriberPrimary,this.pcManager||(yield this.configure(s)),(!this.subscriberPrimary||s.fastPublish)&&this.negotiate(),this.clientConfiguration=s.clientConfiguration,s}catch(s){if(s instanceof G&&s.reason===1&&(this.log.warn("Couldn't connect to server, attempt ".concat(this.joinAttempts," of ").concat(this.maxJoinAttempts),this.logContext),this.joinAttempts<this.maxJoinAttempts))return this.join(e,n,i,r);throw s}})}close(){return y(this,void 0,void 0,function*(){const e=yield this.closingLock.lock();if(this.isClosed){e();return}try{this._isClosed=!0,this.emit(R.Closing),this.removeAllListeners(),this.deregisterOnLineListener(),this.clearPendingReconnect(),yield this.cleanupPeerConnections(),yield this.cleanupClient()}finally{e()}})}cleanupPeerConnections(){return y(this,void 0,void 0,function*(){var e;yield(e=this.pcManager)===null||e===void 0?void 0:e.close(),this.pcManager=void 0;const n=i=>{i&&(i.close(),i.onbufferedamountlow=null,i.onclose=null,i.onclosing=null,i.onerror=null,i.onmessage=null,i.onopen=null)};n(this.lossyDC),n(this.lossyDCSub),n(this.reliableDC),n(this.reliableDCSub),this.lossyDC=void 0,this.lossyDCSub=void 0,this.reliableDC=void 0,this.reliableDCSub=void 0})}cleanupClient(){return y(this,void 0,void 0,function*(){yield this.client.close(),this.client.resetCallbacks()})}addTrack(e){if(this.pendingTrackResolvers[e.cid])throw new De("a track with the same ID has already been published");return new Promise((n,i)=>{const r=setTimeout(()=>{delete this.pendingTrackResolvers[e.cid],i(new G("publication of local track timed out, no response from server"))},1e4);this.pendingTrackResolvers[e.cid]={resolve:s=>{clearTimeout(r),n(s)},reject:()=>{clearTimeout(r),i(new Error("Cancelled publication by calling unpublish"))}},this.client.sendAddTrack(e)})}removeTrack(e){if(e.track&&this.pendingTrackResolvers[e.track.id]){const{reject:n}=this.pendingTrackResolvers[e.track.id];n&&n(),delete this.pendingTrackResolvers[e.track.id]}try{return this.pcManager.removeTrack(e),!0}catch(n){this.log.warn("failed to remove track",Object.assign(Object.assign({},this.logContext),{error:n}))}return!1}updateMuteStatus(e,n){this.client.sendMuteTrack(e,n)}get dataSubscriberReadyState(){var e;return(e=this.reliableDCSub)===null||e===void 0?void 0:e.readyState}getConnectedServerAddress(){return y(this,void 0,void 0,function*(){var e;return(e=this.pcManager)===null||e===void 0?void 0:e.getConnectedAddress()})}setRegionUrlProvider(e){this.regionUrlProvider=e}configure(e){return y(this,void 0,void 0,function*(){var n,i;if(this.pcManager&&this.pcManager.currentState!==H.NEW)return;this.participantSid=(n=e.participant)===null||n===void 0?void 0:n.sid;const r=this.makeRTCConfiguration(e);this.pcManager=new Nd(r,e.subscriberPrimary,this.loggerOptions),this.emit(R.TransportsCreated,this.pcManager.publisher,this.pcManager.subscriber),this.pcManager.onIceCandidate=(s,a)=>{this.client.sendIceCandidate(s,a)},this.pcManager.onPublisherOffer=s=>{this.client.sendOffer(s)},this.pcManager.onDataChannel=this.handleDataChannel,this.pcManager.onStateChange=(s,a,o)=>y(this,void 0,void 0,function*(){if(this.log.debug("primary PC state changed ".concat(s),this.logContext),["closed","disconnected","failed"].includes(a)&&(this.publisherConnectionPromise=void 0),s===H.CONNECTED){const l=this.pcState===Te.New;this.pcState=Te.Connected,l&&this.emit(R.Connected,e)}else s===H.FAILED&&this.pcState===Te.Connected&&(this.pcState=Te.Disconnected,this.handleDisconnect("peerconnection failed",o==="failed"?lt.RR_SUBSCRIBER_FAILED:lt.RR_PUBLISHER_FAILED));const c=this.client.isDisconnected||this.client.currentState===z.RECONNECTING,u=[H.FAILED,H.CLOSING,H.CLOSED].includes(s);c&&u&&!this._isClosed&&this.emit(R.Offline)}),this.pcManager.onTrack=s=>{this.emit(R.MediaTrackAdded,s.track,s.streams[0],s.receiver)},$d((i=e.serverInfo)===null||i===void 0?void 0:i.protocol)||this.createDataChannels()})}setupSignalClientCallbacks(){this.client.onAnswer=e=>y(this,void 0,void 0,function*(){this.pcManager&&(this.log.debug("received server answer",Object.assign(Object.assign({},this.logContext),{RTCSdpType:e.type})),yield this.pcManager.setPublisherAnswer(e))}),this.client.onTrickle=(e,n)=>{this.pcManager&&(this.log.trace("got ICE candidate from peer",Object.assign(Object.assign({},this.logContext),{candidate:e,target:n})),this.pcManager.addIceCandidate(e,n))},this.client.onOffer=e=>y(this,void 0,void 0,function*(){if(!this.pcManager)return;const n=yield this.pcManager.createSubscriberAnswerFromOffer(e);this.client.sendAnswer(n)}),this.client.onLocalTrackPublished=e=>{var n;if(this.log.debug("received trackPublishedResponse",Object.assign(Object.assign({},this.logContext),{cid:e.cid,track:(n=e.track)===null||n===void 0?void 0:n.sid})),!this.pendingTrackResolvers[e.cid]){this.log.error("missing track resolver for ".concat(e.cid),Object.assign(Object.assign({},this.logContext),{cid:e.cid}));return}const{resolve:i}=this.pendingTrackResolvers[e.cid];delete this.pendingTrackResolvers[e.cid],i(e.track)},this.client.onLocalTrackUnpublished=e=>{this.emit(R.LocalTrackUnpublished,e)},this.client.onLocalTrackSubscribed=e=>{this.emit(R.LocalTrackSubscribed,e)},this.client.onTokenRefresh=e=>{this.token=e},this.client.onRemoteMuteChanged=(e,n)=>{this.emit(R.RemoteMute,e,n)},this.client.onSubscribedQualityUpdate=e=>{this.emit(R.SubscribedQualityUpdate,e)},this.client.onClose=()=>{this.handleDisconnect("signal",lt.RR_SIGNAL_DISCONNECTED)},this.client.onLeave=e=>{switch(this.log.debug("client leave request",Object.assign(Object.assign({},this.logContext),{reason:e==null?void 0:e.reason})),e.regions&&this.regionUrlProvider&&(this.log.debug("updating regions",this.logContext),this.regionUrlProvider.setServerReportedRegions(e.regions)),e.action){case gt.DISCONNECT:this.emit(R.Disconnected,e==null?void 0:e.reason),this.close();break;case gt.RECONNECT:this.fullReconnectOnNext=!0,this.handleDisconnect(oi);break;case gt.RESUME:this.handleDisconnect(oi)}}}makeRTCConfiguration(e){var n;const i=Object.assign({},this.rtcConfig);if(!((n=this.signalOpts)===null||n===void 0)&&n.e2eeEnabled&&(this.log.debug("E2EE - setting up transports with insertable streams",this.logContext),i.encodedInsertableStreams=!0),e.iceServers&&!i.iceServers){const r=[];e.iceServers.forEach(s=>{const a={urls:s.urls};s.username&&(a.username=s.username),s.credential&&(a.credential=s.credential),r.push(a)}),i.iceServers=r}return e.clientConfiguration&&e.clientConfiguration.forceRelay===Bt.ENABLED&&(i.iceTransportPolicy="relay"),i.sdpSemantics="unified-plan",i.continualGatheringPolicy="gather_continually",i}createDataChannels(){this.pcManager&&(this.lossyDC&&(this.lossyDC.onmessage=null,this.lossyDC.onerror=null),this.reliableDC&&(this.reliableDC.onmessage=null,this.reliableDC.onerror=null),this.lossyDC=this.pcManager.createPublisherDataChannel(fs,{ordered:!0,maxRetransmits:0}),this.reliableDC=this.pcManager.createPublisherDataChannel(ps,{ordered:!0}),this.lossyDC.onmessage=this.handleDataMessage,this.reliableDC.onmessage=this.handleDataMessage,this.lossyDC.onerror=this.handleDataError,this.reliableDC.onerror=this.handleDataError,this.lossyDC.bufferedAmountLowThreshold=65535,this.reliableDC.bufferedAmountLowThreshold=65535,this.lossyDC.onbufferedamountlow=this.handleBufferedAmountLow,this.reliableDC.onbufferedamountlow=this.handleBufferedAmountLow)}createSender(e,n,i){return y(this,void 0,void 0,function*(){if(Di())return yield this.createTransceiverRTCRtpSender(e,n,i);if(Ai())return this.log.warn("using add-track fallback",this.logContext),yield this.createRTCRtpSender(e.mediaStreamTrack);throw new Y("Required webRTC APIs not supported on this device")})}createSimulcastSender(e,n,i,r){return y(this,void 0,void 0,function*(){if(Di())return this.createSimulcastTransceiverSender(e,n,i,r);if(Ai())return this.log.debug("using add-track fallback",this.logContext),this.createRTCRtpSender(e.mediaStreamTrack);throw new Y("Cannot stream on this device")})}createTransceiverRTCRtpSender(e,n,i){return y(this,void 0,void 0,function*(){if(!this.pcManager)throw new Y("publisher is closed");const r=[];e.mediaStream&&r.push(e.mediaStream),e instanceof le&&(e.codec=n.videoCodec);const s={direction:"sendonly",streams:r};return i&&(s.sendEncodings=i),(yield this.pcManager.addPublisherTransceiver(e.mediaStreamTrack,s)).sender})}createSimulcastTransceiverSender(e,n,i,r){return y(this,void 0,void 0,function*(){if(!this.pcManager)throw new Y("publisher is closed");const s={direction:"sendonly"};r&&(s.sendEncodings=r);const a=yield this.pcManager.addPublisherTransceiver(n.mediaStreamTrack,s);if(i.videoCodec)return e.setSimulcastTrackSender(i.videoCodec,a.sender),a.sender})}createRTCRtpSender(e){return y(this,void 0,void 0,function*(){if(!this.pcManager)throw new Y("publisher is closed");return this.pcManager.addPublisherTrack(e)})}attemptReconnect(e){return y(this,void 0,void 0,function*(){var n,i,r;if(!this._isClosed){if(this.attemptingReconnect){j.warn("already attempting reconnect, returning early",this.logContext);return}(((n=this.clientConfiguration)===null||n===void 0?void 0:n.resumeConnection)===Bt.DISABLED||((r=(i=this.pcManager)===null||i===void 0?void 0:i.currentState)!==null&&r!==void 0?r:H.NEW)===H.NEW)&&(this.fullReconnectOnNext=!0);try{this.attemptingReconnect=!0,this.fullReconnectOnNext?yield this.restartConnection():yield this.resumeConnection(e),this.clearPendingReconnect(),this.fullReconnectOnNext=!1}catch(s){this.reconnectAttempts+=1;let a=!0;s instanceof Y?(this.log.debug("received unrecoverable error",Object.assign(Object.assign({},this.logContext),{error:s})),a=!1):s instanceof dt||(this.fullReconnectOnNext=!0),a?this.handleDisconnect("reconnect",lt.RR_UNKNOWN):(this.log.info("could not recover connection after ".concat(this.reconnectAttempts," attempts, ").concat(Date.now()-this.reconnectStart,"ms. giving up"),this.logContext),this.emit(R.Disconnected),yield this.close())}finally{this.attemptingReconnect=!1}}})}getNextRetryDelay(e){try{return this.reconnectPolicy.nextRetryDelayInMs(e)}catch(n){this.log.warn("encountered error in reconnect policy",Object.assign(Object.assign({},this.logContext),{error:n}))}return null}restartConnection(e){return y(this,void 0,void 0,function*(){var n,i,r;try{if(!this.url||!this.token)throw new Y("could not reconnect, url or token not saved");this.log.info("reconnecting, attempt: ".concat(this.reconnectAttempts),this.logContext),this.emit(R.Restarting),this.client.isDisconnected||(yield this.client.sendLeave()),yield this.cleanupPeerConnections(),yield this.cleanupClient();let s;try{if(!this.signalOpts)throw this.log.warn("attempted connection restart, without signal options present",this.logContext),new dt;s=yield this.join(e??this.url,this.token,this.signalOpts)}catch(a){throw a instanceof G&&a.reason===0?new Y("could not reconnect, token might be expired"):new dt}if(this.shouldFailNext)throw this.shouldFailNext=!1,new Error("simulated failure");if(this.client.setReconnected(),this.emit(R.SignalRestarted,s),yield this.waitForPCReconnected(),this.client.currentState!==z.CONNECTED)throw new dt("Signal connection got severed during reconnect");(n=this.regionUrlProvider)===null||n===void 0||n.resetAttempts(),this.emit(R.Restarted)}catch(s){const a=yield(i=this.regionUrlProvider)===null||i===void 0?void 0:i.getNextBestRegionUrl();if(a){yield this.restartConnection(a);return}else throw(r=this.regionUrlProvider)===null||r===void 0||r.resetAttempts(),s}})}resumeConnection(e){return y(this,void 0,void 0,function*(){var n;if(!this.url||!this.token)throw new Y("could not reconnect, url or token not saved");if(!this.pcManager)throw new Y("publisher and subscriber connections unset");this.log.info("resuming signal connection, attempt ".concat(this.reconnectAttempts),this.logContext),this.emit(R.Resuming);let i;try{this.setupSignalClientCallbacks(),i=yield this.client.reconnect(this.url,this.token,this.participantSid,e)}catch(r){let s="";throw r instanceof Error&&(s=r.message,this.log.error(r.message,Object.assign(Object.assign({},this.logContext),{error:r}))),r instanceof G&&r.reason===0?new Y("could not reconnect, token might be expired"):r instanceof G&&r.reason===4?r:new dt(s)}if(this.emit(R.SignalResumed),i){const r=this.makeRTCConfiguration(i);this.pcManager.updateConfiguration(r)}else this.log.warn("Did not receive reconnect response",this.logContext);if(this.shouldFailNext)throw this.shouldFailNext=!1,new Error("simulated failure");if(yield this.pcManager.triggerIceRestart(),yield this.waitForPCReconnected(),this.client.currentState!==z.CONNECTED)throw new dt("Signal connection got severed during reconnect");this.client.setReconnected(),((n=this.reliableDC)===null||n===void 0?void 0:n.readyState)==="open"&&this.reliableDC.id===null&&this.createDataChannels(),this.emit(R.Resumed)})}waitForPCInitialConnection(e,n){return y(this,void 0,void 0,function*(){if(!this.pcManager)throw new Y("PC manager is closed");yield this.pcManager.ensurePCTransportConnection(n,e)})}waitForPCReconnected(){return y(this,void 0,void 0,function*(){this.pcState=Te.Reconnecting,this.log.debug("waiting for peer connection to reconnect",this.logContext);try{if(yield Ae(Hd),!this.pcManager)throw new Y("PC manager is closed");yield this.pcManager.ensurePCTransportConnection(void 0,this.peerConnectionTimeout),this.pcState=Te.Connected}catch(e){throw this.pcState=Te.Disconnected,new G("could not establish PC connection, ".concat(e.message))}})}sendDataPacket(e,n){return y(this,void 0,void 0,function*(){const i=e.toBinary();yield this.ensurePublisherConnected(n);const r=this.dataChannelForKind(n);r&&r.send(i),this.updateAndEmitDCBufferStatus(n)})}ensureDataTransportConnected(e){return y(this,arguments,void 0,function(n){var i=this;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.subscriberPrimary;return function*(){var s;if(!i.pcManager)throw new Y("PC manager is closed");const a=r?i.pcManager.subscriber:i.pcManager.publisher,o=r?"Subscriber":"Publisher";if(!a)throw new G("".concat(o," connection not set"));let c=!1;!r&&!i.dataChannelForKind(n,r)&&(i.createDataChannels(),c=!0),!c&&!r&&!i.pcManager.publisher.isICEConnected&&i.pcManager.publisher.getICEConnectionState()!=="checking"&&(c=!0),c&&i.negotiate();const u=i.dataChannelForKind(n,r);if((u==null?void 0:u.readyState)==="open")return;const l=new Date().getTime()+i.peerConnectionTimeout;for(;new Date().getTime()<l;){if(a.isICEConnected&&((s=i.dataChannelForKind(n,r))===null||s===void 0?void 0:s.readyState)==="open")return;yield Ae(50)}throw new G("could not establish ".concat(o," connection, state: ").concat(a.getICEConnectionState()))}()})}ensurePublisherConnected(e){return y(this,void 0,void 0,function*(){this.publisherConnectionPromise||(this.publisherConnectionPromise=this.ensureDataTransportConnected(e,!1)),yield this.publisherConnectionPromise})}verifyTransport(){return!(!this.pcManager||this.pcManager.currentState!==H.CONNECTED||!this.client.ws||this.client.ws.readyState===WebSocket.CLOSED)}negotiate(){return y(this,void 0,void 0,function*(){return new Promise((e,n)=>y(this,void 0,void 0,function*(){if(!this.pcManager){n(new Ii("PC manager is closed"));return}this.pcManager.requirePublisher(),this.pcManager.publisher.getTransceivers().length==0&&!this.lossyDC&&!this.reliableDC&&this.createDataChannels();const i=new AbortController,r=()=>{i.abort(),this.log.debug("engine disconnected while negotiation was ongoing",this.logContext),e()};this.isClosed&&n("cannot negotiate on closed engine"),this.on(R.Closing,r),this.pcManager.publisher.once(kt.RTPVideoPayloadTypes,s=>{const a=new Map;s.forEach(o=>{const c=o.codec.toLowerCase();fd(c)&&a.set(o.payload,c)}),this.emit(R.RTPVideoMapUpdate,a)});try{yield this.pcManager.negotiate(i),e()}catch(s){s instanceof Ii&&(this.fullReconnectOnNext=!0),this.handleDisconnect("negotiation",lt.RR_UNKNOWN),n(s)}finally{this.off(R.Closing,r)}}))})}dataChannelForKind(e,n){if(n){if(e===ue.LOSSY)return this.lossyDCSub;if(e===ue.RELIABLE)return this.reliableDCSub}else{if(e===ue.LOSSY)return this.lossyDC;if(e===ue.RELIABLE)return this.reliableDC}}sendSyncState(e,n){var i,r;if(!this.pcManager){this.log.warn("sync state cannot be sent without peer connection setup",this.logContext);return}const s=this.pcManager.subscriber.getLocalDescription(),a=this.pcManager.subscriber.getRemoteDescription(),o=(r=(i=this.signalOpts)===null||i===void 0?void 0:i.autoSubscribe)!==null&&r!==void 0?r:!0,c=new Array,u=new Array;e.forEach(l=>{l.isDesired!==o&&c.push(l.trackSid),l.isEnabled||u.push(l.trackSid)}),this.client.sendSyncState(new Ta({answer:s?wn({sdp:s.sdp,type:s.type}):void 0,offer:a?wn({sdp:a.sdp,type:a.type}):void 0,subscription:new Ln({trackSids:c,subscribe:!o,participantTracks:[]}),publishTracks:ed(n),dataChannels:this.dataChannelsInfo(),trackSidsDisabled:u}))}failNext(){this.shouldFailNext=!0}dataChannelsInfo(){const e=[],n=(i,r)=>{(i==null?void 0:i.id)!==void 0&&i.id!==null&&e.push(new Ea({label:i.label,id:i.id,target:r}))};return n(this.dataChannelForKind(ue.LOSSY),we.PUBLISHER),n(this.dataChannelForKind(ue.RELIABLE),we.PUBLISHER),n(this.dataChannelForKind(ue.LOSSY,!0),we.SUBSCRIBER),n(this.dataChannelForKind(ue.RELIABLE,!0),we.SUBSCRIBER),e}clearReconnectTimeout(){this.reconnectTimeout&&ie.clearTimeout(this.reconnectTimeout)}clearPendingReconnect(){this.clearReconnectTimeout(),this.reconnectAttempts=0}registerOnLineListener(){fe()&&window.addEventListener("online",this.handleBrowserOnLine)}deregisterOnLineListener(){fe()&&window.removeEventListener("online",this.handleBrowserOnLine)}}class dt extends Error{}function $d(t){return t!==void 0&&t>13}function Qd(t,e){const n=t.participantIdentity?t.participantIdentity:e.participantIdentity;t.participantIdentity=n,e.participantIdentity=n;const i=t.destinationIdentities.length!==0?t.destinationIdentities:e.destinationIdentities;t.destinationIdentities=i,e.destinationIdentities=i}class ms{constructor(e,n){this.lastUpdateAt=0,this.settingsCacheTime=3e3,this.attemptedRegions=[],this.serverUrl=new URL(e),this.token=n}updateToken(e){this.token=e}isCloud(){return Li(this.serverUrl)}getServerUrl(){return this.serverUrl}getNextBestRegionUrl(e){return y(this,void 0,void 0,function*(){if(!this.isCloud())throw Error("region availability is only supported for LiveKit Cloud domains");(!this.regionSettings||Date.now()-this.lastUpdateAt>this.settingsCacheTime)&&(this.regionSettings=yield this.fetchRegionSettings(e));const n=this.regionSettings.regions.filter(i=>!this.attemptedRegions.find(r=>r.url===i.url));if(n.length>0){const i=n[0];return this.attemptedRegions.push(i),j.debug("next region: ".concat(i.region)),i.url}else return null})}resetAttempts(){this.attemptedRegions=[]}fetchRegionSettings(e){return y(this,void 0,void 0,function*(){const n=yield fetch("".concat(Yd(this.serverUrl),"/regions"),{headers:{authorization:"Bearer ".concat(this.token)},signal:e});if(n.ok){const i=yield n.json();return this.lastUpdateAt=Date.now(),i}else throw new G("Could not fetch region settings: ".concat(n.statusText),n.status===401?0:void 0,n.status)})}setServerReportedRegions(e){this.regionSettings=e,this.lastUpdateAt=Date.now()}}function Yd(t){return"".concat(t.protocol.replace("ws","http"),"//").concat(t.host,"/settings")}class xo extends k{constructor(e,n,i,r,s){super(e,i,s),this.sid=n,this.receiver=r}setMuted(e){this.isMuted!==e&&(this.isMuted=e,this._mediaStreamTrack.enabled=!e,this.emit(e?_.Muted:_.Unmuted,this))}setMediaStream(e){this.mediaStream=e;const n=i=>{i.track===this._mediaStreamTrack&&(e.removeEventListener("removetrack",n),this.receiver&&"playoutDelayHint"in this.receiver&&(this.receiver.playoutDelayHint=void 0),this.receiver=void 0,this._currentBitrate=0,this.emit(_.Ended,this))};e.addEventListener("removetrack",n)}start(){this.startMonitor(),super.enable()}stop(){this.stopMonitor(),super.disable()}getRTCStatsReport(){return y(this,void 0,void 0,function*(){var e;return!((e=this.receiver)===null||e===void 0)&&e.getStats?yield this.receiver.getStats():void 0})}setPlayoutDelay(e){this.receiver?"playoutDelayHint"in this.receiver?this.receiver.playoutDelayHint=e:this.log.warn("Playout delay not supported in this browser"):this.log.warn("Cannot set playout delay, track already ended")}getPlayoutDelay(){if(this.receiver){if("playoutDelayHint"in this.receiver)return this.receiver.playoutDelayHint;this.log.warn("Playout delay not supported in this browser")}else this.log.warn("Cannot get playout delay, track already ended");return 0}startMonitor(){this.monitorInterval||(this.monitorInterval=setInterval(()=>this.monitorReceiver(),lr)),td()&&this.registerTimeSyncUpdate()}registerTimeSyncUpdate(){const e=()=>{var n;this.timeSyncHandle=requestAnimationFrame(()=>e());const i=(n=this.receiver)===null||n===void 0?void 0:n.getSynchronizationSources()[0];if(i){const{timestamp:r,rtpTimestamp:s}=i;s&&this.rtpTimestamp!==s&&(this.emit(_.TimeSyncUpdate,{timestamp:r,rtpTimestamp:s}),this.rtpTimestamp=s)}};e()}}class St extends xo{constructor(e,n,i,r,s,a){super(e,n,k.Kind.Audio,i,a),this.monitorReceiver=()=>y(this,void 0,void 0,function*(){if(!this.receiver){this._currentBitrate=0;return}const o=yield this.getReceiverStats();o&&this.prevStats&&this.receiver&&(this._currentBitrate=Bn(o,this.prevStats)),this.prevStats=o}),this.audioContext=r,this.webAudioPluginNodes=[],s&&(this.sinkId=s.deviceId)}setVolume(e){var n;for(const i of this.attachedElements)this.audioContext?(n=this.gainNode)===null||n===void 0||n.gain.setTargetAtTime(e,0,.1):i.volume=e;We()&&this._mediaStreamTrack._setVolume(e),this.elementVolume=e}getVolume(){if(this.elementVolume)return this.elementVolume;if(We())return 1;let e=0;return this.attachedElements.forEach(n=>{n.volume>e&&(e=n.volume)}),e}setSinkId(e){return y(this,void 0,void 0,function*(){this.sinkId=e,yield Promise.all(this.attachedElements.map(n=>{if(Ni(n))return n.setSinkId(e)}))})}attach(e){const n=this.attachedElements.length===0;return e?super.attach(e):e=super.attach(),this.sinkId&&Ni(e)&&e.setSinkId(this.sinkId),this.audioContext&&n&&(this.log.debug("using audio context mapping",this.logContext),this.connectWebAudio(this.audioContext,e),e.volume=0,e.muted=!0),this.elementVolume&&this.setVolume(this.elementVolume),e}detach(e){let n;return e?(n=super.detach(e),this.audioContext&&(this.attachedElements.length>0?this.connectWebAudio(this.audioContext,this.attachedElements[0]):this.disconnectWebAudio())):(n=super.detach(),this.disconnectWebAudio()),n}setAudioContext(e){this.audioContext=e,e&&this.attachedElements.length>0?this.connectWebAudio(e,this.attachedElements[0]):e||this.disconnectWebAudio()}setWebAudioPlugins(e){this.webAudioPluginNodes=e,this.attachedElements.length>0&&this.audioContext&&this.connectWebAudio(this.audioContext,this.attachedElements[0])}connectWebAudio(e,n){this.disconnectWebAudio(),this.sourceNode=e.createMediaStreamSource(n.srcObject);let i=this.sourceNode;this.webAudioPluginNodes.forEach(r=>{i.connect(r),i=r}),this.gainNode=e.createGain(),i.connect(this.gainNode),this.gainNode.connect(e.destination),this.elementVolume&&this.gainNode.gain.setTargetAtTime(this.elementVolume,0,.1),e.state!=="running"&&e.resume().then(()=>{e.state!=="running"&&this.emit(_.AudioPlaybackFailed,new Error("Audio Context couldn't be started automatically"))}).catch(r=>{this.emit(_.AudioPlaybackFailed,r)})}disconnectWebAudio(){var e,n;(e=this.gainNode)===null||e===void 0||e.disconnect(),(n=this.sourceNode)===null||n===void 0||n.disconnect(),this.gainNode=void 0,this.sourceNode=void 0}getReceiverStats(){return y(this,void 0,void 0,function*(){if(!this.receiver||!this.receiver.getStats)return;const e=yield this.receiver.getStats();let n;return e.forEach(i=>{i.type==="inbound-rtp"&&(n={type:"audio",timestamp:i.timestamp,jitter:i.jitter,bytesReceived:i.bytesReceived,concealedSamples:i.concealedSamples,concealmentEvents:i.concealmentEvents,silentConcealedSamples:i.silentConcealedSamples,silentConcealmentEvents:i.silentConcealmentEvents,totalAudioEnergy:i.totalAudioEnergy,totalSamplesDuration:i.totalSamplesDuration})}),n})}}const ci=100;class Vt extends xo{constructor(e,n,i,r,s){super(e,n,k.Kind.Video,i,s),this.elementInfos=[],this.monitorReceiver=()=>y(this,void 0,void 0,function*(){if(!this.receiver){this._currentBitrate=0;return}const a=yield this.getReceiverStats();a&&this.prevStats&&this.receiver&&(this._currentBitrate=Bn(a,this.prevStats)),this.prevStats=a}),this.debouncedHandleResize=ar(()=>{this.updateDimensions()},ci),this.adaptiveStreamSettings=r}get isAdaptiveStream(){return this.adaptiveStreamSettings!==void 0}get mediaStreamTrack(){return this._mediaStreamTrack}setMuted(e){super.setMuted(e),this.attachedElements.forEach(n=>{e?yt(this._mediaStreamTrack,n):pt(this._mediaStreamTrack,n)})}attach(e){if(e?super.attach(e):e=super.attach(),this.adaptiveStreamSettings&&this.elementInfos.find(n=>n.element===e)===void 0){const n=new Xd(e);this.observeElementInfo(n)}return e}observeElementInfo(e){this.adaptiveStreamSettings&&this.elementInfos.find(n=>n===e)===void 0?(e.handleResize=()=>{this.debouncedHandleResize()},e.handleVisibilityChanged=()=>{this.updateVisibility()},this.elementInfos.push(e),e.observe(),this.debouncedHandleResize(),this.updateVisibility()):this.log.warn("visibility resize observer not triggered",this.logContext)}stopObservingElementInfo(e){if(!this.isAdaptiveStream){this.log.warn("stopObservingElementInfo ignored",this.logContext);return}const n=this.elementInfos.filter(i=>i===e);for(const i of n)i.stopObserving();this.elementInfos=this.elementInfos.filter(i=>i!==e),this.updateVisibility(),this.debouncedHandleResize()}detach(e){let n=[];if(e)return this.stopObservingElement(e),super.detach(e);n=super.detach();for(const i of n)this.stopObservingElement(i);return n}getDecoderImplementation(){var e;return(e=this.prevStats)===null||e===void 0?void 0:e.decoderImplementation}getReceiverStats(){return y(this,void 0,void 0,function*(){if(!this.receiver||!this.receiver.getStats)return;const e=yield this.receiver.getStats();let n,i="",r=new Map;return e.forEach(s=>{s.type==="inbound-rtp"?(i=s.codecId,n={type:"video",framesDecoded:s.framesDecoded,framesDropped:s.framesDropped,framesReceived:s.framesReceived,packetsReceived:s.packetsReceived,packetsLost:s.packetsLost,frameWidth:s.frameWidth,frameHeight:s.frameHeight,pliCount:s.pliCount,firCount:s.firCount,nackCount:s.nackCount,jitter:s.jitter,timestamp:s.timestamp,bytesReceived:s.bytesReceived,decoderImplementation:s.decoderImplementation}):s.type==="codec"&&r.set(s.id,s)}),n&&i!==""&&r.get(i)&&(n.mimeType=r.get(i).mimeType),n})}stopObservingElement(e){const n=this.elementInfos.filter(i=>i.element===e);for(const i of n)this.stopObservingElementInfo(i)}handleAppVisibilityChanged(){const e=Object.create(null,{handleAppVisibilityChanged:{get:()=>super.handleAppVisibilityChanged}});return y(this,void 0,void 0,function*(){yield e.handleAppVisibilityChanged.call(this),this.isAdaptiveStream&&this.updateVisibility()})}updateVisibility(){var e,n;const i=this.elementInfos.reduce((o,c)=>Math.max(o,c.visibilityChangedAt||0),0),r=!((n=(e=this.adaptiveStreamSettings)===null||e===void 0?void 0:e.pauseVideoInBackground)!==null&&n!==void 0)||n?this.isInBackground:!1,s=this.elementInfos.some(o=>o.pictureInPicture),a=this.elementInfos.some(o=>o.visible)&&!r||s;if(this.lastVisible!==a){if(!a&&Date.now()-i<ci){ie.setTimeout(()=>{this.updateVisibility()},ci);return}this.lastVisible=a,this.emit(_.VisibilityChanged,a,this)}}updateDimensions(){var e,n;let i=0,r=0;const s=this.getPixelDensity();for(const a of this.elementInfos){const o=a.width()*s,c=a.height()*s;o+c>i+r&&(i=o,r=c)}((e=this.lastDimensions)===null||e===void 0?void 0:e.width)===i&&((n=this.lastDimensions)===null||n===void 0?void 0:n.height)===r||(this.lastDimensions={width:i,height:r},this.emit(_.VideoDimensionsChanged,this.lastDimensions,this))}getPixelDensity(){var e;const n=(e=this.adaptiveStreamSettings)===null||e===void 0?void 0:e.pixelDensity;return n==="screen"?es():n||(es()>2?2:1)}}class Xd{get visible(){return this.isPiP||this.isIntersecting}get pictureInPicture(){return this.isPiP}constructor(e,n){this.onVisibilityChanged=i=>{var r;const{target:s,isIntersecting:a}=i;s===this.element&&(this.isIntersecting=a,this.visibilityChangedAt=Date.now(),(r=this.handleVisibilityChanged)===null||r===void 0||r.call(this))},this.onEnterPiP=()=>{var i;this.isPiP=!0,(i=this.handleVisibilityChanged)===null||i===void 0||i.call(this)},this.onLeavePiP=()=>{var i;this.isPiP=!1,(i=this.handleVisibilityChanged)===null||i===void 0||i.call(this)},this.element=e,this.isIntersecting=n??gs(e),this.isPiP=fe()&&document.pictureInPictureElement===e,this.visibilityChangedAt=0}width(){return this.element.clientWidth}height(){return this.element.clientHeight}observe(){this.isIntersecting=gs(this.element),this.isPiP=document.pictureInPictureElement===this.element,this.element.handleResize=()=>{var e;(e=this.handleResize)===null||e===void 0||e.call(this)},this.element.handleVisibilityChanged=this.onVisibilityChanged,ns().observe(this.element),ts().observe(this.element),this.element.addEventListener("enterpictureinpicture",this.onEnterPiP),this.element.addEventListener("leavepictureinpicture",this.onLeavePiP)}stopObserving(){var e,n;(e=ns())===null||e===void 0||e.unobserve(this.element),(n=ts())===null||n===void 0||n.unobserve(this.element),this.element.removeEventListener("enterpictureinpicture",this.onEnterPiP),this.element.removeEventListener("leavepictureinpicture",this.onLeavePiP)}}function gs(t){let e=t.offsetTop,n=t.offsetLeft;const i=t.offsetWidth,r=t.offsetHeight,{hidden:s}=t,{opacity:a,display:o}=getComputedStyle(t);for(;t.offsetParent;)t=t.offsetParent,e+=t.offsetTop,n+=t.offsetLeft;return e<window.pageYOffset+window.innerHeight&&n<window.pageXOffset+window.innerWidth&&e+r>window.pageYOffset&&n+i>window.pageXOffset&&!s&&(a!==""?parseFloat(a)>0:!0)&&o!=="none"}class Ue extends Ne.EventEmitter{constructor(e,n,i,r){var s;super(),this.metadataMuted=!1,this.encryption=me.NONE,this.log=j,this.handleMuted=()=>{this.emit(_.Muted)},this.handleUnmuted=()=>{this.emit(_.Unmuted)},this.log=Be((s=r==null?void 0:r.loggerName)!==null&&s!==void 0?s:_e.Publication),this.loggerContextCb=this.loggerContextCb,this.setMaxListeners(100),this.kind=e,this.trackSid=n,this.trackName=i,this.source=k.Source.Unknown}setTrack(e){this.track&&(this.track.off(_.Muted,this.handleMuted),this.track.off(_.Unmuted,this.handleUnmuted)),this.track=e,e&&(e.on(_.Muted,this.handleMuted),e.on(_.Unmuted,this.handleUnmuted))}get logContext(){var e;return Object.assign(Object.assign({},(e=this.loggerContextCb)===null||e===void 0?void 0:e.call(this)),W(this))}get isMuted(){return this.metadataMuted}get isEnabled(){return!0}get isSubscribed(){return this.track!==void 0}get isEncrypted(){return this.encryption!==me.NONE}get audioTrack(){if(this.track instanceof oe||this.track instanceof St)return this.track}get videoTrack(){if(this.track instanceof le||this.track instanceof Vt)return this.track}updateInfo(e){this.trackSid=e.sid,this.trackName=e.name,this.source=k.sourceFromProto(e.source),this.mimeType=e.mimeType,this.kind===k.Kind.Video&&e.width>0&&(this.dimensions={width:e.width,height:e.height},this.simulcasted=e.simulcast),this.encryption=e.encryption,this.trackInfo=e,this.log.debug("update publication info",Object.assign(Object.assign({},this.logContext),{info:e}))}}(function(t){(function(e){e.Desired="desired",e.Subscribed="subscribed",e.Unsubscribed="unsubscribed"})(t.SubscriptionStatus||(t.SubscriptionStatus={})),function(e){e.Allowed="allowed",e.NotAllowed="not_allowed"}(t.PermissionStatus||(t.PermissionStatus={}))})(Ue||(Ue={}));class zt extends Ue{get isUpstreamPaused(){var e;return(e=this.track)===null||e===void 0?void 0:e.isUpstreamPaused}constructor(e,n,i,r){super(e,n.sid,n.name,r),this.track=void 0,this.handleTrackEnded=()=>{this.emit(_.Ended)},this.updateInfo(n),this.setTrack(i)}setTrack(e){this.track&&this.track.off(_.Ended,this.handleTrackEnded),super.setTrack(e),e&&e.on(_.Ended,this.handleTrackEnded)}get isMuted(){return this.track?this.track.isMuted:super.isMuted}get audioTrack(){return super.audioTrack}get videoTrack(){return super.videoTrack}mute(){return y(this,void 0,void 0,function*(){var e;return(e=this.track)===null||e===void 0?void 0:e.mute()})}unmute(){return y(this,void 0,void 0,function*(){var e;return(e=this.track)===null||e===void 0?void 0:e.unmute()})}pauseUpstream(){return y(this,void 0,void 0,function*(){var e;yield(e=this.track)===null||e===void 0?void 0:e.pauseUpstream()})}resumeUpstream(){return y(this,void 0,void 0,function*(){var e;yield(e=this.track)===null||e===void 0?void 0:e.resumeUpstream()})}getTrackFeatures(){var e;if(this.track instanceof oe){const n=this.track.mediaStreamTrack.getSettings(),i=new Set;return n.autoGainControl&&i.add(Oe.TF_AUTO_GAIN_CONTROL),n.echoCancellation&&i.add(Oe.TF_ECHO_CANCELLATION),n.noiseSuppression&&i.add(Oe.TF_NOISE_SUPPRESSION),n.channelCount&&n.channelCount>1&&i.add(Oe.TF_STEREO),!((e=this.options)===null||e===void 0)&&e.dtx||i.add(Oe.TF_STEREO),this.track.enhancedNoiseCancellation&&i.add(Oe.TF_ENHANCED_NOISE_CANCELLATION),Array.from(i.values())}else return[]}}var ge;(function(t){t.Excellent="excellent",t.Good="good",t.Poor="poor",t.Lost="lost",t.Unknown="unknown"})(ge||(ge={}));function Zd(t){switch(t){case At.EXCELLENT:return ge.Excellent;case At.GOOD:return ge.Good;case At.POOR:return ge.Poor;case At.LOST:return ge.Lost;default:return ge.Unknown}}class Oo extends Ne.EventEmitter{get logContext(){var e,n;return Object.assign({},(n=(e=this.loggerOptions)===null||e===void 0?void 0:e.loggerContextCb)===null||n===void 0?void 0:n.call(e))}get isEncrypted(){return this.trackPublications.size>0&&Array.from(this.trackPublications.values()).every(e=>e.isEncrypted)}get isAgent(){var e;return((e=this.permissions)===null||e===void 0?void 0:e.agent)||this.kind===Pn.AGENT}get kind(){return this._kind}get attributes(){return Object.freeze(Object.assign({},this._attributes))}constructor(e,n,i,r,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Pn.STANDARD;var o;super(),this.audioLevel=0,this.isSpeaking=!1,this._connectionQuality=ge.Unknown,this.log=j,this.log=Be((o=s==null?void 0:s.loggerName)!==null&&o!==void 0?o:_e.Participant),this.loggerOptions=s,this.setMaxListeners(100),this.sid=e,this.identity=n,this.name=i,this.metadata=r,this.audioTrackPublications=new Map,this.videoTrackPublications=new Map,this.trackPublications=new Map,this._kind=a,this._attributes={}}getTrackPublications(){return Array.from(this.trackPublications.values())}getTrackPublication(e){for(const[,n]of this.trackPublications)if(n.source===e)return n}getTrackPublicationByName(e){for(const[,n]of this.trackPublications)if(n.trackName===e)return n}get connectionQuality(){return this._connectionQuality}get isCameraEnabled(){var e;const n=this.getTrackPublication(k.Source.Camera);return!(!((e=n==null?void 0:n.isMuted)!==null&&e!==void 0)||e)}get isMicrophoneEnabled(){var e;const n=this.getTrackPublication(k.Source.Microphone);return!(!((e=n==null?void 0:n.isMuted)!==null&&e!==void 0)||e)}get isScreenShareEnabled(){return!!this.getTrackPublication(k.Source.ScreenShare)}get isLocal(){return!1}get joinedAt(){return this.participantInfo?new Date(Number.parseInt(this.participantInfo.joinedAt.toString())*1e3):new Date}updateInfo(e){return this.participantInfo&&this.participantInfo.sid===e.sid&&this.participantInfo.version>e.version?!1:(this.identity=e.identity,this.sid=e.sid,this._setName(e.name),this._setMetadata(e.metadata),this._setAttributes(e.attributes),e.permission&&this.setPermissions(e.permission),this.participantInfo=e,this.log.trace("update participant info",Object.assign(Object.assign({},this.logContext),{info:e})),!0)}_setMetadata(e){const n=this.metadata!==e,i=this.metadata;this.metadata=e,n&&this.emit(T.ParticipantMetadataChanged,i)}_setName(e){const n=this.name!==e;this.name=e,n&&this.emit(T.ParticipantNameChanged,e)}_setAttributes(e){const n=nd(e,this.attributes);this._attributes=e,Object.keys(n).length>0&&this.emit(T.AttributesChanged,n)}setPermissions(e){var n,i,r,s,a;const o=this.permissions,c=e.canPublish!==((n=this.permissions)===null||n===void 0?void 0:n.canPublish)||e.canSubscribe!==((i=this.permissions)===null||i===void 0?void 0:i.canSubscribe)||e.canPublishData!==((r=this.permissions)===null||r===void 0?void 0:r.canPublishData)||e.hidden!==((s=this.permissions)===null||s===void 0?void 0:s.hidden)||e.recorder!==((a=this.permissions)===null||a===void 0?void 0:a.recorder)||e.canPublishSources.length!==this.permissions.canPublishSources.length||e.canPublishSources.some((u,l)=>{var h;return u!==((h=this.permissions)===null||h===void 0?void 0:h.canPublishSources[l])});return this.permissions=e,c&&this.emit(T.ParticipantPermissionsChanged,o),c}setIsSpeaking(e){e!==this.isSpeaking&&(this.isSpeaking=e,e&&(this.lastSpokeAt=new Date),this.emit(T.IsSpeakingChanged,e))}setConnectionQuality(e){const n=this._connectionQuality;this._connectionQuality=Zd(e),n!==this._connectionQuality&&this.emit(T.ConnectionQualityChanged,this._connectionQuality)}setAudioContext(e){this.audioContext=e,this.audioTrackPublications.forEach(n=>(n.track instanceof St||n.track instanceof oe)&&n.track.setAudioContext(e))}addTrackPublication(e){e.on(_.Muted,()=>{this.emit(T.TrackMuted,e)}),e.on(_.Unmuted,()=>{this.emit(T.TrackUnmuted,e)});const n=e;switch(n.track&&(n.track.sid=e.trackSid),this.trackPublications.set(e.trackSid,e),e.kind){case k.Kind.Audio:this.audioTrackPublications.set(e.trackSid,e);break;case k.Kind.Video:this.videoTrackPublications.set(e.trackSid,e);break}}}function eh(t){var e,n,i;if(!t.participantSid&&!t.participantIdentity)throw new Error("Invalid track permission, must provide at least one of participantIdentity and participantSid");return new Sa({participantIdentity:(e=t.participantIdentity)!==null&&e!==void 0?e:"",participantSid:(n=t.participantSid)!==null&&n!==void 0?n:"",allTracks:(i=t.allowAll)!==null&&i!==void 0?i:!1,trackSids:t.allowedTrackSids||[]})}class Ht extends Oo{constructor(e,n,i,r){super(e,n,void 0,void 0,{loggerName:r.loggerName,loggerContextCb:()=>this.engine.logContext}),this.pendingPublishing=new Set,this.pendingPublishPromises=new Map,this.participantTrackPermissions=[],this.allParticipantsAllowedToSubscribe=!0,this.encryptionType=me.NONE,this.enabledPublishVideoCodecs=[],this.handleReconnecting=()=>{this.reconnectFuture||(this.reconnectFuture=new Co)},this.handleReconnected=()=>{var s,a;(a=(s=this.reconnectFuture)===null||s===void 0?void 0:s.resolve)===null||a===void 0||a.call(s),this.reconnectFuture=void 0,this.updateTrackSubscriptionPermissions()},this.handleDisconnected=()=>{var s,a;this.reconnectFuture&&(this.reconnectFuture.promise.catch(o=>this.log.warn(o.message,this.logContext)),(a=(s=this.reconnectFuture)===null||s===void 0?void 0:s.reject)===null||a===void 0||a.call(s,"Got disconnected during reconnection attempt"),this.reconnectFuture=void 0)},this.handleSignalRequestResponse=s=>{const{requestId:a,reason:o,message:c}=s,u=this.pendingSignalRequests.get(a);u&&(o!==wa.OK&&u.reject(new Yr(c,o)),this.pendingSignalRequests.delete(a))},this.updateTrackSubscriptionPermissions=()=>{this.log.debug("updating track subscription permissions",Object.assign(Object.assign({},this.logContext),{allParticipantsAllowed:this.allParticipantsAllowedToSubscribe,participantTrackPermissions:this.participantTrackPermissions})),this.engine.client.sendUpdateSubscriptionPermissions(this.allParticipantsAllowedToSubscribe,this.participantTrackPermissions.map(s=>eh(s)))},this.onTrackUnmuted=s=>{this.onTrackMuted(s,s.isUpstreamPaused)},this.onTrackMuted=(s,a)=>{if(a===void 0&&(a=!0),!s.sid){this.log.error("could not update mute status for unpublished track",Object.assign(Object.assign({},this.logContext),W(s)));return}this.engine.updateMuteStatus(s.sid,a)},this.onTrackUpstreamPaused=s=>{this.log.debug("upstream paused",Object.assign(Object.assign({},this.logContext),W(s))),this.onTrackMuted(s,!0)},this.onTrackUpstreamResumed=s=>{this.log.debug("upstream resumed",Object.assign(Object.assign({},this.logContext),W(s))),this.onTrackMuted(s,s.isMuted)},this.onTrackFeatureUpdate=s=>{const a=this.audioTrackPublications.get(s.sid);if(!a){this.log.warn("Could not update local audio track settings, missing publication for track ".concat(s.sid),this.logContext);return}this.engine.client.sendUpdateLocalAudioTrack(a.trackSid,a.getTrackFeatures())},this.handleSubscribedQualityUpdate=s=>y(this,void 0,void 0,function*(){var a,o,c,u,l,h;if(!(!((l=this.roomOptions)===null||l===void 0)&&l.dynacast))return;const f=this.videoTrackPublications.get(s.trackSid);if(!f){this.log.warn("received subscribed quality update for unknown track",Object.assign(Object.assign({},this.logContext),{trackSid:s.trackSid}));return}if(s.subscribedCodecs.length>0){if(!f.videoTrack)return;const v=yield f.videoTrack.setPublishingCodecs(s.subscribedCodecs);try{for(var p=!0,g=ht(v),b;b=yield g.next(),a=b.done,!a;p=!0){u=b.value,p=!1;const m=u;Jl(m)&&(this.log.debug("publish ".concat(m," for ").concat(f.videoTrack.sid),Object.assign(Object.assign({},this.logContext),W(f))),yield this.publishAdditionalCodecForTrack(f.videoTrack,m,f.options))}}catch(m){o={error:m}}finally{try{!p&&!a&&(c=g.return)&&(yield c.call(g))}finally{if(o)throw o.error}}}else s.subscribedQualities.length>0&&(yield(h=f.videoTrack)===null||h===void 0?void 0:h.setPublishingLayers(s.subscribedQualities))}),this.handleLocalTrackUnpublished=s=>{const a=this.trackPublications.get(s.trackSid);if(!a){this.log.warn("received unpublished event for unknown track",Object.assign(Object.assign({},this.logContext),{trackSid:s.trackSid}));return}this.unpublishTrack(a.track)},this.handleTrackEnded=s=>y(this,void 0,void 0,function*(){if(s.source===k.Source.ScreenShare||s.source===k.Source.ScreenShareAudio)this.log.debug("unpublishing local track due to TrackEnded",Object.assign(Object.assign({},this.logContext),W(s))),this.unpublishTrack(s);else if(s.isUserProvided)yield s.mute();else if(s instanceof oe||s instanceof le)try{if(fe())try{const a=yield navigator==null?void 0:navigator.permissions.query({name:s.source===k.Source.Camera?"camera":"microphone"});if(a&&a.state==="denied")throw this.log.warn("user has revoked access to ".concat(s.source),Object.assign(Object.assign({},this.logContext),W(s))),a.onchange=()=>{a.state!=="denied"&&(s.isMuted||s.restartTrack(),a.onchange=null)},new Error("GetUserMedia Permission denied")}catch{}s.isMuted||(this.log.debug("track ended, attempting to use a different device",Object.assign(Object.assign({},this.logContext),W(s))),yield s.restartTrack())}catch{this.log.warn("could not restart track, muting instead",Object.assign(Object.assign({},this.logContext),W(s))),yield s.mute()}}),this.audioTrackPublications=new Map,this.videoTrackPublications=new Map,this.trackPublications=new Map,this.engine=i,this.roomOptions=r,this.setupEngine(i),this.activeDeviceMap=new Map,this.pendingSignalRequests=new Map}get lastCameraError(){return this.cameraError}get lastMicrophoneError(){return this.microphoneError}get isE2EEEnabled(){return this.encryptionType!==me.NONE}getTrackPublication(e){const n=super.getTrackPublication(e);if(n)return n}getTrackPublicationByName(e){const n=super.getTrackPublicationByName(e);if(n)return n}setupEngine(e){this.engine=e,this.engine.on(R.RemoteMute,(n,i)=>{const r=this.trackPublications.get(n);!r||!r.track||(i?r.mute():r.unmute())}),this.engine.on(R.Connected,this.handleReconnected).on(R.SignalRestarted,this.handleReconnected).on(R.SignalResumed,this.handleReconnected).on(R.Restarting,this.handleReconnecting).on(R.Resuming,this.handleReconnecting).on(R.LocalTrackUnpublished,this.handleLocalTrackUnpublished).on(R.SubscribedQualityUpdate,this.handleSubscribedQualityUpdate).on(R.Disconnected,this.handleDisconnected).on(R.SignalRequestResponse,this.handleSignalRequestResponse)}setMetadata(e){return y(this,void 0,void 0,function*(){yield this.requestMetadataUpdate({metadata:e})})}setName(e){return y(this,void 0,void 0,function*(){yield this.requestMetadataUpdate({name:e})})}setAttributes(e){return y(this,void 0,void 0,function*(){yield this.requestMetadataUpdate({attributes:e})})}requestMetadataUpdate(e){return y(this,arguments,void 0,function(n){var i=this;let{metadata:r,name:s,attributes:a}=n;return function*(){return new Promise((o,c)=>y(i,void 0,void 0,function*(){var u,l;try{let h=!1;const f=yield this.engine.client.sendUpdateLocalMetadata((u=r??this.metadata)!==null&&u!==void 0?u:"",(l=s??this.name)!==null&&l!==void 0?l:"",a),p=performance.now();for(this.pendingSignalRequests.set(f,{resolve:o,reject:g=>{c(g),h=!0},values:{name:s,metadata:r,attributes:a}});performance.now()-p<5e3&&!h;){if((!s||this.name===s)&&(!r||this.metadata===r)&&(!a||Object.entries(a).every(g=>{let[b,v]=g;return this.attributes[b]===v}))){this.pendingSignalRequests.delete(f),o();return}yield Ae(50)}c(new Yr("Request to update local metadata timed out","TimeoutError"))}catch(h){h instanceof Error&&c(h)}}))}()})}setCameraEnabled(e,n,i){return this.setTrackEnabled(k.Source.Camera,e,n,i)}setMicrophoneEnabled(e,n,i){return this.setTrackEnabled(k.Source.Microphone,e,n,i)}setScreenShareEnabled(e,n,i){return this.setTrackEnabled(k.Source.ScreenShare,e,n,i)}setPermissions(e){const n=this.permissions,i=super.setPermissions(e);return i&&n&&this.emit(T.ParticipantPermissionsChanged,n),i}setE2EEEnabled(e){return y(this,void 0,void 0,function*(){this.encryptionType=e?me.GCM:me.NONE,yield this.republishAllTracks(void 0,!1)})}setTrackEnabled(e,n,i,r){return y(this,void 0,void 0,function*(){var s,a;this.log.debug("setTrackEnabled",Object.assign(Object.assign({},this.logContext),{source:e,enabled:n}));let o=this.getTrackPublication(e);if(n)if(o)yield o.unmute();else{let c;if(this.pendingPublishing.has(e)){this.log.info("skipping duplicate published source",Object.assign(Object.assign({},this.logContext),{source:e}));return}this.pendingPublishing.add(e);try{switch(e){case k.Source.Camera:c=yield this.createTracks({video:(s=i)!==null&&s!==void 0?s:!0});break;case k.Source.Microphone:c=yield this.createTracks({audio:(a=i)!==null&&a!==void 0?a:!0});break;case k.Source.ScreenShare:c=yield this.createScreenTracks(Object.assign({},i));break;default:throw new De(e)}const u=[];for(const h of c)this.log.info("publishing track",Object.assign(Object.assign({},this.logContext),W(h))),u.push(this.publishTrack(h,r));[o]=yield Promise.all(u)}catch(u){throw c==null||c.forEach(l=>{l.stop()}),u instanceof Error&&!(u instanceof De)&&this.emit(T.MediaDevicesError,u),u}finally{this.pendingPublishing.delete(e)}}else if(o&&o.track)if(e===k.Source.ScreenShare){o=yield this.unpublishTrack(o.track);const c=this.getTrackPublication(k.Source.ScreenShareAudio);c&&c.track&&this.unpublishTrack(c.track)}else yield o.mute();return o})}enableCameraAndMicrophone(){return y(this,void 0,void 0,function*(){if(!(this.pendingPublishing.has(k.Source.Camera)||this.pendingPublishing.has(k.Source.Microphone))){this.pendingPublishing.add(k.Source.Camera),this.pendingPublishing.add(k.Source.Microphone);try{const e=yield this.createTracks({audio:!0,video:!0});yield Promise.all(e.map(n=>this.publishTrack(n)))}finally{this.pendingPublishing.delete(k.Source.Camera),this.pendingPublishing.delete(k.Source.Microphone)}}})}createTracks(e){return y(this,void 0,void 0,function*(){var n,i;const r=vo(e,(n=this.roomOptions)===null||n===void 0?void 0:n.audioCaptureDefaults,(i=this.roomOptions)===null||i===void 0?void 0:i.videoCaptureDefaults),s=Vn(r);let a;try{a=yield navigator.mediaDevices.getUserMedia(s)}catch(o){throw o instanceof Error&&(s.audio&&(this.microphoneError=o),s.video&&(this.cameraError=o)),o}return s.audio&&(this.microphoneError=void 0,this.emit(T.AudioStreamAcquired)),s.video&&(this.cameraError=void 0),Promise.all(a.getTracks().map(o=>y(this,void 0,void 0,function*(){const c=o.kind==="audio";let u=c?r.audio:r.video;(typeof u=="boolean"||!u)&&(u={});let l;const h=c?s.audio:s.video;typeof h!="boolean"&&(l=h);const f=Ro(o,l,{loggerName:this.roomOptions.loggerName,loggerContextCb:()=>this.logContext});return f.kind===k.Kind.Video?f.source=k.Source.Camera:f.kind===k.Kind.Audio&&(f.source=k.Source.Microphone,f.setAudioContext(this.audioContext)),f.mediaStream=a,u.processor&&(f instanceof oe?yield f.setProcessor(u.processor):yield f.setProcessor(u.processor)),f})))})}createScreenTracks(e){return y(this,void 0,void 0,function*(){if(e===void 0&&(e={}),navigator.mediaDevices.getDisplayMedia===void 0)throw new sr("getDisplayMedia not supported");e.resolution===void 0&&!cd()&&(e.resolution=or.h1080fps30.resolution);const n=Zl(e),i=yield navigator.mediaDevices.getDisplayMedia(n),r=i.getVideoTracks();if(r.length===0)throw new De("no video track found");const s=new le(r[0],void 0,!1,{loggerName:this.roomOptions.loggerName,loggerContextCb:()=>this.logContext});s.source=k.Source.ScreenShare,e.contentHint&&(s.mediaStreamTrack.contentHint=e.contentHint);const a=[s];if(i.getAudioTracks().length>0){this.emit(T.AudioStreamAcquired);const o=new oe(i.getAudioTracks()[0],void 0,!1,this.audioContext,{loggerName:this.roomOptions.loggerName,loggerContextCb:()=>this.logContext});o.source=k.Source.ScreenShareAudio,a.push(o)}return a})}publishTrack(e,n){return y(this,void 0,void 0,function*(){var i,r,s,a;e instanceof oe&&e.setAudioContext(this.audioContext),yield(i=this.reconnectFuture)===null||i===void 0?void 0:i.promise,e instanceof it&&this.pendingPublishPromises.has(e)&&(yield this.pendingPublishPromises.get(e));let o;if(e instanceof MediaStreamTrack)o=e.getConstraints();else{o=e.constraints;let p;switch(e.source){case k.Source.Microphone:p="audioinput";break;case k.Source.Camera:p="videoinput"}p&&this.activeDeviceMap.has(p)&&(o=Object.assign(Object.assign({},o),{deviceId:this.activeDeviceMap.get(p)}))}if(e instanceof MediaStreamTrack)switch(e.kind){case"audio":e=new oe(e,o,!0,this.audioContext,{loggerName:this.roomOptions.loggerName,loggerContextCb:()=>this.logContext});break;case"video":e=new le(e,o,!0,{loggerName:this.roomOptions.loggerName,loggerContextCb:()=>this.logContext});break;default:throw new De("unsupported MediaStreamTrack kind ".concat(e.kind))}else e.updateLoggerOptions({loggerName:this.roomOptions.loggerName,loggerContextCb:()=>this.logContext});let c;if(this.trackPublications.forEach(p=>{p.track&&p.track===e&&(c=p)}),c)return this.log.warn("track has already been published, skipping",Object.assign(Object.assign({},this.logContext),W(c))),c;const u="channelCount"in e.mediaStreamTrack.getSettings()&&e.mediaStreamTrack.getSettings().channelCount===2||e.mediaStreamTrack.getConstraints().channelCount===2,l=(r=n==null?void 0:n.forceStereo)!==null&&r!==void 0?r:u;l&&(n||(n={}),n.dtx===void 0&&this.log.info("Opus DTX will be disabled for stereo tracks by default. Enable them explicitly to make it work.",Object.assign(Object.assign({},this.logContext),W(e))),n.red===void 0&&this.log.info("Opus RED will be disabled for stereo tracks by default. Enable them explicitly to make it work."),(s=n.dtx)!==null&&s!==void 0||(n.dtx=!1),(a=n.red)!==null&&a!==void 0||(n.red=!1));const h=Object.assign(Object.assign({},this.roomOptions.publishDefaults),n);!ud()&&this.roomOptions.e2ee&&(this.log.info("End-to-end encryption is set up, simulcast publishing will be disabled on Safari versions and iOS browsers running iOS < v17.2",Object.assign({},this.logContext)),h.simulcast=!1),h.source&&(e.source=h.source);const f=this.publish(e,h,l);this.pendingPublishPromises.set(e,f);try{return yield f}catch(p){throw p}finally{this.pendingPublishPromises.delete(e)}})}publish(e,n,i){return y(this,void 0,void 0,function*(){var r,s,a,o,c,u,l,h,f,p;Array.from(this.trackPublications.values()).find(w=>e instanceof it&&w.source===e.source)&&e.source!==k.Source.Unknown&&this.log.info("publishing a second track with the same source: ".concat(e.source),Object.assign(Object.assign({},this.logContext),W(e))),n.stopMicTrackOnMute&&e instanceof oe&&(e.stopOnMute=!0),e.source===k.Source.ScreenShare&&Tt()&&(n.simulcast=!1),n.videoCodec==="av1"&&!sd()&&(n.videoCodec=void 0),n.videoCodec==="vp9"&&!ad()&&(n.videoCodec=void 0),n.videoCodec===void 0&&(n.videoCodec=Ui),this.enabledPublishVideoCodecs.length>0&&(this.enabledPublishVideoCodecs.some(w=>n.videoCodec===yn(w.mime))||(n.videoCodec=yn(this.enabledPublishVideoCodecs[0].mime)));const b=n.videoCodec;e.on(_.Muted,this.onTrackMuted),e.on(_.Unmuted,this.onTrackUnmuted),e.on(_.Ended,this.handleTrackEnded),e.on(_.UpstreamPaused,this.onTrackUpstreamPaused),e.on(_.UpstreamResumed,this.onTrackUpstreamResumed),e.on(_.AudioTrackFeatureUpdate,this.onTrackFeatureUpdate);const v=new ki({cid:e.mediaStreamTrack.id,name:n.name,type:k.kindToProto(e.kind),muted:e.isMuted,source:k.sourceToProto(e.source),disableDtx:!(!((r=n.dtx)!==null&&r!==void 0)||r),encryption:this.encryptionType,stereo:i,disableRed:this.isE2EEEnabled||!(!((s=n.red)!==null&&s!==void 0)||s),stream:n==null?void 0:n.stream});let m;if(e.kind===k.Kind.Video){let w={width:0,height:0};try{w=yield e.waitForDimensions()}catch{const D=(o=(a=this.roomOptions.videoCaptureDefaults)===null||a===void 0?void 0:a.resolution)!==null&&o!==void 0?o:Gt.h720.resolution;w={width:D.width,height:D.height},this.log.error("could not determine track dimensions, using defaults",Object.assign(Object.assign(Object.assign({},this.logContext),W(e)),{dims:w}))}v.width=w.width,v.height=w.height,e instanceof le&&(Ft(b)&&(e.source===k.Source.ScreenShare&&(n.scalabilityMode="L1T3","contentHint"in e.mediaStreamTrack&&(e.mediaStreamTrack.contentHint="motion",this.log.info("forcing contentHint to motion for screenshare with SVC codecs",Object.assign(Object.assign({},this.logContext),W(e))))),n.scalabilityMode=(c=n.scalabilityMode)!==null&&c!==void 0?c:"L3T3_KEY"),v.simulcastCodecs=[new yi({codec:b,cid:e.mediaStreamTrack.id})],n.backupCodec===!0&&(n.backupCodec={codec:Ui}),n.backupCodec&&b!==n.backupCodec.codec&&v.encryption===me.NONE&&(this.roomOptions.dynacast||(this.roomOptions.dynacast=!0),v.simulcastCodecs.push(new yi({codec:n.backupCodec.codec,cid:""})))),m=ji(e.source===k.Source.ScreenShare,v.width,v.height,n),v.layers=hs(v.width,v.height,m,Ft(n.videoCodec))}else e.kind===k.Kind.Audio&&(m=[{maxBitrate:(u=n.audioPreset)===null||u===void 0?void 0:u.maxBitrate,priority:(h=(l=n.audioPreset)===null||l===void 0?void 0:l.priority)!==null&&h!==void 0?h:"high",networkPriority:(p=(f=n.audioPreset)===null||f===void 0?void 0:f.priority)!==null&&p!==void 0?p:"high"}]);if(!this.engine||this.engine.isClosed)throw new Y("cannot publish track when not connected");const E=()=>y(this,void 0,void 0,function*(){var w,M,D;if(!this.engine.pcManager)throw new Y("pcManager is not ready");if(e.sender=yield this.engine.createSender(e,n,m),e instanceof le&&((w=n.degradationPreference)!==null&&w!==void 0||(n.degradationPreference=Kd(e)),e.setDegradationPreference(n.degradationPreference)),m)if(Tt()&&e.kind===k.Kind.Audio){let A;for(const L of this.engine.pcManager.publisher.getTransceivers())if(L.sender===e.sender){A=L;break}A&&this.engine.pcManager.publisher.setTrackCodecBitrate({transceiver:A,codec:"opus",maxbr:!((M=m[0])===null||M===void 0)&&M.maxBitrate?m[0].maxBitrate/1e3:0})}else e.codec&&Ft(e.codec)&&(!((D=m[0])===null||D===void 0)&&D.maxBitrate)&&this.engine.pcManager.publisher.setTrackCodecBitrate({cid:v.cid,codec:e.codec,maxbr:m[0].maxBitrate/1e3});yield this.engine.negotiate()});let O;if(this.enabledPublishVideoCodecs.length>0)O=(yield Promise.all([this.engine.addTrack(v),E()]))[0];else{O=yield this.engine.addTrack(v);let w;if(O.codecs.forEach(M=>{w===void 0&&(w=M.mimeType)}),w&&e.kind===k.Kind.Video){const M=yn(w);M!==b&&(this.log.debug("falling back to server selected codec",Object.assign(Object.assign(Object.assign({},this.logContext),W(e)),{codec:M})),n.videoCodec=M,m=ji(e.source===k.Source.ScreenShare,v.width,v.height,n))}yield E()}const I=new zt(e.kind,O,e,{loggerName:this.roomOptions.loggerName,loggerContextCb:()=>this.logContext});return I.options=n,e.sid=O.sid,this.log.debug("publishing ".concat(e.kind," with encodings"),Object.assign(Object.assign({},this.logContext),{encodings:m,trackInfo:O})),e instanceof le?e.startMonitor(this.engine.client):e instanceof oe&&e.startMonitor(),this.addTrackPublication(I),this.emit(T.LocalTrackPublished,I),I})}get isLocal(){return!0}publishAdditionalCodecForTrack(e,n,i){return y(this,void 0,void 0,function*(){var r;if(this.encryptionType!==me.NONE)return;let s;if(this.trackPublications.forEach(p=>{p.track&&p.track===e&&(s=p)}),!s)throw new De("track is not published");if(!(e instanceof le))throw new De("track is not a video track");const a=Object.assign(Object.assign({},(r=this.roomOptions)===null||r===void 0?void 0:r.publishDefaults),i),o=qd(e,n,a);if(!o){this.log.info("backup codec has been disabled, ignoring request to add additional codec for track",Object.assign(Object.assign({},this.logContext),W(e)));return}const c=e.addSimulcastTrack(n,o);if(!c)return;const u=new ki({cid:c.mediaStreamTrack.id,type:k.kindToProto(e.kind),muted:e.isMuted,source:k.sourceToProto(e.source),sid:e.sid,simulcastCodecs:[{codec:a.videoCodec,cid:c.mediaStreamTrack.id}]});if(u.layers=hs(u.width,u.height,o),!this.engine||this.engine.isClosed)throw new Y("cannot publish track when not connected");const l=()=>y(this,void 0,void 0,function*(){yield this.engine.createSimulcastSender(e,c,a,o),yield this.engine.negotiate()}),f=(yield Promise.all([this.engine.addTrack(u),l()]))[0];this.log.debug("published ".concat(n," for track ").concat(e.sid),Object.assign(Object.assign({},this.logContext),{encodings:o,trackInfo:f}))})}unpublishTrack(e,n){return y(this,void 0,void 0,function*(){var i,r;if(e instanceof it){const u=this.pendingPublishPromises.get(e);u&&(this.log.info("awaiting publish promise before attempting to unpublish",Object.assign(Object.assign({},this.logContext),W(e))),yield u)}const s=this.getPublicationForTrack(e),a=s?W(s):void 0;if(this.log.debug("unpublishing track",Object.assign(Object.assign({},this.logContext),a)),!s||!s.track){this.log.warn("track was not unpublished because no publication was found",Object.assign(Object.assign({},this.logContext),a));return}e=s.track,e.off(_.Muted,this.onTrackMuted),e.off(_.Unmuted,this.onTrackUnmuted),e.off(_.Ended,this.handleTrackEnded),e.off(_.UpstreamPaused,this.onTrackUpstreamPaused),e.off(_.UpstreamResumed,this.onTrackUpstreamResumed),e.off(_.AudioTrackFeatureUpdate,this.onTrackFeatureUpdate),n===void 0&&(n=(r=(i=this.roomOptions)===null||i===void 0?void 0:i.stopLocalTrackOnUnpublish)!==null&&r!==void 0?r:!0),n&&e.stop();let o=!1;const c=e.sender;if(e.sender=void 0,this.engine.pcManager&&this.engine.pcManager.currentState<H.FAILED&&c)try{for(const u of this.engine.pcManager.publisher.getTransceivers())u.sender===c&&(u.direction="inactive",o=!0);if(this.engine.removeTrack(c)&&(o=!0),e instanceof le){for(const[,u]of e.simulcastCodecs)u.sender&&(this.engine.removeTrack(u.sender)&&(o=!0),u.sender=void 0);e.simulcastCodecs.clear()}}catch(u){this.log.warn("failed to unpublish track",Object.assign(Object.assign(Object.assign({},this.logContext),a),{error:u}))}switch(this.trackPublications.delete(s.trackSid),s.kind){case k.Kind.Audio:this.audioTrackPublications.delete(s.trackSid);break;case k.Kind.Video:this.videoTrackPublications.delete(s.trackSid);break}return this.emit(T.LocalTrackUnpublished,s),s.setTrack(void 0),o&&(yield this.engine.negotiate()),s})}unpublishTracks(e){return y(this,void 0,void 0,function*(){return(yield Promise.all(e.map(i=>this.unpublishTrack(i)))).filter(i=>i instanceof zt)})}republishAllTracks(e){return y(this,arguments,void 0,function(n){var i=this;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return function*(){const s=[];i.trackPublications.forEach(a=>{a.track&&(n&&(a.options=Object.assign(Object.assign({},a.options),n)),s.push(a))}),yield Promise.all(s.map(a=>y(i,void 0,void 0,function*(){const o=a.track;yield this.unpublishTrack(o,!1),r&&!o.isMuted&&o.source!==k.Source.ScreenShare&&o.source!==k.Source.ScreenShareAudio&&(o instanceof oe||o instanceof le)&&!o.isUserProvided&&(this.log.debug("restarting existing track",Object.assign(Object.assign({},this.logContext),{track:a.trackSid})),yield o.restartTrack()),yield this.publishTrack(o,a.options)})))}()})}publishData(e){return y(this,arguments,void 0,function(n){var i=this;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){const s=r.reliable?ue.RELIABLE:ue.LOSSY,a=r.destinationIdentities,o=r.topic,c=new ca({kind:s,value:{case:"user",value:new la({participantIdentity:i.identity,payload:n,destinationIdentities:a,topic:o})}});yield i.engine.sendDataPacket(c,s)}()})}setTrackSubscriptionPermissions(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];this.participantTrackPermissions=n,this.allParticipantsAllowedToSubscribe=e,this.engine.client.isDisconnected||this.updateTrackSubscriptionPermissions()}setEnabledPublishCodecs(e){this.enabledPublishVideoCodecs=e.filter(n=>n.mime.split("/")[0].toLowerCase()==="video")}updateInfo(e){return e.sid!==this.sid||!super.updateInfo(e)?!1:(e.tracks.forEach(n=>{var i,r;const s=this.trackPublications.get(n.sid);if(s){const a=s.isMuted||((r=(i=s.track)===null||i===void 0?void 0:i.isUpstreamPaused)!==null&&r!==void 0?r:!1);a!==n.muted&&(this.log.debug("updating server mute state after reconcile",Object.assign(Object.assign(Object.assign({},this.logContext),W(s)),{mutedOnServer:a})),this.engine.client.sendMuteTrack(n.sid,a))}}),!0)}getPublicationForTrack(e){let n;return this.trackPublications.forEach(i=>{const r=i.track;r&&(e instanceof MediaStreamTrack?(r instanceof oe||r instanceof le)&&r.mediaStreamTrack===e&&(n=i):e===r&&(n=i))}),n}}class Jt extends Ue{constructor(e,n,i,r){super(e,n.sid,n.name,r),this.track=void 0,this.allowed=!0,this.disabled=!1,this.currentVideoQuality=ve.HIGH,this.handleEnded=s=>{this.setTrack(void 0),this.emit(_.Ended,s)},this.handleVisibilityChange=s=>{this.log.debug("adaptivestream video visibility ".concat(this.trackSid,", visible=").concat(s),this.logContext),this.disabled=!s,this.emitTrackUpdate()},this.handleVideoDimensionsChange=s=>{this.log.debug("adaptivestream video dimensions ".concat(s.width,"x").concat(s.height),this.logContext),this.videoDimensions=s,this.emitTrackUpdate()},this.subscribed=i,this.updateInfo(n)}setSubscribed(e){const n=this.subscriptionStatus,i=this.permissionStatus;this.subscribed=e,e&&(this.allowed=!0);const r=new Ln({trackSids:[this.trackSid],subscribe:this.subscribed,participantTracks:[new da({participantSid:"",trackSids:[this.trackSid]})]});this.emit(_.UpdateSubscription,r),this.emitSubscriptionUpdateIfChanged(n),this.emitPermissionUpdateIfChanged(i)}get subscriptionStatus(){return this.subscribed===!1?Ue.SubscriptionStatus.Unsubscribed:super.isSubscribed?Ue.SubscriptionStatus.Subscribed:Ue.SubscriptionStatus.Desired}get permissionStatus(){return this.allowed?Ue.PermissionStatus.Allowed:Ue.PermissionStatus.NotAllowed}get isSubscribed(){return this.subscribed===!1?!1:super.isSubscribed}get isDesired(){return this.subscribed!==!1}get isEnabled(){return!this.disabled}setEnabled(e){!this.isManualOperationAllowed()||this.disabled===!e||(this.disabled=!e,this.emitTrackUpdate())}setVideoQuality(e){!this.isManualOperationAllowed()||this.currentVideoQuality===e||(this.currentVideoQuality=e,this.videoDimensions=void 0,this.emitTrackUpdate())}setVideoDimensions(e){var n,i;this.isManualOperationAllowed()&&(((n=this.videoDimensions)===null||n===void 0?void 0:n.width)===e.width&&((i=this.videoDimensions)===null||i===void 0?void 0:i.height)===e.height||(this.track instanceof Vt&&(this.videoDimensions=e),this.currentVideoQuality=void 0,this.emitTrackUpdate()))}setVideoFPS(e){this.isManualOperationAllowed()&&this.track instanceof Vt&&this.fps!==e&&(this.fps=e,this.emitTrackUpdate())}get videoQuality(){return this.currentVideoQuality}setTrack(e){const n=this.subscriptionStatus,i=this.permissionStatus,r=this.track;r!==e&&(r&&(r.off(_.VideoDimensionsChanged,this.handleVideoDimensionsChange),r.off(_.VisibilityChanged,this.handleVisibilityChange),r.off(_.Ended,this.handleEnded),r.detach(),r.stopMonitor(),this.emit(_.Unsubscribed,r)),super.setTrack(e),e&&(e.sid=this.trackSid,e.on(_.VideoDimensionsChanged,this.handleVideoDimensionsChange),e.on(_.VisibilityChanged,this.handleVisibilityChange),e.on(_.Ended,this.handleEnded),this.emit(_.Subscribed,e)),this.emitPermissionUpdateIfChanged(i),this.emitSubscriptionUpdateIfChanged(n))}setAllowed(e){const n=this.subscriptionStatus,i=this.permissionStatus;this.allowed=e,this.emitPermissionUpdateIfChanged(i),this.emitSubscriptionUpdateIfChanged(n)}setSubscriptionError(e){this.emit(_.SubscriptionFailed,e)}updateInfo(e){super.updateInfo(e);const n=this.metadataMuted;this.metadataMuted=e.muted,this.track?this.track.setMuted(e.muted):n!==e.muted&&this.emit(e.muted?_.Muted:_.Unmuted)}emitSubscriptionUpdateIfChanged(e){const n=this.subscriptionStatus;e!==n&&this.emit(_.SubscriptionStatusChanged,n,e)}emitPermissionUpdateIfChanged(e){this.permissionStatus!==e&&this.emit(_.SubscriptionPermissionChanged,this.permissionStatus,e)}isManualOperationAllowed(){return this.kind===k.Kind.Video&&this.isAdaptiveStream?(this.log.warn("adaptive stream is enabled, cannot change video track settings",this.logContext),!1):this.isDesired?!0:(this.log.warn("cannot update track settings when not subscribed",this.logContext),!1)}get isAdaptiveStream(){return this.track instanceof Vt&&this.track.isAdaptiveStream}emitTrackUpdate(){const e=new ga({trackSids:[this.trackSid],disabled:this.disabled,fps:this.fps});this.videoDimensions?(e.width=Math.ceil(this.videoDimensions.width),e.height=Math.ceil(this.videoDimensions.height)):this.currentVideoQuality!==void 0?e.quality=this.currentVideoQuality:e.quality=ve.HIGH,this.emit(_.UpdateSettings,e)}}class _n extends Oo{static fromParticipantInfo(e,n,i){return new _n(e,n.sid,n.identity,n.name,n.metadata,i,n.kind)}get logContext(){return Object.assign(Object.assign({},super.logContext),{rpID:this.sid,remoteParticipant:this.identity})}constructor(e,n,i,r,s,a){let o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:Pn.STANDARD;super(n,i||"",r,s,a,o),this.signalClient=e,this.trackPublications=new Map,this.audioTrackPublications=new Map,this.videoTrackPublications=new Map,this.volumeMap=new Map}addTrackPublication(e){super.addTrackPublication(e),e.on(_.UpdateSettings,n=>{this.log.debug("send update settings",Object.assign(Object.assign({},this.logContext),W(e))),this.signalClient.sendUpdateTrackSettings(n)}),e.on(_.UpdateSubscription,n=>{n.participantTracks.forEach(i=>{i.participantSid=this.sid}),this.signalClient.sendUpdateSubscription(n)}),e.on(_.SubscriptionPermissionChanged,n=>{this.emit(T.TrackSubscriptionPermissionChanged,e,n)}),e.on(_.SubscriptionStatusChanged,n=>{this.emit(T.TrackSubscriptionStatusChanged,e,n)}),e.on(_.Subscribed,n=>{this.emit(T.TrackSubscribed,n,e)}),e.on(_.Unsubscribed,n=>{this.emit(T.TrackUnsubscribed,n,e)}),e.on(_.SubscriptionFailed,n=>{this.emit(T.TrackSubscriptionFailed,e.trackSid,n)})}getTrackPublication(e){const n=super.getTrackPublication(e);if(n)return n}getTrackPublicationByName(e){const n=super.getTrackPublicationByName(e);if(n)return n}setVolume(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k.Source.Microphone;this.volumeMap.set(n,e);const i=this.getTrackPublication(n);i&&i.track&&i.track.setVolume(e)}getVolume(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k.Source.Microphone;const n=this.getTrackPublication(e);return n&&n.track?n.track.getVolume():this.volumeMap.get(e)}addSubscribedMediaTrack(e,n,i,r,s,a){let o=this.getTrackPublicationBySid(n);if(o||n.startsWith("TR")||this.trackPublications.forEach(l=>{!o&&e.kind===l.kind.toString()&&(o=l)}),!o){if(a===0){this.log.error("could not find published track",Object.assign(Object.assign({},this.logContext),{trackSid:n})),this.emit(T.TrackSubscriptionFailed,n);return}a===void 0&&(a=20),setTimeout(()=>{this.addSubscribedMediaTrack(e,n,i,r,s,a-1)},150);return}if(e.readyState==="ended"){this.log.error("unable to subscribe because MediaStreamTrack is ended. Do not call MediaStreamTrack.stop()",Object.assign(Object.assign({},this.logContext),W(o))),this.emit(T.TrackSubscriptionFailed,n);return}const c=e.kind==="video";let u;return c?u=new Vt(e,n,r,s):u=new St(e,n,r,this.audioContext,this.audioOutput),u.source=o.source,u.isMuted=o.isMuted,u.setMediaStream(i),u.start(),o.setTrack(u),this.volumeMap.has(o.source)&&u instanceof St&&u.setVolume(this.volumeMap.get(o.source)),o}get hasMetadata(){return!!this.participantInfo}getTrackPublicationBySid(e){return this.trackPublications.get(e)}updateInfo(e){if(!super.updateInfo(e))return!1;const n=new Map,i=new Map;return e.tracks.forEach(r=>{var s,a;let o=this.getTrackPublicationBySid(r.sid);if(o)o.updateInfo(r);else{const c=k.kindFromProto(r.type);if(!c)return;o=new Jt(c,r,(s=this.signalClient.connectOptions)===null||s===void 0?void 0:s.autoSubscribe,{loggerContextCb:()=>this.logContext,loggerName:(a=this.loggerOptions)===null||a===void 0?void 0:a.loggerName}),o.updateInfo(r),i.set(r.sid,o);const u=Array.from(this.trackPublications.values()).find(l=>l.source===(o==null?void 0:o.source));u&&o.source!==k.Source.Unknown&&this.log.debug("received a second track publication for ".concat(this.identity," with the same source: ").concat(o.source),Object.assign(Object.assign({},this.logContext),{oldTrack:W(u),newTrack:W(o)})),this.addTrackPublication(o)}n.set(r.sid,o)}),this.trackPublications.forEach(r=>{n.has(r.trackSid)||(this.log.trace("detected removed track on remote participant, unpublishing",Object.assign(Object.assign({},this.logContext),W(r))),this.unpublishTrack(r.trackSid,!0))}),i.forEach(r=>{this.emit(T.TrackPublished,r)}),!0}unpublishTrack(e,n){const i=this.trackPublications.get(e);if(!i)return;const{track:r}=i;switch(r&&(r.stop(),i.setTrack(void 0)),this.trackPublications.delete(e),i.kind){case k.Kind.Audio:this.audioTrackPublications.delete(e);break;case k.Kind.Video:this.videoTrackPublications.delete(e);break}n&&this.emit(T.TrackUnpublished,i)}setAudioOutput(e){return y(this,void 0,void 0,function*(){this.audioOutput=e;const n=[];this.audioTrackPublications.forEach(i=>{var r;i.track instanceof St&&n.push(i.track.setSinkId((r=e.deviceId)!==null&&r!==void 0?r:"default"))}),yield Promise.all(n)})}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return this.log.trace("participant event",Object.assign(Object.assign({},this.logContext),{event:e,args:i})),super.emit(e,...i)}}var F;(function(t){t.Disconnected="disconnected",t.Connecting="connecting",t.Connected="connected",t.Reconnecting="reconnecting",t.SignalReconnecting="signalReconnecting"})(F||(F={}));const th=4*1e3;class Rn extends Ne.EventEmitter{constructor(e){var n,i,r;super(),n=this,this.state=F.Disconnected,this.activeSpeakers=[],this.isE2EEEnabled=!1,this.audioEnabled=!0,this.isVideoPlaybackBlocked=!1,this.log=j,this.bufferedEvents=[],this.isResuming=!1,this.connect=(s,a,o)=>y(this,void 0,void 0,function*(){var c;if(!od())throw We()?Error("WebRTC isn't detected, have you called registerGlobals?"):Error("LiveKit doesn't seem to be supported on this browser. Try to update your browser and make sure no browser extensions are disabling webRTC.");const u=yield this.disconnectLock.lock();if(this.state===F.Connected)return this.log.info("already connected to room ".concat(this.name),this.logContext),u(),Promise.resolve();if(this.connectFuture)return u(),this.connectFuture.promise;this.setAndEmitConnectionState(F.Connecting),((c=this.regionUrlProvider)===null||c===void 0?void 0:c.getServerUrl().toString())!==s&&(this.regionUrl=void 0,this.regionUrlProvider=void 0),Li(new URL(s))&&(this.regionUrlProvider===void 0?this.regionUrlProvider=new ms(s,a):this.regionUrlProvider.updateToken(a),this.regionUrlProvider.fetchRegionSettings().then(f=>{var p;(p=this.regionUrlProvider)===null||p===void 0||p.setServerReportedRegions(f)}).catch(f=>{this.log.warn("could not fetch region settings",Object.assign(Object.assign({},this.logContext),{error:f}))}));const l=(f,p,g)=>y(this,void 0,void 0,function*(){var b,v;this.abortController&&this.abortController.abort();const m=new AbortController;this.abortController=m,u==null||u();try{yield this.attemptConnection(g??s,a,o,m),this.abortController=void 0,f()}catch(E){if(this.regionUrlProvider&&E instanceof G&&E.reason!==3&&E.reason!==0){let O=null;try{O=yield this.regionUrlProvider.getNextBestRegionUrl((b=this.abortController)===null||b===void 0?void 0:b.signal)}catch(I){if(I instanceof G&&(I.status===401||I.reason===3)){this.handleDisconnect(this.options.stopLocalTrackOnUnpublish),p(I);return}}O&&!(!((v=this.abortController)===null||v===void 0)&&v.signal.aborted)?(this.log.info("Initial connection failed with ConnectionError: ".concat(E.message,". Retrying with another region: ").concat(O),this.logContext),this.recreateEngine(),yield l(f,p,O)):(this.handleDisconnect(this.options.stopLocalTrackOnUnpublish),p(E))}else this.handleDisconnect(this.options.stopLocalTrackOnUnpublish),p(E)}}),h=this.regionUrl;return this.regionUrl=void 0,this.connectFuture=new Co((f,p)=>{l(f,p,h)},()=>{this.clearConnectionFutures()}),this.connectFuture.promise}),this.connectSignal=(s,a,o,c,u,l)=>y(this,void 0,void 0,function*(){var h,f,p;const g=yield o.join(s,a,{autoSubscribe:c.autoSubscribe,adaptiveStream:typeof u.adaptiveStream=="object"?!0:u.adaptiveStream,maxRetries:c.maxRetries,e2eeEnabled:!!this.e2eeManager,websocketTimeout:c.websocketTimeout},l.signal);let b=g.serverInfo;if(b||(b={version:g.serverVersion,region:g.serverRegion}),this.log.debug("connected to Livekit Server ".concat(Object.entries(b).map(v=>{let[m,E]=v;return"".concat(m,": ").concat(E)}).join(", ")),{room:(h=g.room)===null||h===void 0?void 0:h.name,roomSid:(f=g.room)===null||f===void 0?void 0:f.sid,identity:(p=g.participant)===null||p===void 0?void 0:p.identity}),!g.serverVersion)throw new Bl("unknown server version");return g.serverVersion==="0.15.1"&&this.options.dynacast&&(this.log.debug("disabling dynacast due to server version",this.logContext),u.dynacast=!1),g}),this.applyJoinResponse=s=>{const a=s.participant;if(this.localParticipant.sid=a.sid,this.localParticipant.identity=a.identity,this.localParticipant.setEnabledPublishCodecs(s.enabledPublishCodecs),this.options.e2ee&&this.e2eeManager)try{this.e2eeManager.setSifTrailer(s.sifTrailer)}catch(o){this.log.error(o instanceof Error?o.message:"Could not set SifTrailer",Object.assign(Object.assign({},this.logContext),{error:o}))}this.handleParticipantUpdates([a,...s.otherParticipants]),s.room&&this.handleRoomUpdate(s.room)},this.attemptConnection=(s,a,o,c)=>y(this,void 0,void 0,function*(){var u,l,h;this.state===F.Reconnecting||this.isResuming||!((u=this.engine)===null||u===void 0)&&u.pendingReconnect?(this.log.info("Reconnection attempt replaced by new connection attempt",this.logContext),this.recreateEngine()):this.maybeCreateEngine(),!((l=this.regionUrlProvider)===null||l===void 0)&&l.isCloud()&&this.engine.setRegionUrlProvider(this.regionUrlProvider),this.acquireAudioContext(),this.connOptions=Object.assign(Object.assign({},ur),o),this.connOptions.rtcConfig&&(this.engine.rtcConfig=this.connOptions.rtcConfig),this.connOptions.peerConnectionTimeout&&(this.engine.peerConnectionTimeout=this.connOptions.peerConnectionTimeout);try{const f=yield this.connectSignal(s,a,this.engine,this.connOptions,this.options,c);this.applyJoinResponse(f),this.setupLocalParticipantEvents(),this.emit(S.SignalConnected)}catch(f){yield this.engine.close(),this.recreateEngine();const p=new G("could not establish signal connection");throw f instanceof Error&&(p.message="".concat(p.message,": ").concat(f.message)),f instanceof G&&(p.reason=f.reason,p.status=f.status),this.log.debug("error trying to establish signal connection",Object.assign(Object.assign({},this.logContext),{error:f})),p}if(c.signal.aborted)throw yield this.engine.close(),this.recreateEngine(),new G("Connection attempt aborted");try{yield this.engine.waitForPCInitialConnection(this.connOptions.peerConnectionTimeout,c)}catch(f){throw yield this.engine.close(),this.recreateEngine(),f}fe()&&this.options.disconnectOnPageLeave&&(window.addEventListener("pagehide",this.onPageLeave),window.addEventListener("beforeunload",this.onPageLeave)),fe()&&(document.addEventListener("freeze",this.onPageLeave),(h=navigator.mediaDevices)===null||h===void 0||h.addEventListener("devicechange",this.handleDeviceChange)),this.setAndEmitConnectionState(F.Connected),this.emit(S.Connected),this.registerConnectionReconcile()}),this.disconnect=function(){for(var s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];return y(n,[...a],void 0,function(){var c=this;let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function*(){var l,h,f,p;const g=yield c.disconnectLock.lock();try{if(c.state===F.Disconnected){c.log.debug("already disconnected",c.logContext);return}c.log.info("disconnect from room",Object.assign({},c.logContext)),(c.state===F.Connecting||c.state===F.Reconnecting||c.isResuming)&&(c.log.warn("abort connection attempt",c.logContext),(l=c.abortController)===null||l===void 0||l.abort(),(f=(h=c.connectFuture)===null||h===void 0?void 0:h.reject)===null||f===void 0||f.call(h,new G("Client initiated disconnect")),c.connectFuture=void 0),!((p=c.engine)===null||p===void 0)&&p.client.isDisconnected||(yield c.engine.client.sendLeave()),c.engine&&(yield c.engine.close()),c.handleDisconnect(u,mt.CLIENT_INITIATED),c.engine=void 0}finally{g()}}()})},this.onPageLeave=()=>y(this,void 0,void 0,function*(){this.log.info("Page leave detected, disconnecting",this.logContext),yield this.disconnect()}),this.startAudio=()=>y(this,void 0,void 0,function*(){const s=[],a=qe();if(a&&a.os==="iOS"){const o="livekit-dummy-audio-el";let c=document.getElementById(o);if(!c){c=document.createElement("audio"),c.id=o,c.autoplay=!0,c.hidden=!0;const u=ni();u.enabled=!0;const l=new MediaStream([u]);c.srcObject=l,document.addEventListener("visibilitychange",()=>{c&&(c.srcObject=document.hidden?null:l,document.hidden||(this.log.debug("page visible again, triggering startAudio to resume playback and update playback status",this.logContext),this.startAudio()))}),document.body.append(c),this.once(S.Disconnected,()=>{c==null||c.remove(),c=null})}s.push(c)}this.remoteParticipants.forEach(o=>{o.audioTrackPublications.forEach(c=>{c.track&&c.track.attachedElements.forEach(u=>{s.push(u)})})});try{yield Promise.all([this.acquireAudioContext(),...s.map(o=>(o.muted=!1,o.play()))]),this.handleAudioPlaybackStarted()}catch(o){throw this.handleAudioPlaybackFailed(o),o}}),this.startVideo=()=>y(this,void 0,void 0,function*(){const s=[];for(const a of this.remoteParticipants.values())a.videoTrackPublications.forEach(o=>{var c;(c=o.track)===null||c===void 0||c.attachedElements.forEach(u=>{s.includes(u)||s.push(u)})});yield Promise.all(s.map(a=>a.play())).then(()=>{this.handleVideoPlaybackStarted()}).catch(a=>{a.name==="NotAllowedError"?this.handleVideoPlaybackFailed():this.log.warn("Resuming video playback failed, make sure you call `startVideo` directly in a user gesture handler",this.logContext)})}),this.handleRestarting=()=>{this.clearConnectionReconcile(),this.isResuming=!1;for(const s of this.remoteParticipants.values())this.handleParticipantDisconnected(s.identity,s);this.setAndEmitConnectionState(F.Reconnecting)&&this.emit(S.Reconnecting)},this.handleSignalRestarted=s=>y(this,void 0,void 0,function*(){this.log.debug("signal reconnected to server, region ".concat(s.serverRegion),Object.assign(Object.assign({},this.logContext),{region:s.serverRegion})),this.bufferedEvents=[],this.applyJoinResponse(s);try{yield this.localParticipant.republishAllTracks(void 0,!0)}catch(a){this.log.error("error trying to re-publish tracks after reconnection",Object.assign(Object.assign({},this.logContext),{error:a}))}try{yield this.engine.waitForRestarted(),this.log.debug("fully reconnected to server",Object.assign(Object.assign({},this.logContext),{region:s.serverRegion}))}catch{return}this.setAndEmitConnectionState(F.Connected),this.emit(S.Reconnected),this.registerConnectionReconcile(),this.emitBufferedEvents()}),this.handleParticipantUpdates=s=>{s.forEach(a=>{var o;if(a.identity===this.localParticipant.identity){this.localParticipant.updateInfo(a);return}a.identity===""&&(a.identity=(o=this.sidToIdentity.get(a.sid))!==null&&o!==void 0?o:"");let c=this.remoteParticipants.get(a.identity);a.state===vi.DISCONNECTED?this.handleParticipantDisconnected(a.identity,c):c=this.getOrCreateParticipant(a.identity,a)})},this.handleActiveSpeakersUpdate=s=>{const a=[],o={};s.forEach(c=>{if(o[c.sid]=!0,c.sid===this.localParticipant.sid)this.localParticipant.audioLevel=c.level,this.localParticipant.setIsSpeaking(!0),a.push(this.localParticipant);else{const u=this.getRemoteParticipantBySid(c.sid);u&&(u.audioLevel=c.level,u.setIsSpeaking(!0),a.push(u))}}),o[this.localParticipant.sid]||(this.localParticipant.audioLevel=0,this.localParticipant.setIsSpeaking(!1)),this.remoteParticipants.forEach(c=>{o[c.sid]||(c.audioLevel=0,c.setIsSpeaking(!1))}),this.activeSpeakers=a,this.emitWhenConnected(S.ActiveSpeakersChanged,a)},this.handleSpeakersChanged=s=>{const a=new Map;this.activeSpeakers.forEach(c=>{const u=this.remoteParticipants.get(c.identity);u&&u.sid!==c.sid||a.set(c.sid,c)}),s.forEach(c=>{let u=this.getRemoteParticipantBySid(c.sid);c.sid===this.localParticipant.sid&&(u=this.localParticipant),u&&(u.audioLevel=c.level,u.setIsSpeaking(c.active),c.active?a.set(c.sid,u):a.delete(c.sid))});const o=Array.from(a.values());o.sort((c,u)=>u.audioLevel-c.audioLevel),this.activeSpeakers=o,this.emitWhenConnected(S.ActiveSpeakersChanged,o)},this.handleStreamStateUpdate=s=>{s.streamStates.forEach(a=>{const o=this.getRemoteParticipantBySid(a.participantSid);if(!o)return;const c=o.getTrackPublicationBySid(a.trackSid);!c||!c.track||(c.track.streamState=k.streamStateFromProto(a.state),o.emit(T.TrackStreamStateChanged,c,c.track.streamState),this.emitWhenConnected(S.TrackStreamStateChanged,c,c.track.streamState,o))})},this.handleSubscriptionPermissionUpdate=s=>{const a=this.getRemoteParticipantBySid(s.participantSid);if(!a)return;const o=a.getTrackPublicationBySid(s.trackSid);o&&o.setAllowed(s.allowed)},this.handleSubscriptionError=s=>{const a=Array.from(this.remoteParticipants.values()).find(c=>c.trackPublications.has(s.trackSid));if(!a)return;const o=a.getTrackPublicationBySid(s.trackSid);o&&o.setSubscriptionError(s.err)},this.handleDataPacket=s=>{const a=this.remoteParticipants.get(s.participantIdentity);s.value.case==="user"?this.handleUserPacket(a,s.value.value,s.kind):s.value.case==="transcription"?this.handleTranscription(a,s.value.value):s.value.case==="sipDtmf"&&this.handleSipDtmf(a,s.value.value)},this.handleUserPacket=(s,a,o)=>{this.emit(S.DataReceived,a.payload,s,o,a.topic),s==null||s.emit(T.DataReceived,a.payload,o)},this.handleSipDtmf=(s,a)=>{this.emit(S.SipDTMFReceived,a,s),s==null||s.emit(T.SipDTMFReceived,a)},this.bufferedSegments=new Map,this.handleTranscription=(s,a)=>{const o=a.transcribedParticipantIdentity===this.localParticipant.identity?this.localParticipant:this.getParticipantByIdentity(a.transcribedParticipantIdentity),c=o==null?void 0:o.trackPublications.get(a.trackId),u=md(a,this.transcriptionReceivedTimes);c==null||c.emit(_.TranscriptionReceived,u),o==null||o.emit(T.TranscriptionReceived,u,c),this.emit(S.TranscriptionReceived,u,o,c)},this.handleAudioPlaybackStarted=()=>{this.canPlaybackAudio||(this.audioEnabled=!0,this.emit(S.AudioPlaybackStatusChanged,!0))},this.handleAudioPlaybackFailed=s=>{this.log.warn("could not playback audio",Object.assign(Object.assign({},this.logContext),{error:s})),this.canPlaybackAudio&&(this.audioEnabled=!1,this.emit(S.AudioPlaybackStatusChanged,!1))},this.handleVideoPlaybackStarted=()=>{this.isVideoPlaybackBlocked&&(this.isVideoPlaybackBlocked=!1,this.emit(S.VideoPlaybackStatusChanged,!0))},this.handleVideoPlaybackFailed=()=>{this.isVideoPlaybackBlocked||(this.isVideoPlaybackBlocked=!0,this.emit(S.VideoPlaybackStatusChanged,!1))},this.handleDeviceChange=()=>y(this,void 0,void 0,function*(){this.emit(S.MediaDevicesChanged)}),this.handleRoomUpdate=s=>{const a=this.roomInfo;this.roomInfo=s,a&&a.metadata!==s.metadata&&this.emitWhenConnected(S.RoomMetadataChanged,s.metadata),(a==null?void 0:a.activeRecording)!==s.activeRecording&&this.emitWhenConnected(S.RecordingStatusChanged,s.activeRecording)},this.handleConnectionQualityUpdate=s=>{s.updates.forEach(a=>{if(a.participantSid===this.localParticipant.sid){this.localParticipant.setConnectionQuality(a.quality);return}const o=this.getRemoteParticipantBySid(a.participantSid);o&&o.setConnectionQuality(a.quality)})},this.onLocalParticipantMetadataChanged=s=>{this.emit(S.ParticipantMetadataChanged,s,this.localParticipant)},this.onLocalParticipantNameChanged=s=>{this.emit(S.ParticipantNameChanged,s,this.localParticipant)},this.onLocalAttributesChanged=s=>{this.emit(S.ParticipantAttributesChanged,s,this.localParticipant)},this.onLocalTrackMuted=s=>{this.emit(S.TrackMuted,s,this.localParticipant)},this.onLocalTrackUnmuted=s=>{this.emit(S.TrackUnmuted,s,this.localParticipant)},this.onTrackProcessorUpdate=s=>{var a;(a=s==null?void 0:s.onPublish)===null||a===void 0||a.call(s,this)},this.onLocalTrackPublished=s=>y(this,void 0,void 0,function*(){var a,o,c,u,l;(a=s.track)===null||a===void 0||a.on(_.TrackProcessorUpdate,this.onTrackProcessorUpdate),(u=(c=(o=s.track)===null||o===void 0?void 0:o.getProcessor())===null||c===void 0?void 0:c.onPublish)===null||u===void 0||u.call(c,this),this.emit(S.LocalTrackPublished,s,this.localParticipant),s.track instanceof oe&&(yield s.track.checkForSilence())&&this.emit(S.LocalAudioSilenceDetected,s);const h=yield(l=s.track)===null||l===void 0?void 0:l.getDeviceId(),f=Xl(s.source);f&&h&&h!==this.localParticipant.activeDeviceMap.get(f)&&(this.localParticipant.activeDeviceMap.set(f,h),this.emit(S.ActiveDeviceChanged,f,h))}),this.onLocalTrackUnpublished=s=>{var a;(a=s.track)===null||a===void 0||a.off(_.TrackProcessorUpdate,this.onTrackProcessorUpdate),this.emit(S.LocalTrackUnpublished,s,this.localParticipant)},this.onLocalConnectionQualityChanged=s=>{this.emit(S.ConnectionQualityChanged,s,this.localParticipant)},this.onMediaDevicesError=s=>{this.emit(S.MediaDevicesError,s)},this.onLocalParticipantPermissionsChanged=s=>{this.emit(S.ParticipantPermissionsChanged,s,this.localParticipant)},this.setMaxListeners(100),this.remoteParticipants=new Map,this.sidToIdentity=new Map,this.options=Object.assign(Object.assign({},Ad),e),this.log=Be((i=this.options.loggerName)!==null&&i!==void 0?i:_e.Room),this.transcriptionReceivedTimes=new Map,this.options.audioCaptureDefaults=Object.assign(Object.assign({},wo),e==null?void 0:e.audioCaptureDefaults),this.options.videoCaptureDefaults=Object.assign(Object.assign({},_o),e==null?void 0:e.videoCaptureDefaults),this.options.publishDefaults=Object.assign(Object.assign({},Dd),e==null?void 0:e.publishDefaults),this.maybeCreateEngine(),this.disconnectLock=new be,this.localParticipant=new Ht("","",this.engine,this.options),this.options.videoCaptureDefaults.deviceId&&this.localParticipant.activeDeviceMap.set("videoinput",je(this.options.videoCaptureDefaults.deviceId)),this.options.audioCaptureDefaults.deviceId&&this.localParticipant.activeDeviceMap.set("audioinput",je(this.options.audioCaptureDefaults.deviceId)),!((r=this.options.audioOutput)===null||r===void 0)&&r.deviceId&&this.switchActiveDevice("audiooutput",je(this.options.audioOutput.deviceId)).catch(s=>this.log.warn("Could not set audio output: ".concat(s.message),this.logContext)),this.options.e2ee&&this.setupE2EE()}setE2EEEnabled(e){return y(this,void 0,void 0,function*(){if(this.e2eeManager)yield Promise.all([this.localParticipant.setE2EEEnabled(e)]),this.localParticipant.identity!==""&&this.e2eeManager.setParticipantCryptorEnabled(e,this.localParticipant.identity);else throw Error("e2ee not configured, please set e2ee settings within the room options")})}setupE2EE(){var e;this.options.e2ee&&(this.e2eeManager=new vd(this.options.e2ee),this.e2eeManager.on($e.ParticipantEncryptionStatusChanged,(n,i)=>{i instanceof Ht&&(this.isE2EEEnabled=n),this.emit(S.ParticipantEncryptionStatusChanged,n,i)}),this.e2eeManager.on($e.EncryptionError,n=>this.emit(S.EncryptionError,n)),(e=this.e2eeManager)===null||e===void 0||e.setup(this))}get logContext(){var e;return{room:this.name,roomID:(e=this.roomInfo)===null||e===void 0?void 0:e.sid,participant:this.localParticipant.identity,pID:this.localParticipant.sid}}get isRecording(){var e,n;return(n=(e=this.roomInfo)===null||e===void 0?void 0:e.activeRecording)!==null&&n!==void 0?n:!1}getSid(){return y(this,void 0,void 0,function*(){return this.state===F.Disconnected?"":this.roomInfo&&this.roomInfo.sid!==""?this.roomInfo.sid:new Promise((e,n)=>{const i=r=>{r.sid!==""&&(this.engine.off(R.RoomUpdate,i),e(r.sid))};this.engine.on(R.RoomUpdate,i),this.once(S.Disconnected,()=>{this.engine.off(R.RoomUpdate,i),n("Room disconnected before room server id was available")})})})}get name(){var e,n;return(n=(e=this.roomInfo)===null||e===void 0?void 0:e.name)!==null&&n!==void 0?n:""}get metadata(){var e;return(e=this.roomInfo)===null||e===void 0?void 0:e.metadata}get numParticipants(){var e,n;return(n=(e=this.roomInfo)===null||e===void 0?void 0:e.numParticipants)!==null&&n!==void 0?n:0}get numPublishers(){var e,n;return(n=(e=this.roomInfo)===null||e===void 0?void 0:e.numPublishers)!==null&&n!==void 0?n:0}maybeCreateEngine(){this.engine&&!this.engine.isClosed||(this.engine=new Jd(this.options),this.engine.on(R.ParticipantUpdate,this.handleParticipantUpdates).on(R.RoomUpdate,this.handleRoomUpdate).on(R.SpeakersChanged,this.handleSpeakersChanged).on(R.StreamStateChanged,this.handleStreamStateUpdate).on(R.ConnectionQualityUpdate,this.handleConnectionQualityUpdate).on(R.SubscriptionError,this.handleSubscriptionError).on(R.SubscriptionPermissionUpdate,this.handleSubscriptionPermissionUpdate).on(R.MediaTrackAdded,(e,n,i)=>{this.onTrackAdded(e,n,i)}).on(R.Disconnected,e=>{this.handleDisconnect(this.options.stopLocalTrackOnUnpublish,e)}).on(R.ActiveSpeakersUpdate,this.handleActiveSpeakersUpdate).on(R.DataPacketReceived,this.handleDataPacket).on(R.Resuming,()=>{this.clearConnectionReconcile(),this.isResuming=!0,this.log.info("Resuming signal connection",this.logContext),this.setAndEmitConnectionState(F.SignalReconnecting)&&this.emit(S.SignalReconnecting)}).on(R.Resumed,()=>{this.registerConnectionReconcile(),this.isResuming=!1,this.log.info("Resumed signal connection",this.logContext),this.updateSubscriptions(),this.emitBufferedEvents(),this.setAndEmitConnectionState(F.Connected)&&this.emit(S.Reconnected)}).on(R.SignalResumed,()=>{this.bufferedEvents=[],(this.state===F.Reconnecting||this.isResuming)&&this.sendSyncState()}).on(R.Restarting,this.handleRestarting).on(R.SignalRestarted,this.handleSignalRestarted).on(R.Offline,()=>{this.setAndEmitConnectionState(F.Reconnecting)&&this.emit(S.Reconnecting)}).on(R.DCBufferStatusChanged,(e,n)=>{this.emit(S.DCBufferStatusChanged,e,n)}).on(R.LocalTrackSubscribed,e=>{const n=this.localParticipant.getTrackPublications().find(i=>{let{trackSid:r}=i;return r===e});if(!n){this.log.warn("could not find local track subscription for subscribed event",this.logContext);return}this.localParticipant.emit(T.LocalTrackSubscribed,n),this.emitWhenConnected(S.LocalTrackSubscribed,n,this.localParticipant)}),this.localParticipant&&this.localParticipant.setupEngine(this.engine),this.e2eeManager&&this.e2eeManager.setupEngine(this.engine))}static getLocalDevices(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return ce.getInstance().getDevices(e,n)}prepareConnection(e,n){return y(this,void 0,void 0,function*(){if(this.state===F.Disconnected){this.log.debug("prepareConnection to ".concat(e),this.logContext);try{if(Li(new URL(e))&&n){this.regionUrlProvider=new ms(e,n);const i=yield this.regionUrlProvider.getNextBestRegionUrl();i&&this.state===F.Disconnected&&(this.regionUrl=i,yield fetch(rs(i),{method:"HEAD"}),this.log.debug("prepared connection to ".concat(i),this.logContext))}else yield fetch(rs(e),{method:"HEAD"})}catch(i){this.log.warn("could not prepare connection",Object.assign(Object.assign({},this.logContext),{error:i}))}}})}getParticipantByIdentity(e){return this.localParticipant.identity===e?this.localParticipant:this.remoteParticipants.get(e)}clearConnectionFutures(){this.connectFuture=void 0}simulateScenario(e,n){return y(this,void 0,void 0,function*(){let i=()=>{},r;switch(e){case"signal-reconnect":yield this.engine.client.handleOnClose("simulate disconnect");break;case"speaker":r=new Me({scenario:{case:"speakerUpdate",value:3}});break;case"node-failure":r=new Me({scenario:{case:"nodeFailure",value:!0}});break;case"server-leave":r=new Me({scenario:{case:"serverLeave",value:!0}});break;case"migration":r=new Me({scenario:{case:"migration",value:!0}});break;case"resume-reconnect":this.engine.failNext(),yield this.engine.client.handleOnClose("simulate resume-disconnect");break;case"disconnect-signal-on-resume":i=()=>y(this,void 0,void 0,function*(){yield this.engine.client.handleOnClose("simulate resume-disconnect")}),r=new Me({scenario:{case:"disconnectSignalOnResume",value:!0}});break;case"disconnect-signal-on-resume-no-messages":i=()=>y(this,void 0,void 0,function*(){yield this.engine.client.handleOnClose("simulate resume-disconnect")}),r=new Me({scenario:{case:"disconnectSignalOnResumeNoMessages",value:!0}});break;case"full-reconnect":this.engine.fullReconnectOnNext=!0,yield this.engine.client.handleOnClose("simulate full-reconnect");break;case"force-tcp":case"force-tls":r=new Me({scenario:{case:"switchCandidateProtocol",value:e==="force-tls"?2:1}}),i=()=>y(this,void 0,void 0,function*(){const s=this.engine.client.onLeave;s&&s(new Un({reason:mt.CLIENT_INITIATED,action:gt.RECONNECT}))});break;case"subscriber-bandwidth":if(n===void 0||typeof n!="number")throw new Error("subscriber-bandwidth requires a number as argument");r=new Me({scenario:{case:"subscriberBandwidth",value:BigInt(n)}});break;case"leave-full-reconnect":r=new Me({scenario:{case:"leaveRequestFullReconnect",value:!0}})}r&&(yield this.engine.client.sendSimulateScenario(r),yield i())})}get canPlaybackAudio(){return this.audioEnabled}get canPlaybackVideo(){return!this.isVideoPlaybackBlocked}getActiveDevice(e){return this.localParticipant.activeDeviceMap.get(e)}switchActiveDevice(e,n){return y(this,arguments,void 0,function(i,r){var s=this;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function*(){var o,c,u,l;let h=!1,f=!0;const p=a?{exact:r}:r;if(i==="audioinput"){const g=s.options.audioCaptureDefaults.deviceId;s.options.audioCaptureDefaults.deviceId=p,h=g!==p;const b=Array.from(s.localParticipant.audioTrackPublications.values()).filter(v=>v.source===k.Source.Microphone);try{f=(yield Promise.all(b.map(v=>{var m;return(m=v.audioTrack)===null||m===void 0?void 0:m.setDeviceId(p)}))).every(v=>v===!0)}catch(v){throw s.options.audioCaptureDefaults.deviceId=g,v}}else if(i==="videoinput"){const g=s.options.videoCaptureDefaults.deviceId;s.options.videoCaptureDefaults.deviceId=p,h=g!==p;const b=Array.from(s.localParticipant.videoTrackPublications.values()).filter(v=>v.source===k.Source.Camera);try{f=(yield Promise.all(b.map(v=>{var m;return(m=v.videoTrack)===null||m===void 0?void 0:m.setDeviceId(p)}))).every(v=>v===!0)}catch(v){throw s.options.videoCaptureDefaults.deviceId=g,v}}else if(i==="audiooutput"){if(!Ni()&&!s.options.webAudioMix||s.options.webAudioMix&&s.audioContext&&!("setSinkId"in s.audioContext))throw new Error("cannot switch audio output, setSinkId not supported");s.options.webAudioMix&&(r=(o=yield ce.getInstance().normalizeDeviceId("audiooutput",r))!==null&&o!==void 0?o:""),(c=(l=s.options).audioOutput)!==null&&c!==void 0||(l.audioOutput={});const g=s.options.audioOutput.deviceId;s.options.audioOutput.deviceId=r,h=g!==p;try{s.options.webAudioMix&&((u=s.audioContext)===null||u===void 0||u.setSinkId(r)),yield Promise.all(Array.from(s.remoteParticipants.values()).map(b=>b.setAudioOutput({deviceId:r})))}catch(b){throw s.options.audioOutput.deviceId=g,b}}return h&&f&&(s.localParticipant.activeDeviceMap.set(i,r),s.emit(S.ActiveDeviceChanged,i,r)),f}()})}setupLocalParticipantEvents(){this.localParticipant.on(T.ParticipantMetadataChanged,this.onLocalParticipantMetadataChanged).on(T.ParticipantNameChanged,this.onLocalParticipantNameChanged).on(T.AttributesChanged,this.onLocalAttributesChanged).on(T.TrackMuted,this.onLocalTrackMuted).on(T.TrackUnmuted,this.onLocalTrackUnmuted).on(T.LocalTrackPublished,this.onLocalTrackPublished).on(T.LocalTrackUnpublished,this.onLocalTrackUnpublished).on(T.ConnectionQualityChanged,this.onLocalConnectionQualityChanged).on(T.MediaDevicesError,this.onMediaDevicesError).on(T.AudioStreamAcquired,this.startAudio).on(T.ParticipantPermissionsChanged,this.onLocalParticipantPermissionsChanged)}recreateEngine(){var e;(e=this.engine)===null||e===void 0||e.close(),this.engine=void 0,this.isResuming=!1,this.remoteParticipants.clear(),this.sidToIdentity.clear(),this.bufferedEvents=[],this.maybeCreateEngine()}onTrackAdded(e,n,i){if(this.state===F.Connecting||this.state===F.Reconnecting){const l=()=>{this.onTrackAdded(e,n,i),h()},h=()=>{this.off(S.Reconnected,l),this.off(S.Connected,l),this.off(S.Disconnected,h)};this.once(S.Reconnected,l),this.once(S.Connected,l),this.once(S.Disconnected,h);return}if(this.state===F.Disconnected){this.log.warn("skipping incoming track after Room disconnected",this.logContext);return}const r=rd(n.id),s=r[0];let a=r[1],o=e.id;if(a&&a.startsWith("TR")&&(o=a),s===this.localParticipant.sid){this.log.warn("tried to create RemoteParticipant for local participant",this.logContext);return}const c=Array.from(this.remoteParticipants.values()).find(l=>l.sid===s);if(!c){this.log.error("Tried to add a track for a participant, that's not present. Sid: ".concat(s),this.logContext);return}let u;this.options.adaptiveStream&&(typeof this.options.adaptiveStream=="object"?u=this.options.adaptiveStream:u={}),c.addSubscribedMediaTrack(e,o,n,i,u)}handleDisconnect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,n=arguments.length>1?arguments[1]:void 0;var i;if(this.clearConnectionReconcile(),this.isResuming=!1,this.bufferedEvents=[],this.transcriptionReceivedTimes.clear(),this.state!==F.Disconnected){this.regionUrl=void 0;try{this.remoteParticipants.forEach(r=>{r.trackPublications.forEach(s=>{r.unpublishTrack(s.trackSid)})}),this.localParticipant.trackPublications.forEach(r=>{var s,a;r.track&&this.localParticipant.unpublishTrack(r.track,e),e&&((s=r.track)===null||s===void 0||s.detach(),(a=r.track)===null||a===void 0||a.stop())}),this.localParticipant.off(T.ParticipantMetadataChanged,this.onLocalParticipantMetadataChanged).off(T.ParticipantNameChanged,this.onLocalParticipantNameChanged).off(T.AttributesChanged,this.onLocalAttributesChanged).off(T.TrackMuted,this.onLocalTrackMuted).off(T.TrackUnmuted,this.onLocalTrackUnmuted).off(T.LocalTrackPublished,this.onLocalTrackPublished).off(T.LocalTrackUnpublished,this.onLocalTrackUnpublished).off(T.ConnectionQualityChanged,this.onLocalConnectionQualityChanged).off(T.MediaDevicesError,this.onMediaDevicesError).off(T.AudioStreamAcquired,this.startAudio).off(T.ParticipantPermissionsChanged,this.onLocalParticipantPermissionsChanged),this.localParticipant.trackPublications.clear(),this.localParticipant.videoTrackPublications.clear(),this.localParticipant.audioTrackPublications.clear(),this.remoteParticipants.clear(),this.sidToIdentity.clear(),this.activeSpeakers=[],this.audioContext&&typeof this.options.webAudioMix=="boolean"&&(this.audioContext.close(),this.audioContext=void 0),fe()&&(window.removeEventListener("beforeunload",this.onPageLeave),window.removeEventListener("pagehide",this.onPageLeave),window.removeEventListener("freeze",this.onPageLeave),(i=navigator.mediaDevices)===null||i===void 0||i.removeEventListener("devicechange",this.handleDeviceChange))}finally{this.setAndEmitConnectionState(F.Disconnected),this.emit(S.Disconnected,n)}}}handleParticipantDisconnected(e,n){this.remoteParticipants.delete(e),n&&(n.trackPublications.forEach(i=>{n.unpublishTrack(i.trackSid,!0)}),this.emit(S.ParticipantDisconnected,n))}acquireAudioContext(){return y(this,void 0,void 0,function*(){var e,n;if(typeof this.options.webAudioMix!="boolean"&&this.options.webAudioMix.audioContext?this.audioContext=this.options.webAudioMix.audioContext:(!this.audioContext||this.audioContext.state==="closed")&&(this.audioContext=(e=bo())!==null&&e!==void 0?e:void 0),this.audioContext&&this.audioContext.state==="suspended")try{yield this.audioContext.resume()}catch(r){this.log.warn("Could not resume audio context",Object.assign(Object.assign({},this.logContext),{error:r}))}this.options.webAudioMix&&this.remoteParticipants.forEach(r=>r.setAudioContext(this.audioContext)),this.localParticipant.setAudioContext(this.audioContext);const i=((n=this.audioContext)===null||n===void 0?void 0:n.state)==="running";i!==this.canPlaybackAudio&&(this.audioEnabled=i,this.emit(S.AudioPlaybackStatusChanged,i))})}createParticipant(e,n){var i;let r;return n?r=_n.fromParticipantInfo(this.engine.client,n,{loggerContextCb:()=>this.logContext,loggerName:this.options.loggerName}):r=new _n(this.engine.client,"",e,void 0,void 0,{loggerContextCb:()=>this.logContext,loggerName:this.options.loggerName}),this.options.webAudioMix&&r.setAudioContext(this.audioContext),!((i=this.options.audioOutput)===null||i===void 0)&&i.deviceId&&r.setAudioOutput(this.options.audioOutput).catch(s=>this.log.warn("Could not set audio output: ".concat(s.message),this.logContext)),r}getOrCreateParticipant(e,n){if(this.remoteParticipants.has(e)){const r=this.remoteParticipants.get(e);return n&&r.updateInfo(n)&&this.sidToIdentity.set(n.sid,n.identity),r}const i=this.createParticipant(e,n);return this.remoteParticipants.set(e,i),this.sidToIdentity.set(n.sid,n.identity),this.emitWhenConnected(S.ParticipantConnected,i),i.on(T.TrackPublished,r=>{this.emitWhenConnected(S.TrackPublished,r,i)}).on(T.TrackSubscribed,(r,s)=>{r.kind===k.Kind.Audio?(r.on(_.AudioPlaybackStarted,this.handleAudioPlaybackStarted),r.on(_.AudioPlaybackFailed,this.handleAudioPlaybackFailed)):r.kind===k.Kind.Video&&(r.on(_.VideoPlaybackFailed,this.handleVideoPlaybackFailed),r.on(_.VideoPlaybackStarted,this.handleVideoPlaybackStarted)),this.emit(S.TrackSubscribed,r,s,i)}).on(T.TrackUnpublished,r=>{this.emit(S.TrackUnpublished,r,i)}).on(T.TrackUnsubscribed,(r,s)=>{this.emit(S.TrackUnsubscribed,r,s,i)}).on(T.TrackSubscriptionFailed,r=>{this.emit(S.TrackSubscriptionFailed,r,i)}).on(T.TrackMuted,r=>{this.emitWhenConnected(S.TrackMuted,r,i)}).on(T.TrackUnmuted,r=>{this.emitWhenConnected(S.TrackUnmuted,r,i)}).on(T.ParticipantMetadataChanged,r=>{this.emitWhenConnected(S.ParticipantMetadataChanged,r,i)}).on(T.ParticipantNameChanged,r=>{this.emitWhenConnected(S.ParticipantNameChanged,r,i)}).on(T.AttributesChanged,r=>{this.emitWhenConnected(S.ParticipantAttributesChanged,r,i)}).on(T.ConnectionQualityChanged,r=>{this.emitWhenConnected(S.ConnectionQualityChanged,r,i)}).on(T.ParticipantPermissionsChanged,r=>{this.emitWhenConnected(S.ParticipantPermissionsChanged,r,i)}).on(T.TrackSubscriptionStatusChanged,(r,s)=>{this.emitWhenConnected(S.TrackSubscriptionStatusChanged,r,s,i)}).on(T.TrackSubscriptionFailed,(r,s)=>{this.emit(S.TrackSubscriptionFailed,r,i,s)}).on(T.TrackSubscriptionPermissionChanged,(r,s)=>{this.emitWhenConnected(S.TrackSubscriptionPermissionChanged,r,s,i)}),n&&i.updateInfo(n),i}sendSyncState(){const e=Array.from(this.remoteParticipants.values()).reduce((i,r)=>(i.push(...r.getTrackPublications()),i),[]),n=this.localParticipant.getTrackPublications();this.engine.sendSyncState(e,n)}updateSubscriptions(){for(const e of this.remoteParticipants.values())for(const n of e.videoTrackPublications.values())n.isSubscribed&&n instanceof Jt&&n.emitTrackUpdate()}getRemoteParticipantBySid(e){const n=this.sidToIdentity.get(e);if(n)return this.remoteParticipants.get(n)}registerConnectionReconcile(){this.clearConnectionReconcile();let e=0;this.connectionReconcileInterval=ie.setInterval(()=>{!this.engine||this.engine.isClosed||!this.engine.verifyTransport()?(e++,this.log.warn("detected connection state mismatch",Object.assign(Object.assign({},this.logContext),{numFailures:e,engine:{closed:this.engine.isClosed,transportsConnected:this.engine.verifyTransport()}})),e>=3&&(this.recreateEngine(),this.handleDisconnect(this.options.stopLocalTrackOnUnpublish,mt.STATE_MISMATCH))):e=0},th)}clearConnectionReconcile(){this.connectionReconcileInterval&&ie.clearInterval(this.connectionReconcileInterval)}setAndEmitConnectionState(e){return e===this.state?!1:(this.state=e,this.emit(S.ConnectionStateChanged,this.state),!0)}emitBufferedEvents(){this.bufferedEvents.forEach(e=>{let[n,i]=e;this.emit(n,...i)}),this.bufferedEvents=[]}emitWhenConnected(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];if(this.state===F.Reconnecting||this.isResuming||!this.engine||this.engine.pendingReconnect)this.bufferedEvents.push([e,i]);else if(this.state===F.Connected)return this.emit(e,...i);return!1}simulateParticipants(e){return y(this,void 0,void 0,function*(){var n,i;const r=Object.assign({audio:!0,video:!0,useRealTracks:!1},e.publish),s=Object.assign({count:9,audio:!1,video:!0,aspectRatios:[1.66,1.7,1.3]},e.participants);if(this.handleDisconnect(),this.roomInfo=new Xi({sid:"RM_SIMULATED",name:"simulated-room",emptyTimeout:0,maxParticipants:0,creationTime:ee.parse(new Date().getTime()),metadata:"",numParticipants:1,numPublishers:1,turnPassword:"",enabledCodecs:[],activeRecording:!1}),this.localParticipant.updateInfo(new qt({identity:"simulated-local",name:"local-name"})),this.setupLocalParticipantEvents(),this.emit(S.SignalConnected),this.emit(S.Connected),this.setAndEmitConnectionState(F.Connected),r.video){const a=new zt(k.Kind.Video,new ft({source:ae.CAMERA,sid:Math.floor(Math.random()*1e4).toString(),type:Pe.AUDIO,name:"video-dummy"}),new le(r.useRealTracks?(yield window.navigator.mediaDevices.getUserMedia({video:!0})).getVideoTracks()[0]:is(160*((n=s.aspectRatios[0])!==null&&n!==void 0?n:1),160,!0,!0),void 0,!1,{loggerName:this.options.loggerName,loggerContextCb:()=>this.logContext}),{loggerName:this.options.loggerName,loggerContextCb:()=>this.logContext});this.localParticipant.addTrackPublication(a),this.localParticipant.emit(T.LocalTrackPublished,a)}if(r.audio){const a=new zt(k.Kind.Audio,new ft({source:ae.MICROPHONE,sid:Math.floor(Math.random()*1e4).toString(),type:Pe.AUDIO}),new oe(r.useRealTracks?(yield navigator.mediaDevices.getUserMedia({audio:!0})).getAudioTracks()[0]:ni(),void 0,!1,this.audioContext,{loggerName:this.options.loggerName,loggerContextCb:()=>this.logContext}),{loggerName:this.options.loggerName,loggerContextCb:()=>this.logContext});this.localParticipant.addTrackPublication(a),this.localParticipant.emit(T.LocalTrackPublished,a)}for(let a=0;a<s.count-1;a+=1){let o=new qt({sid:Math.floor(Math.random()*1e4).toString(),identity:"simulated-".concat(a),state:vi.ACTIVE,tracks:[],joinedAt:ee.parse(Date.now())});const c=this.getOrCreateParticipant(o.identity,o);if(s.video){const u=is(160*((i=s.aspectRatios[a%s.aspectRatios.length])!==null&&i!==void 0?i:1),160,!1,!0),l=new ft({source:ae.CAMERA,sid:Math.floor(Math.random()*1e4).toString(),type:Pe.AUDIO});c.addSubscribedMediaTrack(u,l.sid,new MediaStream([u]),new RTCRtpReceiver),o.tracks=[...o.tracks,l]}if(s.audio){const u=ni(),l=new ft({source:ae.MICROPHONE,sid:Math.floor(Math.random()*1e4).toString(),type:Pe.AUDIO});c.addSubscribedMediaTrack(u,l.sid,new MediaStream([u]),new RTCRtpReceiver),o.tracks=[...o.tracks,l]}c.updateInfo(o)}})}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];if(e!==S.ActiveSpeakersChanged){const s=Do(i).filter(a=>a!==void 0);this.log.debug("room event ".concat(e),Object.assign(Object.assign({},this.logContext),{event:e,args:s}))}return super.emit(e,...i)}}function Do(t){return t.map(e=>{if(e)return Array.isArray(e)?Do(e):typeof e=="object"?"logContext"in e&&e.logContext:e})}var Ee;(function(t){t[t.IDLE=0]="IDLE",t[t.RUNNING=1]="RUNNING",t[t.SKIPPED=2]="SKIPPED",t[t.SUCCESS=3]="SUCCESS",t[t.FAILED=4]="FAILED"})(Ee||(Ee={}));class Et extends Ne.EventEmitter{constructor(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};super(),this.status=Ee.IDLE,this.logs=[],this.errorsAsWarnings=!1,this.url=e,this.token=n,this.name=this.constructor.name,this.room=new Rn(i.roomOptions),this.connectOptions=i.connectOptions,i.errorsAsWarnings&&(this.errorsAsWarnings=i.errorsAsWarnings)}run(e){return y(this,void 0,void 0,function*(){if(this.status!==Ee.IDLE)throw Error("check is running already");this.setStatus(Ee.RUNNING);try{yield this.perform()}catch(n){n instanceof Error&&(this.errorsAsWarnings?this.appendWarning(n.message):this.appendError(n.message))}return yield this.disconnect(),yield new Promise(n=>setTimeout(n,500)),this.status!==Ee.SKIPPED&&this.setStatus(this.isSuccess()?Ee.SUCCESS:Ee.FAILED),e&&e(),this.getInfo()})}isSuccess(){return!this.logs.some(e=>e.level==="error")}connect(){return y(this,void 0,void 0,function*(){return this.room.state===F.Connected?this.room:(yield this.room.connect(this.url,this.token),this.room)})}disconnect(){return y(this,void 0,void 0,function*(){this.room&&this.room.state!==F.Disconnected&&(yield this.room.disconnect(),yield new Promise(e=>setTimeout(e,500)))})}skip(){this.setStatus(Ee.SKIPPED)}appendMessage(e){this.logs.push({level:"info",message:e}),this.emit("update",this.getInfo())}appendWarning(e){this.logs.push({level:"warning",message:e}),this.emit("update",this.getInfo())}appendError(e){this.logs.push({level:"error",message:e}),this.emit("update",this.getInfo())}setStatus(e){this.status=e,this.emit("update",this.getInfo())}get engine(){var e;return(e=this.room)===null||e===void 0?void 0:e.engine}getInfo(){return{logs:this.logs,name:this.name,status:this.status,description:this.description}}}function Ao(t){return y(this,void 0,void 0,function*(){var e,n;t??(t={}),(e=t.audio)!==null&&e!==void 0||(t.audio=!0),(n=t.video)!==null&&n!==void 0||(t.video=!0);const i=vo(t,wo,_o),r=Vn(i),s=navigator.mediaDevices.getUserMedia(r);t.audio&&(ce.userMediaPromiseMap.set("audioinput",s),s.catch(()=>ce.userMediaPromiseMap.delete("audioinput"))),t.video&&(ce.userMediaPromiseMap.set("videoinput",s),s.catch(()=>ce.userMediaPromiseMap.delete("videoinput")));const a=yield s;return Promise.all(a.getTracks().map(o=>y(this,void 0,void 0,function*(){const c=o.kind==="audio";let u=c?t.audio:t.video;(typeof u=="boolean"||!u)&&(u={});let l;const h=c?r.audio:r.video;typeof h!="boolean"&&(l=h),l?l.deviceId=o.getSettings().deviceId:l={deviceId:o.getSettings().deviceId};const f=Ro(o,l);return f.kind===k.Kind.Video?f.source=k.Source.Camera:f.kind===k.Kind.Audio&&(f.source=k.Source.Microphone),f.mediaStream=a,u.processor&&(f instanceof oe?yield f.setProcessor(u.processor):f instanceof le&&(yield f.setProcessor(u.processor))),f})))})}function nh(t){return y(this,void 0,void 0,function*(){return(yield Ao({audio:!1,video:t}))[0]})}function ih(t){return y(this,void 0,void 0,function*(){return(yield Ao({audio:t,video:!1}))[0]})}class rh extends Et{get description(){return"Can publish audio"}perform(){return y(this,void 0,void 0,function*(){var e;const n=yield this.connect(),i=yield ih();n.localParticipant.publishTrack(i),yield new Promise(a=>setTimeout(a,3e3));const r=yield(e=i.sender)===null||e===void 0?void 0:e.getStats();if(!r)throw new Error("Could not get RTCStats");let s=0;if(r.forEach(a=>{a.type==="outbound-rtp"&&(a.kind==="audio"||!a.kind&&a.mediaType==="audio")&&(s=a.packetsSent)}),s===0)throw new Error("Could not determine packets are sent");this.appendMessage("published ".concat(s," audio packets"))})}}class sh extends Et{get description(){return"Can publish video"}perform(){return y(this,void 0,void 0,function*(){var e;const n=yield this.connect(),i=yield nh();n.localParticipant.publishTrack(i),yield new Promise(a=>setTimeout(a,5e3));const r=yield(e=i.sender)===null||e===void 0?void 0:e.getStats();if(!r)throw new Error("Could not get RTCStats");let s=0;if(r.forEach(a=>{a.type==="outbound-rtp"&&(a.kind==="video"||!a.kind&&a.mediaType==="video")&&(s+=a.packetsSent)}),s===0)throw new Error("Could not determine packets are sent");this.appendMessage("published ".concat(s," video packets"))})}}class ah extends Et{get description(){return"Resuming connection after interruption"}perform(){return y(this,void 0,void 0,function*(){var e;const n=yield this.connect();let i=!1,r=!1,s;const a=new Promise(u=>{setTimeout(u,5e3),s=u}),o=()=>{i=!0};n.on(S.SignalReconnecting,o).on(S.Reconnecting,o).on(S.Reconnected,()=>{r=!0,s(!0)}),(e=n.engine.client.ws)===null||e===void 0||e.close();const c=n.engine.client.onClose;if(c&&c(""),yield a,i){if(!r||n.state!==F.Connected)throw this.appendWarning("reconnection is only possible in Redis-based configurations"),new Error("Not able to reconnect")}else throw new Error("Did not attempt to reconnect")})}}class oh extends Et{get description(){return"Can connect via TURN"}perform(){return y(this,void 0,void 0,function*(){var e,n;const i=new cr,r=yield i.join(this.url,this.token,{autoSubscribe:!0,maxRetries:0,e2eeEnabled:!1,websocketTimeout:15e3});let s=!1,a=!1,o=!1;for(let c of r.iceServers)for(let u of c.urls)u.startsWith("turn:")?(a=!0,o=!0):u.startsWith("turns:")&&(a=!0,o=!0,s=!0),u.startsWith("stun:")&&(o=!0);o?a&&!s&&this.appendWarning("TURN is configured server side, but TURN/TLS is unavailable."):this.appendWarning("No STUN servers configured on server side."),yield i.close(),!((n=(e=this.connectOptions)===null||e===void 0?void 0:e.rtcConfig)===null||n===void 0)&&n.iceServers||a?yield this.room.connect(this.url,this.token,{rtcConfig:{iceTransportPolicy:"relay"}}):(this.appendWarning("No TURN servers configured."),this.skip(),yield new Promise(c=>setTimeout(c,0)))})}}class ch extends Et{get description(){return"Establishing WebRTC connection"}perform(){return y(this,void 0,void 0,function*(){let e=!1,n=!1;this.room.on(S.SignalConnected,()=>{const i=this.room.engine.client.onTrickle;this.room.engine.client.onTrickle=(r,s)=>{if(r.candidate){const a=new RTCIceCandidate(r);let o="".concat(a.protocol," ").concat(a.address,":").concat(a.port," ").concat(a.type);a.address&&(uh(a.address)?o+=" (private)":a.protocol==="tcp"&&a.tcpType==="passive"?(e=!0,o+=" (passive)"):a.protocol==="udp"&&(n=!0)),this.appendMessage(o)}i&&i(r,s)},this.room.engine.pcManager&&(this.room.engine.pcManager.subscriber.onIceCandidateError=r=>{r instanceof RTCPeerConnectionIceErrorEvent&&this.appendWarning("error with ICE candidate: ".concat(r.errorCode," ").concat(r.errorText," ").concat(r.url))})});try{yield this.connect(),j.info("now the room is connected")}catch(i){throw this.appendWarning("ports need to be open on firewall in order to connect."),i}e||this.appendWarning("Server is not configured for ICE/TCP"),n||this.appendWarning("No public IPv4 UDP candidates were found. Your server is likely not configured correctly")})}}function uh(t){const e=t.split(".");if(e.length===4){if(e[0]==="10")return!0;if(e[0]==="192"&&e[1]==="168")return!0;if(e[0]==="172"){const n=parseInt(e[1],10);if(n>=16&&n<=31)return!0}}return!1}class lh extends Et{get description(){return"Connecting to signal connection via WebSocket"}perform(){return y(this,void 0,void 0,function*(){var e,n,i;(this.url.startsWith("ws:")||this.url.startsWith("http:"))&&this.appendWarning("Server is insecure, clients may block connections to it");let r=new cr;const s=yield r.join(this.url,this.token,{autoSubscribe:!0,maxRetries:0,e2eeEnabled:!1,websocketTimeout:15e3});this.appendMessage("Connected to server, version ".concat(s.serverVersion,".")),((e=s.serverInfo)===null||e===void 0?void 0:e.edition)===ha.Cloud&&(!((n=s.serverInfo)===null||n===void 0)&&n.region)&&this.appendMessage("LiveKit Cloud: ".concat((i=s.serverInfo)===null||i===void 0?void 0:i.region)),yield r.close()})}}class ov extends Ne.EventEmitter{constructor(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};super(),this.options={},this.checkResults=new Map,this.url=e,this.token=n,this.options=i}getNextCheckId(){const e=this.checkResults.size;return this.checkResults.set(e,{logs:[],status:Ee.IDLE,name:"",description:""}),e}updateCheck(e,n){this.checkResults.set(e,n),this.emit("checkUpdate",e,n)}isSuccess(){return Array.from(this.checkResults.values()).every(e=>e.status!==Ee.FAILED)}getResults(){return Array.from(this.checkResults.values())}createAndRunCheck(e){return y(this,void 0,void 0,function*(){const n=this.getNextCheckId(),i=new e(this.url,this.token,this.options),r=a=>{this.updateCheck(n,a)};i.on("update",r);const s=yield i.run();return i.off("update",r),s})}checkWebsocket(){return y(this,void 0,void 0,function*(){return this.createAndRunCheck(lh)})}checkWebRTC(){return y(this,void 0,void 0,function*(){return this.createAndRunCheck(ch)})}checkTURN(){return y(this,void 0,void 0,function*(){return this.createAndRunCheck(oh)})}checkReconnect(){return y(this,void 0,void 0,function*(){return this.createAndRunCheck(ah)})}checkPublishAudio(){return y(this,void 0,void 0,function*(){return this.createAndRunCheck(rh)})}checkPublishVideo(){return y(this,void 0,void 0,function*(){return this.createAndRunCheck(sh)})}}function dh(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var n;const i=t instanceof it?t.mediaStreamTrack:t,r=i.getSettings();let s={facingMode:(n=e.defaultFacingMode)!==null&&n!==void 0?n:"user",confidence:"low"};if("facingMode"in r){const a=r.facingMode;j.trace("rawFacingMode",{rawFacingMode:a}),a&&typeof a=="string"&&ph(a)&&(s={facingMode:a,confidence:"high"})}if(["low","medium"].includes(s.confidence)){j.trace("Try to get facing mode from device label: (".concat(i.label,")"));const a=fh(i.label);a!==void 0&&(s=a)}return s}const vs=new Map([["obs virtual camera",{facingMode:"environment",confidence:"medium"}]]),hh=new Map([["iphone",{facingMode:"environment",confidence:"medium"}],["ipad",{facingMode:"environment",confidence:"medium"}]]);function fh(t){var e;const n=t.trim().toLowerCase();if(n!=="")return vs.has(n)?vs.get(n):(e=Array.from(hh.entries()).find(i=>{let[r]=i;return n.includes(r)}))===null||e===void 0?void 0:e[1]}function ph(t){return t===void 0||["user","environment","left","right"].includes(t)}var No={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(Dt,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],s={},a=null;function o(b,v){var m=b[v];if(typeof m.bind=="function")return m.bind(b);try{return Function.prototype.bind.call(m,b)}catch{return function(){return Function.prototype.apply.apply(m,[b,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(b){return b==="debug"&&(b="log"),typeof console===n?!1:b==="trace"&&i?c:console[b]!==void 0?o(console,b):console.log!==void 0?o(console,"log"):e}function l(){for(var b=this.getLevel(),v=0;v<r.length;v++){var m=r[v];this[m]=v<b?e:this.methodFactory(m,b,this.name)}if(this.log=this.debug,typeof console===n&&b<this.levels.SILENT)return"No console available for logging"}function h(b){return function(){typeof console!==n&&(l.call(this),this[b].apply(this,arguments))}}function f(b,v,m){return u(b)||h.apply(this,arguments)}function p(b,v){var m=this,E,O,I,w="loglevel";typeof b=="string"?w+=":"+b:typeof b=="symbol"&&(w=void 0);function M(N){var V=(r[N]||"silent").toUpperCase();if(!(typeof window===n||!w)){try{window.localStorage[w]=V;return}catch{}try{window.document.cookie=encodeURIComponent(w)+"="+V+";"}catch{}}}function D(){var N;if(!(typeof window===n||!w)){try{N=window.localStorage[w]}catch{}if(typeof N===n)try{var V=window.document.cookie,Ce=encodeURIComponent(w),et=V.indexOf(Ce+"=");et!==-1&&(N=/^([^;]+)/.exec(V.slice(et+Ce.length+1))[1])}catch{}return m.levels[N]===void 0&&(N=void 0),N}}function A(){if(!(typeof window===n||!w)){try{window.localStorage.removeItem(w)}catch{}try{window.document.cookie=encodeURIComponent(w)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function L(N){var V=N;if(typeof V=="string"&&m.levels[V.toUpperCase()]!==void 0&&(V=m.levels[V.toUpperCase()]),typeof V=="number"&&V>=0&&V<=m.levels.SILENT)return V;throw new TypeError("log.setLevel() called with invalid level: "+N)}m.name=b,m.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},m.methodFactory=v||f,m.getLevel=function(){return I??O??E},m.setLevel=function(N,V){return I=L(N),V!==!1&&M(I),l.call(m)},m.setDefaultLevel=function(N){O=L(N),D()||m.setLevel(N,!1)},m.resetLevel=function(){I=null,A(),l.call(m)},m.enableAll=function(N){m.setLevel(m.levels.TRACE,N)},m.disableAll=function(N){m.setLevel(m.levels.SILENT,N)},m.rebuild=function(){if(a!==m&&(E=L(a.getLevel())),l.call(m),a===m)for(var N in s)s[N].rebuild()},E=L(a?a.getLevel():"WARN");var Se=D();Se!=null&&(I=L(Se)),l.call(m)}a=new p,a.getLogger=function(v){if(typeof v!="symbol"&&typeof v!="string"||v==="")throw new TypeError("You must supply a name when creating a logger.");var m=s[v];return m||(m=s[v]=new p(v,a.methodFactory)),m};var g=typeof window!==n?window.log:void 0;return a.noConflict=function(){return typeof window!==n&&window.log===a&&(window.log=g),a},a.getLoggers=function(){return s},a.default=a,a})})(No);var mh=No.exports;const gh=Bs(mh);function K(t){return typeof t=="function"}function dr(t){var e=function(i){Error.call(i),i.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var ui=dr(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription: +`+n.map(function(i,r){return r+1+") "+i.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=n}});function In(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Yt=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,i,r,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Sn(a),c=o.next();!c.done;c=o.next()){var u=c.value;u.remove(this)}}catch(b){e={error:b}}finally{try{c&&!c.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(K(l))try{l()}catch(b){s=b instanceof ui?b.errors:[b]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=Sn(h),p=f.next();!p.done;p=f.next()){var g=p.value;try{bs(g)}catch(b){s=s??[],b instanceof ui?s=rt(rt([],Ye(s)),Ye(b.errors)):s.push(b)}}}catch(b){i={error:b}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}}if(s)throw new ui(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)bs(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&In(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&In(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Lo=Yt.EMPTY;function Uo(t){return t instanceof Yt||t&&"closed"in t&&K(t.remove)&&K(t.add)&&K(t.unsubscribe)}function bs(t){K(t)?t():t.unsubscribe()}var Fo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Vi={setTimeout:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=Vi.delegate;return r!=null&&r.setTimeout?r.setTimeout.apply(r,rt([t,e],Ye(n))):setTimeout.apply(void 0,rt([t,e],Ye(n)))},clearTimeout:function(t){var e=Vi.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function jo(t){Vi.setTimeout(function(){throw t})}function Mn(){}function kn(t){t()}var hr=function(t){Ge(e,t);function e(n){var i=t.call(this)||this;return i.isStopped=!1,n?(i.destination=n,Uo(n)&&n.add(i)):i.destination=kh,i}return e.create=function(n,i,r){return new Bi(n,i,r)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Yt),vh=Function.prototype.bind;function li(t,e){return vh.call(t,e)}var bh=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(i){rn(i)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(i){rn(i)}else rn(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){rn(n)}},t}(),Bi=function(t){Ge(e,t);function e(n,i,r){var s=t.call(this)||this,a;if(K(n)||!n)a={next:n??void 0,error:i??void 0,complete:r??void 0};else{var o;s&&Fo.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=function(){return s.unsubscribe()},a={next:n.next&&li(n.next,o),error:n.error&&li(n.error,o),complete:n.complete&&li(n.complete,o)}):a=n}return s.destination=new bh(a),s}return e}(hr);function rn(t){jo(t)}function yh(t){throw t}var kh={closed:!0,next:Mn,error:yh,complete:Mn},fr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function Sh(t){return t.length===0?pr:t.length===1?t[0]:function(n){return t.reduce(function(i,r){return r(i)},n)}}var re=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,i){var r=this,s=Th(e)?e:new Bi(e,n,i);return kn(function(){var a=r,o=a.operator,c=a.source;s.add(o?o.call(s,c):c?r._subscribe(s):r._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var i=this;return n=ys(n),new n(function(r,s){var a=new Bi({next:function(o){try{e(o)}catch(c){s(c),a.unsubscribe()}},error:s,complete:r});i.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[fr]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sh(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ys(e),new e(function(i,r){var s;n.subscribe(function(a){return s=a},function(a){return r(a)},function(){return i(s)})})},t.create=function(e){return new t(e)},t}();function ys(t){var e;return(e=t??Fo.Promise)!==null&&e!==void 0?e:Promise}function Ch(t){return t&&K(t.next)&&K(t.error)&&K(t.complete)}function Th(t){return t&&t instanceof hr||Ch(t)&&Uo(t)}function Eh(t){return K(t==null?void 0:t.lift)}function ye(t){return function(e){if(Eh(e))return e.lift(function(n){try{return t(n,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Re(t,e,n,i,r){return new Ph(t,e,n,i,r)}var Ph=function(t){Ge(e,t);function e(n,i,r,s,a,o){var c=t.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=o,c._next=i?function(u){try{i(u)}catch(l){n.error(l)}}:t.prototype._next,c._error=s?function(u){try{s(u)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=r?function(){try{r()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;t.prototype.unsubscribe.call(this),!i&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(hr),wh=dr(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ze=function(t){Ge(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var i=new ks(this,this);return i.operator=n,i},e.prototype._throwIfClosed=function(){if(this.closed)throw new wh},e.prototype.next=function(n){var i=this;kn(function(){var r,s;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=Sn(i.currentObservers),o=a.next();!o.done;o=a.next()){var c=o.value;c.next(n)}}catch(u){r={error:u}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}}})},e.prototype.error=function(n){var i=this;kn(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=n;for(var r=i.observers;r.length;)r.shift().error(n)}})},e.prototype.complete=function(){var n=this;kn(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var i=n.observers;i.length;)i.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var i=this,r=this,s=r.hasError,a=r.isStopped,o=r.observers;return s||a?Lo:(this.currentObservers=null,o.push(n),new Yt(function(){i.currentObservers=null,In(o,n)}))},e.prototype._checkFinalizedStatuses=function(n){var i=this,r=i.hasError,s=i.thrownError,a=i.isStopped;r?n.error(s):a&&n.complete()},e.prototype.asObservable=function(){var n=new re;return n.source=this,n},e.create=function(n,i){return new ks(n,i)},e}(re),ks=function(t){Ge(e,t);function e(n,i){var r=t.call(this)||this;return r.destination=n,r.source=i,r}return e.prototype.next=function(n){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.next)===null||r===void 0||r.call(i,n)},e.prototype.error=function(n){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.error)===null||r===void 0||r.call(i,n)},e.prototype.complete=function(){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||i===void 0||i.call(n)},e.prototype._subscribe=function(n){var i,r;return(r=(i=this.source)===null||i===void 0?void 0:i.subscribe(n))!==null&&r!==void 0?r:Lo},e}(Ze),Vo=function(t){Ge(e,t);function e(n){var i=t.call(this)||this;return i._value=n,i}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var i=t.prototype._subscribe.call(this,n);return!i.closed&&n.next(this._value),i},e.prototype.getValue=function(){var n=this,i=n.hasError,r=n.thrownError,s=n._value;if(i)throw r;return this._throwIfClosed(),s},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(Ze),Bo={now:function(){return(Bo.delegate||Date).now()},delegate:void 0},_h=function(t){Ge(e,t);function e(n,i){return t.call(this)||this}return e.prototype.schedule=function(n,i){return this},e}(Yt),xn={setInterval:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=xn.delegate;return r!=null&&r.setInterval?r.setInterval.apply(r,rt([t,e],Ye(n))):setInterval.apply(void 0,rt([t,e],Ye(n)))},clearInterval:function(t){var e=xn.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},Rh=function(t){Ge(e,t);function e(n,i){var r=t.call(this,n,i)||this;return r.scheduler=n,r.work=i,r.pending=!1,r}return e.prototype.schedule=function(n,i){var r;if(i===void 0&&(i=0),this.closed)return this;this.state=n;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,i)),this.pending=!0,this.delay=i,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(a,this.id,i),this},e.prototype.requestAsyncId=function(n,i,r){return r===void 0&&(r=0),xn.setInterval(n.flush.bind(n,this),r)},e.prototype.recycleAsyncId=function(n,i,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return i;i!=null&&xn.clearInterval(i)},e.prototype.execute=function(n,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(n,i);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,i){var r=!1,s;try{this.work(n)}catch(a){r=!0,s=a||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,i=n.id,r=n.scheduler,s=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,In(s,this),i!=null&&(this.id=this.recycleAsyncId(r,i,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(_h),Ss=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,i){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(i,n)},t.now=Bo.now,t}(),Ih=function(t){Ge(e,t);function e(n,i){i===void 0&&(i=Ss.now);var r=t.call(this,n,i)||this;return r.actions=[],r._active=!1,r}return e.prototype.flush=function(n){var i=this.actions;if(this._active){i.push(n);return}var r;this._active=!0;do if(r=n.execute(n.state,n.delay))break;while(n=i.shift());if(this._active=!1,r){for(;n=i.shift();)n.unsubscribe();throw r}},e}(Ss),Mh=new Ih(Rh);function xh(t){return t&&K(t.schedule)}function Oh(t){return t[t.length-1]}function mr(t){return xh(Oh(t))?t.pop():void 0}var gr=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function qo(t){return K(t==null?void 0:t.then)}function Wo(t){return K(t[fr])}function Go(t){return Symbol.asyncIterator&&K(t==null?void 0:t[Symbol.asyncIterator])}function Ko(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Dh(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var zo=Dh();function Ho(t){return K(t==null?void 0:t[zo])}function Jo(t){return Dc(this,arguments,function(){var n,i,r,s;return qs(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Hn(n.read())];case 3:return i=a.sent(),r=i.value,s=i.done,s?[4,Hn(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Hn(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function $o(t){return K(t==null?void 0:t.getReader)}function Ke(t){if(t instanceof re)return t;if(t!=null){if(Wo(t))return Ah(t);if(gr(t))return Nh(t);if(qo(t))return Lh(t);if(Go(t))return Qo(t);if(Ho(t))return Uh(t);if($o(t))return Fh(t)}throw Ko(t)}function Ah(t){return new re(function(e){var n=t[fr]();if(K(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Nh(t){return new re(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Lh(t){return new re(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,jo)})}function Uh(t){return new re(function(e){var n,i;try{for(var r=Sn(t),s=r.next();!s.done;s=r.next()){var a=s.value;if(e.next(a),e.closed)return}}catch(o){n={error:o}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}e.complete()})}function Qo(t){return new re(function(e){jh(t,e).catch(function(n){return e.error(n)})})}function Fh(t){return Qo(Jo(t))}function jh(t,e){var n,i,r,s;return Ac(this,void 0,void 0,function(){var a,o;return qs(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Nc(t),c.label=1;case 1:return[4,n.next()];case 2:if(i=c.sent(),!!i.done)return[3,4];if(a=i.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o=c.sent(),r={error:o},[3,11];case 6:return c.trys.push([6,,9,10]),i&&!i.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Ve(t,e,n,i,r){i===void 0&&(i=0),r===void 0&&(r=!1);var s=e.schedule(function(){n(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(s),!r)return s}function Yo(t,e){return e===void 0&&(e=0),ye(function(n,i){n.subscribe(Re(i,function(r){return Ve(i,t,function(){return i.next(r)},e)},function(){return Ve(i,t,function(){return i.complete()},e)},function(r){return Ve(i,t,function(){return i.error(r)},e)}))})}function Xo(t,e){return e===void 0&&(e=0),ye(function(n,i){i.add(t.schedule(function(){return n.subscribe(i)},e))})}function Vh(t,e){return Ke(t).pipe(Xo(e),Yo(e))}function Bh(t,e){return Ke(t).pipe(Xo(e),Yo(e))}function qh(t,e){return new re(function(n){var i=0;return e.schedule(function(){i===t.length?n.complete():(n.next(t[i++]),n.closed||this.schedule())})})}function Wh(t,e){return new re(function(n){var i;return Ve(n,e,function(){i=t[zo](),Ve(n,e,function(){var r,s,a;try{r=i.next(),s=r.value,a=r.done}catch(o){n.error(o);return}a?n.complete():n.next(s)},0,!0)}),function(){return K(i==null?void 0:i.return)&&i.return()}})}function Zo(t,e){if(!t)throw new Error("Iterable cannot be null");return new re(function(n){Ve(n,e,function(){var i=t[Symbol.asyncIterator]();Ve(n,e,function(){i.next().then(function(r){r.done?n.complete():n.next(r.value)})},0,!0)})})}function Gh(t,e){return Zo(Jo(t),e)}function Kh(t,e){if(t!=null){if(Wo(t))return Vh(t,e);if(gr(t))return qh(t,e);if(qo(t))return Bh(t,e);if(Go(t))return Zo(t,e);if(Ho(t))return Wh(t,e);if($o(t))return Gh(t,e)}throw Ko(t)}function ec(t,e){return e?Kh(t,e):Ke(t)}function Cs(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=mr(t);return ec(t,n)}function zh(t){return t instanceof Date&&!isNaN(t)}var Hh=dr(function(t){return function(n){n===void 0&&(n=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function Jh(t,e){var n=zh(t)?{first:t}:typeof t=="number"?{each:t}:t,i=n.first,r=n.each,s=n.with,a=s===void 0?$h:s,o=n.scheduler,c=o===void 0?e??Mh:o,u=n.meta,l=u===void 0?null:u;if(i==null&&r==null)throw new TypeError("No timeout provided.");return ye(function(h,f){var p,g,b=null,v=0,m=function(E){g=Ve(f,c,function(){try{p.unsubscribe(),Ke(a({meta:l,lastValue:b,seen:v})).subscribe(f)}catch(O){f.error(O)}},E)};p=h.subscribe(Re(f,function(E){g==null||g.unsubscribe(),v++,f.next(b=E),r>0&&m(r)},void 0,void 0,function(){g!=null&&g.closed||g==null||g.unsubscribe(),b=null})),!v&&m(i!=null?typeof i=="number"?i:+i-c.now():r)})}function $h(t){throw new Hh(t)}function Z(t,e){return ye(function(n,i){var r=0;n.subscribe(Re(i,function(s){i.next(t.call(e,s,r++))}))})}var Qh=Array.isArray;function Yh(t,e){return Qh(e)?t.apply(void 0,rt([],Ye(e))):t(e)}function Xh(t){return Z(function(e){return Yh(t,e)})}function Zh(t,e,n,i,r,s,a,o){var c=[],u=0,l=0,h=!1,f=function(){h&&!c.length&&!u&&e.complete()},p=function(b){return u<i?g(b):c.push(b)},g=function(b){s&&e.next(b),u++;var v=!1;Ke(n(b,l++)).subscribe(Re(e,function(m){r==null||r(m),s?p(m):e.next(m)},function(){v=!0},void 0,function(){if(v)try{u--;for(var m=function(){var E=c.shift();a?Ve(e,a,function(){return g(E)}):g(E)};c.length&&u<i;)m();f()}catch(E){e.error(E)}}))};return t.subscribe(Re(e,p,function(){h=!0,f()})),function(){o==null||o()}}function vr(t,e,n){return n===void 0&&(n=1/0),K(e)?vr(function(i,r){return Z(function(s,a){return e(i,s,r,a)})(Ke(t(i,r)))},n):(typeof e=="number"&&(n=e),ye(function(i,r){return Zh(i,r,t,n)}))}function ef(t){return t===void 0&&(t=1/0),vr(pr,t)}function tf(){return ef(1)}function On(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tf()(ec(t,mr(t)))}var nf=["addListener","removeListener"],rf=["addEventListener","removeEventListener"],sf=["on","off"];function qi(t,e,n,i){if(K(n)&&(i=n,n=void 0),i)return qi(t,e,n).pipe(Xh(i));var r=Ye(cf(t)?rf.map(function(o){return function(c){return t[o](e,c,n)}}):af(t)?nf.map(Ts(t,e)):of(t)?sf.map(Ts(t,e)):[],2),s=r[0],a=r[1];if(!s&&gr(t))return vr(function(o){return qi(o,e,n)})(Ke(t));if(!s)throw new TypeError("Invalid event target");return new re(function(o){var c=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return o.next(1<u.length?u:u[0])};return s(c),function(){return a(c)}})}function Ts(t,e){return function(n){return function(i){return t[n](e,i)}}}function af(t){return K(t.addListener)&&K(t.removeListener)}function of(t){return K(t.on)&&K(t.off)}function cf(t){return K(t.addEventListener)&&K(t.removeEventListener)}function br(t,e){return ye(function(n,i){var r=0;n.subscribe(Re(i,function(s){return t.call(e,s,r++)&&i.next(s)}))})}function uf(t,e,n,i,r){return function(s,a){var o=n,c=e,u=0;s.subscribe(Re(a,function(l){var h=u++;c=o?t(c,l,h):(o=!0,l),i&&a.next(c)},r&&function(){o&&a.next(c),a.complete()}))}}function lf(t,e){return e===void 0&&(e=pr),t=t??df,ye(function(n,i){var r,s=!0;n.subscribe(Re(i,function(a){var o=e(a);(s||!t(r,o))&&(s=!1,r=o,i.next(a))}))})}function df(t,e){return t===e}function hf(t){return ye(function(e,n){try{e.subscribe(n)}finally{n.add(t)}})}function ff(t,e){return ye(uf(t,e,arguments.length>=2,!0))}function pf(t){return ye(function(e,n){var i=!1,r=Re(n,function(){r==null||r.unsubscribe(),i=!0},Mn);Ke(t).subscribe(r),e.subscribe(Re(n,function(s){return i&&n.next(s)}))})}function ke(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=mr(t);return ye(function(i,r){(n?On(t,i,n):On(t,i)).subscribe(r)})}function Es(t){return ye(function(e,n){Ke(t).subscribe(Re(n,function(){return n.complete()},Mn)),!n.closed&&e.subscribe(n)})}var mf=Object.defineProperty,gf=Object.defineProperties,vf=Object.getOwnPropertyDescriptors,Ps=Object.getOwnPropertySymbols,bf=Object.prototype.hasOwnProperty,yf=Object.prototype.propertyIsEnumerable,ws=(t,e,n)=>e in t?mf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$t=(t,e)=>{for(var n in e||(e={}))bf.call(e,n)&&ws(t,n,e[n]);if(Ps)for(var n of Ps(e))yf.call(e,n)&&ws(t,n,e[n]);return t},_s=(t,e)=>gf(t,vf(e)),Ie=(t,e,n)=>new Promise((i,r)=>{var s=c=>{try{o(n.next(c))}catch(u){r(u)}},a=c=>{try{o(n.throw(c))}catch(u){r(u)}},o=c=>c.done?i(c.value):Promise.resolve(c.value).then(s,a);o((n=n.apply(t,e)).next())}),tc="lk";function X(t){return typeof t>"u"?!1:kf(t)||Sf(t)}function kf(t){var e;return t?t.hasOwnProperty("participant")&&t.hasOwnProperty("source")&&t.hasOwnProperty("track")&&typeof((e=t.publication)==null?void 0:e.track)<"u":!1}function Sf(t){return t?t.hasOwnProperty("participant")&&t.hasOwnProperty("source")&&t.hasOwnProperty("publication")&&typeof t.publication<"u":!1}function Qt(t){return t?t.hasOwnProperty("participant")&&t.hasOwnProperty("source")&&typeof t.publication>"u":!1}function te(t){if(typeof t=="string"||typeof t=="number")return`${t}`;if(Qt(t))return`${t.participant.identity}_${t.source}_placeholder`;if(X(t))return`${t.participant.identity}_${t.publication.source}_${t.publication.trackSid}`;throw new Error(`Can't generate a id for the given track reference: ${t}`)}function Cf(t,e){return t===void 0||e===void 0?!1:X(t)&&X(e)?t.publication.trackSid===e.publication.trackSid:te(t)===te(e)}function nc(t,e){return typeof e>"u"?!1:X(t)?e.some(n=>n.participant.identity===t.participant.identity&&X(n)&&n.publication.trackSid===t.publication.trackSid):Qt(t)?e.some(n=>n.participant.identity===t.participant.identity&&Qt(n)&&n.source===t.source):!1}function Tf(t,e){return Qt(t)&&X(e)&&e.participant.identity===t.participant.identity&&e.source===t.source}function ic(t){return t instanceof Ht}function Ef(){const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);const n=t.offsetWidth;e.style.overflow="scroll";let i=t.offsetWidth;return n===i&&(i=e.clientWidth),document.body.removeChild(e),n-i}function Pf(){return typeof document<"u"}function wf(t,e){return Ie(this,null,function*(){const{x:n,y:i}=yield Lc(t,e,{placement:"top",middleware:[Uc(6),Fc(),jc({padding:5})]});return{x:n,y:i}})}function _f(t,e){return!t.contains(e.target)}var Rf=[S.ConnectionStateChanged,S.RoomMetadataChanged,S.ActiveSpeakersChanged,S.ConnectionQualityChanged,S.ParticipantConnected,S.ParticipantDisconnected,S.ParticipantPermissionsChanged,S.ParticipantMetadataChanged,S.TrackMuted,S.TrackUnmuted,S.TrackPublished,S.TrackUnpublished,S.TrackStreamStateChanged,S.TrackSubscriptionFailed,S.TrackSubscriptionPermissionChanged,S.TrackSubscriptionStatusChanged],If=[...Rf,S.LocalTrackPublished,S.LocalTrackUnpublished];T.TrackPublished,T.TrackUnpublished,T.TrackMuted,T.TrackUnmuted,T.TrackStreamStateChanged,T.TrackSubscribed,T.TrackUnsubscribed,T.TrackSubscriptionPermissionChanged,T.TrackSubscriptionFailed,T.LocalTrackPublished,T.LocalTrackUnpublished;var Mf=[T.ConnectionQualityChanged,T.IsSpeakingChanged,T.ParticipantMetadataChanged,T.ParticipantPermissionsChanged,T.TrackMuted,T.TrackUnmuted,T.TrackPublished,T.TrackUnpublished,T.TrackStreamStateChanged,T.TrackSubscriptionFailed,T.TrackSubscriptionPermissionChanged,T.TrackSubscriptionStatusChanged];[...Mf,T.LocalTrackPublished,T.LocalTrackUnpublished];var U=gh.getLogger("lk-components-js");U.setDefaultLevel("WARN");var xf=[{columns:1,rows:1},{columns:1,rows:2,orientation:"portrait"},{columns:2,rows:1,orientation:"landscape"},{columns:2,rows:2,minWidth:560},{columns:3,rows:3,minWidth:700},{columns:4,rows:4,minWidth:960},{columns:5,rows:5,minWidth:1100}];function rc(t,e,n,i){if(t.length<1)throw new Error("At least one grid layout definition must be provided.");const r=Of(t);if(n<=0||i<=0)return r[0];let s=0;const a=n/i>1?"landscape":"portrait";let o=r.find((c,u,l)=>{s=u;const h=l.findIndex((f,p)=>{const g=!f.orientation||f.orientation===a,b=p>u,v=f.maxTiles===c.maxTiles;return b&&v&&g})!==-1;return c.maxTiles>=e&&!h});if(o===void 0)if(o=r[r.length-1],o)U.warn(`No layout found for: participantCount: ${e}, width/height: ${n}/${i} fallback to biggest available layout (${o}).`);else throw new Error("No layout or fallback layout found.");if((n<o.minWidth||i<o.minHeight)&&s>0){const c=r[s-1];o=rc(r.slice(0,s),c.maxTiles,n,i)}return o}function Of(t){return[...t].map(e=>{var n,i;return{name:`${e.columns}x${e.rows}`,columns:e.columns,rows:e.rows,maxTiles:e.columns*e.rows,minWidth:(n=e.minWidth)!=null?n:0,minHeight:(i=e.minHeight)!=null?i:0,orientation:e.orientation}}).sort((e,n)=>e.maxTiles!==n.maxTiles?e.maxTiles-n.maxTiles:e.minWidth!==0||n.minWidth!==0?e.minWidth-n.minWidth:e.minHeight!==0||n.minHeight!==0?e.minHeight-n.minHeight:0)}function Df(){return typeof navigator<"u"&&navigator.mediaDevices&&!!navigator.mediaDevices.getDisplayMedia}var sc=[],ac={showChat:!1,unreadMessages:0,showSettings:!1};function oc(t){return typeof t=="object"}function cc(t){return Array.isArray(t)&&t.filter(oc).length>0}function Af(t,e){return e.audioLevel-t.audioLevel}function Nf(t,e){return t.isSpeaking===e.isSpeaking?0:t.isSpeaking?-1:1}function Lf(t,e){var n,i,r,s;return t.lastSpokeAt!==void 0||e.lastSpokeAt!==void 0?((i=(n=e.lastSpokeAt)==null?void 0:n.getTime())!=null?i:0)-((s=(r=t.lastSpokeAt)==null?void 0:r.getTime())!=null?s:0):0}function Wi(t,e){var n,i,r,s;return((i=(n=t.joinedAt)==null?void 0:n.getTime())!=null?i:0)-((s=(r=e.joinedAt)==null?void 0:r.getTime())!=null?s:0)}function Uf(t,e){return X(t)?X(e)?0:-1:X(e)?1:0}function Ff(t,e){const n=t.participant.isCameraEnabled,i=e.participant.isCameraEnabled;return n!==i?n?-1:1:0}function jf(t){const e=[],n=[],i=[],r=[];t.forEach(o=>{o.participant.isLocal&&o.source===k.Source.Camera?e.push(o):o.source===k.Source.ScreenShare?n.push(o):o.source===k.Source.Camera?i.push(o):r.push(o)});const s=Vf(n),a=Bf(i);return[...e,...s,...a,...r]}function Vf(t){const e=[],n=[];return t.forEach(r=>{r.participant.isLocal?e.push(r):n.push(r)}),e.sort((r,s)=>Wi(r.participant,s.participant)),n.sort((r,s)=>Wi(r.participant,s.participant)),[...n,...e]}function Bf(t){const e=[],n=[];return t.forEach(i=>{i.participant.isLocal?e.push(i):n.push(i)}),n.sort((i,r)=>i.participant.isSpeaking&&r.participant.isSpeaking?Af(i.participant,r.participant):i.participant.isSpeaking!==r.participant.isSpeaking?Nf(i.participant,r.participant):i.participant.lastSpokeAt!==r.participant.lastSpokeAt?Lf(i.participant,r.participant):X(i)!==X(r)?Uf(i,r):i.participant.isCameraEnabled!==r.participant.isCameraEnabled?Ff(i,r):Wi(i.participant,r.participant)),[...e,...n]}function qf(t,e){return t.reduce((n,i,r)=>r%e===0?[...n,[i]]:[...n.slice(0,-1),[...n.slice(-1)[0],i]],[])}function Rs(t,e){const n=Math.max(t.length,e.length);return new Array(n).fill([]).map((i,r)=>[t[r],e[r]])}function Dn(t,e,n){return t.filter(i=>!e.map(r=>n(r)).includes(n(i)))}function Gi(t){return t.map(e=>typeof e=="string"||typeof e=="number"?`${e}`:te(e))}function Wf(t,e){return{dropped:Dn(t,e,te),added:Dn(e,t,te)}}function Gf(t){return t.added.length!==0||t.dropped.length!==0}function Ki(t,e){const n=e.findIndex(i=>te(i)===te(t));if(n===-1)throw new Error(`Element not part of the array: ${te(t)} not in ${Gi(e)}`);return n}function Kf(t,e,n){const i=Ki(t,n),r=Ki(e,n);return n.splice(i,1,e),n.splice(r,1,t),n}function zf(t,e){const n=Ki(t,e);return e.splice(n,1),e}function Hf(t,e){return[...e,t]}function di(t,e){return qf(t,e)}function Jf(t,e,n){let i=$f(t,e);if(i.length<e.length){const a=Dn(e,i,te);i=[...i,...a]}const r=di(i,n),s=di(e,n);if(Rs(r,s).forEach(([a,o],c)=>{if(a&&o){const u=di(i,n)[c],l=Wf(u,o);Gf(l)&&(U.debug(`Detected visual changes on page: ${c}, current: ${Gi(a)}, next: ${Gi(o)}`,{changes:l}),l.added.length===l.dropped.length&&Rs(l.added,l.dropped).forEach(([h,f])=>{if(h&&f)i=Kf(h,f,i);else throw new Error(`For a swap action we need a addition and a removal one is missing: ${h}, ${f}`)}),l.added.length===0&&l.dropped.length>0&&l.dropped.forEach(h=>{i=zf(h,i)}),l.added.length>0&&l.dropped.length===0&&l.added.forEach(h=>{i=Hf(h,i)}))}}),i.length>e.length){const a=Dn(i,e,te);i=i.filter(o=>!a.map(te).includes(te(o)))}return i}function $f(t,e){return t.map(n=>{const i=e.find(r=>te(n)===te(r)||typeof n!="number"&&Qt(n)&&X(r)&&Tf(n,r));return i??n})}function de(t){return`${tc}-${t}`}function Qf(t){const e=zi(t),n=uc(t.participant).pipe(Z(()=>zi(t)),ke(e));return{className:de(t.source===k.Source.Camera||t.source===k.Source.ScreenShare?"participant-media-video":"participant-media-audio"),trackObserver:n}}function zi(t){if(X(t))return t.publication;{const{source:e,name:n,participant:i}=t;if(e&&n)return i.getTrackPublications().find(r=>r.source===e&&r.trackName===n);if(n)return i.getTrackPublicationByName(n);if(e)return i.getTrackPublication(e);throw new Error("At least one of source and name needs to be defined")}}function yr(t,...e){return new re(i=>{const r=()=>{i.next(t)};return e.forEach(a=>{t.on(a,r)}),()=>{e.forEach(a=>{t.off(a,r)})}}).pipe(ke(t))}function qn(t,e){return new re(i=>{const r=(...a)=>{i.next(a)};return t.on(e,r),()=>{t.off(e,r)}})}function Yf(t){return qn(t,S.ConnectionStateChanged).pipe(Z(([e])=>e),ke(t.state))}function Xf(t,e,n=!0){var i;const r=()=>Ie(this,null,function*(){try{const o=yield Rn.getLocalDevices(t,n);s.next(o)}catch(o){e==null||e(o)}}),s=new Ze,a=s.pipe(hf(()=>{var o;(o=navigator==null?void 0:navigator.mediaDevices)==null||o.removeEventListener("devicechange",r)}));if(typeof window<"u"){if(!window.isSecureContext)throw new Error("Accessing media devices is available only in secure contexts (HTTPS and localhost), in some or all supporting browsers. See: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices");(i=navigator==null?void 0:navigator.mediaDevices)==null||i.addEventListener("devicechange",r)}return On(Rn.getLocalDevices(t,n).catch(o=>(e==null||e(o),[])),a)}function Zf(t){return qn(t,S.DataReceived)}function ep(t){return yr(t,S.AudioPlaybackStatusChanged).pipe(Z(n=>({canPlayAudio:n.canPlaybackAudio})))}function tp(t){return yr(t,S.VideoPlaybackStatusChanged).pipe(Z(n=>({canPlayVideo:n.canPlaybackVideo})))}function np(t,e){return qn(t,S.ActiveDeviceChanged).pipe(br(([n])=>n===e),Z(([n,i])=>(U.debug("activeDeviceObservable | RoomEvent.ActiveDeviceChanged",{kind:n,deviceId:i}),i)),ke(t.getActiveDevice(e)))}function ip(t,e){return qn(t,S.ParticipantEncryptionStatusChanged).pipe(br(([,n])=>e.identity===(n==null?void 0:n.identity)||!n&&e.identity===t.localParticipant.identity),Z(([n])=>n),ke(e instanceof Ht?e.isE2EEEnabled:e.isEncrypted))}function kr(t,...e){return new re(i=>{const r=()=>{i.next(t)};return e.forEach(a=>{t.on(a,r)}),()=>{e.forEach(a=>{t.off(a,r)})}}).pipe(ke(t))}function uc(t){return kr(t,T.TrackMuted,T.TrackUnmuted,T.ParticipantPermissionsChanged,T.TrackPublished,T.TrackUnpublished,T.LocalTrackPublished,T.LocalTrackUnpublished,T.MediaDevicesError,T.TrackSubscriptionStatusChanged).pipe(Z(n=>{const{isMicrophoneEnabled:i,isCameraEnabled:r,isScreenShareEnabled:s}=n,a=n.getTrackPublication(k.Source.Microphone),o=n.getTrackPublication(k.Source.Camera);return{isCameraEnabled:r,isMicrophoneEnabled:i,isScreenShareEnabled:s,cameraTrack:o,microphoneTrack:a,participant:n}}))}function rp(t){return kr(t,T.ParticipantMetadataChanged,T.ParticipantNameChanged).pipe(Z(({name:n,identity:i,metadata:r})=>({name:n,identity:i,metadata:r})),ke({name:t.name,identity:t.identity,metadata:t.metadata}))}function sp(t){return Sr(t,T.ConnectionQualityChanged).pipe(Z(([n])=>n),ke(t.connectionQuality))}function Sr(t,e){return new re(i=>{const r=(...a)=>{i.next(a)};return t.on(e,r),()=>{t.off(e,r)}})}function lc(t){var e,n,i,r;return kr(t.participant,T.TrackMuted,T.TrackUnmuted,T.TrackSubscribed,T.TrackUnsubscribed,T.LocalTrackPublished,T.LocalTrackUnpublished).pipe(Z(s=>{var a,o;const c=(a=t.publication)!=null?a:s.getTrackPublication(t.source);return(o=c==null?void 0:c.isMuted)!=null?o:!0}),ke((r=(i=(e=t.publication)==null?void 0:e.isMuted)!=null?i:(n=t.participant.getTrackPublication(t.source))==null?void 0:n.isMuted)!=null?r:!0))}function ap(t){return Sr(t,T.IsSpeakingChanged).pipe(Z(([e])=>e))}function op(t){return Sr(t,T.ParticipantPermissionsChanged).pipe(Z(()=>t.permissions),ke(t.permissions))}function cp(t,e,n,i,r){const{localParticipant:s}=e,a=(h,f)=>{let p=!1;switch(h){case k.Source.Camera:p=f.isCameraEnabled;break;case k.Source.Microphone:p=f.isMicrophoneEnabled;break;case k.Source.ScreenShare:p=f.isScreenShareEnabled;break}return p},o=uc(s).pipe(Z(h=>a(t,h.participant)),ke(a(t,s))),c=new Ze,u=(h,f)=>Ie(this,null,function*(){try{switch(f??(f=n),c.next(!0),t){case k.Source.Camera:yield s.setCameraEnabled(h??!s.isCameraEnabled,f,i);break;case k.Source.Microphone:yield s.setMicrophoneEnabled(h??!s.isMicrophoneEnabled,f,i);break;case k.Source.ScreenShare:yield s.setScreenShareEnabled(h??!s.isScreenShareEnabled,f,i);break;default:break}}catch(p){if(r&&p instanceof Error)r==null||r(p);else throw p}finally{c.next(!1)}});return{className:de("button"),toggle:u,enabledObserver:o,pendingObserver:c.asObservable()}}function up(){let t=!1;const e=new Ze,n=new Ze,i=s=>Ie(this,null,function*(){n.next(!0),t=s??!t,e.next(t),n.next(!1)});return{className:de("button"),toggle:i,enabledObserver:e.asObservable(),pendingObserver:n.asObservable()}}function lp(t,e,n){const i=new Vo(void 0),r=e?np(e,t):i.asObservable(),s=(o,...c)=>Ie(this,[o,...c],function*(u,l={}){var h,f,p;if(e){U.debug(`Switching active device of kind "${t}" with id ${u}.`),yield e.switchActiveDevice(t,u,l.exact);const g=(h=e.getActiveDevice(t))!=null?h:u;g!==u&&u!=="default"&&U.info(`We tried to select the device with id (${u}), but the browser decided to select the device with id (${g}) instead.`);let b;t==="audioinput"?b=(f=e.localParticipant.getTrackPublication(k.Source.Microphone))==null?void 0:f.track:t==="videoinput"&&(b=(p=e.localParticipant.getTrackPublication(k.Source.Camera))==null?void 0:p.track);const v=u==="default"&&!b||u==="default"&&(b==null?void 0:b.mediaStreamTrack.label.startsWith("Default"));i.next(v?u:g)}else if(n){yield n.setDeviceId(l.exact?{exact:u}:u);const g=yield n.getDeviceId();i.next(u==="default"&&n.mediaStreamTrack.label.startsWith("Default")?u:g)}else i.value!==u&&(U.warn("device switch skipped, please provide either a room or a local track to switch on. "),i.next(u))});return{className:de("media-device-select"),activeDeviceObservable:r,setActiveMediaDevice:s}}function dp(t){const e=i=>{t.disconnect(i)};return{className:de("disconnect-button"),disconnect:e}}function hp(t){const e=de("connection-quality"),n=sp(t);return{className:e,connectionQualityObserver:n}}function fp(t){let e="track-muted-indicator-camera";switch(t.source){case k.Source.Camera:e="track-muted-indicator-camera";break;case k.Source.Microphone:e="track-muted-indicator-microphone";break}const n=de(e),i=lc(t);return{className:n,mediaMutedObserver:i}}function pp(t){return{className:"lk-participant-name",infoObserver:rp(t)}}function mp(){return{className:de("participant-tile")}}var Is={CHAT:"lk-chat-topic",CHAT_UPDATE:"lk-chat-update-topic"};function Hi(t,e){return Ie(this,arguments,function*(n,i,r={}){const{reliable:s,destinationIdentities:a,topic:o}=r;yield n.publishData(i,{destinationIdentities:a,topic:o,reliable:s})})}function gp(t,e,n){const i=Array.isArray(e)?e:[e],r=Zf(t).pipe(br(([,,,c])=>e===void 0||c!==void 0&&i.includes(c)),Z(([c,u,,l])=>{const h={payload:c,topic:l,from:u};return n==null||n(h),h}));let s;const a=new re(c=>{s=c});return{messageObservable:r,isSendingObservable:a,send:(c,...u)=>Ie(this,[c,...u],function*(l,h={}){s.next(!0);try{yield Hi(t.localParticipant,l,$t({topic:i[0]},h))}finally{s.next(!1)}})}}var vp=new TextEncoder,bp=new TextDecoder,sn=new Map,yp=t=>vp.encode(JSON.stringify(t)),kp=t=>JSON.parse(bp.decode(t));function Sp(t,e){var n,i;const r=new Ze,{messageDecoder:s,messageEncoder:a,channelTopic:o,updateChannelTopic:c}=e??{},u=o??Is.CHAT,l=c??Is.CHAT_UPDATE;let h=!1;sn.has(t)||(h=!0);const f=(n=sn.get(t))!=null?n:new Map,p=(i=f.get(u))!=null?i:new Ze;if(f.set(u,p),sn.set(t,f),h){const{messageObservable:w}=gp(t,[u,l]);w.pipe(Es(r)).subscribe(p)}const g=s??kp,b=p.pipe(Z(w=>{const M=g(w.payload);return _s($t({},M),{from:w.from})}),ff((w,M)=>{if("id"in M&&w.find(D=>{var A,L;return((A=D.from)==null?void 0:A.identity)===((L=M.from)==null?void 0:L.identity)&&D.id===M.id})){const D=w.findIndex(A=>A.id===M.id);if(D>-1){const A=w[D];w[D]=_s($t({},M),{timestamp:A.timestamp,editTimestamp:M.timestamp})}return[...w]}return[...w,M]},[]),Es(r)),v=new Vo(!1),m=a??yp,E=w=>Ie(this,null,function*(){const M=Date.now(),A={id:crypto.randomUUID(),message:w,timestamp:M},L=m(A);v.next(!0);try{return yield Hi(t.localParticipant,L,{reliable:!0,topic:u}),p.next({payload:L,topic:u,from:t.localParticipant}),A}finally{v.next(!1)}}),O=(w,M)=>Ie(this,null,function*(){const D=Date.now(),A={id:M,message:w,timestamp:D},L=m(A);v.next(!0);try{return yield Hi(t.localParticipant,L,{topic:l,reliable:!0}),p.next({payload:L,topic:u,from:t.localParticipant}),A}finally{v.next(!1)}});function I(){r.next(),r.complete(),sn.delete(t)}return t.once(S.Disconnected,I),{messageObservable:b,isSendingObservable:v,send:E,update:O}}function Cp(){const t=n=>Ie(this,null,function*(){U.info("Start Audio for room: ",n),yield n.startAudio()});return{className:de("start-audio-button"),roomAudioPlaybackAllowedObservable:ep,handleStartAudioPlayback:t}}function Tp(){const t=n=>Ie(this,null,function*(){U.info("Start Video for room: ",n),yield n.startVideo()});return{className:de("start-audio-button"),roomVideoPlaybackAllowedObservable:tp,handleStartVideoPlayback:t}}function Ep(){return{className:[de("button"),de("chat-toggle")].join(" ")}}function Pp(){return{className:[de("button"),de("focus-toggle-button")].join(" ")}}function wp(){return{className:"lk-room-container"}}function Ms(t,e,n=!0){const r=[t.localParticipant,...Array.from(t.remoteParticipants.values())],s=[];return r.forEach(a=>{e.forEach(o=>{const c=Array.from(a.trackPublications.values()).filter(u=>u.source===o&&(!n||u.track)).map(u=>({participant:a,publication:u,source:u.source}));s.push(...c)})}),{trackReferences:s,participants:r}}function _p(t,e,n){var i,r;const s=(i=n.additionalRoomEvents)!=null?i:If,a=(r=n.onlySubscribed)!=null?r:!0,o=Array.from(new Set([S.ParticipantConnected,S.ParticipantDisconnected,S.ConnectionStateChanged,S.LocalTrackPublished,S.LocalTrackUnpublished,S.TrackPublished,S.TrackUnpublished,S.TrackSubscriptionStatusChanged,...s]).values());return yr(t,...o).pipe(Z(u=>{const l=Ms(u,e,a);return U.debug(`TrackReference[] was updated. (length ${l.trackReferences.length})`,l),l}),ke(Ms(t,e,a)))}function Rp(t,e=1e3){if(t===null)return Cs(!1);const n=qi(t,"mousemove",{passive:!0}).pipe(Z(()=>!0)),i=n.pipe(Jh({each:e,with:()=>On(Cs(!1),i.pipe(pf(n)))}),lf());return i}function Ip(t,e){if(typeof localStorage>"u"){U.error("Local storage is not available.");return}try{localStorage.setItem(t,JSON.stringify(e))}catch(n){U.error(`Error setting item to local storage: ${n}`)}}function Mp(t){if(typeof localStorage>"u"){U.error("Local storage is not available.");return}try{const e=localStorage.getItem(t);if(!e){U.warn(`Item with key ${t} does not exist in local storage.`);return}return JSON.parse(e)}catch(e){U.error(`Error getting item from local storage: ${e}`);return}}function xp(t){return{load:()=>Mp(t),save:e=>Ip(t,e)}}var Op=`${tc}-user-choices`,Ot={videoEnabled:!0,audioEnabled:!0,videoDeviceId:"",audioDeviceId:"",username:""},{load:Dp,save:Ap}=xp(Op);function Np(t,e=!1){e!==!0&&Ap(t)}function Lp(t,e=!1){var n,i,r,s,a;const o={videoEnabled:(n=t==null?void 0:t.videoEnabled)!=null?n:Ot.videoEnabled,audioEnabled:(i=t==null?void 0:t.audioEnabled)!=null?i:Ot.audioEnabled,videoDeviceId:(r=t==null?void 0:t.videoDeviceId)!=null?r:Ot.videoDeviceId,audioDeviceId:(s=t==null?void 0:t.audioDeviceId)!=null?s:Ot.audioDeviceId,username:(a=t==null?void 0:t.username)!=null?a:Ot.username};if(e)return o;{const c=Dp();return $t($t({},o),c??{})}}function dc(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=dc(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Up(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=dc(t))&&(i&&(i+=" "),i+=e);return i}var Fp="Expected a function",xs=0/0,jp="[object Symbol]",Vp=/^\s+|\s+$/g,Bp=/^[-+]0x[0-9a-f]+$/i,qp=/^0b[01]+$/i,Wp=/^0o[0-7]+$/i,Gp=parseInt,Kp=typeof Dt=="object"&&Dt&&Dt.Object===Object&&Dt,zp=typeof self=="object"&&self&&self.Object===Object&&self,Hp=Kp||zp||Function("return this")(),Jp=Object.prototype,$p=Jp.toString,Qp=Math.max,Yp=Math.min,hi=function(){return Hp.Date.now()};function Xp(t,e,n){var i,r,s,a,o,c,u=0,l=!1,h=!1,f=!0;if(typeof t!="function")throw new TypeError(Fp);e=Os(e)||0,Ji(n)&&(l=!!n.leading,h="maxWait"in n,s=h?Qp(Os(n.maxWait)||0,e):s,f="trailing"in n?!!n.trailing:f);function p(M){var D=i,A=r;return i=r=void 0,u=M,a=t.apply(A,D),a}function g(M){return u=M,o=setTimeout(m,e),l?p(M):a}function b(M){var D=M-c,A=M-u,L=e-D;return h?Yp(L,s-A):L}function v(M){var D=M-c,A=M-u;return c===void 0||D>=e||D<0||h&&A>=s}function m(){var M=hi();if(v(M))return E(M);o=setTimeout(m,b(M))}function E(M){return o=void 0,f&&i?p(M):(i=r=void 0,a)}function O(){o!==void 0&&clearTimeout(o),u=0,i=c=r=o=void 0}function I(){return o===void 0?a:E(hi())}function w(){var M=hi(),D=v(M);if(i=arguments,r=this,c=M,D){if(o===void 0)return g(c);if(h)return o=setTimeout(m,e),p(c)}return o===void 0&&(o=setTimeout(m,e)),a}return w.cancel=O,w.flush=I,w}function Ji(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Zp(t){return!!t&&typeof t=="object"}function em(t){return typeof t=="symbol"||Zp(t)&&$p.call(t)==jp}function Os(t){if(typeof t=="number")return t;if(em(t))return xs;if(Ji(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ji(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Vp,"");var n=qp.test(t);return n||Wp.test(t)?Gp(t.slice(2),n?2:8):Bp.test(t)?xs:+t}var tm=Xp;const Ds=Bs(tm);function nm(t){const e=d.useRef(t);e.current=t,d.useEffect(()=>()=>{e.current()},[])}function im(t,e=500,n){const i=d.useRef();nm(()=>{i.current&&i.current.cancel()});const r=d.useMemo(()=>{const s=Ds(t,e,n),a=(...o)=>s(...o);return a.cancel=()=>{s.cancel()},a.isPending=()=>!!i.current,a.flush=()=>s.flush(),a},[t,e,n]);return d.useEffect(()=>{i.current=Ds(t,e,n)},[t,e,n]),r}function rm(t,e,n){const i=(n==null?void 0:n.equalityFn)??((u,l)=>u===l),r=t instanceof Function?t():t,[s,a]=d.useState(r),o=d.useRef(r),c=im(a,e,n);return i(o.current,r)||(c(r),o.current=r),[s,c]}function sm({threshold:t=0,root:e=null,rootMargin:n="0%",freezeOnceVisible:i=!1,initialIsIntersecting:r=!1,onChange:s}={}){var a;const[o,c]=d.useState(null),[u,l]=d.useState(()=>({isIntersecting:r,entry:void 0})),h=d.useRef();h.current=s;const f=((a=u.entry)==null?void 0:a.isIntersecting)&&i;d.useEffect(()=>{if(!o||!("IntersectionObserver"in window)||f)return;let b;const v=new IntersectionObserver(m=>{const E=Array.isArray(v.thresholds)?v.thresholds:[v.thresholds];m.forEach(O=>{const I=O.isIntersecting&&E.some(w=>O.intersectionRatio>=w);l({isIntersecting:I,entry:O}),h.current&&h.current(I,O),I&&i&&b&&(b(),b=void 0)})},{threshold:t,root:e,rootMargin:n});return v.observe(o),()=>{v.disconnect()}},[o,JSON.stringify(t),e,n,f,i]);const p=d.useRef(null);d.useEffect(()=>{var b;!o&&((b=u.entry)!=null&&b.target)&&!i&&!f&&p.current!==u.entry.target&&(p.current=u.entry.target,l({isIntersecting:r,entry:void 0}))},[o,u.entry,i,f,r]);const g=[c,!!u.isIntersecting,u.entry];return g.ref=g[0],g.isIntersecting=g[1],g.entry=g[2],g}var am=Object.defineProperty,om=Object.defineProperties,cm=Object.getOwnPropertyDescriptors,An=Object.getOwnPropertySymbols,hc=Object.prototype.hasOwnProperty,fc=Object.prototype.propertyIsEnumerable,As=(t,e,n)=>e in t?am(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x=(t,e)=>{for(var n in e||(e={}))hc.call(e,n)&&As(t,n,e[n]);if(An)for(var n of An(e))fc.call(e,n)&&As(t,n,e[n]);return t},ne=(t,e)=>om(t,cm(e)),Q=(t,e)=>{var n={};for(var i in t)hc.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&An)for(var i of An(t))e.indexOf(i)<0&&fc.call(t,i)&&(n[i]=t[i]);return n},pc=(t,e,n)=>new Promise((i,r)=>{var s=c=>{try{o(n.next(c))}catch(u){r(u)}},a=c=>{try{o(n.throw(c))}catch(u){r(u)}},o=c=>c.done?i(c.value):Promise.resolve(c.value).then(s,a);o((n=n.apply(t,e)).next())}),um=t=>{const e=d.useRef(t);return d.useEffect(()=>{e.current=t}),e};function lm(t,e){const n=hm(),i=um(e);return d.useLayoutEffect(()=>{let r=!1;const s=t.current;if(!s)return;function a(o,c){r||i.current(o,c)}return n==null||n.subscribe(s,a),()=>{r=!0,n==null||n.unsubscribe(s,a)}},[t.current,n,i]),n==null?void 0:n.observer}function dm(){let t=!1,e=[];const n=new Map;if(typeof window>"u")return;const i=new ResizeObserver((r,s)=>{e=e.concat(r),t||window.requestAnimationFrame(()=>{const a=new Set;for(let o=0;o<e.length;o++){if(a.has(e[o].target))continue;a.add(e[o].target);const c=n.get(e[o].target);c==null||c.forEach(u=>u(e[o],s))}e=[],t=!1}),t=!0});return{observer:i,subscribe(r,s){var a;i.observe(r);const o=(a=n.get(r))!=null?a:[];o.push(s),n.set(r,o)},unsubscribe(r,s){var a;const o=(a=n.get(r))!=null?a:[];if(o.length===1){i.unobserve(r),n.delete(r);return}const c=o.indexOf(s);c!==-1&&o.splice(c,1),n.set(r,o)}}}var fi,hm=()=>fi||(fi=dm()),mc=t=>{const[e,n]=d.useState({width:0,height:0});d.useLayoutEffect(()=>{if(t.current){const{width:r,height:s}=t.current.getBoundingClientRect();n({width:r,height:s})}},[t.current]);const i=d.useCallback(r=>n(r.contentRect),[]);return lm(t,i),e};function he(t,e,n=!0){const[i,r]=d.useState(e);return d.useEffect(()=>{if(n&&r(e),typeof window>"u"||!t)return;const s=t.subscribe(r);return()=>s.unsubscribe()},[t,n]),i}function fm(t){const e=s=>typeof window<"u"?window.matchMedia(s).matches:!1,[n,i]=d.useState(e(t));function r(){i(e(t))}return d.useEffect(()=>{const s=window.matchMedia(t);return r(),s.addListener?s.addListener(r):s.addEventListener("change",r),()=>{s.removeListener?s.removeListener(r):s.removeEventListener("change",r)}},[t]),n}function gc(t,e){if(e.msg==="show_chat")return ne(x({},t),{showChat:!0,unreadMessages:0});if(e.msg==="hide_chat")return ne(x({},t),{showChat:!1});if(e.msg==="toggle_chat"){const n=ne(x({},t),{showChat:!t.showChat});return n.showChat===!0&&(n.unreadMessages=0),n}else return e.msg==="unread_msg"?ne(x({},t),{unreadMessages:e.count}):e.msg==="toggle_settings"?ne(x({},t),{showSettings:!t.showSettings}):x({},t)}function vc(t,e){return e.msg==="set_pin"?[e.trackReference]:e.msg==="clear_pin"?[]:x({},t)}var Wn=d.createContext(void 0);function bc(){const t=d.useContext(Wn);if(!t)throw Error("Tried to access LayoutContext context outside a LayoutContextProvider provider.");return t}function pm(t){const e=Xt();if(t??(t=e),!t)throw Error("Tried to access LayoutContext context outside a LayoutContextProvider provider.");return t}function mm(){const[t,e]=d.useReducer(vc,sc),[n,i]=d.useReducer(gc,ac);return{pin:{dispatch:e,state:t},widget:{dispatch:i,state:n}}}function gm(t){const[e,n]=d.useReducer(vc,sc),[i,r]=d.useReducer(gc,ac);return t??{pin:{dispatch:n,state:e},widget:{dispatch:r,state:i}}}function Xt(){return d.useContext(Wn)}var Cr=d.createContext(void 0);function Gn(){return d.useContext(Cr)}function Pt(t){const e=Gn(),n=t??e;if(!n)throw new Error("No TrackRef, make sure you are inside a TrackRefContext or pass the TrackRef explicitly");return n}var yc=d.createContext(void 0);function kc(){return d.useContext(yc)}function Zt(t){var e;const n=kc(),i=Gn(),r=(e=t??n)!=null?e:i==null?void 0:i.participant;if(!r)throw new Error("No participant provided, make sure you are inside a participant context or pass the participant explicitly");return r}var Tr=d.createContext(void 0);function Kn(){const t=d.useContext(Tr);if(!t)throw Error("tried to access room context outside of livekit room component");return t}function zn(){return d.useContext(Tr)}function en(t){const e=zn(),n=t??e;if(!n)throw new Error("No room provided, make sure you are inside a Room context or pass the room explicitly");return n}var Sc=d.createContext(void 0);function vm(t){const e=d.useContext(Sc);if(t===!0){if(e)return e;throw Error("tried to access feature context, but none is present")}return e}function bm(...t){return(...e)=>{for(const n of t)if(typeof n=="function")try{n(...e)}catch(i){console.error(i)}}}function Le(...t){const e=x({},t[0]);for(let n=1;n<t.length;n++){const i=t[n];for(const r in i){const s=e[r],a=i[r];typeof s=="function"&&typeof a=="function"&&r[0]==="o"&&r[1]==="n"&&r.charCodeAt(2)>=65&&r.charCodeAt(2)<=90?e[r]=bm(s,a):(r==="className"||r==="UNSAFE_className")&&typeof s=="string"&&typeof a=="string"?e[r]=Up(s,a):e[r]=a!==void 0?a:s}}return e}function ym(t={}){const e=Zt(t.participant),{className:n,connectionQualityObserver:i}=d.useMemo(()=>hp(e),[e]),r=he(i,ge.Unknown);return{className:n,quality:r}}function Er(t){const e=en(t),n=d.useMemo(()=>Yf(e),[e]);return he(n,e.state)}function km(t){const e=Kn(),n=Er(e);return{buttonProps:d.useMemo(()=>{const{className:r,disconnect:s}=dp(e);return Le(t,{className:r,onClick:()=>{var o;return s((o=t.stopTracks)!=null?o:!0)},disabled:n===F.Disconnected})},[e,t,n])}}function Sm(t){if(t.publication instanceof zt){const e=t.publication.track;if(e){const{facingMode:n}=dh(e);return n}}return"undefined"}function Cm({trackRef:t,props:e}){const n=Pt(t),i=Xt(),{className:r}=d.useMemo(()=>Pp(),[]),s=d.useMemo(()=>nc(n,i==null?void 0:i.pin.state),[n,i==null?void 0:i.pin.state]);return{mergedProps:d.useMemo(()=>Le(e,{className:r,onClick:o=>{var c,u,l,h,f;(c=e.onClick)==null||c.call(e,o),s?(l=i==null?void 0:(u=i.pin).dispatch)==null||l.call(u,{msg:"clear_pin"}):(f=i==null?void 0:(h=i.pin).dispatch)==null||f.call(h,{msg:"set_pin",trackReference:n})}}),[e,r,n,s,i==null?void 0:i.pin]),inFocus:s}}function Tm(t,e,n={}){var i;const r=(i=n.gridLayouts)!=null?i:xf,{width:s,height:a}=mc(t),o=rc(r,e,s,a);return d.useEffect(()=>{t.current&&o&&(t.current.style.setProperty("--lk-col-count",o==null?void 0:o.columns.toString()),t.current.style.setProperty("--lk-row-count",o==null?void 0:o.rows.toString()))},[t,o]),{layout:o,containerWidth:s,containerHeight:a}}function Ns(t,e={}){var n,i;const r=typeof t=="string"?e.participant:t.participant,s=Zt(r),a=typeof t=="string"?{participant:s,source:t}:t,[o,c]=d.useState(!!((n=a.publication)!=null&&n.isMuted||(i=s.getTrackPublication(a.source))!=null&&i.isMuted));return d.useEffect(()=>{const u=lc(a).subscribe(c);return()=>u.unsubscribe()},[te(a)]),o}function Em(t){const e=Zt(t),n=d.useMemo(()=>ap(e),[e]);return he(n,e.isSpeaking)}var Pm={connect:!0,audio:!1,video:!1};function wm(t){const e=x(x({},Pm),t),{token:n,serverUrl:i,options:r,room:s,connectOptions:a,connect:o,audio:c,video:u,screen:l,onConnected:h,onDisconnected:f,onError:p,onMediaDeviceFailure:g,onEncryptionError:b,simulateParticipants:v}=e,m=Q(e,["token","serverUrl","options","room","connectOptions","connect","audio","video","screen","onConnected","onDisconnected","onError","onMediaDeviceFailure","onEncryptionError","simulateParticipants"]);r&&s&&U.warn("when using a manually created room, the options object will be ignored. set the desired options directly when creating the room instead.");const[E,O]=d.useState();d.useEffect(()=>{O(s??new Rn(r))},[s]);const I=d.useMemo(()=>{const{className:w}=wp();return Le(m,{className:w})},[m]);return d.useEffect(()=>{if(!E)return;const w=()=>{const A=E.localParticipant;U.debug("trying to publish local tracks"),Promise.all([A.setMicrophoneEnabled(!!c,typeof c!="boolean"?c:void 0),A.setCameraEnabled(!!u,typeof u!="boolean"?u:void 0),A.setScreenShareEnabled(!!l,typeof l!="boolean"?l:void 0)]).catch(L=>{U.warn(L),p==null||p(L)})},M=A=>{const L=Wt.getFailure(A);g==null||g(L)},D=A=>{b==null||b(A)};return E.on(S.SignalConnected,w).on(S.MediaDevicesError,M).on(S.EncryptionError,D),()=>{E.off(S.SignalConnected,w).off(S.MediaDevicesError,M).off(S.EncryptionError,D)}},[E,c,u,l,p,b,g]),d.useEffect(()=>{if(E){if(v){E.simulateParticipants({participants:{count:v},publish:{audio:!0,useRealTracks:!0}});return}if(!n){U.debug("no token yet");return}if(!i){U.warn("no livekit url provided"),p==null||p(Error("no livekit url provided"));return}o?(U.debug("connecting"),E.connect(i,n,a).catch(w=>{U.warn(w),p==null||p(w)})):(U.debug("disconnecting because connect is false"),E.disconnect())}},[o,n,JSON.stringify(a),E,p,i,v]),d.useEffect(()=>{if(!E)return;const w=M=>{switch(M){case F.Disconnected:f&&f();break;case F.Connected:h&&h();break}};return E.on(S.ConnectionStateChanged,w),()=>{E.off(S.ConnectionStateChanged,w)}},[n,h,f,E]),d.useEffect(()=>{if(E)return()=>{U.info("disconnecting on onmount"),E.disconnect()}},[E]),{room:E,htmlProps:I}}function _m(){const t=Kn(),e=d.useMemo(()=>op(t.localParticipant),[t]);return he(e,t.localParticipant.permissions)}function Rm({kind:t,room:e,track:n,requestPermissions:i,onError:r}){const s=zn(),a=d.useMemo(()=>Xf(t,r,i),[t,i,r]),o=he(a,[]),[c,u]=d.useState(""),{className:l,activeDeviceObservable:h,setActiveMediaDevice:f}=d.useMemo(()=>lp(t,e??s,n),[t,e,s,n]);return d.useEffect(()=>{const p=h.subscribe(g=>{U.info("setCurrentDeviceId",g),g&&u(g)});return()=>{p==null||p.unsubscribe()}},[h]),{devices:o,className:l,activeDeviceId:c,setActiveMediaDevice:f}}function Cc(t,e,n={}){const i=d.useRef([]),r=d.useRef(-1),s=e!==r.current,a=typeof n.customSortFunction=="function"?n.customSortFunction(t):jf(t);let o=[...a];if(s===!1)try{o=Jf(i.current,a,e)}catch(c){U.error("Error while running updatePages(): ",c)}return s?i.current=a:i.current=o,r.current=e,o}function Im(t,e){const[n,i]=d.useState(1),r=Math.max(Math.ceil(e.length/t),1);n>r&&i(r);const s=n*t,a=s-t,o=h=>{i(f=>h==="next"?f===r?f:f+1:f===1?f:f-1)},c=h=>{h>r?i(r):h<1?i(1):i(h)},l=Cc(e,t).slice(a,s);return{totalPageCount:r,nextPage:()=>o("next"),prevPage:()=>o("previous"),setPage:c,firstItemIndex:a,lastItemIndex:s,tracks:l,currentPage:n}}function Mm({trackRef:t,onParticipantClick:e,disableSpeakingIndicator:n,htmlProps:i}){const r=Pt(t),s=d.useMemo(()=>{const{className:f}=mp();return Le(i,{className:f,onClick:p=>{var g,b;if((g=i.onClick)==null||g.call(i,p),typeof e=="function"){const v=(b=r.publication)!=null?b:r.participant.getTrackPublication(r.source);e({participant:r.participant,track:v})}}})},[i,e,r.publication,r.source,r.participant]),a=r.participant.getTrackPublication(k.Source.Microphone),o=d.useMemo(()=>({participant:r.participant,source:k.Source.Microphone,publication:a}),[a,r.participant]),c=Ns(r),u=Ns(o),l=Em(r.participant),h=Sm(r);return{elementProps:x({"data-lk-audio-muted":u,"data-lk-video-muted":c,"data-lk-speaking":n===!0?!1:l,"data-lk-local-participant":r.participant.isLocal,"data-lk-source":r.source,"data-lk-facing-mode":h},s)}}function xm(t){return t=pm(t),d.useMemo(()=>(t==null?void 0:t.pin.state)!==void 0&&t.pin.state.length>=1?t.pin.state:[],[t.pin.state])}function Om({room:t,props:e}){const n=en(t),{className:i,roomAudioPlaybackAllowedObservable:r,handleStartAudioPlayback:s}=d.useMemo(()=>Cp(),[]),a=d.useMemo(()=>r(n),[n,r]),{canPlayAudio:o}=he(a,{canPlayAudio:n.canPlaybackAudio});return{mergedProps:d.useMemo(()=>Le(e,{className:i,onClick:()=>{s(n)},style:{display:o?"none":"block"}}),[e,i,o,s,n]),canPlayAudio:o}}function Dm({room:t,props:e}){const n=en(t),{className:i,roomVideoPlaybackAllowedObservable:r,handleStartVideoPlayback:s}=d.useMemo(()=>Tp(),[]),a=d.useMemo(()=>r(n),[n,r]),{canPlayVideo:o}=he(a,{canPlayVideo:n.canPlaybackVideo});return{mergedProps:d.useMemo(()=>Le(e,{className:i,onClick:()=>{s(n)},style:{display:o?"none":"block"}}),[e,i,o,s,n]),canPlayVideo:o}}function Am(t,e={}){var n;const i=d.useRef(null),r=d.useRef(null),s=(n=e.minSwipeDistance)!=null?n:50,a=u=>{r.current=null,i.current=u.targetTouches[0].clientX},o=u=>{r.current=u.targetTouches[0].clientX},c=d.useCallback(()=>{if(!i.current||!r.current)return;const u=i.current-r.current,l=u>s,h=u<-s;l&&e.onLeftSwipe&&e.onLeftSwipe(),h&&e.onRightSwipe&&e.onRightSwipe()},[s,e]);d.useEffect(()=>{const u=t.current;return u&&(u.addEventListener("touchstart",a,{passive:!0}),u.addEventListener("touchmove",o,{passive:!0}),u.addEventListener("touchend",c,{passive:!0})),()=>{u&&(u.removeEventListener("touchstart",a),u.removeEventListener("touchmove",o),u.removeEventListener("touchend",c))}},[t,c])}function Nm({props:t}){const{dispatch:e,state:n}=bc().widget,{className:i}=d.useMemo(()=>Ep(),[]);return{mergedProps:d.useMemo(()=>Le(t,{className:i,onClick:()=>{e&&e({msg:"toggle_chat"})},"aria-pressed":n!=null&&n.showChat?"true":"false","data-lk-unread-msgs":n?n.unreadMessages<10?n.unreadMessages.toFixed(0):"9+":"0"}),[t,i,e,n])}}function Lm(t){var e,n;const i=Pt(t),{className:r,mediaMutedObserver:s}=d.useMemo(()=>fp(i),[te(i)]);return{isMuted:he(s,!!((e=i.publication)!=null&&e.isMuted||(n=i.participant.getTrackPublication(i.source))!=null&&n.isMuted)),className:r}}function Um(t){var e=t,{source:n,onChange:i,initialState:r,captureOptions:s,publishOptions:a,onDeviceError:o}=e,c=Q(e,["source","onChange","initialState","captureOptions","publishOptions","onDeviceError"]),u;const l=zn(),h=(u=l==null?void 0:l.localParticipant)==null?void 0:u.getTrackPublication(n),f=d.useRef(!1),{toggle:p,className:g,pendingObserver:b,enabledObserver:v}=d.useMemo(()=>l?cp(n,l,s,a,o):up(),[l,n,JSON.stringify(s),a]),m=he(b,!1),E=he(v,r??!!(h!=null&&h.isEnabled));d.useEffect(()=>{i==null||i(E,f.current),f.current=!1},[E,i]),d.useEffect(()=>{r!==void 0&&(U.debug("forcing initial toggle state",n,r),p(r))},[]);const O=d.useMemo(()=>Le(c,{className:g}),[c,g]),I=d.useCallback(w=>{var M;f.current=!0,p().finally(()=>f.current=!1),(M=c.onClick)==null||M.call(c,w)},[c,p]);return{toggle:p,enabled:E,pending:m,track:h,buttonProps:ne(x({},O),{"aria-pressed":E,"data-lk-source":n,"data-lk-enabled":E,disabled:m,onClick:I})}}function Tc(t=[k.Source.Camera,k.Source.Microphone,k.Source.ScreenShare,k.Source.ScreenShareAudio,k.Source.Unknown],e={}){const n=en(e.room),[i,r]=d.useState([]),[s,a]=d.useState([]),o=d.useMemo(()=>t.map(u=>oc(u)?u.source:u),[JSON.stringify(t)]);return d.useEffect(()=>{const u=_p(n,o,{additionalRoomEvents:e.updateOnlyOn,onlySubscribed:e.onlySubscribed}).subscribe(({trackReferences:l,participants:h})=>{U.debug("setting track bundles",l,h),r(l),a(h)});return()=>u.unsubscribe()},[n,JSON.stringify(e.onlySubscribed),JSON.stringify(e.updateOnlyOn),JSON.stringify(t)]),d.useMemo(()=>{if(cc(t)){const u=jm(t,s),l=Array.from(i);return s.forEach(h=>{var f;u.has(h.identity)&&((f=u.get(h.identity))!=null?f:[]).forEach(g=>{if(i.find(({participant:v,publication:m})=>h.identity===v.identity&&m.source===g))return;U.debug(`Add ${g} placeholder for participant ${h.identity}.`);const b={participant:h,source:g};l.push(b)})}),l}else return i},[i,s,t])}function Fm(t,e){const n=new Set(t);for(const i of e)n.delete(i);return n}function jm(t,e){const n=new Map;if(cc(t)){const i=t.filter(r=>r.withPlaceholder).map(r=>r.source);e.forEach(r=>{const s=r.getTrackPublications().map(o=>{var c;return(c=o.track)==null?void 0:c.source}).filter(o=>o!==void 0),a=Array.from(Fm(new Set(i),new Set(s)));a.length>0&&n.set(r.identity,a)})}return n}function Vm(t){const e=Kn(),n=Er(e),i=d.useMemo(()=>n===F.Disconnected,[n]),r=d.useMemo(()=>Sp(e,t),[e,t,i]),s=he(r.isSendingObservable,!1),a=he(r.messageObservable,[]);return{send:r.send,update:r.update,chatMessages:a,isSending:s}}function Bm(t={}){var e;const[n,i]=d.useState(Lp(t.defaults,(e=t.preventLoad)!=null?e:!1)),r=d.useCallback(u=>{i(l=>ne(x({},l),{audioEnabled:u}))},[]),s=d.useCallback(u=>{i(l=>ne(x({},l),{videoEnabled:u}))},[]),a=d.useCallback(u=>{i(l=>ne(x({},l),{audioDeviceId:u}))},[]),o=d.useCallback(u=>{i(l=>ne(x({},l),{videoDeviceId:u}))},[]),c=d.useCallback(u=>{i(l=>ne(x({},l),{username:u}))},[]);return d.useEffect(()=>{var u;Np(n,(u=t.preventSave)!=null?u:!1)},[n,t.preventSave]),{userChoices:n,saveAudioInputEnabled:r,saveVideoInputEnabled:s,saveAudioInputDeviceId:a,saveVideoInputDeviceId:o,saveUsername:c}}function qm(t,e={}){const n=Zt(t),i=en(e.room),r=d.useMemo(()=>ip(i,n),[i,n]);return he(r,n instanceof Ht?n.isE2EEEnabled:n.isEncrypted)}var Ec=d.forwardRef(function(e,n){const{mergedProps:i}=Nm({props:e});return d.createElement("button",x({ref:n},i),e.children)}),Wm=d.forwardRef(function(e,n){const{buttonProps:i}=km(e);return d.createElement("button",x({ref:n},i),e.children)}),Gm=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),d.createElement("path",{d:"M1.354.646a.5.5 0 1 0-.708.708l14 14a.5.5 0 0 0 .708-.708L11 10.293V4.5A1.5 1.5 0 0 0 9.5 3H3.707zM0 4.5a1.5 1.5 0 0 1 .943-1.393l9.532 9.533c-.262.224-.603.36-.975.36h-8A1.5 1.5 0 0 1 0 11.5z"}),d.createElement("path",{d:"m15.2 3.6-2.8 2.1a1 1 0 0 0-.4.8v3a1 1 0 0 0 .4.8l2.8 2.1a.5.5 0 0 0 .8-.4V4a.5.5 0 0 0-.8-.4z"})),Km=Gm,zm=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),d.createElement("path",{d:"M0 4.5A1.5 1.5 0 0 1 1.5 3h8A1.5 1.5 0 0 1 11 4.5v7A1.5 1.5 0 0 1 9.5 13h-8A1.5 1.5 0 0 1 0 11.5zM15.2 3.6l-2.8 2.1a1 1 0 0 0-.4.8v3a1 1 0 0 0 .4.8l2.8 2.1a.5.5 0 0 0 .8-.4V4a.5.5 0 0 0-.8-.4z"})),Hm=zm,Jm=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24"},t),d.createElement("path",{fill:"#FFF",d:"M4.99 3.99a1 1 0 0 0-.697 1.717L10.586 12l-6.293 6.293a1 1 0 1 0 1.414 1.414L12 13.414l6.293 6.293a1 1 0 1 0 1.414-1.414L13.414 12l6.293-6.293a1 1 0 0 0-.727-1.717 1 1 0 0 0-.687.303L12 10.586 5.707 4.293a1 1 0 0 0-.717-.303z"})),$m=Jm,Qm=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:18,fill:"none"},t),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M0 2.75A2.75 2.75 0 0 1 2.75 0h10.5A2.75 2.75 0 0 1 16 2.75v13.594a.75.75 0 0 1-1.234.572l-3.691-3.12a1.25 1.25 0 0 0-.807-.296H2.75A2.75 2.75 0 0 1 0 10.75v-8ZM2.75 1.5c-.69 0-1.25.56-1.25 1.25v8c0 .69.56 1.25 1.25 1.25h7.518c.65 0 1.279.23 1.775.65l2.457 2.077V2.75c0-.69-.56-1.25-1.25-1.25H2.75Z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 4.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Z",clipRule:"evenodd"})),Ym=Qm,Xm=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},t),d.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M5.293 2.293a1 1 0 0 1 1.414 0l4.823 4.823a1.25 1.25 0 0 1 0 1.768l-4.823 4.823a1 1 0 0 1-1.414-1.414L9.586 8 5.293 3.707a1 1 0 0 1 0-1.414z",clipRule:"evenodd"})),Ls=Xm,Zm=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},t),d.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},d.createElement("path",{d:"M10 1.75h4.25m0 0V6m0-4.25L9 7M6 14.25H1.75m0 0V10m0 4.25L7 9"}))),eg=Zm,tg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},t),d.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M8.961.894C8.875-.298 7.125-.298 7.04.894c-.066.912-1.246 1.228-1.76.472-.67-.99-2.186-.115-1.664.96.399.824-.465 1.688-1.288 1.289-1.076-.522-1.95.994-.961 1.665.756.513.44 1.693-.472 1.759-1.192.086-1.192 1.836 0 1.922.912.066 1.228 1.246.472 1.76-.99.67-.115 2.186.96 1.664.824-.399 1.688.465 1.289 1.288-.522 1.076.994 1.95 1.665.961.513-.756 1.693-.44 1.759.472.086 1.192 1.836 1.192 1.922 0 .066-.912 1.246-1.228 1.76-.472.67.99 2.186.115 1.664-.96-.399-.824.465-1.688 1.288-1.289 1.076.522 1.95-.994.961-1.665-.756-.513-.44-1.693.472-1.759 1.192-.086 1.192-1.836 0-1.922-.912-.066-1.228-1.246-.472-1.76.99-.67.115-2.186-.96-1.664-.824.399-1.688-.465-1.289-1.288.522-1.076-.994-1.95-1.665-.961-.513.756-1.693.44-1.759-.472ZM8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10Z",clipRule:"evenodd"})),ng=tg,ig=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},t),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 2.75A2.75 2.75 0 0 1 4.75 0h6.5A2.75 2.75 0 0 1 14 2.75v10.5A2.75 2.75 0 0 1 11.25 16h-6.5A2.75 2.75 0 0 1 2 13.25v-.5a.75.75 0 0 1 1.5 0v.5c0 .69.56 1.25 1.25 1.25h6.5c.69 0 1.25-.56 1.25-1.25V2.75c0-.69-.56-1.25-1.25-1.25h-6.5c-.69 0-1.25.56-1.25 1.25v.5a.75.75 0 0 1-1.5 0v-.5Z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.78 7.47a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H1.75a.75.75 0 0 1 0-1.5h4.69l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25Z",clipRule:"evenodd"})),rg=ig,sg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},t),d.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M4 6.104V4a4 4 0 1 1 8 0v2.104c1.154.326 2 1.387 2 2.646v4.5A2.75 2.75 0 0 1 11.25 16h-6.5A2.75 2.75 0 0 1 2 13.25v-4.5c0-1.259.846-2.32 2-2.646ZM5.5 4a2.5 2.5 0 0 1 5 0v2h-5V4Z",clipRule:"evenodd"})),ag=sg,og=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),d.createElement("path",{d:"M12.227 11.52a5.477 5.477 0 0 0 1.246-2.97.5.5 0 0 0-.995-.1 4.478 4.478 0 0 1-.962 2.359l-1.07-1.07C10.794 9.247 11 8.647 11 8V3a3 3 0 0 0-6 0v1.293L1.354.646a.5.5 0 1 0-.708.708l14 14a.5.5 0 0 0 .708-.708zM8 12.5c.683 0 1.33-.152 1.911-.425l.743.743c-.649.359-1.378.59-2.154.66V15h2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1h2v-1.522a5.502 5.502 0 0 1-4.973-4.929.5.5 0 0 1 .995-.098A4.5 4.5 0 0 0 8 12.5z"}),d.createElement("path",{d:"M8.743 10.907 5 7.164V8a3 3 0 0 0 3.743 2.907z"})),cg=og,ug=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),d.createElement("path",{fillRule:"evenodd",d:"M2.975 8.002a.5.5 0 0 1 .547.449 4.5 4.5 0 0 0 8.956 0 .5.5 0 1 1 .995.098A5.502 5.502 0 0 1 8.5 13.478V15h2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1h2v-1.522a5.502 5.502 0 0 1-4.973-4.929.5.5 0 0 1 .448-.547z",clipRule:"evenodd"}),d.createElement("path",{d:"M5 3a3 3 0 1 1 6 0v5a3 3 0 0 1-6 0z"})),lg=ug,dg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentcolor"},t),d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"})),hg=dg,fg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentcolor"},t),d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("g",{opacity:.25},d.createElement("path",{d:"M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("path",{d:"M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}))),pg=fg,mg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentcolor"},t),d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("g",{opacity:.25},d.createElement("path",{d:"M6 6.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("path",{d:"M6 6.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}),d.createElement("path",{d:"M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z"}))),gg=mg,vg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),d.createElement("g",{opacity:.25},d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-4Zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-9Zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V.5Z"}),d.createElement("path",{d:"M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-4Zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-9Zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V.5Z"}))),bg=vg,yg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:20,height:16,fill:"none"},t),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M0 2.75A2.75 2.75 0 0 1 2.75 0h14.5A2.75 2.75 0 0 1 20 2.75v10.5A2.75 2.75 0 0 1 17.25 16H2.75A2.75 2.75 0 0 1 0 13.25V2.75ZM2.75 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h14.5c.69 0 1.25-.56 1.25-1.25V2.75c0-.69-.56-1.25-1.25-1.25H2.75Z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.47 4.22a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1-1.06 1.06l-.97-.97v4.69a.75.75 0 0 1-1.5 0V6.56l-.97.97a.75.75 0 0 1-1.06-1.06l2.25-2.25Z",clipRule:"evenodd"})),Pc=yg,kg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:20,height:16,fill:"none"},t),d.createElement("g",{fill:"currentColor"},d.createElement("path",{d:"M7.28 4.22a.75.75 0 0 0-1.06 1.06L8.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L10 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L11.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L10 6.94z"}),d.createElement("path",{fillRule:"evenodd",d:"M2.75 0A2.75 2.75 0 0 0 0 2.75v10.5A2.75 2.75 0 0 0 2.75 16h14.5A2.75 2.75 0 0 0 20 13.25V2.75A2.75 2.75 0 0 0 17.25 0zM1.5 2.75c0-.69.56-1.25 1.25-1.25h14.5c.69 0 1.25.56 1.25 1.25v10.5c0 .69-.56 1.25-1.25 1.25H2.75c-.69 0-1.25-.56-1.25-1.25z",clipRule:"evenodd"}))),Sg=kg,Cg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},t),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0V.75A.75.75 0 0 1 8 0Z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 12a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5A.75.75 0 0 1 8 12Z",clipRule:"evenodd",opacity:.7}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 1.072a.75.75 0 0 1 .274 1.024l-1.25 2.165a.75.75 0 0 1-1.299-.75l1.25-2.165A.75.75 0 0 1 12 1.072Z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 11.464a.75.75 0 0 1 .274 1.025l-1.25 2.165a.75.75 0 0 1-1.299-.75l1.25-2.165A.75.75 0 0 1 6 11.464Z",clipRule:"evenodd",opacity:.6}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.928 4a.75.75 0 0 1-.274 1.025l-2.165 1.25a.75.75 0 1 1-.75-1.3l2.165-1.25A.75.75 0 0 1 14.928 4Z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.536 10a.75.75 0 0 1-.275 1.024l-2.165 1.25a.75.75 0 0 1-.75-1.298l2.165-1.25A.75.75 0 0 1 4.536 10Z",clipRule:"evenodd",opacity:.5}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 8a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h2.5A.75.75 0 0 1 16 8Z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 8a.75.75 0 0 1-.75.75H.75a.75.75 0 0 1 0-1.5h2.5A.75.75 0 0 1 4 8Z",clipRule:"evenodd",opacity:.4}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.928 12a.75.75 0 0 1-1.024.274l-2.165-1.25a.75.75 0 0 1 .75-1.299l2.165 1.25A.75.75 0 0 1 14.928 12Z",clipRule:"evenodd",opacity:.9}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.536 6a.75.75 0 0 1-1.025.275l-2.165-1.25a.75.75 0 1 1 .75-1.3l2.165 1.25A.75.75 0 0 1 4.536 6Z",clipRule:"evenodd",opacity:.3}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 14.928a.75.75 0 0 1-1.024-.274l-1.25-2.165a.75.75 0 0 1 1.298-.75l1.25 2.165A.75.75 0 0 1 12 14.928Z",clipRule:"evenodd",opacity:.8}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 4.536a.75.75 0 0 1-1.024-.275l-1.25-2.165a.75.75 0 1 1 1.299-.75l1.25 2.165A.75.75 0 0 1 6 4.536Z",clipRule:"evenodd",opacity:.2})),Us=Cg,Tg=t=>d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},t),d.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},d.createElement("path",{d:"M13.25 7H9m0 0V2.75M9 7l5.25-5.25M2.75 9H7m0 0v4.25M7 9l-5.25 5.25"}))),Eg=Tg,Pg=d.forwardRef(function(e,n){var i=e,{trackRef:r}=i,s=Q(i,["trackRef"]);const a=Gn(),{mergedProps:o,inFocus:c}=Cm({trackRef:r??a,props:s});return d.createElement(Wn.Consumer,null,u=>u!==void 0&&d.createElement("button",x({ref:n},o),s.children?s.children:c?d.createElement(Eg,null):d.createElement(eg,null)))});function wg(t){return t!==void 0}function ze(...t){return Le(...t.filter(wg))}function wc(t,e,n){return d.Children.map(t,i=>d.isValidElement(i)&&d.Children.only(t)?d.cloneElement(i,ne(x({},e),{key:n})):i)}function _g(t){var e,n;if(typeof window<"u"&&typeof process<"u"&&(((e=process==null?void 0:process.env)==null?void 0:e.NODE_ENV)==="dev"||((n=process==null?void 0:process.env)==null?void 0:n.NODE_ENV)==="development")){const i=t??document.querySelector(".lk-room-container");i&&!getComputedStyle(i).getPropertyValue("--lk-has-imported-styles")&&U.warn("It looks like you're not using the `@livekit/components-styles package`. To render the UI with the default styling, please import it in your layout or page.")}}var pi=d.forwardRef(function(e,n){var i=e,{kind:r,initialSelection:s,onActiveDeviceChange:a,onDeviceListChange:o,onDeviceSelectError:c,exactMatch:u,track:l,requestPermissions:h,onError:f}=i,p=Q(i,["kind","initialSelection","onActiveDeviceChange","onDeviceListChange","onDeviceSelectError","exactMatch","track","requestPermissions","onError"]);const g=zn(),b=d.useCallback(D=>{g&&g.emit(S.MediaDevicesError,D),f==null||f(D)},[g,f]),{devices:v,activeDeviceId:m,setActiveMediaDevice:E,className:O}=Rm({kind:r,room:g,track:l,requestPermissions:h,onError:b});d.useEffect(()=>{s!==void 0&&E(s)},[E]),d.useEffect(()=>{typeof o=="function"&&o(v)},[o,v]),d.useEffect(()=>{m&&m!==""&&(a==null||a(m))},[m]);const I=D=>pc(this,null,function*(){try{yield E(D,{exact:u})}catch(A){if(A instanceof Error)c==null||c(A);else throw A}}),w=d.useMemo(()=>ze(p,{className:O},{className:"lk-list"}),[O,p]);function M(D,A,L){return D===A||L===0&&A==="default"}return d.createElement("ul",x({ref:n},w),v.map((D,A)=>d.createElement("li",{key:D.deviceId,id:D.deviceId,"data-lk-active":M(D.deviceId,m,A),"aria-selected":M(D.deviceId,m,A),role:"option"},d.createElement("button",{className:"lk-button",onClick:()=>I(D.deviceId)},D.label))))});function _c(t,e){switch(t){case k.Source.Microphone:return e?d.createElement(lg,null):d.createElement(cg,null);case k.Source.Camera:return e?d.createElement(Hm,null):d.createElement(Km,null);case k.Source.ScreenShare:return e?d.createElement(Sg,null):d.createElement(Pc,null);default:return}}function Rg(t){switch(t){case ge.Excellent:return d.createElement(hg,null);case ge.Good:return d.createElement(pg,null);case ge.Poor:return d.createElement(gg,null);default:return d.createElement(bg,null)}}var mi=d.forwardRef(function(e,n){var i=e,{showIcon:r}=i,s=Q(i,["showIcon"]);const{buttonProps:a,enabled:o}=Um(s);return d.createElement("button",x({ref:n},a),(r??!0)&&_c(s.source,o),s.children)}),Ig=d.forwardRef(function(e,n){var i;const{className:r,quality:s}=ym(e),a=d.useMemo(()=>ne(x({},ze(e,{className:r})),{"data-lk-quality":s}),[s,e,r]);return d.createElement("div",x({ref:n},a),(i=e.children)!=null?i:Rg(s))}),Fs=d.forwardRef(function(e,n){var i=e,{participant:r}=i,s=Q(i,["participant"]);const a=Zt(r),{className:o,infoObserver:c}=d.useMemo(()=>pp(a),[a]),{identity:u,name:l}=he(c,{name:a.name,identity:a.identity,metadata:a.metadata}),h=d.useMemo(()=>ze(s,{className:o,"data-lk-participant-name":l}),[s,o,l]);return d.createElement("span",x({ref:n},h),l!==""?l:u,s.children)}),Mg=d.forwardRef(function(e,n){var i=e,{trackRef:r,show:s="always"}=i,a=Q(i,["trackRef","show"]),o;const{className:c,isMuted:u}=Lm(r),l=s==="always"||s==="muted"&&u||s==="unmuted"&&!u,h=d.useMemo(()=>ze(a,{className:c}),[c,a]);return l?d.createElement("div",ne(x({ref:n},h),{"data-lk-muted":u}),(o=a.children)!=null?o:_c(r.source,!u)):null}),xg=t=>d.createElement("svg",x({width:320,height:320,viewBox:"0 0 320 320",preserveAspectRatio:"xMidYMid meet",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),d.createElement("path",{d:"M160 180C204.182 180 240 144.183 240 100C240 55.8172 204.182 20 160 20C115.817 20 79.9997 55.8172 79.9997 100C79.9997 144.183 115.817 180 160 180Z",fill:"white",fillOpacity:.25}),d.createElement("path",{d:"M97.6542 194.614C103.267 191.818 109.841 192.481 115.519 195.141C129.025 201.466 144.1 205 159.999 205C175.899 205 190.973 201.466 204.48 195.141C210.158 192.481 216.732 191.818 222.345 194.614C262.703 214.719 291.985 253.736 298.591 300.062C300.15 310.997 291.045 320 280 320H39.9997C28.954 320 19.8495 310.997 21.4087 300.062C28.014 253.736 57.2966 214.72 97.6542 194.614Z",fill:"white",fillOpacity:.25})),Og=xg;function Rc(t,e={}){var n;const[i,r]=d.useState(zi(t)),[s,a]=d.useState(i==null?void 0:i.isMuted),[o,c]=d.useState(i==null?void 0:i.isSubscribed),[u,l]=d.useState(i==null?void 0:i.track),[h,f]=d.useState("landscape"),p=d.useRef(),{className:g,trackObserver:b}=d.useMemo(()=>Qf(t),[(n=t.participant.sid)!=null?n:t.participant.identity,t.source,X(t)&&t.publication.trackSid]);return d.useEffect(()=>{const v=b.subscribe(m=>{U.debug("update track",m),r(m),a(m==null?void 0:m.isMuted),c(m==null?void 0:m.isSubscribed),l(m==null?void 0:m.track)});return()=>v==null?void 0:v.unsubscribe()},[b]),d.useEffect(()=>{var v,m;return u&&(p.current&&u.detach(p.current),(v=e.element)!=null&&v.current&&!(ic(t.participant)&&(u==null?void 0:u.kind)==="audio")&&u.attach(e.element.current)),p.current=(m=e.element)==null?void 0:m.current,()=>{p.current&&(u==null||u.detach(p.current))}},[u,e.element]),d.useEffect(()=>{var v,m;if(typeof((v=i==null?void 0:i.dimensions)==null?void 0:v.width)=="number"&&typeof((m=i==null?void 0:i.dimensions)==null?void 0:m.height)=="number"){const E=i.dimensions.width>i.dimensions.height?"landscape":"portrait";f(E)}},[i]),{publication:i,isMuted:s,isSubscribed:o,track:u,elementProps:ze(e.props,x({className:g,"data-lk-local-participant":t.participant.isLocal,"data-lk-source":i==null?void 0:i.source},(i==null?void 0:i.kind)==="video"&&{"data-lk-orientation":h}))}}var Dg=d.forwardRef(function(e,n){var i=e,{onTrackClick:r,onClick:s,onSubscriptionStatusChanged:a,trackRef:o,manageSubscription:c}=i,u=Q(i,["onTrackClick","onClick","onSubscriptionStatusChanged","trackRef","manageSubscription"]);const l=Pt(o),h=d.useRef(null);d.useImperativeHandle(n,()=>h.current);const f=sm({root:h.current}),[p]=rm(f,3e3);d.useEffect(()=>{c&&l.publication instanceof Jt&&(p==null?void 0:p.isIntersecting)===!1&&(f==null?void 0:f.isIntersecting)===!1&&l.publication.setSubscribed(!1)},[p,l,c]),d.useEffect(()=>{c&&l.publication instanceof Jt&&(f==null?void 0:f.isIntersecting)===!0&&l.publication.setSubscribed(!0)},[f,l,c]);const{elementProps:g,publication:b,isSubscribed:v}=Rc(l,{element:h,props:u});d.useEffect(()=>{a==null||a(!!v)},[v,a]);const m=E=>{s==null||s(E),r==null||r({participant:l==null?void 0:l.participant,track:b})};return d.createElement("video",ne(x({ref:h},g),{muted:!0,onClick:m}))}),Ic=d.forwardRef(function(e,n){var i=e,{trackRef:r,onSubscriptionStatusChanged:s,volume:a,muted:o}=i,c=Q(i,["trackRef","onSubscriptionStatusChanged","volume","muted"]);const u=Pt(r),l=d.useRef(null);d.useImperativeHandle(n,()=>l.current);const{elementProps:h,isSubscribed:f,track:p,publication:g}=Rc(u,{element:l,props:c});return d.useEffect(()=>{s==null||s(!!f)},[f,s]),d.useEffect(()=>{p===void 0||a===void 0||(p instanceof St?p.setVolume(a):U.warn("Volume can only be set on remote audio tracks."))},[a,p]),d.useEffect(()=>{g===void 0||o===void 0||(g instanceof Jt?g.setEnabled(!o):U.warn("Can only call setEnabled on remote track publications."))},[o,g,p]),d.createElement("audio",x({ref:l},h))});function Ag(t){const e=!!kc();return t.participant&&!e?d.createElement(yc.Provider,{value:t.participant},t.children):d.createElement(d.Fragment,null,t.children)}function Ng(t){const e=!!Gn();return t.trackRef&&!e?d.createElement(Cr.Provider,{value:t.trackRef},t.children):d.createElement(d.Fragment,null,t.children)}var $i=d.forwardRef(function(e,n){var i=e,{trackRef:r,children:s,onParticipantClick:a,disableSpeakingIndicator:o}=i,c=Q(i,["trackRef","children","onParticipantClick","disableSpeakingIndicator"]),u,l;const h=Pt(r),{elementProps:f}=Mm({htmlProps:c,disableSpeakingIndicator:o,onParticipantClick:a,trackRef:h}),p=qm(h.participant),g=Xt(),b=(u=vm())==null?void 0:u.autoSubscription,v=d.useCallback(m=>{h.source&&!m&&g&&g.pin.dispatch&&nc(h,g.pin.state)&&g.pin.dispatch({msg:"clear_pin"})},[h,g]);return d.createElement("div",x({ref:n,style:{position:"relative"}},f),d.createElement(Ng,{trackRef:h},d.createElement(Ag,{participant:h.participant},s??d.createElement(d.Fragment,null,X(h)&&(((l=h.publication)==null?void 0:l.kind)==="video"||h.source===k.Source.Camera||h.source===k.Source.ScreenShare)?d.createElement(Dg,{trackRef:h,onSubscriptionStatusChanged:v,manageSubscription:b}):X(h)&&d.createElement(Ic,{trackRef:h,onSubscriptionStatusChanged:v}),d.createElement("div",{className:"lk-participant-placeholder"},d.createElement(Og,null)),d.createElement("div",{className:"lk-participant-metadata"},d.createElement("div",{className:"lk-participant-metadata-item"},h.source===k.Source.Camera?d.createElement(d.Fragment,null,p&&d.createElement(ag,{style:{marginRight:"0.25rem"}}),d.createElement(Mg,{trackRef:{participant:h.participant,source:k.Source.Microphone},show:"muted"}),d.createElement(Fs,null)):d.createElement(d.Fragment,null,d.createElement(Pc,{style:{marginRight:"0.25rem"}}),d.createElement(Fs,null,"'s screen"))),d.createElement(Ig,{className:"lk-participant-metadata-item"}))),d.createElement(Pg,{trackRef:h}))))});function Lg(t){const e=ze(t,{className:"lk-focus-layout"});return d.createElement("div",x({},e),t.children)}function Ug(t){var e=t,{trackRef:n}=e,i=Q(e,["trackRef"]);return d.createElement($i,x({trackRef:n},i))}function Mc(t){var e=t,{tracks:n}=e,i=Q(e,["tracks"]);return d.createElement(d.Fragment,null,n.map(r=>d.createElement(Cr.Provider,{value:r,key:te(r)},wc(i.children))))}function Fg({totalPageCount:t,nextPage:e,prevPage:n,currentPage:i,pagesContainer:r}){const[s,a]=d.useState(!1);return d.useEffect(()=>{let o;return r&&(o=Rp(r.current,2e3).subscribe(a)),()=>{o&&o.unsubscribe()}},[r]),d.createElement("div",{className:"lk-pagination-control","data-lk-user-interaction":s},d.createElement("button",{className:"lk-button",onClick:n},d.createElement(Ls,null)),d.createElement("span",{className:"lk-pagination-count"},`${i} of ${t}`),d.createElement("button",{className:"lk-button",onClick:e},d.createElement(Ls,null)))}var jg=d.forwardRef(function({totalPageCount:e,currentPage:n},i){const r=new Array(e).fill("").map((s,a)=>a+1===n?d.createElement("span",{"data-lk-active":!0,key:a}):d.createElement("span",{key:a}));return d.createElement("div",{ref:i,className:"lk-pagination-indicator"},r)});function Vg(t){var e=t,{tracks:n}=e,i=Q(e,["tracks"]);const r=d.createRef(),s=d.useMemo(()=>ze(i,{className:"lk-grid-layout"}),[i]),{layout:a}=Tm(r,n.length),o=Im(a.maxTiles,n);return Am(r,{onLeftSwipe:o.nextPage,onRightSwipe:o.prevPage}),d.createElement("div",x({ref:r,"data-lk-pagination":o.totalPageCount>1},s),d.createElement(Mc,{tracks:o.tracks},i.children),n.length>a.maxTiles&&d.createElement(d.Fragment,null,d.createElement(jg,{totalPageCount:o.totalPageCount,currentPage:o.currentPage}),d.createElement(Fg,x({pagesContainer:r},o))))}var Bg=130,qg=140,js=1,xc=16/10,Wg=(1-xc)*-1;function Gg(t){var e=t,{tracks:n,orientation:i}=e,r=Q(e,["tracks","orientation"]);const s=d.useRef(null),[a,o]=d.useState(0),{width:c,height:u}=mc(s),l=i||(u>=c?"vertical":"horizontal"),h=l==="vertical"?Math.max(c*Wg,Bg):Math.max(u*xc,qg),f=Ef(),p=Math.max(l==="vertical"?(u-f)/h:(c-f)/h,js);let g=Math.round(p);Math.abs(p-a)<.5?g=Math.round(a):a!==p&&o(p);const b=Cc(n,g);return d.useLayoutEffect(()=>{s.current&&(s.current.dataset.lkOrientation=l,s.current.style.setProperty("--lk-max-visible-tiles",g.toString()))},[g,l]),d.createElement("aside",x({key:l,className:"lk-carousel",ref:s},r),d.createElement(Mc,{tracks:b},r.children))}function Kg({value:t,onPinChange:e,onWidgetChange:n,children:i}){const r=gm(t);return d.useEffect(()=>{U.debug("PinState Updated",{state:r.pin.state}),e&&r.pin.state&&e(r.pin.state)},[r.pin.state,e]),d.useEffect(()=>{U.debug("Widget Updated",{widgetState:r.widget.state}),n&&r.widget.state&&n(r.widget.state)},[n,r.widget.state]),d.createElement(Wn.Provider,{value:r},i)}var zg=d.forwardRef(function(e,n){const{room:i,htmlProps:r}=wm(e);return d.createElement("div",x({ref:n},r),i&&d.createElement(Tr.Provider,{value:i},d.createElement(Sc.Provider,{value:e.featureFlags},e.children)))});function Hg({volume:t,muted:e}){const n=Tc([k.Source.Microphone,k.Source.ScreenShareAudio,k.Source.Unknown],{updateOnlyOn:[],onlySubscribed:!0}).filter(i=>!ic(i.participant)&&i.publication.kind===k.Kind.Audio);return d.createElement("div",{style:{display:"none"}},n.map(i=>d.createElement(Ic,{key:te(i),trackRef:i,volume:t,muted:e})))}function Jg(t){const e=d.useMemo(()=>ze(t,{className:"lk-toast"}),[t]);return d.createElement("div",x({},e),t.children)}function $g(t){const[e,n]=d.useState(void 0),i=Er(t.room);return d.useEffect(()=>{switch(i){case F.Reconnecting:n(d.createElement(d.Fragment,null,d.createElement(Us,{className:"lk-spinner"})," Reconnecting"));break;case F.Connecting:n(d.createElement(d.Fragment,null,d.createElement(Us,{className:"lk-spinner"})," Connecting"));break;case F.Disconnected:n(d.createElement(d.Fragment,null,"Disconnected"));break;default:n(void 0);break}},[i]),e?d.createElement(Jg,{className:"lk-toast-connection-state"},e):d.createElement(d.Fragment,null)}var Qg=d.forwardRef(function(e,n){var i=e,{entry:r,hideName:s=!1,hideTimestamp:a=!1,messageFormatter:o}=i,c=Q(i,["entry","hideName","hideTimestamp","messageFormatter"]),u,l,h,f;const p=d.useMemo(()=>o?o(r.message):r.message,[r.message,o]),g=!!r.editTimestamp,b=new Date(r.timestamp),v=navigator?navigator.language:"en-US";return d.createElement("li",x({ref:n,className:"lk-chat-entry",title:b.toLocaleTimeString(v,{timeStyle:"full"}),"data-lk-message-origin":(u=r.from)!=null&&u.isLocal?"local":"remote"},c),(!a||!s||g)&&d.createElement("span",{className:"lk-meta-data"},!s&&d.createElement("strong",{className:"lk-participant-name"},(f=(l=r.from)==null?void 0:l.name)!=null?f:(h=r.from)==null?void 0:h.identity),(!a||g)&&d.createElement("span",{className:"lk-timestamp"},g&&"edited ",b.toLocaleTimeString(v,{timeStyle:"short"}))),d.createElement("span",{className:"lk-message-body"},p))});function Yg(t){var e=t,{messageFormatter:n,messageDecoder:i,messageEncoder:r,channelTopic:s}=e,a=Q(e,["messageFormatter","messageDecoder","messageEncoder","channelTopic"]);const o=d.useRef(null),c=d.useRef(null),u=d.useMemo(()=>({messageDecoder:i,messageEncoder:r,channelTopic:s}),[i,r,s]),{send:l,chatMessages:h,isSending:f}=Vm(u),p=Xt(),g=d.useRef(0);function b(v){return pc(this,null,function*(){v.preventDefault(),o.current&&o.current.value.trim()!==""&&l&&(yield l(o.current.value),o.current.value="",o.current.focus())})}return d.useEffect(()=>{var v;c&&((v=c.current)==null||v.scrollTo({top:c.current.scrollHeight}))},[c,h]),d.useEffect(()=>{var v,m,E,O,I;if(!p||h.length===0)return;if((v=p.widget.state)!=null&&v.showChat&&h.length>0&&g.current!==((m=h[h.length-1])==null?void 0:m.timestamp)){g.current=(E=h[h.length-1])==null?void 0:E.timestamp;return}const w=h.filter(D=>!g.current||D.timestamp>g.current).length,{widget:M}=p;w>0&&((O=M.state)==null?void 0:O.unreadMessages)!==w&&((I=M.dispatch)==null||I.call(M,{msg:"unread_msg",count:w}))},[h,p==null?void 0:p.widget]),d.createElement("div",ne(x({},a),{className:"lk-chat"}),d.createElement("div",{className:"lk-chat-header"},"Messages",d.createElement(Ec,{className:"lk-close-button"},d.createElement($m,null))),d.createElement("ul",{className:"lk-list lk-chat-messages",ref:c},a.children?h.map((v,m)=>{var E;return wc(a.children,{entry:v,key:(E=v.id)!=null?E:m,messageFormatter:n})}):h.map((v,m,E)=>{var O;const I=m>=1&&E[m-1].from===v.from,w=m>=1&&v.timestamp-E[m-1].timestamp<6e4;return d.createElement(Qg,{key:(O=v.id)!=null?O:m,hideName:I,hideTimestamp:I===!1?!1:w,entry:v,messageFormatter:n})})),d.createElement("form",{className:"lk-chat-form",onSubmit:b},d.createElement("input",{className:"lk-form-control lk-chat-form-input",disabled:f,ref:o,type:"text",placeholder:"Enter a message...",onInput:v=>v.stopPropagation(),onKeyDown:v=>v.stopPropagation(),onKeyUp:v=>v.stopPropagation()}),d.createElement("button",{type:"submit",className:"lk-button lk-chat-form-button",disabled:f},"Send")))}function Vs(t){var e=t,{kind:n,initialSelection:i,onActiveDeviceChange:r,tracks:s,requestPermissions:a=!1}=e,o=Q(e,["kind","initialSelection","onActiveDeviceChange","tracks","requestPermissions"]);const[c,u]=d.useState(!1),[l,h]=d.useState([]),[f,p]=d.useState(!0),[g,b]=d.useState(a),v=(I,w)=>{U.debug("handle device change"),u(!1),r==null||r(I,w)},m=d.useRef(null),E=d.useRef(null);d.useLayoutEffect(()=>{c&&b(!0)},[c]),d.useLayoutEffect(()=>{m.current&&E.current&&(l||f)&&wf(m.current,E.current).then(({x:I,y:w})=>{E.current&&Object.assign(E.current.style,{left:`${I}px`,top:`${w}px`})}),p(!1)},[m,E,l,f]);const O=d.useCallback(I=>{E.current&&I.target!==m.current&&c&&_f(E.current,I)&&u(!1)},[c,E,m]);return d.useEffect(()=>(document.addEventListener("click",O),window.addEventListener("resize",()=>p(!0)),()=>{document.removeEventListener("click",O),window.removeEventListener("resize",()=>p(!0))}),[O,p]),d.createElement(d.Fragment,null,d.createElement("button",ne(x({className:"lk-button lk-button-menu","aria-pressed":c},o),{onClick:()=>u(!c),ref:m}),o.children),!o.disabled&&d.createElement("div",{className:"lk-device-menu",ref:E,style:{visibility:c?"visible":"hidden"}},n?d.createElement(pi,{initialSelection:i,onActiveDeviceChange:I=>v(n,I),onDeviceListChange:h,kind:n,track:s==null?void 0:s[n],requestPermissions:g}):d.createElement(d.Fragment,null,d.createElement("div",{className:"lk-device-menu-heading"},"Audio inputs"),d.createElement(pi,{kind:"audioinput",onActiveDeviceChange:I=>v("audioinput",I),onDeviceListChange:h,track:s==null?void 0:s.audioinput,requestPermissions:g}),d.createElement("div",{className:"lk-device-menu-heading"},"Video inputs"),d.createElement(pi,{kind:"videoinput",onActiveDeviceChange:I=>v("videoinput",I),onDeviceListChange:h,track:s==null?void 0:s.videoinput,requestPermissions:g}))))}function Xg(){d.useEffect(()=>{_g()},[])}var Zg=d.forwardRef(function(e,n){var i=e,{label:r}=i,s=Q(i,["label"]);const a=Kn(),{mergedProps:o,canPlayAudio:c}=Om({room:a,props:s}),{mergedProps:u,canPlayVideo:l}=Dm({room:a,props:o}),h=u,{style:f}=h,p=Q(h,["style"]);return f.display=c&&l?"none":"block",d.createElement("button",x({ref:n,style:f},p),r??`Start ${c?"Video":"Audio"}`)});function ev({props:t}){const{dispatch:e,state:n}=bc().widget,i="lk-button lk-settings-toggle";return{mergedProps:d.useMemo(()=>Le(t,{className:i,onClick:()=>{e&&e({msg:"toggle_settings"})},"aria-pressed":n!=null&&n.showSettings?"true":"false"}),[t,i,e,n])}}var tv=d.forwardRef(function(e,n){const{mergedProps:i}=ev({props:e});return d.createElement("button",x({ref:n},i),e.children)});function Oc(t){var e=t,{variation:n,controls:i,saveUserChoices:r=!0,onDeviceError:s}=e,a=Q(e,["variation","controls","saveUserChoices","onDeviceError"]),o,c,u,l,h;const[f,p]=d.useState(!1),g=Xt();d.useEffect(()=>{var se,pe;((se=g==null?void 0:g.widget.state)==null?void 0:se.showChat)!==void 0&&p((pe=g==null?void 0:g.widget.state)==null?void 0:pe.showChat)},[(o=g==null?void 0:g.widget.state)==null?void 0:o.showChat]);const v=fm(`(max-width: ${f?1e3:760}px)`)?"minimal":"verbose";n??(n=v);const m=x({leave:!0},i),E=_m();E?((c=m.camera)!=null||(m.camera=E.canPublish),(u=m.microphone)!=null||(m.microphone=E.canPublish),(l=m.screenShare)!=null||(m.screenShare=E.canPublish),(h=m.chat)!=null||(m.chat=E.canPublishData&&(i==null?void 0:i.chat))):(m.camera=!1,m.chat=!1,m.microphone=!1,m.screenShare=!1);const O=d.useMemo(()=>n==="minimal"||n==="verbose",[n]),I=d.useMemo(()=>n==="textOnly"||n==="verbose",[n]),w=Df(),[M,D]=d.useState(!1),A=d.useCallback(se=>{D(se)},[D]),L=ze({className:"lk-control-bar"},a),{saveAudioInputEnabled:Se,saveVideoInputEnabled:N,saveAudioInputDeviceId:V,saveVideoInputDeviceId:Ce}=Bm({preventSave:!r}),et=d.useCallback((se,pe)=>pe?Se(se):null,[Se]),wt=d.useCallback((se,pe)=>pe?N(se):null,[N]);return d.createElement("div",x({},L),m.microphone&&d.createElement("div",{className:"lk-button-group"},d.createElement(mi,{source:k.Source.Microphone,showIcon:O,onChange:et,onDeviceError:se=>s==null?void 0:s({source:k.Source.Microphone,error:se})},I&&"Microphone"),d.createElement("div",{className:"lk-button-group-menu"},d.createElement(Vs,{kind:"audioinput",onActiveDeviceChange:(se,pe)=>V(pe??"")}))),m.camera&&d.createElement("div",{className:"lk-button-group"},d.createElement(mi,{source:k.Source.Camera,showIcon:O,onChange:wt,onDeviceError:se=>s==null?void 0:s({source:k.Source.Camera,error:se})},I&&"Camera"),d.createElement("div",{className:"lk-button-group-menu"},d.createElement(Vs,{kind:"videoinput",onActiveDeviceChange:(se,pe)=>Ce(pe??"")}))),m.screenShare&&w&&d.createElement(mi,{source:k.Source.ScreenShare,captureOptions:{audio:!0,selfBrowserSurface:"include"},showIcon:O,onChange:A,onDeviceError:se=>s==null?void 0:s({source:k.Source.ScreenShare,error:se})},I&&(M?"Stop screen share":"Share screen")),m.chat&&d.createElement(Ec,null,O&&d.createElement(Ym,null),I&&"Chat"),m.settings&&d.createElement(tv,null,O&&d.createElement(ng,null),I&&"Settings"),m.leave&&d.createElement(Wm,null,O&&d.createElement(rg,null),I&&"Leave"),d.createElement(Zg,null))}function nv(t){var e=t,{chatMessageFormatter:n,chatMessageDecoder:i,chatMessageEncoder:r,SettingsComponent:s}=e,a=Q(e,["chatMessageFormatter","chatMessageDecoder","chatMessageEncoder","SettingsComponent"]),o,c;const[u,l]=d.useState({showChat:!1,unreadMessages:0,showSettings:!1}),h=d.useRef(null),f=Tc([{source:k.Source.Camera,withPlaceholder:!0},{source:k.Source.ScreenShare,withPlaceholder:!1}],{updateOnlyOn:[S.ActiveSpeakersChanged],onlySubscribed:!1}),p=E=>{U.debug("updating widget state",E),l(E)},g=mm(),b=f.filter(X).filter(E=>E.publication.source===k.Source.ScreenShare),v=(o=xm(g))==null?void 0:o[0],m=f.filter(E=>!Cf(E,v));return d.useEffect(()=>{var E,O,I,w,M,D;if(b.some(A=>A.publication.isSubscribed)&&h.current===null?(U.debug("Auto set screen share focus:",{newScreenShareTrack:b[0]}),(O=(E=g.pin).dispatch)==null||O.call(E,{msg:"set_pin",trackReference:b[0]}),h.current=b[0]):h.current&&!b.some(A=>{var L,Se;return A.publication.trackSid===((Se=(L=h.current)==null?void 0:L.publication)==null?void 0:Se.trackSid)})&&(U.debug("Auto clearing screen share focus."),(w=(I=g.pin).dispatch)==null||w.call(I,{msg:"clear_pin"}),h.current=null),v&&!X(v)){const A=f.find(L=>L.participant.identity===v.participant.identity&&L.source===v.source);A!==v&&X(A)&&((D=(M=g.pin).dispatch)==null||D.call(M,{msg:"set_pin",trackReference:A}))}},[b.map(E=>`${E.publication.trackSid}_${E.publication.isSubscribed}`).join(),(c=v==null?void 0:v.publication)==null?void 0:c.trackSid,f]),Xg(),d.createElement("div",x({className:"lk-video-conference"},a),Pf()&&d.createElement(Kg,{value:g,onWidgetChange:p},d.createElement("div",{className:"lk-video-conference-inner"},v?d.createElement("div",{className:"lk-focus-layout-wrapper"},d.createElement(Lg,null,d.createElement(Gg,{tracks:m},d.createElement($i,null)),v&&d.createElement(Ug,{trackRef:v}))):d.createElement("div",{className:"lk-grid-layout-wrapper"},d.createElement(Vg,{tracks:f},d.createElement($i,null))),d.createElement(Oc,{controls:{chat:!0,settings:!!s}})),d.createElement(Yg,{style:{display:u.showChat?"grid":"none"},messageFormatter:n,messageEncoder:r,messageDecoder:i}),s&&d.createElement("div",{className:"lk-settings-menu-modal",style:{display:u.showSettings?"block":"none"}},d.createElement(s,null))),d.createElement(Hg,null),d.createElement($g,null))}function iv(){const{profile:t}=Vc(),{chatId:e}=Bc(),[n,i]=Jn.useState(null),[r,s]=Jn.useState(!0),a=qc();return Jn.useEffect(()=>{async function o(){s(!0);try{const c=await Gc.post("/livekit/token",{chatId:e,userId:t==null?void 0:t.id,username:t==null?void 0:t.username});i(c.data.livekitToken)}catch(c){console.log(c),a("/404")}finally{s(!1)}}!(t!=null&&t.id)||!e||!(t!=null&&t.username)||o()},[e,t==null?void 0:t.id,t==null?void 0:t.username]),r?Je.jsx("div",{children:Je.jsx(Kc,{children:Je.jsx(Wc,{className:"text-lg text-gray-600 dark:text-gray-400",children:"Joining Video Chat..."})})}):Je.jsxs(zg,{video:!0,audio:!0,token:n,serverUrl:"wss://chatly-l1w9tld9.livekit.cloud",connect:!0,"data-lk-theme":"default",onConnected:()=>{console.log("connected")},children:[Je.jsx(nv,{}),Je.jsx(Oc,{})]})}function cv(){return Je.jsx("div",{className:"h-screen w-full",children:Je.jsx(iv,{})})}export{cv as default}; diff --git a/backend/src/public/dist/assets/VideoChat-c8ce9e46.css b/backend/src/public/dist/assets/VideoChat-c8ce9e46.css new file mode 100644 index 0000000..b7090ad --- /dev/null +++ b/backend/src/public/dist/assets/VideoChat-c8ce9e46.css @@ -0,0 +1 @@ +[data-lk-theme=default]{color-scheme:dark;--lk-bg: #111;--lk-bg2: #1e1e1e;--lk-bg3: #2b2b2b;--lk-bg4: #373737;--lk-bg5: #444444;--lk-fg: #fff;--lk-fg2: whitesmoke;--lk-fg3: #ebebeb;--lk-fg4: #e0e0e0;--lk-fg5: #d6d6d6;--lk-border-color: rgba(255, 255, 255, .1);--lk-accent-fg: #fff;--lk-accent-bg: #1f8cf9;--lk-accent2: #3396fa;--lk-accent3: #47a0fa;--lk-accent4: #5babfb;--lk-danger-fg: #fff;--lk-danger: #f91f31;--lk-danger2: #fa3343;--lk-danger3: #fa4756;--lk-danger4: #fb5b68;--lk-success-fg: #fff;--lk-success: #1ff968;--lk-success2: #33fa75;--lk-success3: #47fa83;--lk-success4: #5bfb90;--lk-control-fg: var(--lk-fg);--lk-control-bg: var(--lk-bg2);--lk-control-hover-bg: var(--lk-bg3);--lk-control-active-bg: var(--lk-bg4);--lk-control-active-hover-bg: var(--lk-bg5);--lk-connection-excellent: #06db4d;--lk-connection-good: #f9b11f;--lk-connection-poor: #f91f31;--lk-font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--lk-font-size: 16px;--lk-line-height: 1.5;--lk-border-radius: .5rem;--lk-box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);--lk-grid-gap: .5rem;--lk-control-bar-height: 69px;--lk-chat-header-height: 69px}.lk-button,.lk-start-audio-button,.lk-chat-toggle,.lk-disconnect-button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.625rem 1rem;color:var(--lk-control-fg);background-image:none;background-color:var(--lk-control-bg);border:0;border-radius:var(--lk-border-radius);cursor:pointer;white-space:nowrap}.lk-button:not(:disabled):hover,.lk-start-audio-button:not(:disabled):hover,.lk-chat-toggle:not(:disabled):hover,.lk-disconnect-button:not(:disabled):hover{background-color:var(--lk-control-hover-bg)}.lk-button[aria-pressed=true],[aria-pressed=true].lk-start-audio-button,[aria-pressed=true].lk-chat-toggle,[aria-pressed=true].lk-disconnect-button{background-color:var(--lk-control-active-bg)}.lk-button[aria-pressed=true]:hover,[aria-pressed=true].lk-start-audio-button:hover,[aria-pressed=true].lk-chat-toggle:hover,[aria-pressed=true].lk-disconnect-button:hover{background-color:var(--lk-control-active-hover-bg)}.lk-button[data-lk-source=screen_share][data-lk-enabled=true],[data-lk-source=screen_share][data-lk-enabled=true].lk-start-audio-button,[data-lk-source=screen_share][data-lk-enabled=true].lk-chat-toggle,[data-lk-source=screen_share][data-lk-enabled=true].lk-disconnect-button{background-color:var(--lk-accent-bg)}.lk-button[data-lk-source=screen_share][data-lk-enabled=true]:hover,[data-lk-source=screen_share][data-lk-enabled=true].lk-start-audio-button:hover,[data-lk-source=screen_share][data-lk-enabled=true].lk-chat-toggle:hover,[data-lk-source=screen_share][data-lk-enabled=true].lk-disconnect-button:hover{background-color:var(--lk-accent2)}.lk-button:disabled,.lk-start-audio-button:disabled,.lk-chat-toggle:disabled,.lk-disconnect-button:disabled{opacity:.5}.lk-button-group{display:inline-flex;align-items:stretch}.lk-button-group>.lk-button:first-child,.lk-button-group>.lk-start-audio-button:first-child,.lk-button-group>.lk-chat-toggle:first-child,.lk-button-group>.lk-disconnect-button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.lk-button-group-menu{position:relative;flex-shrink:0}.lk-button-group-menu>.lk-button,.lk-button-group-menu>.lk-start-audio-button,.lk-button-group-menu>.lk-chat-toggle,.lk-button-group-menu>.lk-disconnect-button{height:100%;border-top-left-radius:0;border-bottom-left-radius:0}.lk-button-group-menu>.lk-button:after,.lk-button-group-menu>.lk-start-audio-button:after,.lk-button-group-menu>.lk-chat-toggle:after,.lk-button-group-menu>.lk-disconnect-button:after{margin-left:0}.lk-button-menu:after{display:inline-block;content:"";width:.5em;height:.5em;margin-top:-.25rem;margin-left:.5rem;border-left:.125em solid;border-bottom:.125em solid;transform:rotate(-45deg);transform-origin:center center}.lk-disconnect-button{--lk-control-fg: var(--lk-danger-fg);--lk-control-bg: var(--lk-danger);font-weight:600}.lk-disconnect-button:not(:disabled):hover{--lk-control-hover-bg: var(--lk-danger2)}.lk-disconnect-button:not(:disabled):active{--lk-control-hover-bg: var(--lk-danger3)}.lk-chat-toggle{position:relative}.lk-chat-toggle[data-lk-unread-msgs]:not([data-lk-unread-msgs="0"]):after{content:attr(data-lk-unread-msgs);position:absolute;top:0;left:0;padding:.25rem;margin-left:.25rem;margin-top:.25rem;border-radius:50%;font-size:.5rem;line-height:.75;background:var(--lk-accent-bg)}.lk-media-device-select:not(:last-child){padding-bottom:.5rem;margin-bottom:.75rem;border-bottom:1px solid var(--lk-border-color)}.lk-media-device-select li:not(:last-child){margin-bottom:.25rem}.lk-media-device-select li>.lk-button{width:100%;justify-content:start;padding-block:.5rem}.lk-media-device-select li:not([data-lk-active=true])>.lk-button:not(:disabled):hover{background-color:var(--lk-bg3)}.lk-media-device-select [data-lk-active=false]>.lk-button:hover{cursor:pointer;background-color:#0000000d}.lk-media-device-select [data-lk-active=true]>.lk-button{color:var(--lk-accent-fg);background-color:var(--lk-accent-bg)}.lk-device-menu{width:-moz-max-content;width:max-content;position:absolute;top:0;left:0;z-index:5;min-width:10rem;padding:.5rem;margin-bottom:.25rem;white-space:nowrap;background-color:var(--lk-bg2);border:1px solid var(--lk-border-color);border-radius:.75rem;box-shadow:var(--lk-box-shadow)}.lk-device-menu-heading{padding:.25rem .5rem;font-weight:700;opacity:.65}.lk-start-audio-button{color:var(--lk-accent-fg);background-color:var(--lk-accent-bg)}@media screen and (max-width: 600px){.lk-start-audio-button{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}}.lk-pagination-control{position:absolute;bottom:1rem;left:50%;transform:translate(-50%);display:flex;align-items:stretch;background-color:var(--lk-control-bg);border-radius:var(--lk-border-radius);transition:opacity ease-in-out .15s;opacity:0}.lk-pagination-control:hover{opacity:1}.lk-pagination-control>.lk-button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.lk-pagination-control>.lk-button:first-child>svg{transform:rotate(180deg)}.lk-pagination-control>.lk-button:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.lk-pagination-count{padding:.5rem .875rem;border-inline:1px solid var(--lk-bg)}[data-lk-user-interaction=true].lk-pagination-control{opacity:1}.lk-pagination-indicator{position:absolute;height:var(--lk-grid-gap);background-color:var(--lk-bg2);width:-moz-fit-content;width:fit-content;padding:.2rem .5rem;bottom:calc(var(--lk-grid-gap)/2);left:50%;transform:translate(-50%);border-radius:2rem;opacity:1;display:flex;gap:.2rem;align-items:center}.lk-pagination-indicator span{display:inline-block;width:.4rem;height:.4rem;border-radius:9999999px;background-color:var(--lk-fg);opacity:.35;transition:opacity linear .2s}.lk-pagination-indicator span[data-lk-active]{opacity:.9}.lk-grid-layout{--lk-col-count: 1;--lk-row-count: 1;display:grid;grid-template-columns:repeat(var(--lk-col-count),minmax(0,1fr));grid-auto-rows:minmax(0,1fr);grid-gap:var(--lk-grid-gap);width:100%;height:100%;max-width:100%;max-height:100%;padding:var(--lk-grid-gap)}.lk-grid-layout[data-lk-pagination=true]{padding-bottom:calc(var(--lk-grid-gap)*2)}.lk-focus-layout{display:grid;grid-template-columns:1fr 5fr;gap:var(--lk-grid-gap);width:100%;max-height:100%;padding:var(--lk-grid-gap)}.lk-focused-participant{position:relative}.lk-focused-participant .lk-pip-track{position:absolute;top:10px;right:10px;width:20%;height:auto}@media (max-width: 600px){.lk-focus-layout{grid-template-columns:1fr;grid-template-rows:5fr 1fr}.lk-carousel{order:1}}.lk-carousel{max-height:100%;display:flex;gap:var(--lk-grid-gap)}.lk-carousel>*{flex-shrink:0;aspect-ratio:16/10;scroll-snap-align:start}.lk-carousel[data-lk-orientation=vertical]{flex-direction:column;scroll-snap-type:y mandatory;overflow-y:auto;overflow-x:hidden}.lk-carousel[data-lk-orientation=vertical]>*{--lk-height-minus-gaps: calc(100% - calc(var(--lk-grid-gap) * calc(var(--lk-max-visible-tiles) - 1)));height:calc(var(--lk-height-minus-gaps)/var(--lk-max-visible-tiles))}.lk-carousel[data-lk-orientation=horizontal]{scroll-snap-type:x mandatory;overflow-y:hidden;overflow-x:auto}.lk-carousel[data-lk-orientation=horizontal]>*{--lk-width-minus-gaps: calc(100% - var(--lk-grid-gap) * (var(--lk-max-visible-tiles) - 1));width:calc(var(--lk-width-minus-gaps)/var(--lk-max-visible-tiles))}.lk-connection-quality{width:1.5rem;height:1.5rem}.lk-track-muted-indicator-camera,.lk-track-muted-indicator-microphone{position:relative;width:var(--lk-indicator-size, 1rem);height:var(--lk-indicator-size, 1rem);margin-inline-end:.25rem;transition:opacity .25s ease-in-out}.lk-track-muted-indicator-camera[data-lk-muted=true]{opacity:.5}.lk-track-muted-indicator-microphone{--lk-bg: var(--lk-icon-mic)}.lk-track-muted-indicator-microphone[data-lk-muted=true]{opacity:.5}.lk-participant-name{font-size:.875rem}.lk-participant-media-video{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;background-color:#000}.lk-participant-media-video[data-lk-orientation=landscape]{-o-object-fit:cover;object-fit:cover}.lk-participant-media-video[data-lk-orientation=portrait],.lk-participant-media-video[data-lk-source=screen_share]{-o-object-fit:contain;object-fit:contain;background-color:var(--lk-bg2)}.lk-participant-media-audio{width:auto}[data-lk-facing-mode=user] .lk-participant-media-video[data-lk-local-participant=true][data-lk-source=camera]{transform:rotateY(180deg)}.lk-audio-visualizer>rect{fill:var(--lk-bg2);rx:.5rem}.lk-audio-visualizer>g>rect{fill:var(--lk-fg);transition:height .1s ease-out,y .1s ease-out;rx:.25rem}.lk-participant-tile{--lk-speaking-indicator-width: 2.5px;position:relative;display:flex;flex-direction:column;gap:.375rem;overflow:hidden;border-radius:var(--lk-border-radius)}.lk-participant-tile:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--lk-border-radius);border:0px solid var(--lk-accent-bg);transition-property:border opacity;transition-delay:.5s;transition-duration:.4s;pointer-events:none}.lk-participant-tile[data-lk-speaking=true]:not([data-lk-source=screen_share]):after{transition-delay:0s;transition-duration:.2s;border-width:var(--lk-speaking-indicator-width)}.lk-participant-tile .lk-focus-toggle-button{position:absolute;top:.25rem;right:.25rem;padding:.25rem;background-color:#00000080;border-radius:calc(var(--lk-border-radius)/2);opacity:0;transition:opacity .2s ease-in-out;transition-delay:.2s}.lk-participant-tile:hover .lk-focus-toggle-button,.lk-participant-tile:focus .lk-focus-toggle-button{opacity:1;transition-delay:0}.lk-participant-tile .lk-connection-quality{opacity:0;transition:opacity .2s ease-in-out;transition-delay:.2s}.lk-participant-tile .lk-connection-quality[data-lk-quality=poor]{opacity:1;transition-delay:0}.lk-participant-tile:hover .lk-connection-quality,.lk-participant-tile:focus .lk-connection-quality{opacity:1;transition-delay:0}.lk-participant-tile .lk-participant-placeholder{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background-color:var(--lk-bg2);opacity:0;transition:opacity .2s ease-in-out;pointer-events:none;border-radius:var(--lk-border-radius)}.lk-participant-tile .lk-participant-placeholder svg{height:100%;width:auto;padding:10%}.lk-participant-tile[data-lk-video-muted=true][data-lk-source=camera] .lk-participant-placeholder{opacity:1}.lk-participant-metadata{position:absolute;right:.25rem;bottom:.25rem;left:.25rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;line-height:1}.lk-participant-metadata-item{display:flex;align-items:center;padding:.25rem;background-color:#00000080;border-radius:calc(var(--lk-border-radius)/2)}.lk-toast{position:fixed;top:.75rem;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:.5rem;padding:.75rem 1.25rem;background-color:var(--lk-bg);border:1px solid var(--lk-border-color);border-radius:var(--lk-border-radius);box-shadow:var(--lk-box-shadow)}.lk-spinner{animation:lk-rotate 2s infinite linear}@keyframes lk-rotate{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.lk-room-container{background-color:var(--lk-bg);line-height:var(--lk-line-height)}.lk-room-container{position:relative;width:100%;height:100%;--lk-has-imported-styles: "true"}.lk-room-container *[class^=lk-],.lk-room-container *[class*=" lk-"]{box-sizing:border-box}.lk-audio-conference{position:relative;width:100%;height:100%}.lk-audio-conference-stage{width:100%;height:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.lk-chat{display:grid;grid-template-rows:var(--lk-chat-header-height) 1fr var(--lk-control-bar-height);width:clamp(200px,55ch,60ch);background-color:var(--lk-bg2);border-left:1px solid var(--lk-border-color);align-items:end}.lk-chat-header{height:var(--lk-chat-header-height);padding:.75rem;position:relative;display:flex;align-items:center;justify-content:center}.lk-chat-header .lk-close-button{position:absolute;right:0;transform:translate(-50%);background-color:#0000}.lk-chat-header .lk-close-button:hover{background-color:var(--lk-control-active-hover-bg)}.lk-chat-messages{display:flex;width:100%;max-height:100%;flex-direction:column;gap:.25rem;overflow:auto}.lk-chat-entry{display:flex;flex-direction:column;gap:.25rem;margin:0 .25rem}.lk-chat-entry .lk-meta-data{font-size:.75rem;color:var(--lk-fg5);white-space:nowrap;padding:0 .3rem;display:flex}.lk-chat-entry .lk-meta-data .lk-participant-name{margin-top:1rem}.lk-chat-entry .lk-meta-data .lk-timestamp{margin-left:auto;align-self:flex-end}.lk-chat-entry .lk-edit-button{background:none;float:right;margin:0;padding:0 .25rem;border-radius:0;font-size:12px}.lk-chat-entry .lk-message-body{display:inline-block;border-radius:15px;padding:.25rem .75rem;word-break:break-word;width:-moz-fit-content;width:fit-content;max-width:calc(100% - 32px)}.lk-chat-entry[data-lk-message-origin=local] .lk-message-body{background-color:var(--lk-bg5)}.lk-chat-entry[data-lk-message-origin=remote] .lk-message-body{background-color:var(--lk-accent4)}.lk-chat-entry a{text-decoration:underline;color:inherit}.lk-chat-entry:last-child{margin-bottom:.25rem}.lk-chat-form{display:flex;gap:.75rem;padding:.75rem;border-top:1px solid var(--lk-border-color);max-height:var(--lk-control-bar-height)}.lk-chat-form-input{width:100%}@media (max-width: 600px){.lk-chat{position:fixed;top:0;right:0;max-width:100%;bottom:var(--lk-control-bar-height)}}.lk-control-bar{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;border-top:1px solid var(--lk-border-color);max-height:var(--lk-control-bar-height)}.lk-prejoin{background-color:var(--lk-bg);line-height:var(--lk-line-height)}[data-lk-theme]{font-size:var(--lk-font-size);font-family:var(--lk-font-family);color:var(--lk-fg)}[data-lk-theme] button,[data-lk-theme] input{font:inherit;line-height:inherit}[data-lk-theme] .lk-button{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-lk-theme] .lk-list{list-style:none;margin:0;padding:0}[data-lk-theme] .lk-form-control{font-family:var(--lk-font-family);padding:.625rem 1rem;background-color:var(--lk-control-bg);border:1px solid var(--lk-border-color);border-radius:var(--lk-border-radius)}.lk-prejoin{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;padding:1rem;gap:1rem;margin-inline:auto;background-color:var(--lk-bg);width:min(100%,480px);align-items:stretch}.lk-prejoin .lk-video-container{position:relative;width:100%;height:auto;aspect-ratio:16/10;background-color:#000;border-radius:var(--lk-border-radius);overflow:hidden}.lk-prejoin .lk-video-container video,.lk-prejoin .lk-video-container .lk-camera-off-note{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.lk-prejoin .lk-video-container video[data-lk-facing-mode=user]{transform:rotateY(180deg)}.lk-prejoin .lk-video-container .lk-camera-off-note{position:absolute;top:0;left:0;width:100%;aspect-ratio:16/10;background-color:#000;display:grid;place-items:center}.lk-prejoin .lk-video-container .lk-camera-off-note>*{height:70%;max-width:100%}.lk-prejoin .lk-audio-container{display:none}.lk-prejoin .lk-audio-container audio{width:100%;height:auto}.lk-prejoin .lk-button-group-container{display:flex;flex-wrap:nowrap;gap:1rem}.lk-prejoin .lk-button-group-container>.lk-button-group{width:50%}.lk-prejoin .lk-button-group-container>.lk-button-group>.lk-button{justify-content:left}.lk-prejoin .lk-button-group-container>.lk-button-group>.lk-button:first-child{width:100%}@media (max-width: 400px){.lk-prejoin .lk-button-group-container{flex-wrap:wrap}.lk-prejoin .lk-button-group-container>.lk-button-group{width:100%}}.lk-prejoin .lk-username-container{display:flex;flex-direction:column;gap:1rem;width:100%;max-width:100%}.lk-prejoin .lk-join-button{--lk-control-fg: var(--lk-accent-fg);--lk-control-bg: var(--lk-accent-bg);--lk-control-hover-bg: var(--lk-accent2);--lk-control-active-bg: var(--lk-accent3);--lk-control-active-hover-bg: var(--lk-accent4);background-color:var(--lk-control-bg)}.lk-prejoin .lk-join-button:hover{background-color:var(--lk-control-hover-bg)}.lk-focus-layout-wrapper,.lk-grid-layout-wrapper{position:relative;display:flex;justify-content:center;width:100%;height:calc(100% - var(--lk-control-bar-height))}.lk-grid-layout-wrapper{flex-direction:column;align-items:center}.lk-focus-layout-wrapper{align-items:stretch}.lk-video-conference{position:relative;display:flex;align-items:stretch;height:100%}.lk-video-conference-inner{display:flex;flex-direction:column;align-items:stretch;width:100%}.lk-settings-menu-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--lk-bg);padding:1rem;display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:.75rem 1.25rem;background-color:var(--lk-bg);border:1px solid var(--lk-border-color);border-radius:var(--lk-border-radius);box-shadow:var(--lk-box-shadow);min-width:50vw;min-height:50vh} diff --git a/backend/src/public/dist/assets/Wallpaper-8532f884.js b/backend/src/public/dist/assets/Wallpaper-8532f884.js new file mode 100644 index 0000000..b470743 --- /dev/null +++ b/backend/src/public/dist/assets/Wallpaper-8532f884.js @@ -0,0 +1 @@ +import{c as B,r as s,j as a,R as E,a as Ie,b as Se,d as z,u as Ee,e as je,f as Ae,g as Oe,s as Pe,h as Me,i as De,H as Fe,B as L,C as Ue,k as _e,D as Le,l as ke,m as $e,v as Ge,n as Ve}from"./index-d8866171.js";import{M as Ke}from"./message-4e5b8c88.js";const k=B("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["polyline",{points:"22 4 12 14.01 9 11.01",key:"6xbx8j"}]]),Be=B("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]),ze=B("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"}]]);function R(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function q(e,t=[]){let r=[];function n(o,c){const u=s.createContext(c),d=r.length;r=[...r,c];function l(f){const{scope:v,children:h,...p}=f,x=(v==null?void 0:v[e][d])||u,C=s.useMemo(()=>p,Object.values(p));return a.jsx(x.Provider,{value:C,children:h})}function g(f,v){const h=(v==null?void 0:v[e][d])||u,p=s.useContext(h);if(p)return p;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,g]}const i=()=>{const o=r.map(c=>s.createContext(c));return function(u){const d=(u==null?void 0:u[e])||o;return s.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[n,qe(i,...t)]}function qe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const c=n.reduce((u,{useScope:d,scopeName:l})=>{const f=d(o)[`__scope${l}`];return{...u,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function He(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Z(...e){return t=>e.forEach(r=>He(r,t))}function D(...e){return s.useCallback(Z(...e),e)}var F=s.forwardRef((e,t)=>{const{children:r,...n}=e,i=s.Children.toArray(r),o=i.find(Qe);if(o){const c=o.props.children,u=i.map(d=>d===o?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:d);return a.jsx(G,{...n,ref:t,children:s.isValidElement(c)?s.cloneElement(c,void 0,u):null})}return a.jsx(G,{...n,ref:t,children:r})});F.displayName="Slot";var G=s.forwardRef((e,t)=>{const{children:r,...n}=e;if(s.isValidElement(r)){const i=Ze(r);return s.cloneElement(r,{...Xe(n,r.props),ref:t?Z(t,i):i})}return s.Children.count(r)>1?s.Children.only(null):null});G.displayName="SlotClone";var Ye=({children:e})=>a.jsx(a.Fragment,{children:e});function Qe(e){return s.isValidElement(e)&&e.type===Ye}function Xe(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{o(...u),i(...u)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function Ze(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Je(e){const t=e+"CollectionProvider",[r,n]=q(t),[i,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=h=>{const{scope:p,children:x}=h,C=E.useRef(null),y=E.useRef(new Map).current;return a.jsx(i,{scope:p,itemMap:y,collectionRef:C,children:x})};c.displayName=t;const u=e+"CollectionSlot",d=E.forwardRef((h,p)=>{const{scope:x,children:C}=h,y=o(u,x),b=D(p,y.collectionRef);return a.jsx(F,{ref:b,children:C})});d.displayName=u;const l=e+"CollectionItemSlot",g="data-radix-collection-item",f=E.forwardRef((h,p)=>{const{scope:x,children:C,...y}=h,b=E.useRef(null),I=D(p,b),N=o(l,x);return E.useEffect(()=>(N.itemMap.set(b,{ref:b,...y}),()=>void N.itemMap.delete(b))),a.jsx(F,{[g]:"",ref:I,children:C})});f.displayName=l;function v(h){const p=o(e+"CollectionConsumer",h);return E.useCallback(()=>{const C=p.collectionRef.current;if(!C)return[];const y=Array.from(C.querySelectorAll(`[${g}]`));return Array.from(p.itemMap.values()).sort((N,m)=>y.indexOf(N.ref.current)-y.indexOf(m.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:c,Slot:d,ItemSlot:f},v,n]}var V=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},We=Ie["useId".toString()]||(()=>{}),et=0;function J(e){const[t,r]=s.useState(We());return V(()=>{e||r(n=>n??String(et++))},[e]),e||(t?`radix-${t}`:"")}var tt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],j=tt.reduce((e,t)=>{const r=s.forwardRef((n,i)=>{const{asChild:o,...c}=n,u=o?F:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function H(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function W({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=nt({defaultProp:t,onChange:r}),o=e!==void 0,c=o?e:n,u=H(r),d=s.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&u(f)}else i(l)},[o,e,i,u]);return[c,d]}function nt({defaultProp:e,onChange:t}){const r=s.useState(e),[n]=r,i=s.useRef(n),o=H(t);return s.useEffect(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}var ot=s.createContext(void 0);function ee(e){const t=s.useContext(ot);return e||t||"ltr"}var $="rovingFocusGroup.onEntryFocus",rt={bubbles:!1,cancelable:!0},U="RovingFocusGroup",[K,te,st]=Je(U),[at,ne]=q(U,[st]),[it,ct]=at(U),oe=s.forwardRef((e,t)=>a.jsx(K.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(K.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(lt,{...e,ref:t})})}));oe.displayName=U;var lt=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:o,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:g=!1,...f}=e,v=s.useRef(null),h=D(t,v),p=ee(o),[x=null,C]=W({prop:c,defaultProp:u,onChange:d}),[y,b]=s.useState(!1),I=H(l),N=te(r),m=s.useRef(!1),[T,A]=s.useState(0);return s.useEffect(()=>{const w=v.current;if(w)return w.addEventListener($,I),()=>w.removeEventListener($,I)},[I]),a.jsx(it,{scope:r,orientation:n,dir:p,loop:i,currentTabStopId:x,onItemFocus:s.useCallback(w=>C(w),[C]),onItemShiftTab:s.useCallback(()=>b(!0),[]),onFocusableItemAdd:s.useCallback(()=>A(w=>w+1),[]),onFocusableItemRemove:s.useCallback(()=>A(w=>w-1),[]),children:a.jsx(j.div,{tabIndex:y||T===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{m.current=!0}),onFocus:R(e.onFocus,w=>{const we=!m.current;if(w.target===w.currentTarget&&we&&!y){const X=new CustomEvent($,rt);if(w.currentTarget.dispatchEvent(X),!X.defaultPrevented){const _=N().filter(S=>S.focusable),Te=_.find(S=>S.active),Ne=_.find(S=>S.id===x),Re=[Te,Ne,..._].filter(Boolean).map(S=>S.ref.current);ae(Re,g)}}m.current=!1}),onBlur:R(e.onBlur,()=>b(!1))})})}),re="RovingFocusGroupItem",se=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:o,...c}=e,u=J(),d=o||u,l=ct(re,r),g=l.currentTabStopId===d,f=te(r),{onFocusableItemAdd:v,onFocusableItemRemove:h}=l;return s.useEffect(()=>{if(n)return v(),()=>h()},[n,v,h]),a.jsx(K.ItemSlot,{scope:r,id:d,focusable:n,active:i,children:a.jsx(j.span,{tabIndex:g?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,p=>{n?l.onItemFocus(d):p.preventDefault()}),onFocus:R(e.onFocus,()=>l.onItemFocus(d)),onKeyDown:R(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){l.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const x=ft(p,l.orientation,l.dir);if(x!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let y=f().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const b=y.indexOf(p.currentTarget);y=l.loop?pt(y,b+1):y.slice(b+1)}setTimeout(()=>ae(y))}})})})});se.displayName=re;var ut={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dt(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ft(e,t,r){const n=dt(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return ut[n]}function ae(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function pt(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var mt=oe,gt=se;function vt(e,t){return s.useReducer((r,n)=>t[r][n]??r,e)}var ie=e=>{const{present:t,children:r}=e,n=ht(t),i=typeof r=="function"?r({present:n.isPresent}):s.Children.only(r),o=D(n.ref,xt(i));return typeof r=="function"||n.isPresent?s.cloneElement(i,{ref:o}):null};ie.displayName="Presence";function ht(e){const[t,r]=s.useState(),n=s.useRef({}),i=s.useRef(e),o=s.useRef("none"),c=e?"mounted":"unmounted",[u,d]=vt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=O(n.current);o.current=u==="mounted"?l:"none"},[u]),V(()=>{const l=n.current,g=i.current;if(g!==e){const v=o.current,h=O(l);e?d("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?d("UNMOUNT"):d(g&&v!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),V(()=>{if(t){const l=f=>{const h=O(n.current).includes(f.animationName);f.target===t&&h&&Se.flushSync(()=>d("ANIMATION_END"))},g=f=>{f.target===t&&(o.current=O(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function O(e){return(e==null?void 0:e.animationName)||"none"}function xt(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Y="Tabs",[yt,St]=q(Y,[ne]),ce=ne(),[bt,Q]=yt(Y),le=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:o,orientation:c="horizontal",dir:u,activationMode:d="automatic",...l}=e,g=ee(u),[f,v]=W({prop:n,onChange:i,defaultProp:o});return a.jsx(bt,{scope:r,baseId:J(),value:f,onValueChange:v,orientation:c,dir:g,activationMode:d,children:a.jsx(j.div,{dir:g,"data-orientation":c,...l,ref:t})})});le.displayName=Y;var ue="TabsList",de=s.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,o=Q(ue,r),c=ce(r);return a.jsx(mt,{asChild:!0,...c,orientation:o.orientation,dir:o.dir,loop:n,children:a.jsx(j.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});de.displayName=ue;var fe="TabsTrigger",pe=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...o}=e,c=Q(fe,r),u=ce(r),d=ve(c.baseId,n),l=he(c.baseId,n),g=n===c.value;return a.jsx(gt,{asChild:!0,...u,focusable:!i,active:g,children:a.jsx(j.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":l,"data-state":g?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...o,ref:t,onMouseDown:R(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?c.onValueChange(n):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(n)}),onFocus:R(e.onFocus,()=>{const f=c.activationMode!=="manual";!g&&!i&&f&&c.onValueChange(n)})})})});pe.displayName=fe;var me="TabsContent",ge=s.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:o,...c}=e,u=Q(me,r),d=ve(u.baseId,n),l=he(u.baseId,n),g=n===u.value,f=s.useRef(g);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),a.jsx(ie,{present:i||g,children:({present:v})=>a.jsx(j.div,{"data-state":g?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:l,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&o})})});ge.displayName=me;function ve(e,t){return`${e}-trigger-${t}`}function he(e,t){return`${e}-content-${t}`}var Ct=le,xe=de,ye=pe,be=ge;const wt=Ct,Ce=s.forwardRef(({className:e,...t},r)=>a.jsx(xe,{ref:r,className:z("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ce.displayName=xe.displayName;const P=s.forwardRef(({className:e,...t},r)=>a.jsx(ye,{ref:r,className:z("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));P.displayName=ye.displayName;const M=s.forwardRef(({className:e,...t},r)=>a.jsx(be,{ref:r,className:z("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));M.displayName=be.displayName;const Tt=(e,t)=>[{Sender:{username:"MyUsername",avatar:"https://example.com/my-avatar.png"},id:"msg1",body:"Hey, how's it going?",senderId:e,isEditted:!1,readByIds:[],resourceUrl:null,type:"TEXT",createdAt:new Date,chatId:"chat1",parentMessage:null,isReply:!1},{Sender:{username:"OtherUser",avatar:t},id:"msg2",body:"I'm good, thanks! How about you?",senderId:Ge(),isEditted:!1,readByIds:[],resourceUrl:null,type:"TEXT",createdAt:new Date,chatId:"chat1",parentMessage:null,isReply:!1}];function Et(){var N;const e=Ee(),{theme:t}=je(),r=Ae(),{profile:n,updateProfile:i}=Oe(),[o,c]=s.useState(null),[u,d]=s.useState(null),[l,g]=s.useState(null),[f,v]=s.useState(null),h=s.useMemo(()=>t==="dark"?Pe:Me,[t]),p=(m,T)=>{v(m),c({url:T,wallpaperType:"DEFAULT"})};s.useEffect(()=>{if(n){const m=n.wallpaperType&&n.wallpaperUrl?n.wallpaperType==="COLOR"?{color:n.wallpaperUrl,wallpaperType:"COLOR"}:{url:n.wallpaperUrl,wallpaperType:n.wallpaperType}:null;c(m),n.wallpaperType==="UPLOADED"&&d((n==null?void 0:n.wallpaperUrl)??null)}},[n]);const x=s.useMemo(()=>({wallpaperType:o==null?void 0:o.wallpaperType,wallpaperUrl:(o==null?void 0:o.wallpaperType)==="COLOR"?o.color:(o==null?void 0:o.wallpaperType)==="DEFAULT"?f??void 0:o==null?void 0:o.url}),[o==null?void 0:o.color,o==null?void 0:o.url,o==null?void 0:o.wallpaperType,f]),{mutate:C,isPending:y}=De({method:"patch",route:"/users",onSuccess(){console.log(x),e.setQueryData(["profile"],m=>(console.log(m),{data:{user:{...n,...x}}})),i(x),r(`/${n==null?void 0:n.id}/chats`)}}),b=m=>{var A;const T=(A=m.target.files)==null?void 0:A[0];if(T){const w=URL.createObjectURL(T);d(w),g(T),c({url:w,wallpaperType:"UPLOADED"})}},I=async()=>{try{let m=u;if((o==null?void 0:o.wallpaperType)==="UPLOADED"&&l)if(m=await Ve(l),m)c({url:m,wallpaperType:"UPLOADED"});else return;C({...x,wallpaperUrl:m})}catch{}};return a.jsxs(a.Fragment,{children:[a.jsx(Fe,{children:a.jsxs("div",{className:"flex gap-x-2 items-center",children:[a.jsx(L,{variant:"link",size:"icon",onClick:()=>r(`/${n==null?void 0:n.id}/chats`),children:a.jsx(Ue,{})}),a.jsx("h1",{children:"Change Wallpaper"})]})}),a.jsxs("div",{className:"p-4 w-[80%] mx-auto",children:[a.jsxs(wt,{defaultValue:((N=n==null?void 0:n.wallpaperType)==null?void 0:N.toLowerCase())??"default",children:[a.jsxs(Ce,{children:[a.jsx(P,{value:"default",children:"Default Wallpapers"}),a.jsx(P,{value:"colors",children:"Solid Colors"}),a.jsx(P,{value:"uploaded",children:"Uploaded Wallpaper"})]}),a.jsx(M,{value:"colors",children:a.jsx("div",{className:"grid grid-cols-3 gap-4",children:h.map(m=>a.jsx("div",{className:"h-[200px] w-full rounded-lg cursor-pointer relative",style:{backgroundColor:m},onClick:()=>c({color:m,wallpaperType:"COLOR"}),children:(o==null?void 0:o.wallpaperType)==="COLOR"&&o.color===m&&a.jsx(k,{className:"w-8 h-8 text-green-500 absolute right-1 top-1"})},m))})}),a.jsx(M,{value:"default",children:a.jsx("div",{className:"grid grid-cols-3 gap-4",children:Object.entries(_e).map(([m,T])=>m==="light2"&&t==="dark"?null:a.jsx("div",{className:"h-[200px] w-full bg-cover relative bg-center rounded-lg cursor-pointer",style:{backgroundImage:`url(${T})`},onClick:()=>p(m,T),children:(o==null?void 0:o.wallpaperType)==="DEFAULT"&&(o==null?void 0:o.url)===T&&a.jsx(k,{className:"w-8 h-8 text-green-500 absolute right-1 top-1"})},m))})}),a.jsx(M,{value:"uploaded",children:a.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[u&&a.jsx("div",{className:"h-[200px] w-full bg-cover bg-center relative rounded-lg cursor-pointer",style:{backgroundImage:`url(${u})`},onClick:()=>c({url:u,wallpaperType:"UPLOADED"}),children:(o==null?void 0:o.wallpaperType)==="UPLOADED"&&(o==null?void 0:o.url)===u&&a.jsx(k,{className:"w-8 h-8 text-green-500 absolute right-1 top-1"})}),u===null&&a.jsx("div",{className:"h-[200px] w-full bg-cover flex justify-center items-center bg-center rounded-lg border-2 cursor-pointer",children:a.jsx(Be,{size:80,className:"text-gray-600"})}),a.jsxs("label",{className:"flex flex-col items-center justify-center h-20 w-20 bg-gray-200 rounded-lg cursor-pointer",children:[a.jsx(ze,{className:"w-8 h-8 text-gray-600"}),a.jsx("input",{type:"file",className:"hidden",onChange:b})]})]})})]}),a.jsxs(Le,{children:[a.jsx(ke,{asChild:!0,children:a.jsx(L,{className:"mt-6",disabled:o===null,children:"Preview Wallpaper"})}),a.jsxs($e,{disableClose:y,children:[a.jsxs("div",{className:"h-96 w-full bg-cover bg-center rounded-lg",style:{backgroundImage:(o==null?void 0:o.wallpaperType)==="DEFAULT"||(o==null?void 0:o.wallpaperType)==="UPLOADED"?`url(${o.url})`:"none",backgroundColor:(o==null?void 0:o.wallpaperType)==="COLOR"&&(o==null?void 0:o.color)||"transparent"},children:[a.jsx("div",{className:"bg-white/60 p-4 rounded-lg mt-4 mx-2",children:a.jsx("p",{className:"text-gray-800",children:"This is a preview of the selected wallpaper with some message blocks."})}),a.jsx("div",{className:"w-full px-3",children:Tt((n==null?void 0:n.id)??"",(n==null?void 0:n.avatar)??"").map(m=>a.jsx(Ke,{openModal:function(T){throw new Error("Function not implemented.")},index:0,preview:!0,...m},m.id))})]}),a.jsx(L,{disabled:y,variant:"outline",onClick:I,children:"Set Wallpaper"})]})]})]})]})}export{Et as default}; diff --git a/backend/src/public/dist/assets/avatar1-3bf75947.png b/backend/src/public/dist/assets/avatar1-3bf75947.png new file mode 100644 index 0000000..94d35de Binary files /dev/null and b/backend/src/public/dist/assets/avatar1-3bf75947.png differ diff --git a/backend/src/public/dist/assets/avatar2-10b39eb0.png b/backend/src/public/dist/assets/avatar2-10b39eb0.png new file mode 100644 index 0000000..306a626 Binary files /dev/null and b/backend/src/public/dist/assets/avatar2-10b39eb0.png differ diff --git a/backend/src/public/dist/assets/avatar3-b6ffe2e2.png b/backend/src/public/dist/assets/avatar3-b6ffe2e2.png new file mode 100644 index 0000000..590de61 Binary files /dev/null and b/backend/src/public/dist/assets/avatar3-b6ffe2e2.png differ diff --git a/backend/src/public/dist/assets/chatly-svg-955006a9.svg b/backend/src/public/dist/assets/chatly-svg-955006a9.svg new file mode 100644 index 0000000..ba827ae --- /dev/null +++ b/backend/src/public/dist/assets/chatly-svg-955006a9.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><g/><clipPath id="331c1054ed"><path d="M 11.5 120.113281 L 146.269531 120.113281 L 146.269531 254.886719 L 11.5 254.886719 Z M 11.5 120.113281 " clip-rule="nonzero"/></clipPath><clipPath id="8738ef4055"><path d="M 146.269531 187.5 C 146.269531 224.714844 116.101562 254.886719 78.882812 254.886719 C 41.667969 254.886719 11.5 224.714844 11.5 187.5 C 11.5 150.285156 41.667969 120.113281 78.882812 120.113281 C 116.101562 120.113281 146.269531 150.285156 146.269531 187.5 Z M 146.269531 187.5 " clip-rule="nonzero"/></clipPath><clipPath id="1980cb1dea"><path d="M 11.5 120.113281 L 146.261719 120.113281 L 146.261719 254.875 L 11.5 254.875 Z M 11.5 120.113281 " clip-rule="nonzero"/></clipPath><clipPath id="2493bc90ad"><path d="M 146.261719 187.496094 C 146.261719 224.707031 116.09375 254.875 78.878906 254.875 C 41.667969 254.875 11.5 224.707031 11.5 187.496094 C 11.5 150.28125 41.667969 120.113281 78.878906 120.113281 C 116.09375 120.113281 146.261719 150.28125 146.261719 187.496094 Z M 146.261719 187.496094 " clip-rule="nonzero"/></clipPath><clipPath id="788425f58c"><path d="M 37.40625 150.472656 L 120.085938 150.472656 L 120.085938 231.273438 L 37.40625 231.273438 Z M 37.40625 150.472656 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#331c1054ed)"><g clip-path="url(#8738ef4055)"><path fill="#327cb8" d="M 11.5 120.113281 L 146.269531 120.113281 L 146.269531 254.886719 L 11.5 254.886719 Z M 11.5 120.113281 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#1980cb1dea)"><g clip-path="url(#2493bc90ad)"><path stroke-linecap="butt" transform="matrix(1.879035, 0, 0, 1.879035, 11.498623, 120.114844)" fill="none" stroke-linejoin="miter" d="M 71.719308 35.859496 C 71.719308 55.662712 55.664276 71.717744 35.858981 71.717744 C 16.055765 71.717744 0.000732639 55.662712 0.000732639 35.859496 C 0.000732639 16.054201 16.055765 -0.000831737 35.858981 -0.000831737 C 55.664276 -0.000831737 71.719308 16.054201 71.719308 35.859496 Z M 71.719308 35.859496 " stroke="#e4e4e4" stroke-width="3.193128" stroke-opacity="1" stroke-miterlimit="4"/></g></g><g clip-path="url(#788425f58c)"><path fill="#ffffff" d="M 112.175781 150.472656 L 76.46875 150.472656 C 71.53125 151.777344 68.515625 154.773438 68.175781 160.207031 C 68.210938 161.253906 68.242188 162.300781 68.277344 163.335938 C 68.277344 165.246094 68.265625 167.027344 68.277344 168.816406 C 68.277344 171.570312 68.253906 174.339844 68.265625 177.097656 L 45.558594 177.097656 C 44.585938 177.300781 43.660156 177.632812 42.78125 178.09375 C 41.902344 178.554688 41.101562 179.128906 40.382812 179.8125 C 39.664062 180.5 39.050781 181.269531 38.546875 182.125 C 38.042969 182.980469 37.664062 183.890625 37.410156 184.851562 L 37.410156 208.121094 C 37.546875 209.332031 37.945312 210.445312 38.617188 211.460938 C 39.59375 212.816406 40.859375 213.796875 42.417969 214.398438 C 43.914062 215.117188 45.488281 215.480469 47.144531 215.492188 L 49.746094 215.492188 L 49.746094 222.894531 C 49.8125 225.640625 49.890625 228.398438 49.957031 231.152344 C 51.285156 229.894531 52.421875 228.792969 53.3125 227.925781 C 56.101562 225.191406 57.464844 223.796875 59.152344 221.996094 C 60.582031 220.488281 60.648438 220.398438 61.324219 219.699219 C 64.40625 216.480469 65.21875 216.097656 65.632812 215.929688 C 66.476562 215.570312 67.351562 215.410156 68.265625 215.445312 C 72.070312 215.59375 75.882812 215.511719 79.699219 215.492188 C 80.347656 215.519531 80.992188 215.480469 81.632812 215.371094 C 82.273438 215.265625 82.894531 215.09375 83.5 214.859375 C 84.105469 214.621094 84.679688 214.328125 85.222656 213.972656 C 85.765625 213.613281 86.265625 213.207031 86.726562 212.746094 C 87.183594 212.289062 87.589844 211.785156 87.941406 211.242188 C 88.296875 210.695312 88.589844 210.121094 88.824219 209.515625 C 89.058594 208.910156 89.226562 208.285156 89.332031 207.644531 C 89.4375 207.003906 89.472656 206.359375 89.445312 205.710938 C 89.476562 202.292969 89.453125 198.859375 89.453125 195.4375 L 89.453125 189.96875 L 89.488281 188.820312 C 90.394531 188.785156 91.265625 188.949219 92.097656 189.304688 C 92.503906 189.472656 93.316406 189.847656 96.398438 193.074219 C 97.074219 193.773438 97.152344 193.863281 98.570312 195.371094 C 100.269531 197.171875 101.628906 198.566406 104.421875 201.300781 C 105.296875 202.167969 106.433594 203.269531 107.773438 204.53125 C 107.839844 201.773438 107.910156 199.019531 107.976562 196.269531 L 107.976562 188.867188 L 110.585938 188.867188 C 112.242188 188.855469 113.8125 188.492188 115.300781 187.777344 C 116.859375 187.171875 118.128906 186.191406 119.105469 184.839844 C 119.78125 183.816406 120.183594 182.699219 120.320312 181.484375 L 120.320312 158.226562 C 120.070312 157.265625 119.691406 156.359375 119.183594 155.503906 C 118.679688 154.648438 118.066406 153.878906 117.347656 153.191406 C 116.628906 152.507812 115.828125 151.933594 114.949219 151.472656 C 114.070312 151.011719 113.144531 150.675781 112.175781 150.472656 Z M 86.339844 205.710938 C 86.371094 206.15625 86.351562 206.601562 86.289062 207.042969 C 86.226562 207.488281 86.117188 207.917969 85.960938 208.335938 C 85.804688 208.753906 85.605469 209.152344 85.363281 209.527344 C 85.121094 209.902344 84.84375 210.25 84.527344 210.566406 C 84.210938 210.882812 83.867188 211.160156 83.492188 211.402344 C 83.113281 211.644531 82.71875 211.84375 82.300781 212.003906 C 81.882812 212.160156 81.449219 212.269531 81.007812 212.335938 C 80.566406 212.398438 80.121094 212.414062 79.675781 212.386719 C 75.277344 212.417969 70.886719 212.441406 66.488281 212.363281 C 65.84375 212.328125 65.222656 212.433594 64.628906 212.683594 C 64.03125 212.933594 63.519531 213.296875 63.089844 213.78125 C 61.46875 215.445312 59.667969 216.941406 58.183594 218.730469 C 56.507812 220.746094 54.660156 222.597656 52.648438 224.277344 C 52.679688 223.402344 52.804688 219.261719 52.863281 214.738281 C 52.9375 214.023438 52.742188 213.390625 52.277344 212.847656 C 51.769531 212.453125 51.199219 212.300781 50.566406 212.386719 C 49.40625 212.429688 48.238281 212.40625 47.078125 212.386719 C 46.640625 212.402344 46.203125 212.375 45.773438 212.300781 C 45.339844 212.230469 44.917969 212.113281 44.511719 211.953125 C 44.101562 211.789062 43.714844 211.589844 43.351562 211.347656 C 42.984375 211.105469 42.648438 210.828125 42.339844 210.519531 C 42.03125 210.207031 41.757812 209.867188 41.519531 209.496094 C 41.285156 209.128906 41.085938 208.738281 40.929688 208.328125 C 40.777344 207.917969 40.664062 207.496094 40.597656 207.0625 C 40.527344 206.628906 40.503906 206.195312 40.527344 205.757812 C 40.496094 199.5 40.496094 193.238281 40.527344 186.964844 C 40.503906 186.527344 40.523438 186.089844 40.585938 185.65625 C 40.652344 185.222656 40.761719 184.796875 40.914062 184.386719 C 41.070312 183.976562 41.261719 183.582031 41.496094 183.210938 C 41.734375 182.839844 42.003906 182.5 42.308594 182.183594 C 42.617188 181.871094 42.953125 181.589844 43.316406 181.347656 C 43.683594 181.101562 44.070312 180.898438 44.476562 180.734375 C 44.882812 180.570312 45.304688 180.449219 45.738281 180.375 C 46.167969 180.296875 46.605469 180.265625 47.042969 180.28125 C 54.144531 180.246094 61.246094 180.234375 68.34375 180.246094 C 68.398438 181.035156 68.554688 181.800781 68.804688 182.546875 C 69.058594 183.292969 69.398438 183.996094 69.832031 184.65625 C 70.265625 185.316406 70.773438 185.910156 71.359375 186.4375 C 71.945312 186.964844 72.585938 187.410156 73.285156 187.777344 C 74.777344 188.515625 76.355469 188.878906 78.023438 188.867188 C 79.28125 188.878906 80.542969 188.890625 81.804688 188.890625 C 83.3125 188.910156 84.832031 188.910156 86.339844 188.890625 C 86.371094 194.492188 86.371094 200.101562 86.339844 205.710938 Z M 117.203125 179.132812 C 117.226562 179.570312 117.203125 180.007812 117.136719 180.441406 C 117.066406 180.875 116.953125 181.296875 116.796875 181.707031 C 116.640625 182.117188 116.445312 182.503906 116.207031 182.875 C 115.96875 183.242188 115.695312 183.582031 115.386719 183.894531 C 115.078125 184.207031 114.742188 184.484375 114.375 184.726562 C 114.007812 184.96875 113.621094 185.167969 113.210938 185.328125 C 112.804688 185.488281 112.382812 185.605469 111.949219 185.679688 C 111.519531 185.75 111.082031 185.777344 110.644531 185.761719 C 109.484375 185.785156 108.3125 185.804688 107.15625 185.761719 C 106.523438 185.671875 105.957031 185.824219 105.457031 186.222656 C 104.988281 186.765625 104.789062 187.398438 104.859375 188.113281 C 104.917969 192.636719 105.050781 196.765625 105.074219 197.65625 C 103.0625 195.96875 101.21875 194.121094 99.539062 192.109375 C 98.0625 190.320312 96.25 188.820312 94.640625 187.15625 C 94.210938 186.671875 93.699219 186.308594 93.101562 186.058594 C 92.5 185.808594 91.878906 185.703125 91.234375 185.738281 C 90.636719 185.75 90.039062 185.761719 89.445312 185.761719 C 88.375 185.773438 87.316406 185.785156 86.25 185.785156 C 83.515625 185.796875 80.78125 185.773438 78.046875 185.761719 C 74.375 185.726562 71.921875 183.65625 71.472656 180.246094 C 71.414062 179.863281 71.382812 179.476562 71.382812 179.089844 L 71.382812 177.097656 C 71.359375 171.492188 71.351562 165.890625 71.382812 160.285156 C 71.355469 159.847656 71.375 159.410156 71.4375 158.976562 C 71.503906 158.542969 71.613281 158.117188 71.765625 157.707031 C 71.921875 157.292969 72.117188 156.902344 72.351562 156.535156 C 72.589844 156.164062 72.859375 155.820312 73.167969 155.507812 C 73.476562 155.195312 73.816406 154.917969 74.183594 154.675781 C 74.550781 154.4375 74.9375 154.234375 75.347656 154.074219 C 75.757812 153.917969 76.179688 153.800781 76.613281 153.730469 C 77.046875 153.660156 77.480469 153.636719 77.921875 153.65625 C 88.835938 153.601562 99.757812 153.601562 110.6875 153.65625 C 111.128906 153.644531 111.5625 153.671875 111.996094 153.75 C 112.429688 153.824219 112.847656 153.945312 113.257812 154.109375 C 113.664062 154.273438 114.050781 154.476562 114.414062 154.722656 C 114.78125 154.964844 115.117188 155.246094 115.421875 155.5625 C 115.730469 155.875 116 156.21875 116.234375 156.589844 C 116.46875 156.960938 116.664062 157.351562 116.816406 157.761719 C 116.972656 158.175781 117.082031 158.597656 117.144531 159.03125 C 117.210938 159.464844 117.230469 159.902344 117.203125 160.339844 C 117.238281 166.609375 117.238281 172.875 117.203125 179.132812 Z M 110.472656 165.652344 L 78.585938 165.652344 C 78.363281 165.652344 78.148438 165.609375 77.941406 165.527344 C 77.734375 165.441406 77.550781 165.316406 77.394531 165.160156 C 77.234375 165 77.113281 164.820312 77.027344 164.613281 C 76.941406 164.40625 76.898438 164.191406 76.898438 163.964844 C 76.898438 163.742188 76.941406 163.527344 77.027344 163.320312 C 77.113281 163.113281 77.234375 162.929688 77.394531 162.773438 C 77.550781 162.613281 77.734375 162.492188 77.941406 162.40625 C 78.148438 162.320312 78.363281 162.277344 78.585938 162.277344 L 110.472656 162.277344 C 110.699219 162.277344 110.914062 162.320312 111.121094 162.40625 C 111.328125 162.492188 111.507812 162.613281 111.667969 162.773438 C 111.824219 162.929688 111.949219 163.113281 112.03125 163.320312 C 112.117188 163.527344 112.160156 163.742188 112.160156 163.964844 C 112.160156 164.191406 112.117188 164.40625 112.03125 164.613281 C 111.949219 164.820312 111.824219 165 111.667969 165.160156 C 111.507812 165.316406 111.328125 165.441406 111.121094 165.527344 C 110.914062 165.609375 110.699219 165.652344 110.472656 165.652344 Z M 99.085938 174.601562 L 79.5625 174.601562 C 79.339844 174.601562 79.125 174.558594 78.917969 174.472656 C 78.710938 174.386719 78.527344 174.265625 78.371094 174.109375 C 78.210938 173.949219 78.089844 173.765625 78.003906 173.558594 C 77.917969 173.351562 77.875 173.136719 77.875 172.914062 C 77.875 172.691406 77.917969 172.476562 78.003906 172.269531 C 78.089844 172.0625 78.210938 171.878906 78.371094 171.71875 C 78.527344 171.5625 78.710938 171.441406 78.917969 171.355469 C 79.125 171.269531 79.339844 171.226562 79.5625 171.226562 L 99.085938 171.226562 C 99.308594 171.226562 99.523438 171.269531 99.730469 171.355469 C 99.9375 171.441406 100.121094 171.5625 100.277344 171.71875 C 100.4375 171.878906 100.558594 172.0625 100.644531 172.269531 C 100.730469 172.476562 100.773438 172.691406 100.773438 172.914062 C 100.773438 173.136719 100.730469 173.351562 100.644531 173.558594 C 100.558594 173.765625 100.4375 173.949219 100.277344 174.109375 C 100.121094 174.265625 99.9375 174.386719 99.730469 174.472656 C 99.523438 174.558594 99.308594 174.601562 99.085938 174.601562 Z M 79.140625 202.40625 L 47.253906 202.40625 C 47.027344 202.40625 46.8125 202.363281 46.605469 202.277344 C 46.398438 202.191406 46.21875 202.070312 46.058594 201.910156 C 45.902344 201.753906 45.777344 201.570312 45.691406 201.363281 C 45.605469 201.15625 45.5625 200.941406 45.5625 200.71875 C 45.5625 200.496094 45.605469 200.277344 45.691406 200.070312 C 45.777344 199.867188 45.902344 199.683594 46.058594 199.523438 C 46.21875 199.367188 46.398438 199.246094 46.605469 199.160156 C 46.8125 199.074219 47.027344 199.03125 47.253906 199.03125 L 79.140625 199.03125 C 79.363281 199.03125 79.578125 199.074219 79.785156 199.160156 C 79.992188 199.246094 80.175781 199.367188 80.332031 199.523438 C 80.492188 199.683594 80.613281 199.867188 80.699219 200.070312 C 80.785156 200.277344 80.828125 200.496094 80.828125 200.71875 C 80.828125 200.941406 80.785156 201.15625 80.699219 201.363281 C 80.613281 201.570312 80.492188 201.753906 80.332031 201.910156 C 80.175781 202.070312 79.992188 202.191406 79.785156 202.277344 C 79.578125 202.363281 79.363281 202.40625 79.140625 202.40625 Z M 47.386719 189.96875 L 66.910156 189.96875 C 67.132812 189.96875 67.351562 190.011719 67.554688 190.097656 C 67.761719 190.183594 67.945312 190.304688 68.105469 190.464844 C 68.261719 190.621094 68.382812 190.804688 68.46875 191.011719 C 68.554688 191.21875 68.597656 191.433594 68.597656 191.65625 C 68.597656 191.882812 68.554688 192.097656 68.46875 192.304688 C 68.382812 192.511719 68.261719 192.691406 68.105469 192.851562 C 67.945312 193.007812 67.761719 193.132812 67.554688 193.21875 C 67.351562 193.300781 67.132812 193.34375 66.910156 193.34375 L 47.386719 193.34375 C 47.164062 193.34375 46.949219 193.300781 46.742188 193.21875 C 46.535156 193.132812 46.351562 193.007812 46.195312 192.851562 C 46.035156 192.691406 45.914062 192.511719 45.828125 192.304688 C 45.742188 192.097656 45.699219 191.882812 45.699219 191.65625 C 45.699219 191.433594 45.742188 191.21875 45.828125 191.011719 C 45.914062 190.804688 46.035156 190.621094 46.195312 190.464844 C 46.351562 190.304688 46.535156 190.183594 46.742188 190.097656 C 46.949219 190.011719 47.164062 189.96875 47.386719 189.96875 Z M 47.386719 189.96875 " fill-opacity="1" fill-rule="nonzero"/></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(164.852132, 213.483395)"><g><path d="M 35.109375 -33.859375 C 33.203125 -33.859375 31.789062 -34.867188 30.875 -36.890625 C 30.445312 -37.835938 30.023438 -38.410156 29.609375 -38.609375 C 29.285156 -38.753906 28.445312 -38.828125 27.09375 -38.828125 C 24.425781 -38.828125 21.34375 -36.75 17.84375 -32.59375 C 12.945312 -26.78125 10.5 -21.34375 10.5 -16.28125 C 10.5 -13.96875 11.269531 -11.984375 12.8125 -10.328125 C 14.363281 -8.679688 16.21875 -7.859375 18.375 -7.859375 C 20.476562 -7.859375 22.609375 -8.410156 24.765625 -9.515625 C 25.535156 -9.910156 27.148438 -10.945312 29.609375 -12.625 C 31.253906 -13.726562 32.503906 -14.28125 33.359375 -14.28125 C 34.628906 -14.28125 35.707031 -13.8125 36.59375 -12.875 C 37.425781 -12.007812 37.84375 -11.015625 37.84375 -9.890625 C 37.84375 -8.640625 37.289062 -7.546875 36.1875 -6.609375 C 30.351562 -1.691406 24.414062 0.765625 18.375 0.765625 C 13.601562 0.765625 9.578125 -0.972656 6.296875 -4.453125 C 3.160156 -7.796875 1.59375 -11.738281 1.59375 -16.28125 C 1.59375 -23.382812 4.695312 -30.632812 10.90625 -38.03125 C 16.1875 -44.300781 21.582031 -47.4375 27.09375 -47.4375 C 28.03125 -47.4375 28.875 -47.40625 29.625 -47.34375 C 30.375 -47.28125 31.035156 -47.1875 31.609375 -47.0625 C 32.535156 -47.976562 33.660156 -48.4375 34.984375 -48.4375 C 37.140625 -48.4375 38.472656 -47.191406 38.984375 -44.703125 C 39.347656 -42.921875 39.53125 -40.847656 39.53125 -38.484375 C 39.53125 -37.421875 39.222656 -36.453125 38.609375 -35.578125 C 37.796875 -34.429688 36.628906 -33.859375 35.109375 -33.859375 Z M 35.109375 -33.859375 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(205.138958, 213.483395)"><g><path d="M 12.6875 -29.09375 C 14.238281 -30.625 15.894531 -31.765625 17.65625 -32.515625 C 19.425781 -33.265625 21.320312 -33.640625 23.34375 -33.640625 C 26.96875 -33.640625 29.570312 -32.625 31.15625 -30.59375 C 32.34375 -29.0625 33.066406 -26.71875 33.328125 -23.5625 C 33.429688 -20.957031 33.546875 -18.335938 33.671875 -15.703125 C 34.015625 -12.296875 34.226562 -10.21875 34.3125 -9.46875 C 34.601562 -7.125 34.960938 -5.070312 35.390625 -3.3125 C 35.492188 -2.863281 35.546875 -2.46875 35.546875 -2.125 C 35.546875 -0.9375 35.09375 0.0390625 34.1875 0.8125 C 33.289062 1.582031 32.238281 1.96875 31.03125 1.96875 C 28.894531 1.96875 27.507812 0.910156 26.875 -1.203125 C 26.363281 -2.921875 25.894531 -5.335938 25.46875 -8.453125 C 25.09375 -11.441406 24.90625 -13.90625 24.90625 -15.84375 C 24.90625 -16.363281 24.929688 -17.160156 24.984375 -18.234375 C 25.035156 -19.304688 25.0625 -20.109375 25.0625 -20.640625 C 25.0625 -22.203125 25.039062 -23.113281 25 -23.375 C 24.800781 -24.539062 24.25 -25.125 23.34375 -25.125 C 20.988281 -25.125 18.859375 -24.039062 16.953125 -21.875 C 15.972656 -20.789062 14.632812 -18.734375 12.9375 -15.703125 C 12.9375 -8.035156 12.566406 -3.414062 11.828125 -1.84375 C 11.003906 -0.101562 9.691406 0.765625 7.890625 0.765625 C 6.703125 0.765625 5.644531 0.367188 4.71875 -0.421875 C 3.800781 -1.222656 3.34375 -2.207031 3.34375 -3.375 C 3.34375 -3.769531 3.457031 -4.332031 3.6875 -5.0625 C 3.832031 -5.519531 3.960938 -8.378906 4.078125 -13.640625 C 3.960938 -17.898438 3.984375 -24.992188 4.140625 -34.921875 L 4.203125 -35.96875 C 4.328125 -38.46875 4.390625 -40.140625 4.390625 -40.984375 C 4.390625 -41.640625 4.285156 -42.609375 4.078125 -43.890625 C 3.878906 -45.179688 3.78125 -46.15625 3.78125 -46.8125 C 3.78125 -48.019531 4.210938 -49.007812 5.078125 -49.78125 C 5.953125 -50.550781 7.003906 -50.9375 8.234375 -50.9375 C 10.335938 -50.9375 11.75 -49.816406 12.46875 -47.578125 C 12.863281 -46.296875 13.0625 -44.34375 13.0625 -41.71875 C 13.0625 -39.601562 13 -37.453125 12.875 -35.265625 C 12.75 -33.191406 12.6875 -31.132812 12.6875 -29.09375 Z M 12.6875 -29.09375 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(242.754836, 213.483395)"><g><path d="M 30.6875 2.09375 C 29.707031 2.09375 28.160156 1.035156 26.046875 -1.078125 C 24.097656 -0.148438 22.378906 0.550781 20.890625 1.03125 C 19.410156 1.507812 18.148438 1.75 17.109375 1.75 C 11.992188 1.75 8.160156 0.382812 5.609375 -2.34375 C 3.054688 -5.082031 1.78125 -9.175781 1.78125 -14.625 C 1.78125 -19.738281 3.664062 -24.113281 7.4375 -27.75 C 11.207031 -31.382812 15.722656 -33.203125 20.984375 -33.203125 C 23.003906 -33.203125 25.335938 -32.628906 27.984375 -31.484375 C 31.179688 -30.109375 32.78125 -28.503906 32.78125 -26.671875 C 32.78125 -25.910156 32.535156 -25.242188 32.046875 -24.671875 C 31.835938 -23.828125 31.675781 -22.765625 31.5625 -21.484375 C 31.445312 -20.203125 31.390625 -18.703125 31.390625 -16.984375 C 31.390625 -12.929688 31.675781 -10.015625 32.25 -8.234375 C 32.3125 -8.046875 32.796875 -6.941406 33.703125 -4.921875 C 34.535156 -3.097656 34.953125 -2.0625 34.953125 -1.8125 C 34.953125 -0.6875 34.519531 0.242188 33.65625 0.984375 C 32.800781 1.722656 31.8125 2.09375 30.6875 2.09375 Z M 22.796875 -19.71875 C 22.796875 -20.394531 22.84375 -21.171875 22.9375 -22.046875 C 23.039062 -22.929688 23.1875 -23.914062 23.375 -25 C 22.945312 -25.207031 22.566406 -25.359375 22.234375 -25.453125 C 21.910156 -25.546875 21.632812 -25.59375 21.40625 -25.59375 C 18.519531 -25.59375 15.992188 -24.460938 13.828125 -22.203125 C 11.671875 -19.953125 10.59375 -17.34375 10.59375 -14.375 C 10.59375 -11.53125 11.097656 -9.390625 12.109375 -7.953125 C 13.128906 -6.523438 14.65625 -5.8125 16.6875 -5.8125 C 18.007812 -5.8125 19.257812 -6.03125 20.4375 -6.46875 C 21.613281 -6.90625 22.71875 -7.546875 23.75 -8.390625 C 23.113281 -13.441406 22.796875 -17.21875 22.796875 -19.71875 Z M 22.796875 -19.71875 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(278.939847, 213.483395)"><g><path d="M 25.6875 -25.59375 C 25.25 -25.59375 24.726562 -25.609375 24.125 -25.640625 C 23.519531 -25.671875 22.992188 -25.6875 22.546875 -25.6875 C 21.671875 -25.6875 20.664062 -25.601562 19.53125 -25.4375 C 19.90625 -16.875 20.09375 -11.28125 20.09375 -8.65625 C 20.09375 -8.375 20.101562 -7.859375 20.125 -7.109375 C 20.144531 -6.359375 20.15625 -5.75 20.15625 -5.28125 C 20.15625 -0.40625 18.617188 2.03125 15.546875 2.03125 C 14.378906 2.03125 13.375 1.671875 12.53125 0.953125 C 11.59375 0.191406 11.125 -0.757812 11.125 -1.90625 C 11.125 -2.664062 11.15625 -3.804688 11.21875 -5.328125 C 11.289062 -6.859375 11.328125 -8.007812 11.328125 -8.78125 C 11.328125 -11.34375 11.132812 -16.832031 10.75 -25.25 C 9.4375 -25.3125 7.445312 -25.484375 4.78125 -25.765625 C 2.125 -26.054688 0.796875 -27.429688 0.796875 -29.890625 C 0.796875 -31.078125 1.195312 -32.082031 2 -32.90625 C 2.8125 -33.738281 3.851562 -34.15625 5.125 -34.15625 C 5.90625 -34.15625 7.707031 -34.023438 10.53125 -33.765625 C 10.507812 -34.441406 10.453125 -35.566406 10.359375 -37.140625 C 10.273438 -38.492188 10.234375 -39.546875 10.234375 -40.296875 C 10.234375 -41.484375 10.664062 -42.46875 11.53125 -43.25 C 12.40625 -44.03125 13.457031 -44.421875 14.6875 -44.421875 C 17.820312 -44.421875 19.390625 -41.78125 19.390625 -36.5 L 19.328125 -33.890625 C 20.648438 -34.085938 21.722656 -34.1875 22.546875 -34.1875 C 24.984375 -34.1875 26.644531 -34.023438 27.53125 -33.703125 C 29.226562 -33.109375 30.078125 -31.816406 30.078125 -29.828125 C 30.078125 -28.617188 29.664062 -27.609375 28.84375 -26.796875 C 28.019531 -25.992188 26.96875 -25.59375 25.6875 -25.59375 Z M 25.6875 -25.59375 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(309.623974, 213.483395)"><g><path d="M 13.03125 -4.671875 C 13.03125 -0.640625 11.570312 1.375 8.65625 1.375 C 7.375 1.375 6.320312 0.96875 5.5 0.15625 C 4.675781 -0.644531 4.265625 -1.679688 4.265625 -2.953125 L 4.265625 -46.9375 C 4.265625 -48.164062 4.707031 -49.171875 5.59375 -49.953125 C 6.445312 -50.671875 7.5 -51.03125 8.75 -51.03125 C 10 -51.03125 11.023438 -50.65625 11.828125 -49.90625 C 12.628906 -49.15625 13.03125 -48.164062 13.03125 -46.9375 Z M 13.03125 -4.671875 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(327.462103, 213.483395)"><g><path d="M 34.859375 -26.875 C 32.546875 -22.0625 28.882812 -14.503906 23.875 -4.203125 C 21.164062 1.335938 19.101562 5.929688 17.6875 9.578125 C 17.238281 10.890625 16.535156 12.835938 15.578125 15.421875 C 14.816406 17.410156 13.460938 18.40625 11.515625 18.40625 C 10.304688 18.40625 9.242188 18.015625 8.328125 17.234375 C 7.421875 16.453125 6.96875 15.46875 6.96875 14.28125 C 6.96875 12.3125 9.210938 6.46875 13.703125 -3.25 C 11.367188 -7.84375 7.671875 -14.613281 2.609375 -23.5625 C 2.097656 -24.363281 1.578125 -25.179688 1.046875 -26.015625 C 0.472656 -26.984375 0.1875 -27.875 0.1875 -28.6875 C 0.1875 -29.832031 0.640625 -30.835938 1.546875 -31.703125 C 2.460938 -32.566406 3.515625 -33 4.703125 -33 C 6.109375 -33 7.203125 -32.484375 7.984375 -31.453125 C 10.992188 -27.441406 14.5 -21.410156 18.5 -13.359375 C 20.769531 -18.378906 22.148438 -21.410156 22.640625 -22.453125 C 24.148438 -25.609375 25.625 -28.382812 27.0625 -30.78125 C 27.96875 -32.3125 29.21875 -33.078125 30.8125 -33.078125 C 32 -33.078125 33.054688 -32.671875 33.984375 -31.859375 C 34.921875 -31.054688 35.390625 -30.070312 35.390625 -28.90625 C 35.390625 -28.289062 35.210938 -27.613281 34.859375 -26.875 Z M 34.859375 -26.875 "/></g></g></g></svg> \ No newline at end of file diff --git a/backend/src/public/dist/assets/coffee-8a3f4512.jpg b/backend/src/public/dist/assets/coffee-8a3f4512.jpg new file mode 100644 index 0000000..c1a5796 Binary files /dev/null and b/backend/src/public/dist/assets/coffee-8a3f4512.jpg differ diff --git a/backend/src/public/dist/assets/dark1-d97a968a.png b/backend/src/public/dist/assets/dark1-d97a968a.png new file mode 100644 index 0000000..fad5d90 Binary files /dev/null and b/backend/src/public/dist/assets/dark1-d97a968a.png differ diff --git a/backend/src/public/dist/assets/dark2-f4da29c7.jpg b/backend/src/public/dist/assets/dark2-f4da29c7.jpg new file mode 100644 index 0000000..6c6c547 Binary files /dev/null and b/backend/src/public/dist/assets/dark2-f4da29c7.jpg differ diff --git a/backend/src/public/dist/assets/dark3-0a2fff6b.jpg b/backend/src/public/dist/assets/dark3-0a2fff6b.jpg new file mode 100644 index 0000000..fcfddd6 Binary files /dev/null and b/backend/src/public/dist/assets/dark3-0a2fff6b.jpg differ diff --git a/backend/src/public/dist/assets/empty-state-27cd4c62.js b/backend/src/public/dist/assets/empty-state-27cd4c62.js new file mode 100644 index 0000000..fc574f7 --- /dev/null +++ b/backend/src/public/dist/assets/empty-state-27cd4c62.js @@ -0,0 +1 @@ +import{c as t,j as e,P as s}from"./index-d8866171.js";const a=t("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v5Z",key:"16vlm8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);function c(){return e.jsxs("div",{className:"h-screen flex items-center justify-center flex-col",children:[e.jsx("div",{className:"rounded-full bg-brand-p1 border-2 mb-2 border-[rgb(49,102,145)] h-[70px] w-[70px] flex items-center justify-center text-gray-100",children:e.jsx(a,{size:35})}),e.jsx(s,{className:"text-lg font-medium text-muted-foreground",children:"Welcome to chatly click a chat to start a conversation"})]})}export{c as E}; diff --git a/backend/src/public/dist/assets/femaleHero-9a59337a.png b/backend/src/public/dist/assets/femaleHero-9a59337a.png new file mode 100644 index 0000000..8fbdfea Binary files /dev/null and b/backend/src/public/dist/assets/femaleHero-9a59337a.png differ diff --git a/backend/src/public/dist/assets/green1-c08a6088.jpg b/backend/src/public/dist/assets/green1-c08a6088.jpg new file mode 100644 index 0000000..1511e28 Binary files /dev/null and b/backend/src/public/dist/assets/green1-c08a6088.jpg differ diff --git a/backend/src/public/dist/assets/group-7eb70257.svg b/backend/src/public/dist/assets/group-7eb70257.svg new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/backend/src/public/dist/assets/group-7eb70257.svg @@ -0,0 +1 @@ + diff --git a/backend/src/public/dist/assets/groupchats-c07878ef.png b/backend/src/public/dist/assets/groupchats-c07878ef.png new file mode 100644 index 0000000..7e7b227 Binary files /dev/null and b/backend/src/public/dist/assets/groupchats-c07878ef.png differ diff --git a/backend/src/public/dist/assets/heroBg-9a90915d.png b/backend/src/public/dist/assets/heroBg-9a90915d.png new file mode 100644 index 0000000..253ac48 Binary files /dev/null and b/backend/src/public/dist/assets/heroBg-9a90915d.png differ diff --git a/backend/src/public/dist/assets/index-d8866171.js b/backend/src/public/dist/assets/index-d8866171.js new file mode 100644 index 0000000..23287af --- /dev/null +++ b/backend/src/public/dist/assets/index-d8866171.js @@ -0,0 +1,374 @@ +var Gf=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var R=(e,t,n)=>(Gf(e,t,"read from private field"),n?n.call(e):t.get(e)),oe=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ee=(e,t,n,r)=>(Gf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var cu=(e,t,n,r)=>({set _(s){ee(e,t,s,n)},get _(){return R(e,t,r)}}),_e=(e,t,n)=>(Gf(e,t,"access private method"),n);function u_(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var ip=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ld(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mx={exports:{}},Vd={},gx={exports:{}},Te={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ql=Symbol.for("react.element"),c_=Symbol.for("react.portal"),d_=Symbol.for("react.fragment"),f_=Symbol.for("react.strict_mode"),h_=Symbol.for("react.profiler"),p_=Symbol.for("react.provider"),m_=Symbol.for("react.context"),g_=Symbol.for("react.forward_ref"),v_=Symbol.for("react.suspense"),y_=Symbol.for("react.memo"),b_=Symbol.for("react.lazy"),Ny=Symbol.iterator;function x_(e){return e===null||typeof e!="object"?null:(e=Ny&&e[Ny]||e["@@iterator"],typeof e=="function"?e:null)}var vx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yx=Object.assign,bx={};function Jo(e,t,n){this.props=e,this.context=t,this.refs=bx,this.updater=n||vx}Jo.prototype.isReactComponent={};Jo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Jo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xx(){}xx.prototype=Jo.prototype;function bg(e,t,n){this.props=e,this.context=t,this.refs=bx,this.updater=n||vx}var xg=bg.prototype=new xx;xg.constructor=bg;yx(xg,Jo.prototype);xg.isPureReactComponent=!0;var Dy=Array.isArray,wx=Object.prototype.hasOwnProperty,wg={current:null},Ex={key:!0,ref:!0,__self:!0,__source:!0};function Sx(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)wx.call(t,r)&&!Ex.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ql,type:e,key:i,ref:o,props:s,_owner:wg.current}}function w_(e,t){return{$$typeof:ql,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Eg(e){return typeof e=="object"&&e!==null&&e.$$typeof===ql}function E_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var jy=/\/+/g;function Qf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?E_(""+e.key):t.toString(36)}function Zu(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ql:case c_:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Qf(o,0):r,Dy(s)?(n="",e!=null&&(n=e.replace(jy,"$&/")+"/"),Zu(s,t,n,"",function(u){return u})):s!=null&&(Eg(s)&&(s=w_(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(jy,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Dy(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Qf(i,a);o+=Zu(i,t,n,l,s)}else if(l=x_(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Qf(i,a++),o+=Zu(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function du(e,t,n){if(e==null)return e;var r=[],s=0;return Zu(e,r,"","",function(i){return t.call(n,i,s++)}),r}function S_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Kt={current:null},Yu={transition:null},C_={ReactCurrentDispatcher:Kt,ReactCurrentBatchConfig:Yu,ReactCurrentOwner:wg};Te.Children={map:du,forEach:function(e,t,n){du(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return du(e,function(){t++}),t},toArray:function(e){return du(e,function(t){return t})||[]},only:function(e){if(!Eg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Te.Component=Jo;Te.Fragment=d_;Te.Profiler=h_;Te.PureComponent=bg;Te.StrictMode=f_;Te.Suspense=v_;Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C_;Te.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=yx({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=wg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)wx.call(t,l)&&!Ex.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ql,type:e.type,key:s,ref:i,props:r,_owner:o}};Te.createContext=function(e){return e={$$typeof:m_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:p_,_context:e},e.Consumer=e};Te.createElement=Sx;Te.createFactory=function(e){var t=Sx.bind(null,e);return t.type=e,t};Te.createRef=function(){return{current:null}};Te.forwardRef=function(e){return{$$typeof:g_,render:e}};Te.isValidElement=Eg;Te.lazy=function(e){return{$$typeof:b_,_payload:{_status:-1,_result:e},_init:S_}};Te.memo=function(e,t){return{$$typeof:y_,type:e,compare:t===void 0?null:t}};Te.startTransition=function(e){var t=Yu.transition;Yu.transition={};try{e()}finally{Yu.transition=t}};Te.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Te.useCallback=function(e,t){return Kt.current.useCallback(e,t)};Te.useContext=function(e){return Kt.current.useContext(e)};Te.useDebugValue=function(){};Te.useDeferredValue=function(e){return Kt.current.useDeferredValue(e)};Te.useEffect=function(e,t){return Kt.current.useEffect(e,t)};Te.useId=function(){return Kt.current.useId()};Te.useImperativeHandle=function(e,t,n){return Kt.current.useImperativeHandle(e,t,n)};Te.useInsertionEffect=function(e,t){return Kt.current.useInsertionEffect(e,t)};Te.useLayoutEffect=function(e,t){return Kt.current.useLayoutEffect(e,t)};Te.useMemo=function(e,t){return Kt.current.useMemo(e,t)};Te.useReducer=function(e,t,n){return Kt.current.useReducer(e,t,n)};Te.useRef=function(e){return Kt.current.useRef(e)};Te.useState=function(e){return Kt.current.useState(e)};Te.useSyncExternalStore=function(e,t,n){return Kt.current.useSyncExternalStore(e,t,n)};Te.useTransition=function(){return Kt.current.useTransition()};Te.version="18.3.0";gx.exports=Te;var h=gx.exports;const G=Ld(h),Ac=u_({__proto__:null,default:G},[h]);/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var k_=h,__=Symbol.for("react.element"),O_=Symbol.for("react.fragment"),R_=Object.prototype.hasOwnProperty,P_=k_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,A_={key:!0,ref:!0,__self:!0,__source:!0};function Cx(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)R_.call(t,r)&&!A_.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:__,type:e,key:i,ref:o,props:s,_owner:P_.current}}Vd.Fragment=O_;Vd.jsx=Cx;Vd.jsxs=Cx;mx.exports=Vd;var w=mx.exports,op={},kx={exports:{}},gn={},_x={exports:{}},Ox={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(D,N){var B=D.length;D.push(N);e:for(;0<B;){var Z=B-1>>>1,Q=D[Z];if(0<s(Q,N))D[Z]=N,D[B]=Q,B=Z;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var N=D[0],B=D.pop();if(B!==N){D[0]=B;e:for(var Z=0,Q=D.length,se=Q>>>1;Z<se;){var be=2*(Z+1)-1,Ce=D[be],pe=be+1,me=D[pe];if(0>s(Ce,B))pe<Q&&0>s(me,Ce)?(D[Z]=me,D[pe]=B,Z=pe):(D[Z]=Ce,D[be]=B,Z=be);else if(pe<Q&&0>s(me,B))D[Z]=me,D[pe]=B,Z=pe;else break e}}return N}function s(D,N){var B=D.sortIndex-N.sortIndex;return B!==0?B:D.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,c=null,f=3,p=!1,v=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(D){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=D)r(u),N.sortIndex=N.expirationTime,t(l,N);else break;N=n(u)}}function E(D){if(y=!1,x(D),!v)if(n(l)!==null)v=!0,z(C);else{var N=n(u);N!==null&&X(E,N.startTime-D)}}function C(D,N){v=!1,y&&(y=!1,m(S),S=-1),p=!0;var B=f;try{for(x(N),c=n(l);c!==null&&(!(c.expirationTime>N)||D&&!T());){var Z=c.callback;if(typeof Z=="function"){c.callback=null,f=c.priorityLevel;var Q=Z(c.expirationTime<=N);N=e.unstable_now(),typeof Q=="function"?c.callback=Q:c===n(l)&&r(l),x(N)}else r(l);c=n(l)}if(c!==null)var se=!0;else{var be=n(u);be!==null&&X(E,be.startTime-N),se=!1}return se}finally{c=null,f=B,p=!1}}var O=!1,k=null,S=-1,$=5,A=-1;function T(){return!(e.unstable_now()-A<$)}function P(){if(k!==null){var D=e.unstable_now();A=D;var N=!0;try{N=k(!0,D)}finally{N?L():(O=!1,k=null)}}else O=!1}var L;if(typeof g=="function")L=function(){g(P)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,U=I.port2;I.port1.onmessage=P,L=function(){U.postMessage(null)}}else L=function(){b(P,0)};function z(D){k=D,O||(O=!0,L())}function X(D,N){S=b(function(){D(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){v||p||(v=!0,z(C))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(f){case 1:case 2:case 3:var N=3;break;default:N=f}var B=f;f=N;try{return D()}finally{f=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,N){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var B=f;f=D;try{return N()}finally{f=B}},e.unstable_scheduleCallback=function(D,N,B){var Z=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Z+B:Z):B=Z,D){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=B+Q,D={id:d++,callback:N,priorityLevel:D,startTime:B,expirationTime:Q,sortIndex:-1},B>Z?(D.sortIndex=B,t(u,D),n(l)===null&&D===n(u)&&(y?(m(S),S=-1):y=!0,X(E,B-Z))):(D.sortIndex=Q,t(l,D),v||p||(v=!0,z(C))),D},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(D){var N=f;return function(){var B=f;f=N;try{return D.apply(this,arguments)}finally{f=B}}}})(Ox);_x.exports=Ox;var T_=_x.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $_=h,mn=T_;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Rx=new Set,Za={};function Ci(e,t){Io(e,t),Io(e+"Capture",t)}function Io(e,t){for(Za[e]=t,e=0;e<t.length;e++)Rx.add(t[e])}var Vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ap=Object.prototype.hasOwnProperty,I_=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fy={},Ly={};function M_(e){return ap.call(Ly,e)?!0:ap.call(Fy,e)?!1:I_.test(e)?Ly[e]=!0:(Fy[e]=!0,!1)}function N_(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function D_(e,t,n,r){if(t===null||typeof t>"u"||N_(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Gt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Gt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Gt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Gt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Gt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Tt[e]=new Gt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Gt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Gt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Gt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Gt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Sg=/[\-:]([a-z])/g;function Cg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Sg,Cg);Tt[t]=new Gt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Sg,Cg);Tt[t]=new Gt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Sg,Cg);Tt[t]=new Gt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Gt(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Gt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Gt(e,1,!1,e.toLowerCase(),null,!0,!0)});function kg(e,t,n,r){var s=Tt.hasOwnProperty(t)?Tt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(D_(t,n,s,r)&&(n=null),r||s===null?M_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zr=$_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fu=Symbol.for("react.element"),qi=Symbol.for("react.portal"),Ki=Symbol.for("react.fragment"),_g=Symbol.for("react.strict_mode"),lp=Symbol.for("react.profiler"),Px=Symbol.for("react.provider"),Ax=Symbol.for("react.context"),Og=Symbol.for("react.forward_ref"),up=Symbol.for("react.suspense"),cp=Symbol.for("react.suspense_list"),Rg=Symbol.for("react.memo"),os=Symbol.for("react.lazy"),Tx=Symbol.for("react.offscreen"),Vy=Symbol.iterator;function ha(e){return e===null||typeof e!="object"?null:(e=Vy&&e[Vy]||e["@@iterator"],typeof e=="function"?e:null)}var et=Object.assign,Zf;function Pa(e){if(Zf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zf=t&&t[1]||""}return` +`+Zf+e}var Yf=!1;function Xf(e,t){if(!e||Yf)return"";Yf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` +`),i=r.stack.split(` +`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` +`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Yf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pa(e):""}function j_(e){switch(e.tag){case 5:return Pa(e.type);case 16:return Pa("Lazy");case 13:return Pa("Suspense");case 19:return Pa("SuspenseList");case 0:case 2:case 15:return e=Xf(e.type,!1),e;case 11:return e=Xf(e.type.render,!1),e;case 1:return e=Xf(e.type,!0),e;default:return""}}function dp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ki:return"Fragment";case qi:return"Portal";case lp:return"Profiler";case _g:return"StrictMode";case up:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ax:return(e.displayName||"Context")+".Consumer";case Px:return(e._context.displayName||"Context")+".Provider";case Og:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Rg:return t=e.displayName||null,t!==null?t:dp(e.type)||"Memo";case os:t=e._payload,e=e._init;try{return dp(e(t))}catch{}}return null}function F_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return dp(t);case 8:return t===_g?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ns(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $x(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function L_(e){var t=$x(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hu(e){e._valueTracker||(e._valueTracker=L_(e))}function Ix(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$x(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Tc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function fp(e,t){var n=t.checked;return et({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ns(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Mx(e,t){t=t.checked,t!=null&&kg(e,"checked",t,!1)}function hp(e,t){Mx(e,t);var n=Ns(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pp(e,t.type,n):t.hasOwnProperty("defaultValue")&&pp(e,t.type,Ns(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pp(e,t,n){(t!=="number"||Tc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Aa=Array.isArray;function ao(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ns(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function mp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return et({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function By(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(Aa(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ns(n)}}function Nx(e,t){var n=Ns(t.value),r=Ns(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Hy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Dx(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function gp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Dx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pu,jx=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pu=pu||document.createElement("div"),pu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ya(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ja={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},V_=["Webkit","ms","Moz","O"];Object.keys(ja).forEach(function(e){V_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ja[t]=ja[e]})});function Fx(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ja.hasOwnProperty(e)&&ja[e]?(""+t).trim():t+"px"}function Lx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Fx(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var U_=et({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vp(e,t){if(t){if(U_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function yp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bp=null;function Pg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xp=null,lo=null,uo=null;function Wy(e){if(e=Ql(e)){if(typeof xp!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Wd(t),xp(e.stateNode,e.type,t))}}function Vx(e){lo?uo?uo.push(e):uo=[e]:lo=e}function Ux(){if(lo){var e=lo,t=uo;if(uo=lo=null,Wy(e),t)for(e=0;e<t.length;e++)Wy(t[e])}}function zx(e,t){return e(t)}function Bx(){}var Jf=!1;function Hx(e,t,n){if(Jf)return e(t,n);Jf=!0;try{return zx(e,t,n)}finally{Jf=!1,(lo!==null||uo!==null)&&(Bx(),Ux())}}function Xa(e,t){var n=e.stateNode;if(n===null)return null;var r=Wd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var wp=!1;if(Vr)try{var pa={};Object.defineProperty(pa,"passive",{get:function(){wp=!0}}),window.addEventListener("test",pa,pa),window.removeEventListener("test",pa,pa)}catch{wp=!1}function z_(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Fa=!1,$c=null,Ic=!1,Ep=null,B_={onError:function(e){Fa=!0,$c=e}};function H_(e,t,n,r,s,i,o,a,l){Fa=!1,$c=null,z_.apply(B_,arguments)}function W_(e,t,n,r,s,i,o,a,l){if(H_.apply(this,arguments),Fa){if(Fa){var u=$c;Fa=!1,$c=null}else throw Error(W(198));Ic||(Ic=!0,Ep=u)}}function ki(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Wx(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function qy(e){if(ki(e)!==e)throw Error(W(188))}function q_(e){var t=e.alternate;if(!t){if(t=ki(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return qy(s),e;if(i===r)return qy(s),t;i=i.sibling}throw Error(W(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function qx(e){return e=q_(e),e!==null?Kx(e):null}function Kx(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Kx(e);if(t!==null)return t;e=e.sibling}return null}var Gx=mn.unstable_scheduleCallback,Ky=mn.unstable_cancelCallback,K_=mn.unstable_shouldYield,G_=mn.unstable_requestPaint,lt=mn.unstable_now,Q_=mn.unstable_getCurrentPriorityLevel,Ag=mn.unstable_ImmediatePriority,Qx=mn.unstable_UserBlockingPriority,Mc=mn.unstable_NormalPriority,Z_=mn.unstable_LowPriority,Zx=mn.unstable_IdlePriority,Ud=null,fr=null;function Y_(e){if(fr&&typeof fr.onCommitFiberRoot=="function")try{fr.onCommitFiberRoot(Ud,e,void 0,(e.current.flags&128)===128)}catch{}}var Bn=Math.clz32?Math.clz32:eO,X_=Math.log,J_=Math.LN2;function eO(e){return e>>>=0,e===0?32:31-(X_(e)/J_|0)|0}var mu=64,gu=4194304;function Ta(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Ta(a):(i&=o,i!==0&&(r=Ta(i)))}else o=n&~s,o!==0?r=Ta(o):i!==0&&(r=Ta(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Bn(t),s=1<<n,r|=e[n],t&=~s;return r}function tO(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nO(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Bn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=tO(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Sp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yx(){var e=mu;return mu<<=1,!(mu&4194240)&&(mu=64),e}function eh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bn(t),e[t]=n}function rO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Bn(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Tg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Bn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Ve=0;function Xx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Jx,$g,ew,tw,nw,Cp=!1,vu=[],ks=null,_s=null,Os=null,Ja=new Map,el=new Map,us=[],sO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Gy(e,t){switch(e){case"focusin":case"focusout":ks=null;break;case"dragenter":case"dragleave":_s=null;break;case"mouseover":case"mouseout":Os=null;break;case"pointerover":case"pointerout":Ja.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":el.delete(t.pointerId)}}function ma(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Ql(t),t!==null&&$g(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function iO(e,t,n,r,s){switch(t){case"focusin":return ks=ma(ks,e,t,n,r,s),!0;case"dragenter":return _s=ma(_s,e,t,n,r,s),!0;case"mouseover":return Os=ma(Os,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ja.set(i,ma(Ja.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,el.set(i,ma(el.get(i)||null,e,t,n,r,s)),!0}return!1}function rw(e){var t=Xs(e.target);if(t!==null){var n=ki(t);if(n!==null){if(t=n.tag,t===13){if(t=Wx(n),t!==null){e.blockedOn=t,nw(e.priority,function(){ew(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bp=r,n.target.dispatchEvent(r),bp=null}else return t=Ql(n),t!==null&&$g(t),e.blockedOn=n,!1;t.shift()}return!0}function Qy(e,t,n){Xu(e)&&n.delete(t)}function oO(){Cp=!1,ks!==null&&Xu(ks)&&(ks=null),_s!==null&&Xu(_s)&&(_s=null),Os!==null&&Xu(Os)&&(Os=null),Ja.forEach(Qy),el.forEach(Qy)}function ga(e,t){e.blockedOn===t&&(e.blockedOn=null,Cp||(Cp=!0,mn.unstable_scheduleCallback(mn.unstable_NormalPriority,oO)))}function tl(e){function t(s){return ga(s,e)}if(0<vu.length){ga(vu[0],e);for(var n=1;n<vu.length;n++){var r=vu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ks!==null&&ga(ks,e),_s!==null&&ga(_s,e),Os!==null&&ga(Os,e),Ja.forEach(t),el.forEach(t),n=0;n<us.length;n++)r=us[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<us.length&&(n=us[0],n.blockedOn===null);)rw(n),n.blockedOn===null&&us.shift()}var co=Zr.ReactCurrentBatchConfig,Dc=!0;function aO(e,t,n,r){var s=Ve,i=co.transition;co.transition=null;try{Ve=1,Ig(e,t,n,r)}finally{Ve=s,co.transition=i}}function lO(e,t,n,r){var s=Ve,i=co.transition;co.transition=null;try{Ve=4,Ig(e,t,n,r)}finally{Ve=s,co.transition=i}}function Ig(e,t,n,r){if(Dc){var s=kp(e,t,n,r);if(s===null)ch(e,t,r,jc,n),Gy(e,r);else if(iO(s,e,t,n,r))r.stopPropagation();else if(Gy(e,r),t&4&&-1<sO.indexOf(e)){for(;s!==null;){var i=Ql(s);if(i!==null&&Jx(i),i=kp(e,t,n,r),i===null&&ch(e,t,r,jc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ch(e,t,r,null,n)}}var jc=null;function kp(e,t,n,r){if(jc=null,e=Pg(r),e=Xs(e),e!==null)if(t=ki(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Wx(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return jc=e,null}function sw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Q_()){case Ag:return 1;case Qx:return 4;case Mc:case Z_:return 16;case Zx:return 536870912;default:return 16}default:return 16}}var xs=null,Mg=null,Ju=null;function iw(){if(Ju)return Ju;var e,t=Mg,n=t.length,r,s="value"in xs?xs.value:xs.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Ju=s.slice(e,1<r?1-r:void 0)}function ec(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yu(){return!0}function Zy(){return!1}function vn(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?yu:Zy,this.isPropagationStopped=Zy,this}return et(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yu)},persist:function(){},isPersistent:yu}),t}var ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ng=vn(ea),Gl=et({},ea,{view:0,detail:0}),uO=vn(Gl),th,nh,va,zd=et({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==va&&(va&&e.type==="mousemove"?(th=e.screenX-va.screenX,nh=e.screenY-va.screenY):nh=th=0,va=e),th)},movementY:function(e){return"movementY"in e?e.movementY:nh}}),Yy=vn(zd),cO=et({},zd,{dataTransfer:0}),dO=vn(cO),fO=et({},Gl,{relatedTarget:0}),rh=vn(fO),hO=et({},ea,{animationName:0,elapsedTime:0,pseudoElement:0}),pO=vn(hO),mO=et({},ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gO=vn(mO),vO=et({},ea,{data:0}),Xy=vn(vO),yO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bO={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xO[e])?!!t[e]:!1}function Dg(){return wO}var EO=et({},Gl,{key:function(e){if(e.key){var t=yO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ec(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dg,charCode:function(e){return e.type==="keypress"?ec(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ec(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SO=vn(EO),CO=et({},zd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jy=vn(CO),kO=et({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dg}),_O=vn(kO),OO=et({},ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),RO=vn(OO),PO=et({},zd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),AO=vn(PO),TO=[9,13,27,32],jg=Vr&&"CompositionEvent"in window,La=null;Vr&&"documentMode"in document&&(La=document.documentMode);var $O=Vr&&"TextEvent"in window&&!La,ow=Vr&&(!jg||La&&8<La&&11>=La),e0=String.fromCharCode(32),t0=!1;function aw(e,t){switch(e){case"keyup":return TO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function IO(e,t){switch(e){case"compositionend":return lw(t);case"keypress":return t.which!==32?null:(t0=!0,e0);case"textInput":return e=t.data,e===e0&&t0?null:e;default:return null}}function MO(e,t){if(Gi)return e==="compositionend"||!jg&&aw(e,t)?(e=iw(),Ju=Mg=xs=null,Gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ow&&t.locale!=="ko"?null:t.data;default:return null}}var NO={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function n0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!NO[e.type]:t==="textarea"}function uw(e,t,n,r){Vx(r),t=Fc(t,"onChange"),0<t.length&&(n=new Ng("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Va=null,nl=null;function DO(e){xw(e,0)}function Bd(e){var t=Yi(e);if(Ix(t))return e}function jO(e,t){if(e==="change")return t}var cw=!1;if(Vr){var sh;if(Vr){var ih="oninput"in document;if(!ih){var r0=document.createElement("div");r0.setAttribute("oninput","return;"),ih=typeof r0.oninput=="function"}sh=ih}else sh=!1;cw=sh&&(!document.documentMode||9<document.documentMode)}function s0(){Va&&(Va.detachEvent("onpropertychange",dw),nl=Va=null)}function dw(e){if(e.propertyName==="value"&&Bd(nl)){var t=[];uw(t,nl,e,Pg(e)),Hx(DO,t)}}function FO(e,t,n){e==="focusin"?(s0(),Va=t,nl=n,Va.attachEvent("onpropertychange",dw)):e==="focusout"&&s0()}function LO(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bd(nl)}function VO(e,t){if(e==="click")return Bd(t)}function UO(e,t){if(e==="input"||e==="change")return Bd(t)}function zO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qn=typeof Object.is=="function"?Object.is:zO;function rl(e,t){if(qn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ap.call(t,s)||!qn(e[s],t[s]))return!1}return!0}function i0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o0(e,t){var n=i0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=i0(n)}}function fw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hw(){for(var e=window,t=Tc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Tc(e.document)}return t}function Fg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function BO(e){var t=hw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fw(n.ownerDocument.documentElement,n)){if(r!==null&&Fg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=o0(n,i);var o=o0(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var HO=Vr&&"documentMode"in document&&11>=document.documentMode,Qi=null,_p=null,Ua=null,Op=!1;function a0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Op||Qi==null||Qi!==Tc(r)||(r=Qi,"selectionStart"in r&&Fg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ua&&rl(Ua,r)||(Ua=r,r=Fc(_p,"onSelect"),0<r.length&&(t=new Ng("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qi)))}function bu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zi={animationend:bu("Animation","AnimationEnd"),animationiteration:bu("Animation","AnimationIteration"),animationstart:bu("Animation","AnimationStart"),transitionend:bu("Transition","TransitionEnd")},oh={},pw={};Vr&&(pw=document.createElement("div").style,"AnimationEvent"in window||(delete Zi.animationend.animation,delete Zi.animationiteration.animation,delete Zi.animationstart.animation),"TransitionEvent"in window||delete Zi.transitionend.transition);function Hd(e){if(oh[e])return oh[e];if(!Zi[e])return e;var t=Zi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in pw)return oh[e]=t[n];return e}var mw=Hd("animationend"),gw=Hd("animationiteration"),vw=Hd("animationstart"),yw=Hd("transitionend"),bw=new Map,l0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Hs(e,t){bw.set(e,t),Ci(t,[e])}for(var ah=0;ah<l0.length;ah++){var lh=l0[ah],WO=lh.toLowerCase(),qO=lh[0].toUpperCase()+lh.slice(1);Hs(WO,"on"+qO)}Hs(mw,"onAnimationEnd");Hs(gw,"onAnimationIteration");Hs(vw,"onAnimationStart");Hs("dblclick","onDoubleClick");Hs("focusin","onFocus");Hs("focusout","onBlur");Hs(yw,"onTransitionEnd");Io("onMouseEnter",["mouseout","mouseover"]);Io("onMouseLeave",["mouseout","mouseover"]);Io("onPointerEnter",["pointerout","pointerover"]);Io("onPointerLeave",["pointerout","pointerover"]);Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $a="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),KO=new Set("cancel close invalid load scroll toggle".split(" ").concat($a));function u0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,W_(r,t,void 0,e),e.currentTarget=null}function xw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;u0(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;u0(s,a,u),i=l}}}if(Ic)throw e=Ep,Ic=!1,Ep=null,e}function Ge(e,t){var n=t[$p];n===void 0&&(n=t[$p]=new Set);var r=e+"__bubble";n.has(r)||(ww(t,e,2,!1),n.add(r))}function uh(e,t,n){var r=0;t&&(r|=4),ww(n,e,r,t)}var xu="_reactListening"+Math.random().toString(36).slice(2);function sl(e){if(!e[xu]){e[xu]=!0,Rx.forEach(function(n){n!=="selectionchange"&&(KO.has(n)||uh(n,!1,e),uh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xu]||(t[xu]=!0,uh("selectionchange",!1,t))}}function ww(e,t,n,r){switch(sw(t)){case 1:var s=aO;break;case 4:s=lO;break;default:s=Ig}n=s.bind(null,t,n,e),s=void 0,!wp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function ch(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Xs(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Hx(function(){var u=i,d=Pg(n),c=[];e:{var f=bw.get(e);if(f!==void 0){var p=Ng,v=e;switch(e){case"keypress":if(ec(n)===0)break e;case"keydown":case"keyup":p=SO;break;case"focusin":v="focus",p=rh;break;case"focusout":v="blur",p=rh;break;case"beforeblur":case"afterblur":p=rh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Yy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=dO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=_O;break;case mw:case gw:case vw:p=pO;break;case yw:p=RO;break;case"scroll":p=uO;break;case"wheel":p=AO;break;case"copy":case"cut":case"paste":p=gO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Jy}var y=(t&4)!==0,b=!y&&e==="scroll",m=y?f!==null?f+"Capture":null:f;y=[];for(var g=u,x;g!==null;){x=g;var E=x.stateNode;if(x.tag===5&&E!==null&&(x=E,m!==null&&(E=Xa(g,m),E!=null&&y.push(il(g,E,x)))),b)break;g=g.return}0<y.length&&(f=new p(f,v,null,n,d),c.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==bp&&(v=n.relatedTarget||n.fromElement)&&(Xs(v)||v[Ur]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=u,v=v?Xs(v):null,v!==null&&(b=ki(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=u),p!==v)){if(y=Yy,E="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=Jy,E="onPointerLeave",m="onPointerEnter",g="pointer"),b=p==null?f:Yi(p),x=v==null?f:Yi(v),f=new y(E,g+"leave",p,n,d),f.target=b,f.relatedTarget=x,E=null,Xs(d)===u&&(y=new y(m,g+"enter",v,n,d),y.target=x,y.relatedTarget=b,E=y),b=E,p&&v)t:{for(y=p,m=v,g=0,x=y;x;x=Mi(x))g++;for(x=0,E=m;E;E=Mi(E))x++;for(;0<g-x;)y=Mi(y),g--;for(;0<x-g;)m=Mi(m),x--;for(;g--;){if(y===m||m!==null&&y===m.alternate)break t;y=Mi(y),m=Mi(m)}y=null}else y=null;p!==null&&c0(c,f,p,y,!1),v!==null&&b!==null&&c0(c,b,v,y,!0)}}e:{if(f=u?Yi(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=jO;else if(n0(f))if(cw)C=UO;else{C=LO;var O=FO}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=VO);if(C&&(C=C(e,u))){uw(c,C,n,d);break e}O&&O(e,f,u),e==="focusout"&&(O=f._wrapperState)&&O.controlled&&f.type==="number"&&pp(f,"number",f.value)}switch(O=u?Yi(u):window,e){case"focusin":(n0(O)||O.contentEditable==="true")&&(Qi=O,_p=u,Ua=null);break;case"focusout":Ua=_p=Qi=null;break;case"mousedown":Op=!0;break;case"contextmenu":case"mouseup":case"dragend":Op=!1,a0(c,n,d);break;case"selectionchange":if(HO)break;case"keydown":case"keyup":a0(c,n,d)}var k;if(jg)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Gi?aw(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(ow&&n.locale!=="ko"&&(Gi||S!=="onCompositionStart"?S==="onCompositionEnd"&&Gi&&(k=iw()):(xs=d,Mg="value"in xs?xs.value:xs.textContent,Gi=!0)),O=Fc(u,S),0<O.length&&(S=new Xy(S,e,null,n,d),c.push({event:S,listeners:O}),k?S.data=k:(k=lw(n),k!==null&&(S.data=k)))),(k=$O?IO(e,n):MO(e,n))&&(u=Fc(u,"onBeforeInput"),0<u.length&&(d=new Xy("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=k))}xw(c,t)})}function il(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Xa(e,n),i!=null&&r.unshift(il(e,i,s)),i=Xa(e,t),i!=null&&r.push(il(e,i,s))),e=e.return}return r}function Mi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function c0(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=Xa(n,i),l!=null&&o.unshift(il(n,l,a))):s||(l=Xa(n,i),l!=null&&o.push(il(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var GO=/\r\n?/g,QO=/\u0000|\uFFFD/g;function d0(e){return(typeof e=="string"?e:""+e).replace(GO,` +`).replace(QO,"")}function wu(e,t,n){if(t=d0(t),d0(e)!==t&&n)throw Error(W(425))}function Lc(){}var Rp=null,Pp=null;function Ap(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Tp=typeof setTimeout=="function"?setTimeout:void 0,ZO=typeof clearTimeout=="function"?clearTimeout:void 0,f0=typeof Promise=="function"?Promise:void 0,YO=typeof queueMicrotask=="function"?queueMicrotask:typeof f0<"u"?function(e){return f0.resolve(null).then(e).catch(XO)}:Tp;function XO(e){setTimeout(function(){throw e})}function dh(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),tl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);tl(t)}function Rs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function h0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ta=Math.random().toString(36).slice(2),or="__reactFiber$"+ta,ol="__reactProps$"+ta,Ur="__reactContainer$"+ta,$p="__reactEvents$"+ta,JO="__reactListeners$"+ta,eR="__reactHandles$"+ta;function Xs(e){var t=e[or];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ur]||n[or]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=h0(e);e!==null;){if(n=e[or])return n;e=h0(e)}return t}e=n,n=e.parentNode}return null}function Ql(e){return e=e[or]||e[Ur],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function Wd(e){return e[ol]||null}var Ip=[],Xi=-1;function Ws(e){return{current:e}}function Ze(e){0>Xi||(e.current=Ip[Xi],Ip[Xi]=null,Xi--)}function We(e,t){Xi++,Ip[Xi]=e.current,e.current=t}var Ds={},Lt=Ws(Ds),en=Ws(!1),hi=Ds;function Mo(e,t){var n=e.type.contextTypes;if(!n)return Ds;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function tn(e){return e=e.childContextTypes,e!=null}function Vc(){Ze(en),Ze(Lt)}function p0(e,t,n){if(Lt.current!==Ds)throw Error(W(168));We(Lt,t),We(en,n)}function Ew(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(W(108,F_(e)||"Unknown",s));return et({},n,r)}function Uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ds,hi=Lt.current,We(Lt,e),We(en,en.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=Ew(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,Ze(en),Ze(Lt),We(Lt,e)):Ze(en),We(en,n)}var Pr=null,qd=!1,fh=!1;function Sw(e){Pr===null?Pr=[e]:Pr.push(e)}function tR(e){qd=!0,Sw(e)}function qs(){if(!fh&&Pr!==null){fh=!0;var e=0,t=Ve;try{var n=Pr;for(Ve=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pr=null,qd=!1}catch(s){throw Pr!==null&&(Pr=Pr.slice(e+1)),Gx(Ag,qs),s}finally{Ve=t,fh=!1}}return null}var Ji=[],eo=0,zc=null,Bc=0,Sn=[],Cn=0,pi=null,$r=1,Ir="";function Qs(e,t){Ji[eo++]=Bc,Ji[eo++]=zc,zc=e,Bc=t}function Cw(e,t,n){Sn[Cn++]=$r,Sn[Cn++]=Ir,Sn[Cn++]=pi,pi=e;var r=$r;e=Ir;var s=32-Bn(r)-1;r&=~(1<<s),n+=1;var i=32-Bn(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,$r=1<<32-Bn(t)+s|n<<s|r,Ir=i+e}else $r=1<<i|n<<s|r,Ir=e}function Lg(e){e.return!==null&&(Qs(e,1),Cw(e,1,0))}function Vg(e){for(;e===zc;)zc=Ji[--eo],Ji[eo]=null,Bc=Ji[--eo],Ji[eo]=null;for(;e===pi;)pi=Sn[--Cn],Sn[Cn]=null,Ir=Sn[--Cn],Sn[Cn]=null,$r=Sn[--Cn],Sn[Cn]=null}var fn=null,cn=null,Ye=!1,Ln=null;function kw(e,t){var n=_n(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function g0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,fn=e,cn=Rs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,fn=e,cn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=pi!==null?{id:$r,overflow:Ir}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=_n(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,fn=e,cn=null,!0):!1;default:return!1}}function Mp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Np(e){if(Ye){var t=cn;if(t){var n=t;if(!g0(e,t)){if(Mp(e))throw Error(W(418));t=Rs(n.nextSibling);var r=fn;t&&g0(e,t)?kw(r,n):(e.flags=e.flags&-4097|2,Ye=!1,fn=e)}}else{if(Mp(e))throw Error(W(418));e.flags=e.flags&-4097|2,Ye=!1,fn=e}}}function v0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;fn=e}function Eu(e){if(e!==fn)return!1;if(!Ye)return v0(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ap(e.type,e.memoizedProps)),t&&(t=cn)){if(Mp(e))throw _w(),Error(W(418));for(;t;)kw(e,t),t=Rs(t.nextSibling)}if(v0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){cn=Rs(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}cn=null}}else cn=fn?Rs(e.stateNode.nextSibling):null;return!0}function _w(){for(var e=cn;e;)e=Rs(e.nextSibling)}function No(){cn=fn=null,Ye=!1}function Ug(e){Ln===null?Ln=[e]:Ln.push(e)}var nR=Zr.ReactCurrentBatchConfig;function ya(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function Su(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function y0(e){var t=e._init;return t(e._payload)}function Ow(e){function t(m,g){if(e){var x=m.deletions;x===null?(m.deletions=[g],m.flags|=16):x.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function s(m,g){return m=$s(m,g),m.index=0,m.sibling=null,m}function i(m,g,x){return m.index=x,e?(x=m.alternate,x!==null?(x=x.index,x<g?(m.flags|=2,g):x):(m.flags|=2,g)):(m.flags|=1048576,g)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,x,E){return g===null||g.tag!==6?(g=bh(x,m.mode,E),g.return=m,g):(g=s(g,x),g.return=m,g)}function l(m,g,x,E){var C=x.type;return C===Ki?d(m,g,x.props.children,E,x.key):g!==null&&(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===os&&y0(C)===g.type)?(E=s(g,x.props),E.ref=ya(m,g,x),E.return=m,E):(E=ac(x.type,x.key,x.props,null,m.mode,E),E.ref=ya(m,g,x),E.return=m,E)}function u(m,g,x,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=xh(x,m.mode,E),g.return=m,g):(g=s(g,x.children||[]),g.return=m,g)}function d(m,g,x,E,C){return g===null||g.tag!==7?(g=fi(x,m.mode,E,C),g.return=m,g):(g=s(g,x),g.return=m,g)}function c(m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=bh(""+g,m.mode,x),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fu:return x=ac(g.type,g.key,g.props,null,m.mode,x),x.ref=ya(m,null,g),x.return=m,x;case qi:return g=xh(g,m.mode,x),g.return=m,g;case os:var E=g._init;return c(m,E(g._payload),x)}if(Aa(g)||ha(g))return g=fi(g,m.mode,x,null),g.return=m,g;Su(m,g)}return null}function f(m,g,x,E){var C=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:a(m,g,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case fu:return x.key===C?l(m,g,x,E):null;case qi:return x.key===C?u(m,g,x,E):null;case os:return C=x._init,f(m,g,C(x._payload),E)}if(Aa(x)||ha(x))return C!==null?null:d(m,g,x,E,null);Su(m,x)}return null}function p(m,g,x,E,C){if(typeof E=="string"&&E!==""||typeof E=="number")return m=m.get(x)||null,a(g,m,""+E,C);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case fu:return m=m.get(E.key===null?x:E.key)||null,l(g,m,E,C);case qi:return m=m.get(E.key===null?x:E.key)||null,u(g,m,E,C);case os:var O=E._init;return p(m,g,x,O(E._payload),C)}if(Aa(E)||ha(E))return m=m.get(x)||null,d(g,m,E,C,null);Su(g,E)}return null}function v(m,g,x,E){for(var C=null,O=null,k=g,S=g=0,$=null;k!==null&&S<x.length;S++){k.index>S?($=k,k=null):$=k.sibling;var A=f(m,k,x[S],E);if(A===null){k===null&&(k=$);break}e&&k&&A.alternate===null&&t(m,k),g=i(A,g,S),O===null?C=A:O.sibling=A,O=A,k=$}if(S===x.length)return n(m,k),Ye&&Qs(m,S),C;if(k===null){for(;S<x.length;S++)k=c(m,x[S],E),k!==null&&(g=i(k,g,S),O===null?C=k:O.sibling=k,O=k);return Ye&&Qs(m,S),C}for(k=r(m,k);S<x.length;S++)$=p(k,m,S,x[S],E),$!==null&&(e&&$.alternate!==null&&k.delete($.key===null?S:$.key),g=i($,g,S),O===null?C=$:O.sibling=$,O=$);return e&&k.forEach(function(T){return t(m,T)}),Ye&&Qs(m,S),C}function y(m,g,x,E){var C=ha(x);if(typeof C!="function")throw Error(W(150));if(x=C.call(x),x==null)throw Error(W(151));for(var O=C=null,k=g,S=g=0,$=null,A=x.next();k!==null&&!A.done;S++,A=x.next()){k.index>S?($=k,k=null):$=k.sibling;var T=f(m,k,A.value,E);if(T===null){k===null&&(k=$);break}e&&k&&T.alternate===null&&t(m,k),g=i(T,g,S),O===null?C=T:O.sibling=T,O=T,k=$}if(A.done)return n(m,k),Ye&&Qs(m,S),C;if(k===null){for(;!A.done;S++,A=x.next())A=c(m,A.value,E),A!==null&&(g=i(A,g,S),O===null?C=A:O.sibling=A,O=A);return Ye&&Qs(m,S),C}for(k=r(m,k);!A.done;S++,A=x.next())A=p(k,m,S,A.value,E),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?S:A.key),g=i(A,g,S),O===null?C=A:O.sibling=A,O=A);return e&&k.forEach(function(P){return t(m,P)}),Ye&&Qs(m,S),C}function b(m,g,x,E){if(typeof x=="object"&&x!==null&&x.type===Ki&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case fu:e:{for(var C=x.key,O=g;O!==null;){if(O.key===C){if(C=x.type,C===Ki){if(O.tag===7){n(m,O.sibling),g=s(O,x.props.children),g.return=m,m=g;break e}}else if(O.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===os&&y0(C)===O.type){n(m,O.sibling),g=s(O,x.props),g.ref=ya(m,O,x),g.return=m,m=g;break e}n(m,O);break}else t(m,O);O=O.sibling}x.type===Ki?(g=fi(x.props.children,m.mode,E,x.key),g.return=m,m=g):(E=ac(x.type,x.key,x.props,null,m.mode,E),E.ref=ya(m,g,x),E.return=m,m=E)}return o(m);case qi:e:{for(O=x.key;g!==null;){if(g.key===O)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(m,g.sibling),g=s(g,x.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=xh(x,m.mode,E),g.return=m,m=g}return o(m);case os:return O=x._init,b(m,g,O(x._payload),E)}if(Aa(x))return v(m,g,x,E);if(ha(x))return y(m,g,x,E);Su(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(m,g.sibling),g=s(g,x),g.return=m,m=g):(n(m,g),g=bh(x,m.mode,E),g.return=m,m=g),o(m)):n(m,g)}return b}var Do=Ow(!0),Rw=Ow(!1),Hc=Ws(null),Wc=null,to=null,zg=null;function Bg(){zg=to=Wc=null}function Hg(e){var t=Hc.current;Ze(Hc),e._currentValue=t}function Dp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fo(e,t){Wc=e,zg=to=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jt=!0),e.firstContext=null)}function Pn(e){var t=e._currentValue;if(zg!==e)if(e={context:e,memoizedValue:t,next:null},to===null){if(Wc===null)throw Error(W(308));to=e,Wc.dependencies={lanes:0,firstContext:e}}else to=to.next=e;return t}var Js=null;function Wg(e){Js===null?Js=[e]:Js.push(e)}function Pw(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Wg(t)):(n.next=s.next,s.next=n),t.interleaved=n,zr(e,r)}function zr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var as=!1;function qg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Aw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Dr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ps(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ne&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,zr(e,n)}return s=r.interleaved,s===null?(t.next=t,Wg(r)):(t.next=s.next,s.next=t),r.interleaved=t,zr(e,n)}function tc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tg(e,n)}}function b0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function qc(e,t,n,r){var s=e.updateQueue;as=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var c=s.baseState;o=0,d=u=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,y=a;switch(f=t,p=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){c=v.call(p,c,f);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,f=typeof v=="function"?v.call(p,c,f):v,f==null)break e;c=et({},c,f);break e;case 2:as=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(1);if(d===null&&(l=c),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);gi|=o,e.lanes=o,e.memoizedState=c}}function x0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(W(191,s));s.call(r)}}}var Zl={},hr=Ws(Zl),al=Ws(Zl),ll=Ws(Zl);function ei(e){if(e===Zl)throw Error(W(174));return e}function Kg(e,t){switch(We(ll,t),We(al,e),We(hr,Zl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gp(t,e)}Ze(hr),We(hr,t)}function jo(){Ze(hr),Ze(al),Ze(ll)}function Tw(e){ei(ll.current);var t=ei(hr.current),n=gp(t,e.type);t!==n&&(We(al,e),We(hr,n))}function Gg(e){al.current===e&&(Ze(hr),Ze(al))}var Xe=Ws(0);function Kc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hh=[];function Qg(){for(var e=0;e<hh.length;e++)hh[e]._workInProgressVersionPrimary=null;hh.length=0}var nc=Zr.ReactCurrentDispatcher,ph=Zr.ReactCurrentBatchConfig,mi=0,Je=null,gt=null,St=null,Gc=!1,za=!1,ul=0,rR=0;function It(){throw Error(W(321))}function Zg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qn(e[n],t[n]))return!1;return!0}function Yg(e,t,n,r,s,i){if(mi=i,Je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,nc.current=e===null||e.memoizedState===null?aR:lR,e=n(r,s),za){i=0;do{if(za=!1,ul=0,25<=i)throw Error(W(301));i+=1,St=gt=null,t.updateQueue=null,nc.current=uR,e=n(r,s)}while(za)}if(nc.current=Qc,t=gt!==null&>.next!==null,mi=0,St=gt=Je=null,Gc=!1,t)throw Error(W(300));return e}function Xg(){var e=ul!==0;return ul=0,e}function Xn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Je.memoizedState=St=e:St=St.next=e,St}function An(){if(gt===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=gt.next;var t=St===null?Je.memoizedState:St.next;if(t!==null)St=t,gt=e;else{if(e===null)throw Error(W(310));gt=e,e={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},St===null?Je.memoizedState=St=e:St=St.next=e}return St}function cl(e,t){return typeof t=="function"?t(e):t}function mh(e){var t=An(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=gt,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var d=u.lane;if((mi&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Je.lanes|=d,gi|=d}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,qn(r,t.memoizedState)||(Jt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Je.lanes|=i,gi|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function gh(e){var t=An(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);qn(i,t.memoizedState)||(Jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function $w(){}function Iw(e,t){var n=Je,r=An(),s=t(),i=!qn(r.memoizedState,s);if(i&&(r.memoizedState=s,Jt=!0),r=r.queue,Jg(Dw.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||St!==null&&St.memoizedState.tag&1){if(n.flags|=2048,dl(9,Nw.bind(null,n,r,s,t),void 0,null),Ct===null)throw Error(W(349));mi&30||Mw(n,t,s)}return s}function Mw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Nw(e,t,n,r){t.value=n,t.getSnapshot=r,jw(t)&&Fw(e)}function Dw(e,t,n){return n(function(){jw(t)&&Fw(e)})}function jw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qn(e,n)}catch{return!0}}function Fw(e){var t=zr(e,1);t!==null&&Hn(t,e,1,-1)}function w0(e){var t=Xn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:cl,lastRenderedState:e},t.queue=e,e=e.dispatch=oR.bind(null,Je,e),[t.memoizedState,e]}function dl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Lw(){return An().memoizedState}function rc(e,t,n,r){var s=Xn();Je.flags|=e,s.memoizedState=dl(1|t,n,void 0,r===void 0?null:r)}function Kd(e,t,n,r){var s=An();r=r===void 0?null:r;var i=void 0;if(gt!==null){var o=gt.memoizedState;if(i=o.destroy,r!==null&&Zg(r,o.deps)){s.memoizedState=dl(t,n,i,r);return}}Je.flags|=e,s.memoizedState=dl(1|t,n,i,r)}function E0(e,t){return rc(8390656,8,e,t)}function Jg(e,t){return Kd(2048,8,e,t)}function Vw(e,t){return Kd(4,2,e,t)}function Uw(e,t){return Kd(4,4,e,t)}function zw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bw(e,t,n){return n=n!=null?n.concat([e]):null,Kd(4,4,zw.bind(null,t,e),n)}function ev(){}function Hw(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ww(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qw(e,t,n){return mi&21?(qn(n,t)||(n=Yx(),Je.lanes|=n,gi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Jt=!0),e.memoizedState=n)}function sR(e,t){var n=Ve;Ve=n!==0&&4>n?n:4,e(!0);var r=ph.transition;ph.transition={};try{e(!1),t()}finally{Ve=n,ph.transition=r}}function Kw(){return An().memoizedState}function iR(e,t,n){var r=Ts(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Gw(e))Qw(t,n);else if(n=Pw(e,t,n,r),n!==null){var s=Wt();Hn(n,e,r,s),Zw(n,t,r)}}function oR(e,t,n){var r=Ts(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gw(e))Qw(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,qn(a,o)){var l=t.interleaved;l===null?(s.next=s,Wg(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Pw(e,t,s,r),n!==null&&(s=Wt(),Hn(n,e,r,s),Zw(n,t,r))}}function Gw(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function Qw(e,t){za=Gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tg(e,n)}}var Qc={readContext:Pn,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useInsertionEffect:It,useLayoutEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useMutableSource:It,useSyncExternalStore:It,useId:It,unstable_isNewReconciler:!1},aR={readContext:Pn,useCallback:function(e,t){return Xn().memoizedState=[e,t===void 0?null:t],e},useContext:Pn,useEffect:E0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rc(4194308,4,zw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rc(4194308,4,e,t)},useInsertionEffect:function(e,t){return rc(4,2,e,t)},useMemo:function(e,t){var n=Xn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iR.bind(null,Je,e),[r.memoizedState,e]},useRef:function(e){var t=Xn();return e={current:e},t.memoizedState=e},useState:w0,useDebugValue:ev,useDeferredValue:function(e){return Xn().memoizedState=e},useTransition:function(){var e=w0(!1),t=e[0];return e=sR.bind(null,e[1]),Xn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Je,s=Xn();if(Ye){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),Ct===null)throw Error(W(349));mi&30||Mw(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,E0(Dw.bind(null,r,i,e),[e]),r.flags|=2048,dl(9,Nw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Xn(),t=Ct.identifierPrefix;if(Ye){var n=Ir,r=$r;n=(r&~(1<<32-Bn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ul++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rR++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lR={readContext:Pn,useCallback:Hw,useContext:Pn,useEffect:Jg,useImperativeHandle:Bw,useInsertionEffect:Vw,useLayoutEffect:Uw,useMemo:Ww,useReducer:mh,useRef:Lw,useState:function(){return mh(cl)},useDebugValue:ev,useDeferredValue:function(e){var t=An();return qw(t,gt.memoizedState,e)},useTransition:function(){var e=mh(cl)[0],t=An().memoizedState;return[e,t]},useMutableSource:$w,useSyncExternalStore:Iw,useId:Kw,unstable_isNewReconciler:!1},uR={readContext:Pn,useCallback:Hw,useContext:Pn,useEffect:Jg,useImperativeHandle:Bw,useInsertionEffect:Vw,useLayoutEffect:Uw,useMemo:Ww,useReducer:gh,useRef:Lw,useState:function(){return gh(cl)},useDebugValue:ev,useDeferredValue:function(e){var t=An();return gt===null?t.memoizedState=e:qw(t,gt.memoizedState,e)},useTransition:function(){var e=gh(cl)[0],t=An().memoizedState;return[e,t]},useMutableSource:$w,useSyncExternalStore:Iw,useId:Kw,unstable_isNewReconciler:!1};function Nn(e,t){if(e&&e.defaultProps){t=et({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:et({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gd={isMounted:function(e){return(e=e._reactInternals)?ki(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wt(),s=Ts(e),i=Dr(r,s);i.payload=t,n!=null&&(i.callback=n),t=Ps(e,i,s),t!==null&&(Hn(t,e,s,r),tc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wt(),s=Ts(e),i=Dr(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ps(e,i,s),t!==null&&(Hn(t,e,s,r),tc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wt(),r=Ts(e),s=Dr(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ps(e,s,r),t!==null&&(Hn(t,e,r,n),tc(t,e,r))}};function S0(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!rl(n,r)||!rl(s,i):!0}function Yw(e,t,n){var r=!1,s=Ds,i=t.contextType;return typeof i=="object"&&i!==null?i=Pn(i):(s=tn(t)?hi:Lt.current,r=t.contextTypes,i=(r=r!=null)?Mo(e,s):Ds),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function C0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Gd.enqueueReplaceState(t,t.state,null)}function Fp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},qg(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Pn(i):(i=tn(t)?hi:Lt.current,s.context=Mo(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(jp(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Gd.enqueueReplaceState(s,s.state,null),qc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Fo(e,t){try{var n="",r=t;do n+=j_(r),r=r.return;while(r);var s=n}catch(i){s=` +Error generating stack: `+i.message+` +`+i.stack}return{value:e,source:t,stack:s,digest:null}}function vh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Lp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var cR=typeof WeakMap=="function"?WeakMap:Map;function Xw(e,t,n){n=Dr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yc||(Yc=!0,Qp=r),Lp(e,t)},n}function Jw(e,t,n){n=Dr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Lp(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Lp(e,t),typeof r!="function"&&(As===null?As=new Set([this]):As.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function k0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new cR;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=CR.bind(null,e,t,n),t.then(e,e))}function _0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function O0(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Dr(-1,1),t.tag=2,Ps(n,t,1))),n.lanes|=1),e)}var dR=Zr.ReactCurrentOwner,Jt=!1;function zt(e,t,n,r){t.child=e===null?Rw(t,null,n,r):Do(t,e.child,n,r)}function R0(e,t,n,r,s){n=n.render;var i=t.ref;return fo(t,s),r=Yg(e,t,n,r,i,s),n=Xg(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Br(e,t,s)):(Ye&&n&&Lg(t),t.flags|=1,zt(e,t,r,s),t.child)}function P0(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!lv(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,eE(e,t,i,r,s)):(e=ac(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:rl,n(o,r)&&e.ref===t.ref)return Br(e,t,s)}return t.flags|=1,e=$s(i,r),e.ref=t.ref,e.return=t,t.child=e}function eE(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(rl(i,r)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Jt=!0);else return t.lanes=e.lanes,Br(e,t,s)}return Vp(e,t,n,r,s)}function tE(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(ro,ln),ln|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,We(ro,ln),ln|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,We(ro,ln),ln|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,We(ro,ln),ln|=r;return zt(e,t,s,n),t.child}function nE(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vp(e,t,n,r,s){var i=tn(n)?hi:Lt.current;return i=Mo(t,i),fo(t,s),n=Yg(e,t,n,r,i,s),r=Xg(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Br(e,t,s)):(Ye&&r&&Lg(t),t.flags|=1,zt(e,t,n,s),t.child)}function A0(e,t,n,r,s){if(tn(n)){var i=!0;Uc(t)}else i=!1;if(fo(t,s),t.stateNode===null)sc(e,t),Yw(t,n,r),Fp(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Pn(u):(u=tn(n)?hi:Lt.current,u=Mo(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&C0(t,o,r,u),as=!1;var f=t.memoizedState;o.state=f,qc(t,r,o,s),l=t.memoizedState,a!==r||f!==l||en.current||as?(typeof d=="function"&&(jp(t,n,d,r),l=t.memoizedState),(a=as||S0(t,n,a,r,f,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Aw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Pn(l):(l=tn(n)?hi:Lt.current,l=Mo(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&C0(t,o,r,l),as=!1,f=t.memoizedState,o.state=f,qc(t,r,o,s);var v=t.memoizedState;a!==c||f!==v||en.current||as?(typeof p=="function"&&(jp(t,n,p,r),v=t.memoizedState),(u=as||S0(t,n,u,r,f,v,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Up(e,t,n,r,i,s)}function Up(e,t,n,r,s,i){nE(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&m0(t,n,!1),Br(e,t,i);r=t.stateNode,dR.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Do(t,e.child,null,i),t.child=Do(t,null,a,i)):zt(e,t,a,i),t.memoizedState=r.state,s&&m0(t,n,!0),t.child}function rE(e){var t=e.stateNode;t.pendingContext?p0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&p0(e,t.context,!1),Kg(e,t.containerInfo)}function T0(e,t,n,r,s){return No(),Ug(s),t.flags|=256,zt(e,t,n,r),t.child}var zp={dehydrated:null,treeContext:null,retryLane:0};function Bp(e){return{baseLanes:e,cachePool:null,transitions:null}}function sE(e,t,n){var r=t.pendingProps,s=Xe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),We(Xe,s&1),e===null)return Np(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Yd(o,r,0,null),e=fi(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Bp(n),t.memoizedState=zp,e):tv(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return fR(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=$s(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=$s(a,i):(i=fi(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Bp(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=zp,r}return i=e.child,e=i.sibling,r=$s(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function tv(e,t){return t=Yd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cu(e,t,n,r){return r!==null&&Ug(r),Do(t,e.child,null,n),e=tv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fR(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=vh(Error(W(422))),Cu(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Yd({mode:"visible",children:r.children},s,0,null),i=fi(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Do(t,e.child,null,o),t.child.memoizedState=Bp(o),t.memoizedState=zp,i);if(!(t.mode&1))return Cu(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(W(419)),r=vh(i,r,void 0),Cu(e,t,o,r)}if(a=(o&e.childLanes)!==0,Jt||a){if(r=Ct,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,zr(e,s),Hn(r,e,s,-1))}return av(),r=vh(Error(W(421))),Cu(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=kR.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,cn=Rs(s.nextSibling),fn=t,Ye=!0,Ln=null,e!==null&&(Sn[Cn++]=$r,Sn[Cn++]=Ir,Sn[Cn++]=pi,$r=e.id,Ir=e.overflow,pi=t),t=tv(t,r.children),t.flags|=4096,t)}function $0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Dp(e.return,t,n)}function yh(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function iE(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(zt(e,t,r.children,n),r=Xe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$0(e,n,t);else if(e.tag===19)$0(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(We(Xe,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Kc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),yh(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Kc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}yh(t,!0,n,null,i);break;case"together":yh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Br(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),gi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=$s(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$s(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hR(e,t,n){switch(t.tag){case 3:rE(t),No();break;case 5:Tw(t);break;case 1:tn(t.type)&&Uc(t);break;case 4:Kg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;We(Hc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(We(Xe,Xe.current&1),t.flags|=128,null):n&t.child.childLanes?sE(e,t,n):(We(Xe,Xe.current&1),e=Br(e,t,n),e!==null?e.sibling:null);We(Xe,Xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return iE(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),We(Xe,Xe.current),r)break;return null;case 22:case 23:return t.lanes=0,tE(e,t,n)}return Br(e,t,n)}var oE,Hp,aE,lE;oE=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Hp=function(){};aE=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ei(hr.current);var i=null;switch(n){case"input":s=fp(e,s),r=fp(e,r),i=[];break;case"select":s=et({},s,{value:void 0}),r=et({},r,{value:void 0}),i=[];break;case"textarea":s=mp(e,s),r=mp(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Lc)}vp(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Za.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Za.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ge("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};lE=function(e,t,n,r){n!==r&&(t.flags|=4)};function ba(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pR(e,t,n){var r=t.pendingProps;switch(Vg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(t),null;case 1:return tn(t.type)&&Vc(),Mt(t),null;case 3:return r=t.stateNode,jo(),Ze(en),Ze(Lt),Qg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Eu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ln!==null&&(Xp(Ln),Ln=null))),Hp(e,t),Mt(t),null;case 5:Gg(t);var s=ei(ll.current);if(n=t.type,e!==null&&t.stateNode!=null)aE(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return Mt(t),null}if(e=ei(hr.current),Eu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[or]=t,r[ol]=i,e=(t.mode&1)!==0,n){case"dialog":Ge("cancel",r),Ge("close",r);break;case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(s=0;s<$a.length;s++)Ge($a[s],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"details":Ge("toggle",r);break;case"input":Uy(r,i),Ge("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ge("invalid",r);break;case"textarea":By(r,i),Ge("invalid",r)}vp(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&wu(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&wu(r.textContent,a,e),s=["children",""+a]):Za.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ge("scroll",r)}switch(n){case"input":hu(r),zy(r,i,!0);break;case"textarea":hu(r),Hy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Lc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Dx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[or]=t,e[ol]=r,oE(e,t,!1,!1),t.stateNode=e;e:{switch(o=yp(n,r),n){case"dialog":Ge("cancel",e),Ge("close",e),s=r;break;case"iframe":case"object":case"embed":Ge("load",e),s=r;break;case"video":case"audio":for(s=0;s<$a.length;s++)Ge($a[s],e);s=r;break;case"source":Ge("error",e),s=r;break;case"img":case"image":case"link":Ge("error",e),Ge("load",e),s=r;break;case"details":Ge("toggle",e),s=r;break;case"input":Uy(e,r),s=fp(e,r),Ge("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=et({},r,{value:void 0}),Ge("invalid",e);break;case"textarea":By(e,r),s=mp(e,r),Ge("invalid",e);break;default:s=r}vp(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Lx(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&jx(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ya(e,l):typeof l=="number"&&Ya(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Za.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ge("scroll",e):l!=null&&kg(e,i,l,o))}switch(n){case"input":hu(e),zy(e,r,!1);break;case"textarea":hu(e),Hy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ns(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ao(e,!!r.multiple,i,!1):r.defaultValue!=null&&ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Lc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Mt(t),null;case 6:if(e&&t.stateNode!=null)lE(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=ei(ll.current),ei(hr.current),Eu(t)){if(r=t.stateNode,n=t.memoizedProps,r[or]=t,(i=r.nodeValue!==n)&&(e=fn,e!==null))switch(e.tag){case 3:wu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[or]=t,t.stateNode=r}return Mt(t),null;case 13:if(Ze(Xe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&cn!==null&&t.mode&1&&!(t.flags&128))_w(),No(),t.flags|=98560,i=!1;else if(i=Eu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(W(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(W(317));i[or]=t}else No(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mt(t),i=!1}else Ln!==null&&(Xp(Ln),Ln=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Xe.current&1?yt===0&&(yt=3):av())),t.updateQueue!==null&&(t.flags|=4),Mt(t),null);case 4:return jo(),Hp(e,t),e===null&&sl(t.stateNode.containerInfo),Mt(t),null;case 10:return Hg(t.type._context),Mt(t),null;case 17:return tn(t.type)&&Vc(),Mt(t),null;case 19:if(Ze(Xe),i=t.memoizedState,i===null)return Mt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)ba(i,!1);else{if(yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Kc(e),o!==null){for(t.flags|=128,ba(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return We(Xe,Xe.current&1|2),t.child}e=e.sibling}i.tail!==null&<()>Lo&&(t.flags|=128,r=!0,ba(i,!1),t.lanes=4194304)}else{if(!r)if(e=Kc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ba(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ye)return Mt(t),null}else 2*lt()-i.renderingStartTime>Lo&&n!==1073741824&&(t.flags|=128,r=!0,ba(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=lt(),t.sibling=null,n=Xe.current,We(Xe,r?n&1|2:n&1),t):(Mt(t),null);case 22:case 23:return ov(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ln&1073741824&&(Mt(t),t.subtreeFlags&6&&(t.flags|=8192)):Mt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function mR(e,t){switch(Vg(t),t.tag){case 1:return tn(t.type)&&Vc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),Ze(en),Ze(Lt),Qg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Gg(t),null;case 13:if(Ze(Xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));No()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ze(Xe),null;case 4:return jo(),null;case 10:return Hg(t.type._context),null;case 22:case 23:return ov(),null;case 24:return null;default:return null}}var ku=!1,Ft=!1,gR=typeof WeakSet=="function"?WeakSet:Set,te=null;function no(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){it(e,t,r)}else n.current=null}function Wp(e,t,n){try{n()}catch(r){it(e,t,r)}}var I0=!1;function vR(e,t){if(Rp=Dc,e=hw(),Fg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var p;c!==n||s!==0&&c.nodeType!==3||(a=o+s),c!==i||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)f=c,c=p;for(;;){if(c===e)break t;if(f===n&&++u===s&&(a=o),f===i&&++d===r&&(l=o),(p=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pp={focusedElem:e,selectionRange:n},Dc=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,b=v.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Nn(t.type,y),b);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(E){it(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return v=I0,I0=!1,v}function Ba(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Wp(t,n,i)}s=s.next}while(s!==r)}}function Qd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function qp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function uE(e){var t=e.alternate;t!==null&&(e.alternate=null,uE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[or],delete t[ol],delete t[$p],delete t[JO],delete t[eR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cE(e){return e.tag===5||e.tag===3||e.tag===4}function M0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Lc));else if(r!==4&&(e=e.child,e!==null))for(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}function Gp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gp(e,t,n),e=e.sibling;e!==null;)Gp(e,t,n),e=e.sibling}var Rt=null,jn=!1;function ts(e,t,n){for(n=n.child;n!==null;)dE(e,t,n),n=n.sibling}function dE(e,t,n){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(Ud,n)}catch{}switch(n.tag){case 5:Ft||no(n,t);case 6:var r=Rt,s=jn;Rt=null,ts(e,t,n),Rt=r,jn=s,Rt!==null&&(jn?(e=Rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rt.removeChild(n.stateNode));break;case 18:Rt!==null&&(jn?(e=Rt,n=n.stateNode,e.nodeType===8?dh(e.parentNode,n):e.nodeType===1&&dh(e,n),tl(e)):dh(Rt,n.stateNode));break;case 4:r=Rt,s=jn,Rt=n.stateNode.containerInfo,jn=!0,ts(e,t,n),Rt=r,jn=s;break;case 0:case 11:case 14:case 15:if(!Ft&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Wp(n,t,o),s=s.next}while(s!==r)}ts(e,t,n);break;case 1:if(!Ft&&(no(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){it(n,t,a)}ts(e,t,n);break;case 21:ts(e,t,n);break;case 22:n.mode&1?(Ft=(r=Ft)||n.memoizedState!==null,ts(e,t,n),Ft=r):ts(e,t,n);break;default:ts(e,t,n)}}function N0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gR),t.forEach(function(r){var s=_R.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function In(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Rt=a.stateNode,jn=!1;break e;case 3:Rt=a.stateNode.containerInfo,jn=!0;break e;case 4:Rt=a.stateNode.containerInfo,jn=!0;break e}a=a.return}if(Rt===null)throw Error(W(160));dE(i,o,s),Rt=null,jn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){it(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)fE(t,e),t=t.sibling}function fE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(In(t,e),Yn(e),r&4){try{Ba(3,e,e.return),Qd(3,e)}catch(y){it(e,e.return,y)}try{Ba(5,e,e.return)}catch(y){it(e,e.return,y)}}break;case 1:In(t,e),Yn(e),r&512&&n!==null&&no(n,n.return);break;case 5:if(In(t,e),Yn(e),r&512&&n!==null&&no(n,n.return),e.flags&32){var s=e.stateNode;try{Ya(s,"")}catch(y){it(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Mx(s,i),yp(a,o);var u=yp(a,i);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?Lx(s,c):d==="dangerouslySetInnerHTML"?jx(s,c):d==="children"?Ya(s,c):kg(s,d,c,u)}switch(a){case"input":hp(s,i);break;case"textarea":Nx(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?ao(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?ao(s,!!i.multiple,i.defaultValue,!0):ao(s,!!i.multiple,i.multiple?[]:"",!1))}s[ol]=i}catch(y){it(e,e.return,y)}}break;case 6:if(In(t,e),Yn(e),r&4){if(e.stateNode===null)throw Error(W(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){it(e,e.return,y)}}break;case 3:if(In(t,e),Yn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{tl(t.containerInfo)}catch(y){it(e,e.return,y)}break;case 4:In(t,e),Yn(e);break;case 13:In(t,e),Yn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(sv=lt())),r&4&&N0(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ft=(u=Ft)||d,In(t,e),Ft=u):In(t,e),Yn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(te=e,d=e.child;d!==null;){for(c=te=d;te!==null;){switch(f=te,p=f.child,f.tag){case 0:case 11:case 14:case 15:Ba(4,f,f.return);break;case 1:no(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){it(r,n,y)}}break;case 5:no(f,f.return);break;case 22:if(f.memoizedState!==null){j0(c);continue}}p!==null?(p.return=f,te=p):j0(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{s=c.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Fx("display",o))}catch(y){it(e,e.return,y)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(y){it(e,e.return,y)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:In(t,e),Yn(e),r&4&&N0(e);break;case 21:break;default:In(t,e),Yn(e)}}function Yn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(cE(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ya(s,""),r.flags&=-33);var i=M0(e);Gp(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=M0(e);Kp(e,a,o);break;default:throw Error(W(161))}}catch(l){it(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yR(e,t,n){te=e,hE(e)}function hE(e,t,n){for(var r=(e.mode&1)!==0;te!==null;){var s=te,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||ku;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ft;a=ku;var u=Ft;if(ku=o,(Ft=l)&&!u)for(te=s;te!==null;)o=te,l=o.child,o.tag===22&&o.memoizedState!==null?F0(s):l!==null?(l.return=o,te=l):F0(s);for(;i!==null;)te=i,hE(i),i=i.sibling;te=s,ku=a,Ft=u}D0(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,te=i):D0(e)}}function D0(e){for(;te!==null;){var t=te;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ft||Qd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ft)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Nn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&x0(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}x0(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&tl(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}Ft||t.flags&512&&qp(t)}catch(f){it(t,t.return,f)}}if(t===e){te=null;break}if(n=t.sibling,n!==null){n.return=t.return,te=n;break}te=t.return}}function j0(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var n=t.sibling;if(n!==null){n.return=t.return,te=n;break}te=t.return}}function F0(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qd(4,t)}catch(l){it(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){it(t,s,l)}}var i=t.return;try{qp(t)}catch(l){it(t,i,l)}break;case 5:var o=t.return;try{qp(t)}catch(l){it(t,o,l)}}}catch(l){it(t,t.return,l)}if(t===e){te=null;break}var a=t.sibling;if(a!==null){a.return=t.return,te=a;break}te=t.return}}var bR=Math.ceil,Zc=Zr.ReactCurrentDispatcher,nv=Zr.ReactCurrentOwner,On=Zr.ReactCurrentBatchConfig,Ne=0,Ct=null,dt=null,At=0,ln=0,ro=Ws(0),yt=0,fl=null,gi=0,Zd=0,rv=0,Ha=null,Xt=null,sv=0,Lo=1/0,Rr=null,Yc=!1,Qp=null,As=null,_u=!1,ws=null,Xc=0,Wa=0,Zp=null,ic=-1,oc=0;function Wt(){return Ne&6?lt():ic!==-1?ic:ic=lt()}function Ts(e){return e.mode&1?Ne&2&&At!==0?At&-At:nR.transition!==null?(oc===0&&(oc=Yx()),oc):(e=Ve,e!==0||(e=window.event,e=e===void 0?16:sw(e.type)),e):1}function Hn(e,t,n,r){if(50<Wa)throw Wa=0,Zp=null,Error(W(185));Kl(e,n,r),(!(Ne&2)||e!==Ct)&&(e===Ct&&(!(Ne&2)&&(Zd|=n),yt===4&&cs(e,At)),nn(e,r),n===1&&Ne===0&&!(t.mode&1)&&(Lo=lt()+500,qd&&qs()))}function nn(e,t){var n=e.callbackNode;nO(e,t);var r=Nc(e,e===Ct?At:0);if(r===0)n!==null&&Ky(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ky(n),t===1)e.tag===0?tR(L0.bind(null,e)):Sw(L0.bind(null,e)),YO(function(){!(Ne&6)&&qs()}),n=null;else{switch(Xx(r)){case 1:n=Ag;break;case 4:n=Qx;break;case 16:n=Mc;break;case 536870912:n=Zx;break;default:n=Mc}n=wE(n,pE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function pE(e,t){if(ic=-1,oc=0,Ne&6)throw Error(W(327));var n=e.callbackNode;if(ho()&&e.callbackNode!==n)return null;var r=Nc(e,e===Ct?At:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Jc(e,r);else{t=r;var s=Ne;Ne|=2;var i=gE();(Ct!==e||At!==t)&&(Rr=null,Lo=lt()+500,di(e,t));do try{ER();break}catch(a){mE(e,a)}while(1);Bg(),Zc.current=i,Ne=s,dt!==null?t=0:(Ct=null,At=0,t=yt)}if(t!==0){if(t===2&&(s=Sp(e),s!==0&&(r=s,t=Yp(e,s))),t===1)throw n=fl,di(e,0),cs(e,r),nn(e,lt()),n;if(t===6)cs(e,r);else{if(s=e.current.alternate,!(r&30)&&!xR(s)&&(t=Jc(e,r),t===2&&(i=Sp(e),i!==0&&(r=i,t=Yp(e,i))),t===1))throw n=fl,di(e,0),cs(e,r),nn(e,lt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Zs(e,Xt,Rr);break;case 3:if(cs(e,r),(r&130023424)===r&&(t=sv+500-lt(),10<t)){if(Nc(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Wt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Tp(Zs.bind(null,e,Xt,Rr),t);break}Zs(e,Xt,Rr);break;case 4:if(cs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Bn(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=lt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bR(r/1960))-r,10<r){e.timeoutHandle=Tp(Zs.bind(null,e,Xt,Rr),r);break}Zs(e,Xt,Rr);break;case 5:Zs(e,Xt,Rr);break;default:throw Error(W(329))}}}return nn(e,lt()),e.callbackNode===n?pE.bind(null,e):null}function Yp(e,t){var n=Ha;return e.current.memoizedState.isDehydrated&&(di(e,t).flags|=256),e=Jc(e,t),e!==2&&(t=Xt,Xt=n,t!==null&&Xp(t)),e}function Xp(e){Xt===null?Xt=e:Xt.push.apply(Xt,e)}function xR(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!qn(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function cs(e,t){for(t&=~rv,t&=~Zd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Bn(t),r=1<<n;e[n]=-1,t&=~r}}function L0(e){if(Ne&6)throw Error(W(327));ho();var t=Nc(e,0);if(!(t&1))return nn(e,lt()),null;var n=Jc(e,t);if(e.tag!==0&&n===2){var r=Sp(e);r!==0&&(t=r,n=Yp(e,r))}if(n===1)throw n=fl,di(e,0),cs(e,t),nn(e,lt()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Zs(e,Xt,Rr),nn(e,lt()),null}function iv(e,t){var n=Ne;Ne|=1;try{return e(t)}finally{Ne=n,Ne===0&&(Lo=lt()+500,qd&&qs())}}function vi(e){ws!==null&&ws.tag===0&&!(Ne&6)&&ho();var t=Ne;Ne|=1;var n=On.transition,r=Ve;try{if(On.transition=null,Ve=1,e)return e()}finally{Ve=r,On.transition=n,Ne=t,!(Ne&6)&&qs()}}function ov(){ln=ro.current,Ze(ro)}function di(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,ZO(n)),dt!==null)for(n=dt.return;n!==null;){var r=n;switch(Vg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Vc();break;case 3:jo(),Ze(en),Ze(Lt),Qg();break;case 5:Gg(r);break;case 4:jo();break;case 13:Ze(Xe);break;case 19:Ze(Xe);break;case 10:Hg(r.type._context);break;case 22:case 23:ov()}n=n.return}if(Ct=e,dt=e=$s(e.current,null),At=ln=t,yt=0,fl=null,rv=Zd=gi=0,Xt=Ha=null,Js!==null){for(t=0;t<Js.length;t++)if(n=Js[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Js=null}return e}function mE(e,t){do{var n=dt;try{if(Bg(),nc.current=Qc,Gc){for(var r=Je.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Gc=!1}if(mi=0,St=gt=Je=null,za=!1,ul=0,nv.current=null,n===null||n.return===null){yt=1,fl=t,dt=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=At,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=_0(o);if(p!==null){p.flags&=-257,O0(p,o,a,i,t),p.mode&1&&k0(i,u,t),t=p,l=u;var v=t.updateQueue;if(v===null){var y=new Set;y.add(l),t.updateQueue=y}else v.add(l);break e}else{if(!(t&1)){k0(i,u,t),av();break e}l=Error(W(426))}}else if(Ye&&a.mode&1){var b=_0(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),O0(b,o,a,i,t),Ug(Fo(l,a));break e}}i=l=Fo(l,a),yt!==4&&(yt=2),Ha===null?Ha=[i]:Ha.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Xw(i,l,t);b0(i,m);break e;case 1:a=l;var g=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(As===null||!As.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var E=Jw(i,a,t);b0(i,E);break e}}i=i.return}while(i!==null)}yE(n)}catch(C){t=C,dt===n&&n!==null&&(dt=n=n.return);continue}break}while(1)}function gE(){var e=Zc.current;return Zc.current=Qc,e===null?Qc:e}function av(){(yt===0||yt===3||yt===2)&&(yt=4),Ct===null||!(gi&268435455)&&!(Zd&268435455)||cs(Ct,At)}function Jc(e,t){var n=Ne;Ne|=2;var r=gE();(Ct!==e||At!==t)&&(Rr=null,di(e,t));do try{wR();break}catch(s){mE(e,s)}while(1);if(Bg(),Ne=n,Zc.current=r,dt!==null)throw Error(W(261));return Ct=null,At=0,yt}function wR(){for(;dt!==null;)vE(dt)}function ER(){for(;dt!==null&&!K_();)vE(dt)}function vE(e){var t=xE(e.alternate,e,ln);e.memoizedProps=e.pendingProps,t===null?yE(e):dt=t,nv.current=null}function yE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=mR(n,t),n!==null){n.flags&=32767,dt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yt=6,dt=null;return}}else if(n=pR(n,t,ln),n!==null){dt=n;return}if(t=t.sibling,t!==null){dt=t;return}dt=t=e}while(t!==null);yt===0&&(yt=5)}function Zs(e,t,n){var r=Ve,s=On.transition;try{On.transition=null,Ve=1,SR(e,t,n,r)}finally{On.transition=s,Ve=r}return null}function SR(e,t,n,r){do ho();while(ws!==null);if(Ne&6)throw Error(W(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(rO(e,i),e===Ct&&(dt=Ct=null,At=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_u||(_u=!0,wE(Mc,function(){return ho(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=On.transition,On.transition=null;var o=Ve;Ve=1;var a=Ne;Ne|=4,nv.current=null,vR(e,n),fE(n,e),BO(Pp),Dc=!!Rp,Pp=Rp=null,e.current=n,yR(n),G_(),Ne=a,Ve=o,On.transition=i}else e.current=n;if(_u&&(_u=!1,ws=e,Xc=s),i=e.pendingLanes,i===0&&(As=null),Y_(n.stateNode),nn(e,lt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Yc)throw Yc=!1,e=Qp,Qp=null,e;return Xc&1&&e.tag!==0&&ho(),i=e.pendingLanes,i&1?e===Zp?Wa++:(Wa=0,Zp=e):Wa=0,qs(),null}function ho(){if(ws!==null){var e=Xx(Xc),t=On.transition,n=Ve;try{if(On.transition=null,Ve=16>e?16:e,ws===null)var r=!1;else{if(e=ws,ws=null,Xc=0,Ne&6)throw Error(W(331));var s=Ne;for(Ne|=4,te=e.current;te!==null;){var i=te,o=i.child;if(te.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(te=u;te!==null;){var d=te;switch(d.tag){case 0:case 11:case 15:Ba(8,d,i)}var c=d.child;if(c!==null)c.return=d,te=c;else for(;te!==null;){d=te;var f=d.sibling,p=d.return;if(uE(d),d===u){te=null;break}if(f!==null){f.return=p,te=f;break}te=p}}}var v=i.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}te=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,te=o;else e:for(;te!==null;){if(i=te,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ba(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,te=m;break e}te=i.return}}var g=e.current;for(te=g;te!==null;){o=te;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,te=x;else e:for(o=g;te!==null;){if(a=te,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Qd(9,a)}}catch(C){it(a,a.return,C)}if(a===o){te=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,te=E;break e}te=a.return}}if(Ne=s,qs(),fr&&typeof fr.onPostCommitFiberRoot=="function")try{fr.onPostCommitFiberRoot(Ud,e)}catch{}r=!0}return r}finally{Ve=n,On.transition=t}}return!1}function V0(e,t,n){t=Fo(n,t),t=Xw(e,t,1),e=Ps(e,t,1),t=Wt(),e!==null&&(Kl(e,1,t),nn(e,t))}function it(e,t,n){if(e.tag===3)V0(e,e,n);else for(;t!==null;){if(t.tag===3){V0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(As===null||!As.has(r))){e=Fo(n,e),e=Jw(t,e,1),t=Ps(t,e,1),e=Wt(),t!==null&&(Kl(t,1,e),nn(t,e));break}}t=t.return}}function CR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Wt(),e.pingedLanes|=e.suspendedLanes&n,Ct===e&&(At&n)===n&&(yt===4||yt===3&&(At&130023424)===At&&500>lt()-sv?di(e,0):rv|=n),nn(e,t)}function bE(e,t){t===0&&(e.mode&1?(t=gu,gu<<=1,!(gu&130023424)&&(gu=4194304)):t=1);var n=Wt();e=zr(e,t),e!==null&&(Kl(e,t,n),nn(e,n))}function kR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bE(e,n)}function _R(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),bE(e,n)}var xE;xE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||en.current)Jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jt=!1,hR(e,t,n);Jt=!!(e.flags&131072)}else Jt=!1,Ye&&t.flags&1048576&&Cw(t,Bc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;sc(e,t),e=t.pendingProps;var s=Mo(t,Lt.current);fo(t,n),s=Yg(null,t,r,e,s,n);var i=Xg();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tn(r)?(i=!0,Uc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,qg(t),s.updater=Gd,t.stateNode=s,s._reactInternals=t,Fp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,Ye&&i&&Lg(t),zt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(sc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=RR(r),e=Nn(r,e),s){case 0:t=Vp(null,t,r,e,n);break e;case 1:t=A0(null,t,r,e,n);break e;case 11:t=R0(null,t,r,e,n);break e;case 14:t=P0(null,t,r,Nn(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),Vp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),A0(e,t,r,s,n);case 3:e:{if(rE(t),e===null)throw Error(W(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Aw(e,t),qc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Fo(Error(W(423)),t),t=T0(e,t,r,n,s);break e}else if(r!==s){s=Fo(Error(W(424)),t),t=T0(e,t,r,n,s);break e}else for(cn=Rs(t.stateNode.containerInfo.firstChild),fn=t,Ye=!0,Ln=null,n=Rw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(No(),r===s){t=Br(e,t,n);break e}zt(e,t,r,n)}t=t.child}return t;case 5:return Tw(t),e===null&&Np(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ap(r,s)?o=null:i!==null&&Ap(r,i)&&(t.flags|=32),nE(e,t),zt(e,t,o,n),t.child;case 6:return e===null&&Np(t),null;case 13:return sE(e,t,n);case 4:return Kg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Do(t,null,r,n):zt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),R0(e,t,r,s,n);case 7:return zt(e,t,t.pendingProps,n),t.child;case 8:return zt(e,t,t.pendingProps.children,n),t.child;case 12:return zt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,We(Hc,r._currentValue),r._currentValue=o,i!==null)if(qn(i.value,o)){if(i.children===s.children&&!en.current){t=Br(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Dr(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Dp(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(W(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Dp(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}zt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,fo(t,n),s=Pn(s),r=r(s),t.flags|=1,zt(e,t,r,n),t.child;case 14:return r=t.type,s=Nn(r,t.pendingProps),s=Nn(r.type,s),P0(e,t,r,s,n);case 15:return eE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),sc(e,t),t.tag=1,tn(r)?(e=!0,Uc(t)):e=!1,fo(t,n),Yw(t,r,s),Fp(t,r,s,n),Up(null,t,r,!0,e,n);case 19:return iE(e,t,n);case 22:return tE(e,t,n)}throw Error(W(156,t.tag))};function wE(e,t){return Gx(e,t)}function OR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(e,t,n,r){return new OR(e,t,n,r)}function lv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function RR(e){if(typeof e=="function")return lv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Og)return 11;if(e===Rg)return 14}return 2}function $s(e,t){var n=e.alternate;return n===null?(n=_n(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ac(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")lv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ki:return fi(n.children,s,i,t);case _g:o=8,s|=8;break;case lp:return e=_n(12,n,t,s|2),e.elementType=lp,e.lanes=i,e;case up:return e=_n(13,n,t,s),e.elementType=up,e.lanes=i,e;case cp:return e=_n(19,n,t,s),e.elementType=cp,e.lanes=i,e;case Tx:return Yd(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Px:o=10;break e;case Ax:o=9;break e;case Og:o=11;break e;case Rg:o=14;break e;case os:o=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=_n(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function fi(e,t,n,r){return e=_n(7,e,r,t),e.lanes=n,e}function Yd(e,t,n,r){return e=_n(22,e,r,t),e.elementType=Tx,e.lanes=n,e.stateNode={isHidden:!1},e}function bh(e,t,n){return e=_n(6,e,null,t),e.lanes=n,e}function xh(e,t,n){return t=_n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PR(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=eh(0),this.expirationTimes=eh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eh(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function uv(e,t,n,r,s,i,o,a,l){return e=new PR(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=_n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qg(i),e}function AR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function EE(e){if(!e)return Ds;e=e._reactInternals;e:{if(ki(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(tn(n))return Ew(e,n,t)}return t}function SE(e,t,n,r,s,i,o,a,l){return e=uv(n,r,!0,e,s,i,o,a,l),e.context=EE(null),n=e.current,r=Wt(),s=Ts(n),i=Dr(r,s),i.callback=t??null,Ps(n,i,s),e.current.lanes=s,Kl(e,s,r),nn(e,r),e}function Xd(e,t,n,r){var s=t.current,i=Wt(),o=Ts(s);return n=EE(n),t.context===null?t.context=n:t.pendingContext=n,t=Dr(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ps(s,t,o),e!==null&&(Hn(e,s,o,i),tc(e,s,o)),o}function ed(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function U0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cv(e,t){U0(e,t),(e=e.alternate)&&U0(e,t)}function TR(){return null}var CE=typeof reportError=="function"?reportError:function(e){console.error(e)};function dv(e){this._internalRoot=e}Jd.prototype.render=dv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Xd(e,t,null,null)};Jd.prototype.unmount=dv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vi(function(){Xd(null,e,null,null)}),t[Ur]=null}};function Jd(e){this._internalRoot=e}Jd.prototype.unstable_scheduleHydration=function(e){if(e){var t=tw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<us.length&&t!==0&&t<us[n].priority;n++);us.splice(n,0,e),n===0&&rw(e)}};function fv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ef(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function z0(){}function $R(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=ed(o);i.call(u)}}var o=SE(t,r,e,0,null,!1,!1,"",z0);return e._reactRootContainer=o,e[Ur]=o.current,sl(e.nodeType===8?e.parentNode:e),vi(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=ed(l);a.call(u)}}var l=uv(e,0,!1,null,null,!1,!1,"",z0);return e._reactRootContainer=l,e[Ur]=l.current,sl(e.nodeType===8?e.parentNode:e),vi(function(){Xd(t,l,n,r)}),l}function tf(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=ed(o);a.call(l)}}Xd(t,o,e,s)}else o=$R(n,t,e,s,r);return ed(o)}Jx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ta(t.pendingLanes);n!==0&&(Tg(t,n|1),nn(t,lt()),!(Ne&6)&&(Lo=lt()+500,qs()))}break;case 13:vi(function(){var r=zr(e,1);if(r!==null){var s=Wt();Hn(r,e,1,s)}}),cv(e,1)}};$g=function(e){if(e.tag===13){var t=zr(e,134217728);if(t!==null){var n=Wt();Hn(t,e,134217728,n)}cv(e,134217728)}};ew=function(e){if(e.tag===13){var t=Ts(e),n=zr(e,t);if(n!==null){var r=Wt();Hn(n,e,t,r)}cv(e,t)}};tw=function(){return Ve};nw=function(e,t){var n=Ve;try{return Ve=e,t()}finally{Ve=n}};xp=function(e,t,n){switch(t){case"input":if(hp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Wd(r);if(!s)throw Error(W(90));Ix(r),hp(r,s)}}}break;case"textarea":Nx(e,n);break;case"select":t=n.value,t!=null&&ao(e,!!n.multiple,t,!1)}};zx=iv;Bx=vi;var IR={usingClientEntryPoint:!1,Events:[Ql,Yi,Wd,Vx,Ux,iv]},xa={findFiberByHostInstance:Xs,bundleType:0,version:"18.3.0",rendererPackageName:"react-dom"},MR={bundleType:xa.bundleType,version:xa.version,rendererPackageName:xa.rendererPackageName,rendererConfig:xa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qx(e),e===null?null:e.stateNode},findFiberByHostInstance:xa.findFiberByHostInstance||TR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-8a015b68cc-20240425"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ou.isDisabled&&Ou.supportsFiber)try{Ud=Ou.inject(MR),fr=Ou}catch{}}gn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IR;gn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!fv(t))throw Error(W(200));return AR(e,t,null,n)};gn.createRoot=function(e,t){if(!fv(e))throw Error(W(299));var n=!1,r="",s=CE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=uv(e,1,!1,null,null,n,!1,r,s),e[Ur]=t.current,sl(e.nodeType===8?e.parentNode:e),new dv(t)};gn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=qx(t),e=e===null?null:e.stateNode,e};gn.flushSync=function(e){return vi(e)};gn.hydrate=function(e,t,n){if(!ef(t))throw Error(W(200));return tf(null,e,t,!0,n)};gn.hydrateRoot=function(e,t,n){if(!fv(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=CE;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=SE(t,null,e,1,n??null,s,!1,i,o),e[Ur]=t.current,sl(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Jd(t)};gn.render=function(e,t,n){if(!ef(t))throw Error(W(200));return tf(null,e,t,!1,n)};gn.unmountComponentAtNode=function(e){if(!ef(e))throw Error(W(40));return e._reactRootContainer?(vi(function(){tf(null,null,e,!1,function(){e._reactRootContainer=null,e[Ur]=null})}),!0):!1};gn.unstable_batchedUpdates=iv;gn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ef(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return tf(e,t,n,!1,r)};gn.version="18.3.0-next-8a015b68cc-20240425";function kE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kE)}catch(e){console.error(e)}}kE(),kx.exports=gn;var na=kx.exports;const NR=Ld(na);var B0=na;op.createRoot=B0.createRoot,op.hydrateRoot=B0.hydrateRoot;const DR="modulepreload",jR=function(e){return"/"+e},H0={},Er=function(t,n,r){if(!n||n.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=jR(i),i in H0)return;H0[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let d=s.length-1;d>=0;d--){const c=s[d];if(c.href===i&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":DR,o||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),o)return new Promise((d,c)=>{u.addEventListener("load",d),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},FR={theme:"system",setTheme:()=>null},_E=h.createContext(FR);function LR({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,i]=h.useState(()=>localStorage.getItem(n)||t);h.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return w.jsx(_E.Provider,{...r,value:o,children:e})}const OE=()=>{const e=h.useContext(_E);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var ra=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vo=typeof window>"u"||"Deno"in globalThis;function wn(){}function VR(e,t){return typeof e=="function"?e(t):e}function Jp(e){return typeof e=="number"&&e>=0&&e!==1/0}function RE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function po(e,t){return typeof e=="function"?e(t):e}function Vn(e,t){return typeof e=="function"?e(t):e}function W0(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==hv(o,t.options))return!1}else if(!hl(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function q0(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(yi(t.options.mutationKey)!==yi(i))return!1}else if(!hl(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function hv(e,t){return((t==null?void 0:t.queryKeyHashFn)||yi)(e)}function yi(e){return JSON.stringify(e,(t,n)=>em(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function hl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!hl(e[n],t[n])):!1}function PE(e,t){if(e===t)return e;const n=K0(e)&&K0(t);if(n||em(e)&&em(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=PE(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function td(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function K0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function em(e){if(!G0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!G0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function G0(e){return Object.prototype.toString.call(e)==="[object Object]"}function UR(e){return new Promise(t=>{setTimeout(t,e)})}function tm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?PE(e,t):t}function zR(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function BR(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var AE=Symbol();function TE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===AE?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ri,fs,bo,ix,HR=(ix=class extends ra{constructor(){super();oe(this,ri,void 0);oe(this,fs,void 0);oe(this,bo,void 0);ee(this,bo,t=>{if(!Vo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,fs)||this.setEventListener(R(this,bo))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,fs))==null||t.call(this),ee(this,fs,void 0))}setEventListener(t){var n;ee(this,bo,t),(n=R(this,fs))==null||n.call(this),ee(this,fs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,ri)!==t&&(ee(this,ri,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,ri)=="boolean"?R(this,ri):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ri=new WeakMap,fs=new WeakMap,bo=new WeakMap,ix),pv=new HR,xo,hs,wo,ox,WR=(ox=class extends ra{constructor(){super();oe(this,xo,!0);oe(this,hs,void 0);oe(this,wo,void 0);ee(this,wo,t=>{if(!Vo&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,hs)||this.setEventListener(R(this,wo))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,hs))==null||t.call(this),ee(this,hs,void 0))}setEventListener(t){var n;ee(this,wo,t),(n=R(this,hs))==null||n.call(this),ee(this,hs,t(this.setOnline.bind(this)))}setOnline(t){R(this,xo)!==t&&(ee(this,xo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,xo)}},xo=new WeakMap,hs=new WeakMap,wo=new WeakMap,ox),nd=new WR;function qR(e){return Math.min(1e3*2**e,3e4)}function $E(e){return(e??"online")==="online"?nd.isOnline():!0}var IE=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wh(e){return e instanceof IE}function ME(e){let t=!1,n=0,r=!1,s,i,o;const a=new Promise((m,g)=>{i=m,o=g}),l=m=>{var g;r||(v(new IE(m)),(g=e.abort)==null||g.call(e))},u=()=>{t=!0},d=()=>{t=!1},c=()=>pv.isFocused()&&(e.networkMode==="always"||nd.isOnline())&&e.canRun(),f=()=>$E(e.networkMode)&&e.canRun(),p=m=>{var g;r||(r=!0,(g=e.onSuccess)==null||g.call(e,m),s==null||s(),i(m))},v=m=>{var g;r||(r=!0,(g=e.onError)==null||g.call(e,m),s==null||s(),o(m))},y=()=>new Promise(m=>{var g;s=x=>{(r||c())&&m(x)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),b=()=>{if(r)return;let m;const g=n===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(x){m=Promise.reject(x)}Promise.resolve(m).then(p).catch(x=>{var S;if(r)return;const E=e.retry??(Vo?0:3),C=e.retryDelay??qR,O=typeof C=="function"?C(n,x):C,k=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,x);if(t||!k){v(x);return}n++,(S=e.onFail)==null||S.call(e,n,x),UR(O).then(()=>c()?void 0:y()).then(()=>{t?v(x):b()})})};return{promise:a,cancel:l,continue:()=>(s==null||s(),a),cancelRetry:u,continueRetry:d,canStart:f,start:()=>(f()?b():y().then(b),a)}}function KR(){let e=[],t=0,n=f=>{f()},r=f=>{f()},s=f=>setTimeout(f,0);const i=f=>{s=f},o=f=>{let p;t++;try{p=f()}finally{t--,t||u()}return p},a=f=>{t?e.push(f):s(()=>{n(f)})},l=f=>(...p)=>{a(()=>{f(...p)})},u=()=>{const f=e;e=[],f.length&&s(()=>{r(()=>{f.forEach(p=>{n(p)})})})};return{batch:o,batchCalls:l,schedule:a,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:i}}var vt=KR(),si,ax,NE=(ax=class{constructor(){oe(this,si,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jp(this.gcTime)&&ee(this,si,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vo?1/0:5*60*1e3))}clearGcTimeout(){R(this,si)&&(clearTimeout(R(this,si)),ee(this,si,void 0))}},si=new WeakMap,ax),Eo,So,xn,jt,Ml,ii,Dn,_r,lx,GR=(lx=class extends NE{constructor(t){super();oe(this,Dn);oe(this,Eo,void 0);oe(this,So,void 0);oe(this,xn,void 0);oe(this,jt,void 0);oe(this,Ml,void 0);oe(this,ii,void 0);ee(this,ii,!1),ee(this,Ml,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,xn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Eo,QR(this.options)),this.state=t.state??R(this,Eo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,jt))==null?void 0:t.promise}setOptions(t){this.options={...R(this,Ml),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,xn).remove(this)}setData(t,n){const r=tm(this.state.data,t,this.options);return _e(this,Dn,_r).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){_e(this,Dn,_r).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=R(this,jt))==null?void 0:r.promise;return(s=R(this,jt))==null||s.cancel(t),n?n.then(wn).catch(wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Eo))}isActive(){return this.observers.some(t=>Vn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!RE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,jt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,jt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,xn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,jt)&&(R(this,ii)?R(this,jt).cancel({revert:!0}):R(this,jt).cancelRetry()),this.scheduleGc()),R(this,xn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||_e(this,Dn,_r).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,jt))return R(this,jt).continueRetry(),R(this,jt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,s=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(ee(this,ii,!0),r.signal)})},i=()=>{const c=TE(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return s(f),ee(this,ii,!1),this.options.persister?this.options.persister(c,f,this):c(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),ee(this,So,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&_e(this,Dn,_r).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,p,v,y;wh(c)&&c.silent||_e(this,Dn,_r).call(this,{type:"error",error:c}),wh(c)||((p=(f=R(this,xn).config).onError)==null||p.call(f,c,this),(y=(v=R(this,xn).config).onSettled)==null||y.call(v,this.state.data,c,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return ee(this,jt,ME({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,p,v,y;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(p=(f=R(this,xn).config).onSuccess)==null||p.call(f,c,this),(y=(v=R(this,xn).config).onSettled)==null||y.call(v,c,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(c,f)=>{_e(this,Dn,_r).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{_e(this,Dn,_r).call(this,{type:"pause"})},onContinue:()=>{_e(this,Dn,_r).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),R(this,jt).start()}},Eo=new WeakMap,So=new WeakMap,xn=new WeakMap,jt=new WeakMap,Ml=new WeakMap,ii=new WeakMap,Dn=new WeakSet,_r=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...DE(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return wh(s)&&s.revert&&R(this,So)?{...R(this,So),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),vt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,xn).notify({query:this,type:"updated",action:t})})},lx);function DE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$E(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function QR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var er,ux,ZR=(ux=class extends ra{constructor(t={}){super();oe(this,er,void 0);this.config=t,ee(this,er,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??hv(s,n);let o=this.get(i);return o||(o=new GR({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){R(this,er).has(t.queryHash)||(R(this,er).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,er).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,er).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,er).get(t)}getAll(){return[...R(this,er).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>W0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>W0(t,r)):n}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},er=new WeakMap,ux),tr,Vt,oi,nr,ss,cx,YR=(cx=class extends NE{constructor(t){super();oe(this,nr);oe(this,tr,void 0);oe(this,Vt,void 0);oe(this,oi,void 0);this.mutationId=t.mutationId,ee(this,Vt,t.mutationCache),ee(this,tr,[]),this.state=t.state||jE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,tr).includes(t)||(R(this,tr).push(t),this.clearGcTimeout(),R(this,Vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,tr,R(this,tr).filter(n=>n!==t)),this.scheduleGc(),R(this,Vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,tr).length||(this.state.status==="pending"?this.scheduleGc():R(this,Vt).remove(this))}continue(){var t;return((t=R(this,oi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,u,d,c,f,p,v,y,b,m,g,x,E,C,O,k;ee(this,oi,ME({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,$)=>{_e(this,nr,ss).call(this,{type:"failed",failureCount:S,error:$})},onPause:()=>{_e(this,nr,ss).call(this,{type:"pause"})},onContinue:()=>{_e(this,nr,ss).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,Vt).canRun(this)}));const n=this.state.status==="pending",r=!R(this,oi).canStart();try{if(!n){_e(this,nr,ss).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=R(this,Vt).config).onMutate)==null?void 0:i.call(s,t,this));const $=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));$!==this.state.context&&_e(this,nr,ss).call(this,{type:"pending",context:$,variables:t,isPaused:r})}const S=await R(this,oi).start();return await((u=(l=R(this,Vt).config).onSuccess)==null?void 0:u.call(l,S,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,S,t,this.state.context)),await((p=(f=R(this,Vt).config).onSettled)==null?void 0:p.call(f,S,null,this.state.variables,this.state.context,this)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,S,null,t,this.state.context)),_e(this,nr,ss).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(b=R(this,Vt).config).onError)==null?void 0:m.call(b,S,t,this.state.context,this)),await((x=(g=this.options).onError)==null?void 0:x.call(g,S,t,this.state.context)),await((C=(E=R(this,Vt).config).onSettled)==null?void 0:C.call(E,void 0,S,this.state.variables,this.state.context,this)),await((k=(O=this.options).onSettled)==null?void 0:k.call(O,void 0,S,t,this.state.context)),S}finally{_e(this,nr,ss).call(this,{type:"error",error:S})}}finally{R(this,Vt).runNext(this)}}},tr=new WeakMap,Vt=new WeakMap,oi=new WeakMap,nr=new WeakSet,ss=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),vt.batch(()=>{R(this,tr).forEach(r=>{r.onMutationUpdate(t)}),R(this,Vt).notify({mutation:this,type:"updated",action:t})})},cx);function jE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var an,Nl,dx,XR=(dx=class extends ra{constructor(t={}){super();oe(this,an,void 0);oe(this,Nl,void 0);this.config=t,ee(this,an,new Map),ee(this,Nl,Date.now())}build(t,n,r){const s=new YR({mutationCache:this,mutationId:++cu(this,Nl)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=Ru(t),r=R(this,an).get(n)??[];r.push(t),R(this,an).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Ru(t);if(R(this,an).has(n)){const s=(r=R(this,an).get(n))==null?void 0:r.filter(i=>i!==t);s&&(s.length===0?R(this,an).delete(n):R(this,an).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=R(this,an).get(Ru(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=R(this,an).get(Ru(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...R(this,an).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>q0(n,r))}findAll(t={}){return this.getAll().filter(n=>q0(t,n))}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return vt.batch(()=>Promise.all(t.map(n=>n.continue().catch(wn))))}},an=new WeakMap,Nl=new WeakMap,dx);function Ru(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function JR(e){return{onFetch:(t,n)=>{const r=async()=>{var v,y,b,m,g;const s=t.options,i=(b=(y=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:y.fetchMore)==null?void 0:b.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],a=((g=t.state.data)==null?void 0:g.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const d=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},c=TE(t.options,t.fetchOptions),f=async(x,E,C)=>{if(u)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);const O={queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};d(O);const k=await c(O),{maxPages:S}=t.options,$=C?BR:zR;return{pages:$(x.pages,k,S),pageParams:$(x.pageParams,E,S)}};let p;if(i&&o.length){const x=i==="backward",E=x?FE:nm,C={pages:o,pageParams:a},O=E(s,C);p=await f(C,O,x)}else{p=await f(l,a[0]??s.initialPageParam);const x=e??o.length;for(let E=1;E<x;E++){const C=nm(s,p);if(C==null)break;p=await f(p,C)}}return p};t.options.persister?t.fetchFn=()=>{var s,i;return(i=(s=t.options).persister)==null?void 0:i.call(s,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function nm(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function FE(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function gV(e,t){return t?nm(e,t)!=null:!1}function vV(e,t){return!t||!e.getPreviousPageParam?!1:FE(e,t)!=null}var rt,ps,ms,Co,ko,gs,_o,Oo,fx,eP=(fx=class{constructor(e={}){oe(this,rt,void 0);oe(this,ps,void 0);oe(this,ms,void 0);oe(this,Co,void 0);oe(this,ko,void 0);oe(this,gs,void 0);oe(this,_o,void 0);oe(this,Oo,void 0);ee(this,rt,e.queryCache||new ZR),ee(this,ps,e.mutationCache||new XR),ee(this,ms,e.defaultOptions||{}),ee(this,Co,new Map),ee(this,ko,new Map),ee(this,gs,0)}mount(){cu(this,gs)._++,R(this,gs)===1&&(ee(this,_o,pv.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,rt).onFocus())})),ee(this,Oo,nd.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,rt).onOnline())})))}unmount(){var e,t;cu(this,gs)._--,R(this,gs)===0&&((e=R(this,_o))==null||e.call(this),ee(this,_o,void 0),(t=R(this,Oo))==null||t.call(this),ee(this,Oo,void 0))}isFetching(e){return R(this,rt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,ps).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,rt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=R(this,rt).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(po(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return R(this,rt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=R(this,rt).get(r.queryHash),i=s==null?void 0:s.state.data,o=VR(t,i);if(o!==void 0)return R(this,rt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return vt.batch(()=>R(this,rt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,rt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,rt);vt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,rt),r={type:"active",...e};return vt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=vt.batch(()=>R(this,rt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(wn).catch(wn)}invalidateQueries(e={},t={}){return vt.batch(()=>{if(R(this,rt).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=vt.batch(()=>R(this,rt).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(wn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(wn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,rt).build(this,t);return n.isStaleByTime(po(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wn).catch(wn)}fetchInfiniteQuery(e){return e.behavior=JR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wn).catch(wn)}resumePausedMutations(){return nd.isOnline()?R(this,ps).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,rt)}getMutationCache(){return R(this,ps)}getDefaultOptions(){return R(this,ms)}setDefaultOptions(e){ee(this,ms,e)}setQueryDefaults(e,t){R(this,Co).set(yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Co).values()];let n={};return t.forEach(r=>{hl(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){R(this,ko).set(yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,ko).values()];let n={};return t.forEach(r=>{hl(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,ms).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===AE&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,ms).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,rt).clear(),R(this,ps).clear()}},rt=new WeakMap,ps=new WeakMap,ms=new WeakMap,Co=new WeakMap,ko=new WeakMap,gs=new WeakMap,_o=new WeakMap,Oo=new WeakMap,fx),Zt,$e,Dl,Ut,ai,Ro,rr,jl,Po,Ao,li,ui,vs,To,ci,Ia,Fl,rm,Ll,sm,Vl,im,Ul,om,zl,am,Bl,lm,Hl,um,Fd,LE,hx,tP=(hx=class extends ra{constructor(t,n){super();oe(this,ci);oe(this,Fl);oe(this,Ll);oe(this,Vl);oe(this,Ul);oe(this,zl);oe(this,Bl);oe(this,Hl);oe(this,Fd);oe(this,Zt,void 0);oe(this,$e,void 0);oe(this,Dl,void 0);oe(this,Ut,void 0);oe(this,ai,void 0);oe(this,Ro,void 0);oe(this,rr,void 0);oe(this,jl,void 0);oe(this,Po,void 0);oe(this,Ao,void 0);oe(this,li,void 0);oe(this,ui,void 0);oe(this,vs,void 0);oe(this,To,new Set);this.options=n,ee(this,Zt,t),ee(this,rr,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,$e).addObserver(this),Q0(R(this,$e),this.options)?_e(this,ci,Ia).call(this):this.updateResult(),_e(this,Ul,om).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cm(R(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cm(R(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,_e(this,zl,am).call(this),_e(this,Bl,lm).call(this),R(this,$e).removeObserver(this)}setOptions(t,n){const r=this.options,s=R(this,$e);if(this.options=R(this,Zt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vn(this.options.enabled,R(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");_e(this,Hl,um).call(this),R(this,$e).setOptions(this.options),r._defaulted&&!td(this.options,r)&&R(this,Zt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,$e),observer:this});const i=this.hasListeners();i&&Z0(R(this,$e),s,this.options,r)&&_e(this,ci,Ia).call(this),this.updateResult(n),i&&(R(this,$e)!==s||Vn(this.options.enabled,R(this,$e))!==Vn(r.enabled,R(this,$e))||po(this.options.staleTime,R(this,$e))!==po(r.staleTime,R(this,$e)))&&_e(this,Fl,rm).call(this);const o=_e(this,Ll,sm).call(this);i&&(R(this,$e)!==s||Vn(this.options.enabled,R(this,$e))!==Vn(r.enabled,R(this,$e))||o!==R(this,vs))&&_e(this,Vl,im).call(this,o)}getOptimisticResult(t){const n=R(this,Zt).getQueryCache().build(R(this,Zt),t),r=this.createResult(n,t);return rP(this,r)&&(ee(this,Ut,r),ee(this,Ro,this.options),ee(this,ai,R(this,$e).state)),r}getCurrentResult(){return R(this,Ut)}trackResult(t,n){const r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),t[s])})}),r}trackProp(t){R(this,To).add(t)}getCurrentQuery(){return R(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,Zt).defaultQueryOptions(t),r=R(this,Zt).getQueryCache().build(R(this,Zt),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return _e(this,ci,Ia).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Ut)))}createResult(t,n){var k;const r=R(this,$e),s=this.options,i=R(this,Ut),o=R(this,ai),a=R(this,Ro),u=t!==r?t.state:R(this,Dl),{state:d}=t;let c={...d},f=!1,p;if(n._optimisticResults){const S=this.hasListeners(),$=!S&&Q0(t,n),A=S&&Z0(t,r,n,s);($||A)&&(c={...c,...DE(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:b}=c;if(n.select&&c.data!==void 0)if(i&&c.data===(o==null?void 0:o.data)&&n.select===R(this,jl))p=R(this,Po);else try{ee(this,jl,n.select),p=n.select(c.data),p=tm(i==null?void 0:i.data,p,n),ee(this,Po,p),ee(this,rr,null)}catch(S){ee(this,rr,S)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let S;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))S=i.data;else if(S=typeof n.placeholderData=="function"?n.placeholderData((k=R(this,Ao))==null?void 0:k.state.data,R(this,Ao)):n.placeholderData,n.select&&S!==void 0)try{S=n.select(S),ee(this,rr,null)}catch($){ee(this,rr,$)}S!==void 0&&(b="success",p=tm(i==null?void 0:i.data,S,n),f=!0)}R(this,rr)&&(v=R(this,rr),p=R(this,Po),y=Date.now(),b="error");const m=c.fetchStatus==="fetching",g=b==="pending",x=b==="error",E=g&&m,C=p!==void 0;return{status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:x,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:c.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!g,isLoadingError:x&&!C,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&C,isStale:mv(t,n),refetch:this.refetch}}updateResult(t){const n=R(this,Ut),r=this.createResult(R(this,$e),this.options);if(ee(this,ai,R(this,$e).state),ee(this,Ro,this.options),R(this,ai).data!==void 0&&ee(this,Ao,R(this,$e)),td(r,n))return;ee(this,Ut,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!R(this,To).size)return!0;const l=new Set(a??R(this,To));return this.options.throwOnError&&l.add("error"),Object.keys(R(this,Ut)).some(u=>{const d=u;return R(this,Ut)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),_e(this,Fd,LE).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&_e(this,Ul,om).call(this)}},Zt=new WeakMap,$e=new WeakMap,Dl=new WeakMap,Ut=new WeakMap,ai=new WeakMap,Ro=new WeakMap,rr=new WeakMap,jl=new WeakMap,Po=new WeakMap,Ao=new WeakMap,li=new WeakMap,ui=new WeakMap,vs=new WeakMap,To=new WeakMap,ci=new WeakSet,Ia=function(t){_e(this,Hl,um).call(this);let n=R(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(wn)),n},Fl=new WeakSet,rm=function(){_e(this,zl,am).call(this);const t=po(this.options.staleTime,R(this,$e));if(Vo||R(this,Ut).isStale||!Jp(t))return;const r=RE(R(this,Ut).dataUpdatedAt,t)+1;ee(this,li,setTimeout(()=>{R(this,Ut).isStale||this.updateResult()},r))},Ll=new WeakSet,sm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,$e)):this.options.refetchInterval)??!1},Vl=new WeakSet,im=function(t){_e(this,Bl,lm).call(this),ee(this,vs,t),!(Vo||Vn(this.options.enabled,R(this,$e))===!1||!Jp(R(this,vs))||R(this,vs)===0)&&ee(this,ui,setInterval(()=>{(this.options.refetchIntervalInBackground||pv.isFocused())&&_e(this,ci,Ia).call(this)},R(this,vs)))},Ul=new WeakSet,om=function(){_e(this,Fl,rm).call(this),_e(this,Vl,im).call(this,_e(this,Ll,sm).call(this))},zl=new WeakSet,am=function(){R(this,li)&&(clearTimeout(R(this,li)),ee(this,li,void 0))},Bl=new WeakSet,lm=function(){R(this,ui)&&(clearInterval(R(this,ui)),ee(this,ui,void 0))},Hl=new WeakSet,um=function(){const t=R(this,Zt).getQueryCache().build(R(this,Zt),this.options);if(t===R(this,$e))return;const n=R(this,$e);ee(this,$e,t),ee(this,Dl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Fd=new WeakSet,LE=function(t){vt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,Ut))}),R(this,Zt).getQueryCache().notify({query:R(this,$e),type:"observerResultsUpdated"})})},hx);function nP(e,t){return Vn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Q0(e,t){return nP(e,t)||e.state.data!==void 0&&cm(e,t,t.refetchOnMount)}function cm(e,t,n){if(Vn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&mv(e,t)}return!1}function Z0(e,t,n,r){return(e!==t||Vn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&mv(e,n)}function mv(e,t){return Vn(t.enabled,e)!==!1&&e.isStaleByTime(po(t.staleTime,e))}function rP(e,t){return!td(e.getCurrentResult(),t)}var ys,bs,Yt,Tr,$o,lc,Wl,dm,px,sP=(px=class extends ra{constructor(n,r){super();oe(this,$o);oe(this,Wl);oe(this,ys,void 0);oe(this,bs,void 0);oe(this,Yt,void 0);oe(this,Tr,void 0);ee(this,ys,n),this.setOptions(r),this.bindMethods(),_e(this,$o,lc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=R(this,ys).defaultMutationOptions(n),td(this.options,r)||R(this,ys).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,Yt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&yi(r.mutationKey)!==yi(this.options.mutationKey)?this.reset():((s=R(this,Yt))==null?void 0:s.state.status)==="pending"&&R(this,Yt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=R(this,Yt))==null||n.removeObserver(this)}onMutationUpdate(n){_e(this,$o,lc).call(this),_e(this,Wl,dm).call(this,n)}getCurrentResult(){return R(this,bs)}reset(){var n;(n=R(this,Yt))==null||n.removeObserver(this),ee(this,Yt,void 0),_e(this,$o,lc).call(this),_e(this,Wl,dm).call(this)}mutate(n,r){var s;return ee(this,Tr,r),(s=R(this,Yt))==null||s.removeObserver(this),ee(this,Yt,R(this,ys).getMutationCache().build(R(this,ys),this.options)),R(this,Yt).addObserver(this),R(this,Yt).execute(n)}},ys=new WeakMap,bs=new WeakMap,Yt=new WeakMap,Tr=new WeakMap,$o=new WeakSet,lc=function(){var r;const n=((r=R(this,Yt))==null?void 0:r.state)??jE();ee(this,bs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Wl=new WeakSet,dm=function(n){vt.batch(()=>{var r,s,i,o,a,l,u,d;if(R(this,Tr)&&this.hasListeners()){const c=R(this,bs).variables,f=R(this,bs).context;(n==null?void 0:n.type)==="success"?((s=(r=R(this,Tr)).onSuccess)==null||s.call(r,n.data,c,f),(o=(i=R(this,Tr)).onSettled)==null||o.call(i,n.data,null,c,f)):(n==null?void 0:n.type)==="error"&&((l=(a=R(this,Tr)).onError)==null||l.call(a,n.error,c,f),(d=(u=R(this,Tr)).onSettled)==null||d.call(u,void 0,n.error,c,f))}this.listeners.forEach(c=>{c(R(this,bs))})})},px),VE=h.createContext(void 0),Yl=e=>{const t=h.useContext(VE);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},iP=({client:e,children:t})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(VE.Provider,{value:e,children:t})),UE=h.createContext(!1),oP=()=>h.useContext(UE);UE.Provider;function aP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var lP=h.createContext(aP()),uP=()=>h.useContext(lP);function zE(e,t){return typeof e=="function"?e(...t):!!e}function cP(){}var dP=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},fP=e=>{h.useEffect(()=>{e.clearReset()},[e])},hP=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&zE(n,[e.error,r]),pP=e=>{e.suspense&&(typeof e.staleTime!="number"&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},mP=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,gP=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function vP(e,t,n){var u,d,c,f;const r=Yl(n),s=oP(),i=uP(),o=r.defaultQueryOptions(e);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,o),o._optimisticResults=s?"isRestoring":"optimistic",pP(o),dP(o,i),fP(i);const[a]=h.useState(()=>new t(r,o)),l=a.getOptimisticResult(o);if(h.useSyncExternalStore(h.useCallback(p=>{const v=s?()=>{}:a.subscribe(vt.batchCalls(p));return a.updateResult(),v},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),h.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),mP(o,l))throw gP(o,a,i);if(hP({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;return(f=(c=r.getDefaultOptions().queries)==null?void 0:c._experimental_afterQuery)==null||f.call(c,o,l),o.notifyOnChangeProps?l:a.trackResult(l)}function yP(e,t){return vP(e,tP,t)}function bP(e,t){const n=Yl(t),[r]=h.useState(()=>new sP(n,e));h.useEffect(()=>{r.setOptions(e)},[r,e]);const s=h.useSyncExternalStore(h.useCallback(o=>r.subscribe(vt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=h.useCallback((o,a)=>{r.mutate(o,a).catch(cP)},[r]);if(s.error&&zE(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}var xP=function(){return null};let wP={data:""},EP=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||wP,SP=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,CP=/\/\*[^]*?\*\/| +/g,Y0=/\n+/g,ds=(e,t)=>{let n="",r="",s="";for(let i in e){let o=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+o+";":r+=i[1]=="f"?ds(o,i):i+"{"+ds(o,i[1]=="k"?"":t)+"}":typeof o=="object"?r+=ds(o,t?t.replace(/([^,])+/g,a=>i.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=ds.p?ds.p(i,o):i+":"+o+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Cr={},BE=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+BE(e[n]);return t}return e},kP=(e,t,n,r,s)=>{let i=BE(e),o=Cr[i]||(Cr[i]=(l=>{let u=0,d=11;for(;u<l.length;)d=101*d+l.charCodeAt(u++)>>>0;return"go"+d})(i));if(!Cr[o]){let l=i!==e?e:(u=>{let d,c,f=[{}];for(;d=SP.exec(u.replace(CP,""));)d[4]?f.shift():d[3]?(c=d[3].replace(Y0," ").trim(),f.unshift(f[0][c]=f[0][c]||{})):f[0][d[1]]=d[2].replace(Y0," ").trim();return f[0]})(e);Cr[o]=ds(s?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&Cr.g?Cr.g:null;return n&&(Cr.g=Cr[o]),((l,u,d,c)=>{c?u.data=u.data.replace(c,l):u.data.indexOf(l)===-1&&(u.data=d?l+u.data:u.data+l)})(Cr[o],t,r,a),o},_P=(e,t,n)=>e.reduce((r,s,i)=>{let o=t[i];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":ds(a,""):a===!1?"":a}return r+s+(o??"")},"");function nf(e){let t=this||{},n=e.call?e(t.p):e;return kP(n.unshift?n.raw?_P(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,EP(t.target),t.g,t.o,t.k)}let HE,fm,hm;nf.bind({g:1});let Hr=nf.bind({k:1});function OP(e,t,n,r){ds.p=t,HE=e,fm=n,hm=r}function Ks(e,t){let n=this||{};return function(){let r=arguments;function s(i,o){let a=Object.assign({},i),l=a.className||s.className;n.p=Object.assign({theme:fm&&fm()},a),n.o=/ *go\d+/.test(l),a.className=nf.apply(n,r)+(l?" "+l:""),t&&(a.ref=o);let u=e;return e[0]&&(u=a.as||e,delete a.as),hm&&u[0]&&hm(a),HE(u,a)}return t?t(s):s}}var RP=e=>typeof e=="function",rd=(e,t)=>RP(e)?e(t):e,PP=(()=>{let e=0;return()=>(++e).toString()})(),WE=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),AP=20,uc=new Map,TP=1e3,X0=e=>{if(uc.has(e))return;let t=setTimeout(()=>{uc.delete(e),_i({type:4,toastId:e})},TP);uc.set(e,t)},$P=e=>{let t=uc.get(e);t&&clearTimeout(t)},pm=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,AP)};case 1:return t.toast.id&&$P(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?pm(e,{type:1,toast:n}):pm(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?X0(r):e.toasts.forEach(i=>{X0(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+s}))}}},cc=[],dc={toasts:[],pausedAt:void 0},_i=e=>{dc=pm(dc,e),cc.forEach(t=>{t(dc)})},IP={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},MP=(e={})=>{let[t,n]=h.useState(dc);h.useEffect(()=>(cc.push(n),()=>{let s=cc.indexOf(n);s>-1&&cc.splice(s,1)}),[t]);let r=t.toasts.map(s=>{var i,o;return{...e,...e[s.type],...s,duration:s.duration||((i=e[s.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||IP[s.type],style:{...e.style,...(o=e[s.type])==null?void 0:o.style,...s.style}}});return{...t,toasts:r}},NP=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||PP()}),Xl=e=>(t,n)=>{let r=NP(t,e,n);return _i({type:2,toast:r}),r.id},dn=(e,t)=>Xl("blank")(e,t);dn.error=Xl("error");dn.success=Xl("success");dn.loading=Xl("loading");dn.custom=Xl("custom");dn.dismiss=e=>{_i({type:3,toastId:e})};dn.remove=e=>_i({type:4,toastId:e});dn.promise=(e,t,n)=>{let r=dn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(s=>(dn.success(rd(t.success,s),{id:r,...n,...n==null?void 0:n.success}),s)).catch(s=>{dn.error(rd(t.error,s),{id:r,...n,...n==null?void 0:n.error})}),e};var DP=(e,t)=>{_i({type:1,toast:{id:e,height:t}})},jP=()=>{_i({type:5,time:Date.now()})},FP=e=>{let{toasts:t,pausedAt:n}=MP(e);h.useEffect(()=>{if(n)return;let i=Date.now(),o=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(i-a.createdAt);if(l<0){a.visible&&dn.dismiss(a.id);return}return setTimeout(()=>dn.dismiss(a.id),l)});return()=>{o.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=h.useCallback(()=>{n&&_i({type:6,time:Date.now()})},[n]),s=h.useCallback((i,o)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:u}=o||{},d=t.filter(p=>(p.position||u)===(i.position||u)&&p.height),c=d.findIndex(p=>p.id===i.id),f=d.filter((p,v)=>v<c&&p.visible).length;return d.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,v)=>p+(v.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:DP,startPause:jP,endPause:r,calculateOffset:s}}},LP=Hr` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,VP=Hr` +from { + transform: scale(0); + opacity: 0; +} +to { + transform: scale(1); + opacity: 1; +}`,UP=Hr` +from { + transform: scale(0) rotate(90deg); + opacity: 0; +} +to { + transform: scale(1) rotate(90deg); + opacity: 1; +}`,zP=Ks("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#ff4b4b"}; + position: relative; + transform: rotate(45deg); + + animation: ${LP} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + + &:after, + &:before { + content: ''; + animation: ${VP} 0.15s ease-out forwards; + animation-delay: 150ms; + position: absolute; + border-radius: 3px; + opacity: 0; + background: ${e=>e.secondary||"#fff"}; + bottom: 9px; + left: 4px; + height: 2px; + width: 12px; + } + + &:before { + animation: ${UP} 0.15s ease-out forwards; + animation-delay: 180ms; + transform: rotate(90deg); + } +`,BP=Hr` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,HP=Ks("div")` + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid; + border-radius: 100%; + border-color: ${e=>e.secondary||"#e0e0e0"}; + border-right-color: ${e=>e.primary||"#616161"}; + animation: ${BP} 1s linear infinite; +`,WP=Hr` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,qP=Hr` +0% { + height: 0; + width: 0; + opacity: 0; +} +40% { + height: 0; + width: 6px; + opacity: 1; +} +100% { + opacity: 1; + height: 10px; +}`,KP=Ks("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#61d345"}; + position: relative; + transform: rotate(45deg); + + animation: ${WP} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + &:after { + content: ''; + box-sizing: border-box; + animation: ${qP} 0.2s ease-out forwards; + opacity: 0; + animation-delay: 200ms; + position: absolute; + border-right: 2px solid; + border-bottom: 2px solid; + border-color: ${e=>e.secondary||"#fff"}; + bottom: 6px; + left: 6px; + height: 10px; + width: 6px; + } +`,GP=Ks("div")` + position: absolute; +`,QP=Ks("div")` + position: relative; + display: flex; + justify-content: center; + align-items: center; + min-width: 20px; + min-height: 20px; +`,ZP=Hr` +from { + transform: scale(0.6); + opacity: 0.4; +} +to { + transform: scale(1); + opacity: 1; +}`,YP=Ks("div")` + position: relative; + transform: scale(0.6); + opacity: 0.4; + min-width: 20px; + animation: ${ZP} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; +`,XP=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?h.createElement(YP,null,t):t:n==="blank"?null:h.createElement(QP,null,h.createElement(HP,{...r}),n!=="loading"&&h.createElement(GP,null,n==="error"?h.createElement(zP,{...r}):h.createElement(KP,{...r})))},JP=e=>` +0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} +100% {transform: translate3d(0,0,0) scale(1); opacity:1;} +`,eA=e=>` +0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} +100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} +`,tA="0%{opacity:0;} 100%{opacity:1;}",nA="0%{opacity:1;} 100%{opacity:0;}",rA=Ks("div")` + display: flex; + align-items: center; + background: #fff; + color: #363636; + line-height: 1.3; + will-change: transform; + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); + max-width: 350px; + pointer-events: auto; + padding: 8px 10px; + border-radius: 8px; +`,sA=Ks("div")` + display: flex; + justify-content: center; + margin: 4px 10px; + color: inherit; + flex: 1 1 auto; + white-space: pre-line; +`,iA=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=WE()?[tA,nA]:[JP(n),eA(n)];return{animation:t?`${Hr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Hr(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},oA=h.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?iA(e.position||t||"top-center",e.visible):{opacity:0},i=h.createElement(XP,{toast:e}),o=h.createElement(sA,{...e.ariaProps},rd(e.message,e));return h.createElement(rA,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:i,message:o}):h.createElement(h.Fragment,null,i,o))});OP(h.createElement);var aA=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let i=h.useCallback(o=>{if(o){let a=()=>{let l=o.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return h.createElement("div",{ref:i,className:t,style:n},s)},lA=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:WE()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},uA=nf` + z-index: 9999; + > * { + pointer-events: auto; + } +`,Pu=16,cA=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:i,containerClassName:o})=>{let{toasts:a,handlers:l}=FP(n);return h.createElement("div",{style:{position:"fixed",zIndex:9999,top:Pu,left:Pu,right:Pu,bottom:Pu,pointerEvents:"none",...i},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(u=>{let d=u.position||t,c=l.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),f=lA(d,c);return h.createElement(aA,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?uA:"",style:f},u.type==="custom"?rd(u.message,u):s?s(u):h.createElement(oA,{toast:u,position:d}))}))},gv=dn,qE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ie=(e,t,n)=>(qE(e,t,"read from private field"),n?n.call(e):t.get(e)),Ui=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ni=(e,t,n,r)=>(qE(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);typeof window<"u"&&!window.global&&(window.global=typeof ip>"u"?window:ip);var KE=e=>typeof atob<"u"&&typeof atob=="function"?atob(e):typeof global<"u"&&global.Buffer?new global.Buffer(e,"base64").toString():e,GE="pk_live_",dA="pk_test_";function J0(e){if(e=e||"",!QE(e))return null;const t=e.startsWith(GE)?"production":"development";let n=KE(e.split("_")[2]);return n.endsWith("$")?(n=n.slice(0,-1),{instanceType:t,frontendApi:n}):null}function QE(e){e=e||"";const t=e.startsWith(GE)||e.startsWith(dA),n=KE(e.split("_")[2]||"").endsWith("$");return t&&n}function fA(e){return e=e||"",e.startsWith("clerk.")}function hA(){const e=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],t=new Map;return{isDevOrStagingUrl:n=>{if(!n)return!1;const r=typeof n=="string"?n:n.hostname;let s=t.get(r);return s===void 0&&(s=e.some(i=>r.endsWith(i)),t.set(r,s)),s}}}var ZE=Object.defineProperty,pA=Object.getOwnPropertyDescriptor,mA=Object.getOwnPropertyNames,gA=Object.prototype.hasOwnProperty,vA=(e,t)=>{for(var n in t)ZE(e,n,{get:t[n],enumerable:!0})},e1=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of mA(t))!gA.call(e,s)&&s!==n&&ZE(e,s,{get:()=>t[s],enumerable:!(r=pA(t,s))||r.enumerable});return e},yA=(e,t,n)=>(e1(e,t,"default"),n&&e1(n,t,"default")),bV=()=>{try{return!1}catch{}return!1},bA=()=>{try{return!1}catch{}return!1},xA=()=>{try{return!0}catch{}return!1},t1=new Set,sd=(e,t,n)=>{const r=bA()||xA(),s=n??e;t1.has(s)||r||(t1.add(s),console.warn(`Clerk - DEPRECATION WARNING: "${e}" is deprecated and will be removed in the next major release. +${t}`))},wA={Expired:"expired",Failed:"failed"};new Proxy(wA,{get(e,t,n){return sd("MagicLinkErrorCode","Use `EmailLinkErrorCode` instead."),Reflect.get(e,t,n)}});var EA=Object.freeze({InvalidFrontendApiErrorMessage:"The frontendApi passed to Clerk is invalid. You can get your Frontend API key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys."});function SA({packageName:e,customMessages:t}){let n=e;const r={...EA,...t};function s(i,o){if(!o)return`${n}: ${i}`;let a=i;const l=i.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(const u of l){const d=(o[u[1]]||"").toString();a=a.replace(`{{${u[1]}}}`,d)}return`${n}: ${a}`}return{setPackageName({packageName:i}){return typeof i=="string"&&(n=i),this},setMessages({customMessages:i}){return Object.assign(r,i||{}),this},throwInvalidPublishableKeyError(i){throw new Error(s(r.InvalidPublishableKeyErrorMessage,i))},throwInvalidFrontendApiError(i){throw new Error(s(r.InvalidFrontendApiErrorMessage,i))},throwInvalidProxyUrl(i){throw new Error(s(r.InvalidProxyUrlErrorMessage,i))},throwMissingPublishableKeyError(){throw new Error(s(r.MissingPublishableKeyErrorMessage))}}}const CA="Clerk: You must wrap your application in a <ClerkProvider> component.",kA="Clerk: You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.",_A="Clerk: Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support",Eh="Clerk: Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.",xV="Clerk: <UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",wV="Clerk: <UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",EV="Clerk: <OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",SV="Clerk: <OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",CV=e=>`Clerk: <${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored.`,kV=e=>`Clerk: Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,_V=e=>`Clerk: Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,OA='Clerk: Missing parameters. `has` from `useAuth` requires a permission or role key to be passed. Example usage: `has({permission: "org:posts:edit"`',qa=SA({packageName:"@clerk/react"});function RA(e){qa.setMessages(e).setPackageName(e)}function PA(e){return typeof e=="function"}var AA="loadScript cannot be called when document does not exist",TA="loadScript cannot be called without a src";async function $A(e="",t){const{async:n,defer:r,beforeLoad:s,crossOrigin:i}=t||{};return new Promise((o,a)=>{e||a(TA),(!document||!document.body)&&a(AA);const l=document.createElement("script");i&&l.setAttribute("crossorigin",i),l.async=n||!1,l.defer=r||!1,l.addEventListener("load",()=>{l.remove(),o(l)}),l.addEventListener("error",()=>{l.remove(),a()}),l.src=e,s==null||s(l),document.body.appendChild(l)})}function IA(e){return e?MA(e)||YE(e):!0}function MA(e){return/^http(s)?:\/\//.test(e||"")}function YE(e){return e.startsWith("/")}function NA(e){return e?YE(e)?new URL(e,window.location.origin).toString():e:""}function DA(e){if(!e)return"";let t;if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else{if(e.match(/\.clerk.accounts/))return e;t=/^(clerk\.)*/gi}return`clerk.${e.replace(t,"")}`}const{isDevOrStagingUrl:jA}=hA(),FA=e=>{if(e)return e;const t=LA("4.30.0");return t?t==="snapshot"?"4.67.0":t:VA("4.30.0")},LA=e=>{var t;return(t=e.match(/-(.*)\./))==null?void 0:t[1]},VA=e=>e.split(".")[0],UA="Clerk: Failed to load Clerk",zA=e=>{const{frontendApi:t,publishableKey:n}=e;return!n&&!t&&qa.throwMissingPublishableKeyError(),$A(BA(e),{async:!0,crossOrigin:"anonymous",beforeLoad:HA(e)}).catch(()=>{throw new Error(UA)})},BA=e=>{var c,f;const{clerkJSUrl:t,clerkJSVariant:n,clerkJSVersion:r,proxyUrl:s,domain:i,publishableKey:o,frontendApi:a}=e;if(t)return t;let l="";s&&IA(s)?l=NA(s).replace(/http(s)?:\/\//,""):i&&!jA(((c=J0(o))==null?void 0:c.frontendApi)||a||"")?l=DA(i):l=((f=J0(o))==null?void 0:f.frontendApi)||a||"";const u=n?`${n.replace(/\.+$/,"")}.`:"",d=FA(r);return`https://${l}/npm/@clerk/clerk-js@${d}/dist/clerk.${u}browser.js`},HA=e=>t=>{const{publishableKey:n,frontendApi:r,proxyUrl:s,domain:i}=e;n?t.setAttribute("data-clerk-publishable-key",n):r&&t.setAttribute("data-clerk-frontend-api",r),s&&t.setAttribute("data-clerk-proxy-url",s),i&&t.setAttribute("data-clerk-domain",i)},Au=new Map;function WA(e,t,n=1){G.useEffect(()=>{const r=Au.get(e)||0;if(r==n)throw new Error(t);return Au.set(e,r+1),()=>{Au.set(e,(Au.get(e)||1)-1)}},[])}function qA(e,t,n){const r=e.displayName||e.name||t||"Component",s=i=>(WA(t,n),G.createElement(e,{...i}));return s.displayName=`withMaxAllowedInstancesGuard(${r})`,s}function Sh(e,t,n){if(typeof e=="function")return e(t);if(typeof e<"u")return e;if(typeof n<"u")return n}function n1(){return typeof window<"u"}var XE={exports:{}},JE={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Uo=h;function KA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GA=typeof Object.is=="function"?Object.is:KA,QA=Uo.useState,ZA=Uo.useEffect,YA=Uo.useLayoutEffect,XA=Uo.useDebugValue;function JA(e,t){var n=t(),r=QA({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return YA(function(){s.value=n,s.getSnapshot=t,Ch(s)&&i({inst:s})},[e,n,t]),ZA(function(){return Ch(s)&&i({inst:s}),e(function(){Ch(s)&&i({inst:s})})},[e]),XA(n),n}function Ch(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!GA(e,n)}catch{return!0}}function eT(e,t){return t()}var tT=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?eT:JA;JE.useSyncExternalStore=Uo.useSyncExternalStore!==void 0?Uo.useSyncExternalStore:tT;XE.exports=JE;var vv=XE.exports;const Es=()=>{},Ht=Es(),fc=Object,Re=e=>e===Ht,zn=e=>typeof e=="function",Wr=(e,t)=>({...e,...t}),nT=e=>zn(e.then),Tu=new WeakMap;let rT=0;const pl=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let s,i;if(fc(e)===e&&!r&&n!=RegExp){if(s=Tu.get(e),s)return s;if(s=++rT+"~",Tu.set(e,s),n==Array){for(s="@",i=0;i<e.length;i++)s+=pl(e[i])+",";Tu.set(e,s)}if(n==fc){s="#";const o=fc.keys(e).sort();for(;!Re(i=o.pop());)Re(e[i])||(s+=i+":"+pl(e[i])+",");Tu.set(e,s)}}else s=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},ar=new WeakMap,kh={},$u={},yv="undefined",rf=typeof window!=yv,mm=typeof document!=yv,sT=()=>rf&&typeof window.requestAnimationFrame!=yv,ls=(e,t)=>{const n=ar.get(e);return[()=>!Re(t)&&e.get(t)||kh,r=>{if(!Re(t)){const s=e.get(t);t in $u||($u[t]=s),n[5](t,Wr(s,r),s||kh)}},n[6],()=>!Re(t)&&t in $u?$u[t]:!Re(t)&&e.get(t)||kh]};let gm=!0;const iT=()=>gm,[vm,ym]=rf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Es,Es],oT=()=>{const e=mm&&document.visibilityState;return Re(e)||e!=="hidden"},aT=e=>(mm&&document.addEventListener("visibilitychange",e),vm("focus",e),()=>{mm&&document.removeEventListener("visibilitychange",e),ym("focus",e)}),lT=e=>{const t=()=>{gm=!0,e()},n=()=>{gm=!1};return vm("online",t),vm("offline",n),()=>{ym("online",t),ym("offline",n)}},uT={isOnline:iT,isVisible:oT},cT={initFocus:aT,initReconnect:lT},r1=!G.useId,ml=!rf||"Deno"in window,dT=e=>sT()?window.requestAnimationFrame(e):setTimeout(e,1),Ka=ml?h.useEffect:h.useLayoutEffect,_h=typeof navigator<"u"&&navigator.connection,s1=!ml&&_h&&(["slow-2g","2g"].includes(_h.effectiveType)||_h.saveData),js=e=>{if(zn(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?pl(e):"",[e,t]};let fT=0;const bm=()=>++fT,eS=0,tS=1,nS=2,hT=3;var wa={__proto__:null,ERROR_REVALIDATE_EVENT:hT,FOCUS_EVENT:eS,MUTATE_EVENT:nS,RECONNECT_EVENT:tS};async function rS(...e){const[t,n,r,s]=e,i=Wr({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let o=i.populateCache;const a=i.rollbackOnError;let l=i.optimisticData;const u=i.revalidate!==!1,d=p=>typeof a=="function"?a(p):a!==!1,c=i.throwOnError;if(zn(n)){const p=n,v=[],y=t.keys();for(const b of y)!/^\$(inf|sub)\$/.test(b)&&p(t.get(b)._k)&&v.push(b);return Promise.all(v.map(f))}return f(n);async function f(p){const[v]=js(p);if(!v)return;const[y,b]=ls(t,v),[m,g,x,E]=ar.get(t),C=m[v],O=()=>u&&(delete x[v],delete E[v],C&&C[0])?C[0](nS).then(()=>y().data):y().data;if(e.length<3)return O();let k=r,S;const $=bm();g[v]=[$,0];const A=!Re(l),T=y(),P=T.data,L=T._c,I=Re(L)?P:L;if(A&&(l=zn(l)?l(I,P):l,b({data:l,_c:I})),zn(k))try{k=k(I)}catch(z){S=z}if(k&&nT(k))if(k=await k.catch(z=>{S=z}),$!==g[v][0]){if(S)throw S;return k}else S&&A&&d(S)&&(o=!0,k=I,b({data:k,_c:Ht}));o&&(S||(zn(o)&&(k=o(k,I)),b({data:k,error:Ht,_c:Ht}))),g[v][1]=bm();const U=await O();if(b({_c:Ht}),S){if(c)throw S;return}return o?U:k}}const i1=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},sS=(e,t)=>{if(!ar.has(e)){const n=Wr(cT,t),r={},s=rS.bind(Ht,e);let i=Es;const o={},a=(d,c)=>{const f=o[d]||[];return o[d]=f,f.push(c),()=>f.splice(f.indexOf(c),1)},l=(d,c,f)=>{e.set(d,c);const p=o[d];if(p)for(const v of p)v(c,f)},u=()=>{if(!ar.has(e)&&(ar.set(e,[r,{},{},{},s,l,a]),!ml)){const d=n.initFocus(setTimeout.bind(Ht,i1.bind(Ht,r,eS))),c=n.initReconnect(setTimeout.bind(Ht,i1.bind(Ht,r,tS)));i=()=>{d&&d(),c&&c(),ar.delete(e)}}};return u(),[e,s,u,i]}return[e,ar.get(e)[4]]},pT=(e,t,n,r,s)=>{const i=n.errorRetryCount,o=s.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!Re(i)&&o>i||setTimeout(r,a,s)},mT=(e,t)=>pl(e)==pl(t),[sf,iS]=sS(new Map),oS=Wr({onLoadingSlow:Es,onSuccess:Es,onError:Es,onErrorRetry:pT,onDiscarded:Es,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:s1?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:s1?5e3:3e3,compare:mT,isPaused:()=>!1,cache:sf,mutate:iS,fallback:{}},uT),aS=(e,t)=>{const n=Wr(e,t);if(t){const{use:r,fallback:s}=e,{use:i,fallback:o}=t;r&&i&&(n.use=r.concat(i)),s&&o&&(n.fallback=Wr(s,o))}return n},xm=h.createContext({}),gT=e=>{const{value:t}=e,n=h.useContext(xm),r=zn(t),s=h.useMemo(()=>r?t(n):t,[r,n,t]),i=h.useMemo(()=>r?s:aS(n,s),[r,n,s]),o=s&&s.provider,a=h.useRef(Ht);o&&!a.current&&(a.current=sS(o(i.cache||sf),s));const l=a.current;return l&&(i.cache=l[0],i.mutate=l[1]),Ka(()=>{if(l)return l[2]&&l[2](),l[3]},[]),h.createElement(xm.Provider,Wr(e,{value:i}))},lS=rf&&window.__SWR_DEVTOOLS_USE__,vT=lS?window.__SWR_DEVTOOLS_USE__:[],yT=()=>{lS&&(window.__SWR_DEVTOOLS_REACT__=G)},uS=e=>zn(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],cS=()=>Wr(oS,h.useContext(xm)),bT=(e,t)=>{const[n,r]=js(e),[,,,s]=ar.get(sf);if(s[n])return s[n];const i=t(r);return s[n]=i,i},xT=e=>(t,n,r)=>e(t,n&&((...i)=>{const[o]=js(t),[,,,a]=ar.get(sf),l=a[o];return Re(l)?n(...i):(delete a[o],l)}),r),wT=vT.concat(xT),ET=e=>function(...n){const r=cS(),[s,i,o]=uS(n),a=aS(r,o);let l=e;const{use:u}=a,d=(u||[]).concat(wT);for(let c=d.length;c--;)l=d[c](l);return l(s,i||a.fetcher||null,a)},ST=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const s=r.indexOf(n);s>=0&&(r[s]=r[r.length-1],r.pop())}},CT=(e,t)=>(...n)=>{const[r,s,i]=uS(n),o=(i.use||[]).concat(t);return e(r,s,{...i,use:o})};yT();const kT=e=>js(e)[0],o1=G.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Oh={dedupe:!0},_T=(e,t,n)=>{const{cache:r,compare:s,suspense:i,fallbackData:o,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:c,keepPreviousData:f}=n,[p,v,y,b]=ar.get(r),[m,g]=js(e),x=h.useRef(!1),E=h.useRef(!1),C=h.useRef(m),O=h.useRef(t),k=h.useRef(n),S=()=>k.current,$=()=>S().isVisible()&&S().isOnline(),[A,T,P,L]=ls(r,m),I=h.useRef({}).current,U=Re(o)?n.fallback[m]:o,z=(we,ae)=>{for(const fe in I){const ve=fe;if(ve==="data"){if(!s(we[ve],ae[ve])&&(!Re(we[ve])||!s(Ce,ae[ve])))return!1}else if(ae[ve]!==we[ve])return!1}return!0},X=h.useMemo(()=>{const we=(()=>!m||!t?!1:Re(a)?S().isPaused()||i?!1:Re(l)?!0:l:a)(),ae=Et=>{const _=Wr(Et);return delete _._k,we?{isValidating:!0,isLoading:!0,..._}:_},fe=A(),ve=L(),qe=ae(fe),bn=fe===ve?qe:ae(ve);let ut=qe;return[()=>{const Et=ae(A());return z(Et,ut)?(ut.data=Et.data,ut.isLoading=Et.isLoading,ut.isValidating=Et.isValidating,ut.error=Et.error,ut):(ut=Et,Et)},()=>bn]},[r,m]),D=vv.useSyncExternalStore(h.useCallback(we=>P(m,(ae,fe)=>{z(fe,ae)||we()}),[r,m]),X[0],X[1]),N=!x.current,B=p[m]&&p[m].length>0,Z=D.data,Q=Re(Z)?U:Z,se=D.error,be=h.useRef(Q),Ce=f?Re(Z)?be.current:Z:Q,pe=(()=>B&&!Re(se)?!1:N&&!Re(a)?a:S().isPaused()?!1:i?Re(Q)?!1:l:Re(Q)||l)(),me=!!(m&&t&&N&&pe),xe=Re(D.isValidating)?me:D.isValidating,ke=Re(D.isLoading)?me:D.isLoading,ze=h.useCallback(async we=>{const ae=O.current;if(!m||!ae||E.current||S().isPaused())return!1;let fe,ve,qe=!0;const bn=we||{},ut=!y[m]||!bn.dedupe,Et=()=>r1?!E.current&&m===C.current&&x.current:m===C.current,_={isValidating:!1,isLoading:!1},M=()=>{T(_)},j=()=>{const q=y[m];q&&q[1]===ve&&delete y[m]},J={isValidating:!0};Re(A().data)&&(J.isLoading=!0);try{if(ut&&(T(J),n.loadingTimeout&&Re(A().data)&&setTimeout(()=>{qe&&Et()&&S().onLoadingSlow(m,n)},n.loadingTimeout),y[m]=[ae(g),bm()]),[fe,ve]=y[m],fe=await fe,ut&&setTimeout(j,n.dedupingInterval),!y[m]||y[m][1]!==ve)return ut&&Et()&&S().onDiscarded(m),!1;_.error=Ht;const q=v[m];if(!Re(q)&&(ve<=q[0]||ve<=q[1]||q[1]===0))return M(),ut&&Et()&&S().onDiscarded(m),!1;const H=A().data;_.data=s(H,fe)?H:fe,ut&&Et()&&S().onSuccess(fe,m,n)}catch(q){j();const H=S(),{shouldRetryOnError:ue}=H;H.isPaused()||(_.error=q,ut&&Et()&&(H.onError(q,m,H),(ue===!0||zn(ue)&&ue(q))&&$()&&H.onErrorRetry(q,m,H,Be=>{const nt=p[m];nt&&nt[0]&&nt[0](wa.ERROR_REVALIDATE_EVENT,Be)},{retryCount:(bn.retryCount||0)+1,dedupe:!0})))}return qe=!1,M(),!0},[m,r]),tt=h.useCallback((...we)=>rS(r,C.current,...we),[]);if(Ka(()=>{O.current=t,k.current=n,Re(Z)||(be.current=Z)}),Ka(()=>{if(!m)return;const we=ze.bind(Ht,Oh);let ae=0;const ve=ST(m,p,(qe,bn={})=>{if(qe==wa.FOCUS_EVENT){const ut=Date.now();S().revalidateOnFocus&&ut>ae&&$()&&(ae=ut+S().focusThrottleInterval,we())}else if(qe==wa.RECONNECT_EVENT)S().revalidateOnReconnect&&$()&&we();else{if(qe==wa.MUTATE_EVENT)return ze();if(qe==wa.ERROR_REVALIDATE_EVENT)return ze(bn)}});return E.current=!1,C.current=m,x.current=!0,T({_k:g}),pe&&(Re(Q)||ml?we():dT(we)),()=>{E.current=!0,ve()}},[m]),Ka(()=>{let we;function ae(){const ve=zn(u)?u(A().data):u;ve&&we!==-1&&(we=setTimeout(fe,ve))}function fe(){!A().error&&(d||S().isVisible())&&(c||S().isOnline())?ze(Oh).then(ae):ae()}return ae(),()=>{we&&(clearTimeout(we),we=-1)}},[u,d,c,m]),h.useDebugValue(Ce),i&&Re(Q)&&m){if(!r1&&ml)throw new Error("Fallback data is required when using suspense in SSR.");O.current=t,k.current=n,E.current=!1;const we=b[m];if(!Re(we)){const ae=tt(we);o1(ae)}if(Re(se)){const ae=ze(Oh);Re(Ce)||(ae.status="fulfilled",ae.value=!0),o1(ae)}else throw se}return{mutate:tt,get data(){return I.data=!0,Ce},get error(){return I.error=!0,se},get isValidating(){return I.isValidating=!0,xe},get isLoading(){return I.isLoading=!0,ke}}},bv=fc.defineProperty(gT,"defaultValue",{value:oS}),xv=ET(_T),OT=Object.freeze(Object.defineProperty({__proto__:null,SWRConfig:bv,default:xv,mutate:iS,preload:bT,unstable_serialize:kT,useSWRConfig:cS},Symbol.toStringTag,{value:"Module"})),RT="$inf$",PT=e=>js(e?e(0,null):null)[0],Rh=Promise.resolve(),AT=e=>(t,n,r)=>{const s=h.useRef(!1),{cache:i,initialSize:o=1,revalidateAll:a=!1,persistSize:l=!1,revalidateFirstPage:u=!0,revalidateOnMount:d=!1,parallel:c=!1}=r;let f;try{f=PT(t),f&&(f=RT+f)}catch{}const[p,v,y]=ls(i,f),b=h.useCallback(()=>Re(p()._l)?o:p()._l,[i,f,o]);vv.useSyncExternalStore(h.useCallback(k=>f?y(f,()=>{k()}):()=>{},[i,f]),b,b);const m=h.useCallback(()=>{const k=p()._l;return Re(k)?o:k},[f,o]),g=h.useRef(m());Ka(()=>{if(!s.current){s.current=!0;return}f&&v({_l:l?g.current:m()})},[f,i]);const x=d&&!s.current,E=e(f,async k=>{const S=p()._i,$=[],A=m(),[T]=ls(i,k),P=T().data,L=[];let I=null;for(let U=0;U<A;++U){const[z,X]=js(t(U,c?null:I));if(!z)break;const[D,N]=ls(i,z);let B=D().data;const Z=a||S||Re(B)||u&&!U&&!Re(P)||x||P&&!Re(P[U])&&!r.compare(P[U],B);if(n&&Z){const Q=async()=>{B=await n(X),N({data:B,_k:X}),$[U]=B};c?L.push(Q):await Q()}else $[U]=B;c||(I=B)}return c&&await Promise.all(L.map(U=>U())),v({_i:Ht}),$},r),C=h.useCallback(function(k,S){const $=typeof S=="boolean"?{revalidate:S}:S||{},A=$.revalidate!==!1;return f?(A&&(Re(k)?v({_i:!0}):v({_i:!1})),arguments.length?E.mutate(k,{...$,revalidate:A}):E.mutate()):Rh},[f,i]),O=h.useCallback(k=>{if(!f)return Rh;const[,S]=ls(i,f);let $;if(zn(k)?$=k(m()):typeof k=="number"&&($=k),typeof $!="number")return Rh;S({_l:$}),g.current=$;const A=[],[T]=ls(i,f);let P=null;for(let L=0;L<$;++L){const[I]=js(t(L,P)),[U]=ls(i,I),z=I?U().data:Ht;if(Re(z))return C(T().data);A.push(z),P=z}return C(A)},[f,i,C,m]);return{size:m(),setSize:O,mutate:C,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}},TT=CT(xv,AT);function $T(e,t){if(!e)throw typeof t=="string"?new Error(t):new Error(`${t.displayName} not found`)}var sa=(e,t)=>{const{assertCtxFn:n=$T}=t||{},r=G.createContext(void 0);return r.displayName=e,[r,()=>{const o=G.useContext(r);return n(o,`${e} not found`),o.value},()=>{const o=G.useContext(r);return o?o.value:{}}]},dS={};vA(dS,{SWRConfig:()=>bv,useSWR:()=>xv,useSWRInfinite:()=>TT});yA(dS,OT);var[IT,MT]=sa("ClerkInstanceContext"),[NT,OV]=sa("UserContext"),[DT,RV]=sa("ClientContext"),[jT,PV]=sa("SessionContext"),[FT,AV]=sa("OrganizationContext"),LT=({children:e,organization:t,lastOrganizationMember:n,lastOrganizationInvitation:r,swrConfig:s})=>G.createElement(bv,{value:s},G.createElement(FT.Provider,{value:{value:{organization:t,lastOrganizationMember:n,lastOrganizationInvitation:r}}},e));typeof window<"u"?G.useLayoutEffect:G.useEffect;const[VT,wv]=[IT,MT];function UT(e){if(!e)throw new Error(CA)}const fS=Object.freeze({noGuarantees:Object.freeze({guaranteedLoaded:!1}),guaranteedLoaded:Object.freeze({guaranteedLoaded:!0})}),of=G.createContext(void 0);of.displayName="StructureContext";const zT=()=>{const e=G.useContext(of);return UT(e),e},BT=({children:e})=>zT().guaranteedLoaded?G.createElement(G.Fragment,null,e):G.createElement(of.Provider,{value:fS.guaranteedLoaded},e),ia=(e,t)=>{t=t||e.displayName||e.name||"Component",e.displayName=t;const n=r=>{const s=wv();return s.loaded?G.createElement(BT,null,G.createElement(e,{...r,clerk:s})):null};return n.displayName=`withClerk(${t})`,n};var le,zi,Bi,hc,pc,so;const hS=class pS{constructor(t){this.clerkjs=null,this.preopenSignIn=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.loadedListeners=[],Ui(this,le,!1),Ui(this,zi,void 0),Ui(this,Bi,void 0),Ui(this,hc,void 0),Ui(this,pc,void 0),this.isReady=()=>{var i;return!!((i=this.clerkjs)!=null&&i.isReady())},this.buildSignInUrl=i=>{const o=()=>{var a;return((a=this.clerkjs)==null?void 0:a.buildSignInUrl(i))||""};if(this.clerkjs&&ie(this,le))return o();this.premountMethodCalls.set("buildSignInUrl",o)},this.buildSignUpUrl=i=>{const o=()=>{var a;return((a=this.clerkjs)==null?void 0:a.buildSignUpUrl(i))||""};if(this.clerkjs&&ie(this,le))return o();this.premountMethodCalls.set("buildSignUpUrl",o)},this.buildUserProfileUrl=()=>{const i=()=>{var o;return((o=this.clerkjs)==null?void 0:o.buildUserProfileUrl())||""};if(this.clerkjs&&ie(this,le))return i();this.premountMethodCalls.set("buildUserProfileUrl",i)},this.buildCreateOrganizationUrl=()=>{const i=()=>{var o;return((o=this.clerkjs)==null?void 0:o.buildCreateOrganizationUrl())||""};if(this.clerkjs&&ie(this,le))return i();this.premountMethodCalls.set("buildCreateOrganizationUrl",i)},this.buildOrganizationProfileUrl=()=>{const i=()=>{var o;return((o=this.clerkjs)==null?void 0:o.buildOrganizationProfileUrl())||""};if(this.clerkjs&&ie(this,le))return i();this.premountMethodCalls.set("buildOrganizationProfileUrl",i)},this.buildHomeUrl=()=>{const i=()=>{var o;return((o=this.clerkjs)==null?void 0:o.buildHomeUrl())||""};if(this.clerkjs&&ie(this,le))return i();this.premountMethodCalls.set("buildHomeUrl",i)},this.buildUrlWithAuth=(i,o)=>{const a=()=>{var l;return((l=this.clerkjs)==null?void 0:l.buildUrlWithAuth(i,o))||""};if(this.clerkjs&&ie(this,le))return a();this.premountMethodCalls.set("buildUrlWithAuth",a)},this.handleUnauthenticated=()=>{const i=()=>{var o;return(o=this.clerkjs)==null?void 0:o.handleUnauthenticated()};this.clerkjs&&ie(this,le)?i():this.premountMethodCalls.set("handleUnauthenticated",i)},this.addOnLoaded=i=>{this.loadedListeners.push(i)},this.emitLoaded=()=>{this.loadedListeners.forEach(i=>i()),this.loadedListeners=[]},this.hydrateClerkJS=i=>{if(!i)throw new Error("Failed to hydrate latest Clerk JS");return this.clerkjs=i,this.premountMethodCalls.forEach(o=>o()),this.preopenSignIn!==null&&i.openSignIn(this.preopenSignIn),this.preopenSignUp!==null&&i.openSignUp(this.preopenSignUp),this.preopenUserProfile!==null&&i.openUserProfile(this.preopenUserProfile),this.preopenOrganizationProfile!==null&&i.openOrganizationProfile(this.preopenOrganizationProfile),this.preopenCreateOrganization!==null&&i.openCreateOrganization(this.preopenCreateOrganization),this.premountSignInNodes.forEach((o,a)=>{i.mountSignIn(a,o)}),this.premountSignUpNodes.forEach((o,a)=>{i.mountSignUp(a,o)}),this.premountUserProfileNodes.forEach((o,a)=>{i.mountUserProfile(a,o)}),this.premountUserButtonNodes.forEach((o,a)=>{i.mountUserButton(a,o)}),this.premountOrganizationListNodes.forEach((o,a)=>{i.mountOrganizationList(a,o)}),Ni(this,le,!0),this.emitLoaded(),this.clerkjs},this.__unstable__updateProps=i=>{if(this.clerkjs&&"__unstable__updateProps"in this.clerkjs)this.clerkjs.__unstable__updateProps(i);else return},this.setActive=({session:i,organization:o,beforeEmit:a})=>this.clerkjs?this.clerkjs.setActive({session:i,organization:o,beforeEmit:a}):Promise.reject(),this.setSession=(i,o)=>(sd("setSession","Use `Clerk.setActive` instead"),this.setActive({session:i,beforeEmit:o})),this.openSignIn=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.openSignIn(i):this.preopenSignIn=i},this.closeSignIn=()=>{this.clerkjs&&ie(this,le)?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.openUserProfile=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.openUserProfile(i):this.preopenUserProfile=i},this.closeUserProfile=()=>{this.clerkjs&&ie(this,le)?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.openOrganizationProfile(i):this.preopenOrganizationProfile=i},this.closeOrganizationProfile=()=>{this.clerkjs&&ie(this,le)?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.openCreateOrganization(i):this.preopenCreateOrganization=i},this.closeCreateOrganization=()=>{this.clerkjs&&ie(this,le)?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openSignUp=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.openSignUp(i):this.preopenSignUp=i},this.closeSignUp=()=>{this.clerkjs&&ie(this,le)?this.clerkjs.closeSignUp():this.preopenSignUp=null},this.mountSignIn=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountSignIn(i,o):this.premountSignInNodes.set(i,o)},this.unmountSignIn=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountSignIn(i):this.premountSignInNodes.delete(i)},this.mountSignUp=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountSignUp(i,o):this.premountSignUpNodes.set(i,o)},this.unmountSignUp=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountSignUp(i):this.premountSignUpNodes.delete(i)},this.mountUserProfile=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountUserProfile(i,o):this.premountUserProfileNodes.set(i,o)},this.unmountUserProfile=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountUserProfile(i):this.premountUserProfileNodes.delete(i)},this.mountOrganizationProfile=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountOrganizationProfile(i,o):this.premountOrganizationProfileNodes.set(i,o)},this.unmountOrganizationProfile=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountOrganizationProfile(i):this.premountOrganizationProfileNodes.delete(i)},this.mountCreateOrganization=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountCreateOrganization(i,o):this.premountCreateOrganizationNodes.set(i,o)},this.unmountCreateOrganization=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountCreateOrganization(i):this.premountCreateOrganizationNodes.delete(i)},this.mountOrganizationSwitcher=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountOrganizationSwitcher(i,o):this.premountOrganizationSwitcherNodes.set(i,o)},this.unmountOrganizationSwitcher=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountOrganizationSwitcher(i):this.premountOrganizationSwitcherNodes.delete(i)},this.mountOrganizationList=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountOrganizationList(i,o):this.premountOrganizationListNodes.set(i,o)},this.unmountOrganizationList=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountOrganizationList(i):this.premountOrganizationListNodes.delete(i)},this.mountUserButton=(i,o)=>{this.clerkjs&&ie(this,le)?this.clerkjs.mountUserButton(i,o):this.premountUserButtonNodes.set(i,o)},this.unmountUserButton=i=>{this.clerkjs&&ie(this,le)?this.clerkjs.unmountUserButton(i):this.premountUserButtonNodes.delete(i)},this.addListener=i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.addListener(i)};return this.clerkjs?o():(this.premountMethodCalls.set("addListener",o),()=>this.premountMethodCalls.delete("addListener"))},this.navigate=i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.navigate(i)};this.clerkjs&&ie(this,le)?o():this.premountMethodCalls.set("navigate",o)},this.redirectWithAuth=(...i)=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.redirectWithAuth(...i)};this.clerkjs&&ie(this,le)?o():this.premountMethodCalls.set("redirectWithAuth",o)},this.redirectToSignIn=i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.redirectToSignIn(i)};this.clerkjs&&ie(this,le)?o():this.premountMethodCalls.set("redirectToSignIn",o)},this.redirectToSignUp=i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.redirectToSignUp(i)};this.clerkjs&&ie(this,le)?o():this.premountMethodCalls.set("redirectToSignUp",o)},this.redirectToUserProfile=()=>{const i=()=>{var o;return(o=this.clerkjs)==null?void 0:o.redirectToUserProfile()};this.clerkjs&&ie(this,le)?i():this.premountMethodCalls.set("redirectToUserProfile",i)},this.redirectToHome=()=>{const i=()=>{var o;return(o=this.clerkjs)==null?void 0:o.redirectToHome()};this.clerkjs&&ie(this,le)?i():this.premountMethodCalls.set("redirectToHome",i)},this.redirectToOrganizationProfile=()=>{const i=()=>{var o;return(o=this.clerkjs)==null?void 0:o.redirectToOrganizationProfile()};this.clerkjs&&ie(this,le)?i():this.premountMethodCalls.set("redirectToOrganizationProfile",i)},this.redirectToCreateOrganization=()=>{const i=()=>{var o;return(o=this.clerkjs)==null?void 0:o.redirectToCreateOrganization()};this.clerkjs&&ie(this,le)?i():this.premountMethodCalls.set("redirectToCreateOrganization",i)},this.handleRedirectCallback=i=>{var a;const o=()=>{var l;return(l=this.clerkjs)==null?void 0:l.handleRedirectCallback(i)};this.clerkjs&&ie(this,le)?(a=o())==null||a.catch(()=>{}):this.premountMethodCalls.set("handleRedirectCallback",o)},this.handleMagicLinkVerification=async i=>{sd("handleMagicLinkVerification","Use `handleEmailLinkVerification` instead.");const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.handleMagicLinkVerification(i)};if(this.clerkjs&&ie(this,le))return o();this.premountMethodCalls.set("handleMagicLinkVerification",o)},this.handleEmailLinkVerification=async i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.handleEmailLinkVerification(i)};if(this.clerkjs&&ie(this,le))return o();this.premountMethodCalls.set("handleEmailLinkVerification",o)},this.authenticateWithMetamask=async i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.authenticateWithMetamask(i)};if(this.clerkjs&&ie(this,le))return o();this.premountMethodCalls.set("authenticateWithMetamask",o)},this.createOrganization=async i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.createOrganization(i)};if(this.clerkjs&&ie(this,le))return o();this.premountMethodCalls.set("createOrganization",o)},this.getOrganizationMemberships=async()=>{const i=()=>{var o;return(o=this.clerkjs)==null?void 0:o.getOrganizationMemberships()};if(this.clerkjs&&ie(this,le))return i();this.premountMethodCalls.set("getOrganizationMemberships",i)},this.getOrganization=async i=>{const o=()=>{var a;return(a=this.clerkjs)==null?void 0:a.getOrganization(i)};if(this.clerkjs&&ie(this,le))return o();this.premountMethodCalls.set("getOrganization",o)},this.signOut=async(i,o)=>{const a=()=>{var l;return(l=this.clerkjs)==null?void 0:l.signOut(i,o)};if(this.clerkjs&&ie(this,le))return a();this.premountMethodCalls.set("signOut",a)};const{Clerk:n=null,frontendApi:r,publishableKey:s}=t||{};Ni(this,hc,r),Ni(this,pc,s),Ni(this,Bi,t==null?void 0:t.proxyUrl),Ni(this,zi,t==null?void 0:t.domain),this.options=t,this.Clerk=n,this.mode=n1()?"browser":"server",this.loadClerkJS()}get publishableKey(){return ie(this,pc)}get loaded(){return ie(this,le)}static getOrCreateInstance(t){return(!n1()||!ie(this,so)||t.Clerk&&ie(this,so).Clerk!==t.Clerk)&&Ni(this,so,new pS(t)),ie(this,so)}get domain(){if(typeof window<"u"&&window.location)return Sh(ie(this,zi),new URL(window.location.href),"");if(typeof ie(this,zi)=="function")throw new Error(Eh);return ie(this,zi)||""}get proxyUrl(){if(typeof window<"u"&&window.location)return Sh(ie(this,Bi),new URL(window.location.href),"");if(typeof ie(this,Bi)=="function")throw new Error(Eh);return ie(this,Bi)||""}get sdkMetadata(){var t;return((t=this.clerkjs)==null?void 0:t.sdkMetadata)||this.options.sdkMetadata||void 0}get instanceType(){var t;return(t=this.clerkjs)==null?void 0:t.instanceType}get frontendApi(){var t;return((t=this.clerkjs)==null?void 0:t.frontendApi)||ie(this,hc)||""}get isStandardBrowser(){var t;return((t=this.clerkjs)==null?void 0:t.isStandardBrowser)||this.options.standardBrowser||!1}get isSatellite(){if(typeof window<"u"&&window.location)return Sh(this.options.isSatellite,new URL(window.location.href),!1);if(typeof this.options.isSatellite=="function")throw new Error(Eh);return!1}async loadClerkJS(){var t;if(!(this.mode!=="browser"||ie(this,le))){typeof window<"u"&&(window.__clerk_frontend_api=this.frontendApi,window.__clerk_publishable_key=this.publishableKey,window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{if(this.Clerk){let n;PA(this.Clerk)?(n=new this.Clerk(this.publishableKey||this.frontendApi||"",{proxyUrl:this.proxyUrl,domain:this.domain}),await n.load(this.options)):(n=this.Clerk,n.loaded||await n.load(this.options)),global.Clerk=n}else{if(global.Clerk||await zA({...this.options,frontendApi:this.frontendApi,publishableKey:this.publishableKey,proxyUrl:this.proxyUrl,domain:this.domain}),!global.Clerk)throw new Error("Failed to download latest ClerkJS. Contact support@clerk.com.");await global.Clerk.load(this.options)}return global.Clerk.sdkMetadata=this.options.sdkMetadata??{name:"@clerk/clerk-react",version:"4.30.0"},(t=global.Clerk)!=null&&t.loaded?this.hydrateClerkJS(global.Clerk):void 0}catch(n){const r=n;console.error(r.stack||r.message||r);return}}}get version(){var t;return(t=this.clerkjs)==null?void 0:t.version}get client(){if(this.clerkjs)return this.clerkjs.client}get session(){if(this.clerkjs)return this.clerkjs.session}get user(){if(this.clerkjs)return this.clerkjs.user}get organization(){if(this.clerkjs)return this.clerkjs.organization}get __unstable__environment(){if(this.clerkjs)return this.clerkjs.__unstable__environment}__unstable__setEnvironment(...t){if(this.clerkjs&&"__unstable__setEnvironment"in this.clerkjs)this.clerkjs.__unstable__setEnvironment(t);else return}};le=new WeakMap;zi=new WeakMap;Bi=new WeakMap;hc=new WeakMap;pc=new WeakMap;so=new WeakMap;Ui(hS,so,void 0);let HT=hS;const WT=(e,t,n)=>!e&&n?qT(n):KT(t),qT=e=>{const t=e.userId,n=e.user,r=e.sessionId,s=e.session,i=e.organization,o=e.orgId,a=e.orgRole,l=e.orgPermissions,u=e.orgSlug,d=e.actor;return{userId:t,user:n,sessionId:r,session:s,organization:i,orgId:o,orgRole:a,orgPermissions:l,orgSlug:u,actor:d,lastOrganizationInvitation:null,lastOrganizationMember:null}},KT=e=>{var v;const t=e.user?e.user.id:e.user,n=e.user,r=e.session?e.session.id:e.session,s=e.session,i=s==null?void 0:s.actor,o=e.organization,a=e.organization?e.organization.id:e.organization,l=o==null?void 0:o.slug,u=o&&((v=n==null?void 0:n.organizationMemberships)==null?void 0:v.find(y=>y.organization.id===a)),d=u&&u.permissions,c=u&&u.role,f=e.lastOrganizationInvitation,p=e.lastOrganizationMember;return{userId:t,user:n,sessionId:r,session:s,organization:o,orgId:a,orgRole:c,orgSlug:l,orgPermissions:d,actor:i,lastOrganizationInvitation:f,lastOrganizationMember:p}},[GT,Ev]=sa("AuthContext");function QT(e){const{isomorphicClerkOptions:t,initialState:n,children:r}=e,{isomorphicClerk:s,loaded:i}=ZT(t);t.frontendApi&&sd("frontendApi","Use `publishableKey` instead.");const[o,a]=G.useState({client:s.client,session:s.session,user:s.user,organization:s.organization,lastOrganizationInvitation:null,lastOrganizationMember:null});G.useEffect(()=>s.addListener(T=>a({...T})),[]);const l=WT(i,o,n),u=G.useMemo(()=>({value:s}),[i]),d=G.useMemo(()=>({value:o.client}),[o.client]),{sessionId:c,session:f,userId:p,user:v,orgId:y,actor:b,lastOrganizationInvitation:m,lastOrganizationMember:g,organization:x,orgRole:E,orgSlug:C,orgPermissions:O}=l,k=G.useMemo(()=>({value:{sessionId:c,userId:p,actor:b,orgId:y,orgRole:E,orgSlug:C,orgPermissions:O}}),[c,p,b,y,E,C]),S=G.useMemo(()=>({value:v}),[p,v]),$=G.useMemo(()=>({value:f}),[c,f]),A=G.useMemo(()=>({value:{organization:x,lastOrganizationInvitation:m,lastOrganizationMember:g}}),[y,x,m,g]);return G.createElement(VT.Provider,{value:u},G.createElement(DT.Provider,{value:d},G.createElement(jT.Provider,{value:$},G.createElement(LT,{...A.value},G.createElement(GT.Provider,{value:k},G.createElement(NT.Provider,{value:S},r))))))}const ZT=e=>{const[t,n]=G.useState(!1),r=G.useMemo(()=>HT.getOrCreateInstance(e),[]);return G.useEffect(()=>{r.__unstable__updateProps({appearance:e.appearance})},[e.appearance]),G.useEffect(()=>{r.__unstable__updateProps({options:e})},[e.localization]),G.useEffect(()=>{r.addOnLoaded(()=>n(!0))},[]),{isomorphicClerk:r,loaded:t}};RA({packageName:"@clerk/clerk-react"});function YT(e){const{initialState:t,children:n,...r}=e,{frontendApi:s="",publishableKey:i="",Clerk:o}=r;return o||(!i&&!s?qa.throwMissingPublishableKeyError():i&&!QE(i)?qa.throwInvalidPublishableKeyError({key:i}):!i&&s&&!fA(s)&&qa.throwInvalidFrontendApiError({key:s})),G.createElement(of.Provider,{value:fS.noGuarantees},G.createElement(QT,{initialState:t,isomorphicClerkOptions:r},n))}const mS=qA(YT,"ClerkProvider",kA);mS.displayName="ClerkProvider";const gS=e=>new Promise(t=>{e.loaded&&t(),e.addOnLoaded(t)}),XT=e=>async t=>(await gS(e),e.session?e.session.getToken(t):null),JT=e=>async(...t)=>(await gS(e),e.signOut(...t)),Jl=()=>{const{sessionId:e,userId:t,actor:n,orgId:r,orgRole:s,orgSlug:i,orgPermissions:o}=Ev(),a=wv(),l=h.useCallback(XT(a),[a]),u=h.useCallback(JT(a),[a]),d=h.useCallback(c=>{if(!(c!=null&&c.permission)&&!(c!=null&&c.role))throw new Error(OA);return!r||!t||!s||!o?!1:c.permission?o.includes(c.permission):c.role?s===c.role:!1},[r,s,t,o]);if(e===void 0&&t===void 0)return{isLoaded:!1,isSignedIn:void 0,sessionId:e,userId:t,actor:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,has:void 0,signOut:u,getToken:l};if(e===null&&t===null)return{isLoaded:!0,isSignedIn:!1,sessionId:e,userId:t,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:u,getToken:l};if(e&&t&&r&&s)return{isLoaded:!0,isSignedIn:!0,sessionId:e,userId:t,actor:n||null,orgId:r,orgRole:s,orgSlug:i||null,has:d,signOut:u,getToken:l};if(e&&t&&!r)return{isLoaded:!0,isSignedIn:!0,sessionId:e,userId:t,actor:n||null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:u,getToken:l};throw new Error(_A)},e$=({children:e})=>{const{userId:t}=Ev();return t?G.createElement(G.Fragment,null,e):null},t$=({children:e})=>{const{userId:t}=Ev();return t===null?G.createElement(G.Fragment,null,e):null},n$=({children:e})=>wv().loaded?null:G.createElement(G.Fragment,null,e),r$=ia(({clerk:e,...t})=>{const{client:n,session:r}=e,{__unstable__environment:s}=e,i=n.activeSessions&&n.activeSessions.length>0;return G.useEffect(()=>{if(r===null&&i&&s){const{afterSignOutOneUrl:o}=s.displayConfig;e.navigate(o)}else e.redirectToSignIn(t)},[]),null},"RedirectToSignIn");ia(({clerk:e,...t})=>(G.useEffect(()=>{e.redirectToSignUp(t)},[]),null),"RedirectToSignUp");ia(({clerk:e})=>(G.useEffect(()=>{e.redirectToUserProfile()},[]),null),"RedirectToUserProfile");ia(({clerk:e})=>(G.useEffect(()=>{e.redirectToOrganizationProfile()},[]),null),"RedirectToOrganizationProfile");ia(({clerk:e})=>(G.useEffect(()=>{e.redirectToCreateOrganization()},[]),null),"RedirectToCreateOrganization");ia(({clerk:e,...t})=>(G.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),"AuthenticateWithRedirectCallback");/** + * @remix-run/router v1.14.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gl.apply(this,arguments)}var Ss;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ss||(Ss={}));const a1="popstate";function s$(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return wm("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:id(s)}return o$(t,n,null,e)}function pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Sv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function i$(){return Math.random().toString(36).substr(2,8)}function l1(e,t){return{usr:e.state,key:e.key,idx:t}}function wm(e,t,n,r){return n===void 0&&(n=null),gl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?oa(t):t,{state:n,key:t&&t.key||r||i$()})}function id(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function oa(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function o$(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Ss.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(gl({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function c(){a=Ss.Pop;let b=d(),m=b==null?null:b-u;u=b,l&&l({action:a,location:y.location,delta:m})}function f(b,m){a=Ss.Push;let g=wm(y.location,b,m);n&&n(g,b),u=d()+1;let x=l1(g,u),E=y.createHref(g);try{o.pushState(x,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(E)}i&&l&&l({action:a,location:y.location,delta:1})}function p(b,m){a=Ss.Replace;let g=wm(y.location,b,m);n&&n(g,b),u=d();let x=l1(g,u),E=y.createHref(g);o.replaceState(x,"",E),i&&l&&l({action:a,location:y.location,delta:0})}function v(b){let m=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:id(b);return pt(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let y={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(a1,c),l=b,()=>{s.removeEventListener(a1,c),l=null}},createHref(b){return t(s,b)},createURL:v,encodeLocation(b){let m=v(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:p,go(b){return o.go(b)}};return y}var u1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(u1||(u1={}));function a$(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?oa(t):t,s=Cv(r.pathname||"/",n);if(s==null)return null;let i=vS(e);l$(i);let o=null;for(let a=0;o==null&&a<i.length;++a)o=v$(i[a],x$(s));return o}function vS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(pt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Is([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(pt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),vS(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:m$(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of yS(i.path))s(i,o,l)}),t}function yS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=yS(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function l$(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:g$(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const u$=/^:\w+$/,c$=3,d$=2,f$=1,h$=10,p$=-2,c1=e=>e==="*";function m$(e,t){let n=e.split("/"),r=n.length;return n.some(c1)&&(r+=p$),t&&(r+=d$),n.filter(s=>!c1(s)).reduce((s,i)=>s+(u$.test(i)?c$:i===""?f$:h$),r)}function g$(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function v$(e,t){let{routesMeta:n}=e,r={},s="/",i=[];for(let o=0;o<n.length;++o){let a=n[o],l=o===n.length-1,u=s==="/"?t:t.slice(s.length)||"/",d=y$({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},u);if(!d)return null;Object.assign(r,d.params);let c=a.route;i.push({params:r,pathname:Is([s,d.pathname]),pathnameBase:k$(Is([s,d.pathnameBase])),route:c}),d.pathnameBase!=="/"&&(s=Is([s,d.pathnameBase]))}return i}function y$(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=b$(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,c)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let y=a[c]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const v=a[c];return p&&!v?u[f]=void 0:u[f]=w$(v||"",f),u},{}),pathname:i,pathnameBase:o,pattern:e}}function b$(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Sv(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function x$(e){try{return decodeURI(e)}catch(t){return Sv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function w$(e,t){try{return decodeURIComponent(e)}catch(n){return Sv(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Cv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function E$(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?oa(e):e;return{pathname:n?n.startsWith("/")?n:S$(n,t):t,search:_$(r),hash:O$(s)}}function S$(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Ph(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function C$(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bS(e,t){let n=C$(e);return t?n.map((r,s)=>s===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xS(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=oa(e):(s=gl({},e),pt(!s.pathname||!s.pathname.includes("?"),Ph("?","pathname","search",s)),pt(!s.pathname||!s.pathname.includes("#"),Ph("#","pathname","hash",s)),pt(!s.search||!s.search.includes("#"),Ph("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else if(r){let c=t.length===0?[]:t[t.length-1].replace(/^\//,"").split("/");if(o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),c.pop();s.pathname=f.join("/")}a="/"+c.join("/")}else{let c=t.length-1;if(o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),c-=1;s.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=E$(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Is=e=>e.join("/").replace(/\/\/+/g,"/"),k$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function R$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wS=["post","put","patch","delete"];new Set(wS);const P$=["get",...wS];new Set(P$);/** + * React Router v6.21.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vl.apply(this,arguments)}const kv=h.createContext(null),A$=h.createContext(null),Oi=h.createContext(null),af=h.createContext(null),Yr=h.createContext({outlet:null,matches:[],isDataRoute:!1}),ES=h.createContext(null);function T$(e,t){let{relative:n}=t===void 0?{}:t;eu()||pt(!1);let{basename:r,navigator:s}=h.useContext(Oi),{hash:i,pathname:o,search:a}=kS(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Is([r,o])),s.createHref({pathname:l,search:a,hash:i})}function eu(){return h.useContext(af)!=null}function tu(){return eu()||pt(!1),h.useContext(af).location}function SS(e){h.useContext(Oi).static||h.useLayoutEffect(e)}function Qt(){let{isDataRoute:e}=h.useContext(Yr);return e?q$():$$()}function $$(){eu()||pt(!1);let e=h.useContext(kv),{basename:t,future:n,navigator:r}=h.useContext(Oi),{matches:s}=h.useContext(Yr),{pathname:i}=tu(),o=JSON.stringify(bS(s,n.v7_relativeSplatPath)),a=h.useRef(!1);return SS(()=>{a.current=!0}),h.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=xS(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Is([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,i,e])}const I$=h.createContext(null);function M$(e){let t=h.useContext(Yr).outlet;return t&&h.createElement(I$.Provider,{value:e},t)}function CS(){let{matches:e}=h.useContext(Yr),t=e[e.length-1];return t?t.params:{}}function kS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=h.useContext(Oi),{matches:s}=h.useContext(Yr),{pathname:i}=tu(),o=JSON.stringify(bS(s,r.v7_relativeSplatPath));return h.useMemo(()=>xS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function N$(e,t){return D$(e,t)}function D$(e,t,n,r){eu()||pt(!1);let{navigator:s}=h.useContext(Oi),{matches:i}=h.useContext(Yr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=tu(),d;if(t){var c;let b=typeof t=="string"?oa(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||pt(!1),d=b}else d=u;let f=d.pathname||"/",p=l==="/"?f:f.slice(l.length)||"/",v=a$(e,{pathname:p}),y=U$(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Is([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Is([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&y?h.createElement(af.Provider,{value:{location:vl({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Ss.Pop}},y):y}function j$(){let e=W$(),t=R$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.createElement("pre",{style:s},n):null,i)}const F$=h.createElement(j$,null);class L$ extends h.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?h.createElement(Yr.Provider,{value:this.props.routeContext},h.createElement(ES.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function V$(e){let{routeContext:t,match:n,children:r}=e,s=h.useContext(kv);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),h.createElement(Yr.Provider,{value:t},r)}function U$(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id]));d>=0||pt(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.loader&&c.route.id&&n.loaderData[c.route.id]===void 0&&(!n.errors||n.errors[c.route.id]===void 0)){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}return o.reduceRight((d,c,f)=>{let p,v=!1,y=null,b=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,y=c.route.errorElement||F$,l&&(u<0&&f===0?(K$("route-fallback",!1),v=!0,b=null):u===f&&(v=!0,b=c.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,f+1)),g=()=>{let x;return p?x=y:v?x=b:c.route.Component?x=h.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=d,h.createElement(V$,{match:c,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:x})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?h.createElement(L$,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var _S=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_S||{}),od=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(od||{});function z$(e){let t=h.useContext(kv);return t||pt(!1),t}function B$(e){let t=h.useContext(A$);return t||pt(!1),t}function H$(e){let t=h.useContext(Yr);return t||pt(!1),t}function OS(e){let t=H$(),n=t.matches[t.matches.length-1];return n.route.id||pt(!1),n.route.id}function W$(){var e;let t=h.useContext(ES),n=B$(od.UseRouteError),r=OS(od.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function q$(){let{router:e}=z$(_S.UseNavigateStable),t=OS(od.UseNavigateStable),n=h.useRef(!1);return SS(()=>{n.current=!0}),h.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,vl({fromRouteId:t},i)))},[e,t])}const d1={};function K$(e,t,n){!t&&!d1[e]&&(d1[e]=!0)}function _v(e){return M$(e.context)}function Nt(e){pt(!1)}function G$(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ss.Pop,navigator:i,static:o=!1,future:a}=e;eu()&&pt(!1);let l=t.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:l,navigator:i,static:o,future:vl({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=oa(r));let{pathname:d="/",search:c="",hash:f="",state:p=null,key:v="default"}=r,y=h.useMemo(()=>{let b=Cv(d,l);return b==null?null:{location:{pathname:b,search:c,hash:f,state:p,key:v},navigationType:s}},[l,d,c,f,p,v,s]);return y==null?null:h.createElement(Oi.Provider,{value:u},h.createElement(af.Provider,{children:n,value:y}))}function Q$(e){let{children:t,location:n}=e;return N$(Em(t),n)}new Promise(()=>{});function Em(e,t){t===void 0&&(t=[]);let n=[];return h.Children.forEach(e,(r,s)=>{if(!h.isValidElement(r))return;let i=[...t,s];if(r.type===h.Fragment){n.push.apply(n,Em(r.props.children,i));return}r.type!==Nt&&pt(!1),!r.props.index||!r.props.children||pt(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Em(r.props.children,i)),n.push(o)}),n}/** + * React Router DOM v6.21.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Sm(){return Sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sm.apply(this,arguments)}function Z$(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Y$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function X$(e,t){return e.button===0&&(!t||t==="_self")&&!Y$(e)}const J$=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],e3="startTransition",f1=Ac[e3];function t3(e){let{basename:t,children:n,future:r,window:s}=e,i=h.useRef();i.current==null&&(i.current=s$({window:s,v5Compat:!0}));let o=i.current,[a,l]=h.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=h.useCallback(c=>{u&&f1?f1(()=>l(c)):l(c)},[l,u]);return h.useLayoutEffect(()=>o.listen(d),[o,d]),h.createElement(G$,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const n3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",r3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ov=h.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:c}=t,f=Z$(t,J$),{basename:p}=h.useContext(Oi),v,y=!1;if(typeof u=="string"&&r3.test(u)&&(v=u,n3))try{let x=new URL(window.location.href),E=u.startsWith("//")?new URL(x.protocol+u):new URL(u),C=Cv(E.pathname,p);E.origin===x.origin&&C!=null?u=C+E.search+E.hash:y=!0}catch{}let b=T$(u,{relative:s}),m=s3(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:c});function g(x){r&&r(x),x.defaultPrevented||m(x)}return h.createElement("a",Sm({},f,{href:v||b,onClick:y||i?r:g,ref:n,target:l}))});var h1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(h1||(h1={}));var p1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(p1||(p1={}));function s3(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=Qt(),u=tu(),d=kS(e,{relative:o});return h.useCallback(c=>{if(X$(c,n)){c.preventDefault();let f=r!==void 0?r:id(u)===id(d);l(e,{replace:f,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,l,d,r,s,n,e,i,o,a])}const i3=new eP({defaultOptions:{queries:{retry:(e,t)=>e===3,refetchOnWindowFocus:!1,staleTime:10*60*1e3}}}),o3="pk_test_Y2hhcm1pbmctZ3JpZmZvbi01NC5jbGVyay5hY2NvdW50cy5kZXYk";function a3({children:e}){const t=Qt();return w.jsx(mS,{publishableKey:o3,navigate:n=>t(n),afterSignInUrl:"/chats-redirect",afterSignUpUrl:"/onboarding",signUpUrl:"/sign-up/*",signInUrl:"/sign-in/*",children:w.jsx(iP,{client:i3,children:w.jsx(LR,{defaultTheme:"light",storageKey:"vite-ui-theme",children:w.jsxs(w.Fragment,{children:[e,w.jsx(cA,{position:"top-right"}),w.jsx(xP,{initialIsOpen:!1})]})})})})}function RS(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=RS(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Rv(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=RS(e))&&(r&&(r+=" "),r+=t);return r}function l3(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=PS(t))&&(r&&(r+=" "),r+=n);return r}function PS(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=PS(e[r]))&&(n&&(n+=" "),n+=t);return n}var Pv="-";function u3(e){var t=d3(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,s=r===void 0?{}:r;function i(a){var l=a.split(Pv);return l[0]===""&&l.length!==1&&l.shift(),AS(l,t)||c3(a)}function o(a,l){var u=n[a]||[];return l&&s[a]?[].concat(u,s[a]):u}return{getClassGroupId:i,getConflictingClassGroupIds:o}}function AS(e,t){var o;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),s=r?AS(e.slice(1),r):void 0;if(s)return s;if(t.validators.length!==0){var i=e.join(Pv);return(o=t.validators.find(function(a){var l=a.validator;return l(i)}))==null?void 0:o.classGroupId}}var m1=/^\[(.+)\]$/;function c3(e){if(m1.test(e)){var t=m1.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function d3(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},s=h3(Object.entries(e.classGroups),n);return s.forEach(function(i){var o=i[0],a=i[1];Cm(a,r,o,t)}),r}function Cm(e,t,n,r){e.forEach(function(s){if(typeof s=="string"){var i=s===""?t:g1(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(f3(s)){Cm(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(function(o){var a=o[0],l=o[1];Cm(l,g1(t,a),n,r)})})}function g1(e,t){var n=e;return t.split(Pv).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function f3(e){return e.isThemeGetter}function h3(e,t){return t?e.map(function(n){var r=n[0],s=n[1],i=s.map(function(o){return typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(function(a){var l=a[0],u=a[1];return[t+l,u]})):o});return[r,i]}):e}function p3(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function s(i,o){n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(o){var a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set:function(o,a){n.has(o)?n.set(o,a):s(o,a)}}}var TS="!";function m3(e){var t=e.separator||":",n=t.length===1,r=t[0],s=t.length;return function(o){for(var a=[],l=0,u=0,d,c=0;c<o.length;c++){var f=o[c];if(l===0){if(f===r&&(n||o.slice(c,c+s)===t)){a.push(o.slice(u,c)),u=c+s;continue}if(f==="/"){d=c;continue}}f==="["?l++:f==="]"&&l--}var p=a.length===0?o:o.substring(u),v=p.startsWith(TS),y=v?p.substring(1):p,b=d&&d>u?d-u:void 0;return{modifiers:a,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:b}}}function g3(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var s=r[0]==="[";s?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function v3(e){return{cache:p3(e.cacheSize),splitModifiers:m3(e),...u3(e)}}var y3=/\s+/;function b3(e,t){var n=t.splitModifiers,r=t.getClassGroupId,s=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(y3).map(function(o){var a=n(o),l=a.modifiers,u=a.hasImportantModifier,d=a.baseClassName,c=a.maybePostfixModifierPosition,f=r(c?d.substring(0,c):d),p=!!c;if(!f){if(!c)return{isTailwindClass:!1,originalClassName:o};if(f=r(d),!f)return{isTailwindClass:!1,originalClassName:o};p=!1}var v=g3(l).join(":"),y=u?v+TS:v;return{isTailwindClass:!0,modifierId:y,classGroupId:f,originalClassName:o,hasPostfixModifier:p}}).reverse().filter(function(o){if(!o.isTailwindClass)return!0;var a=o.modifierId,l=o.classGroupId,u=o.hasPostfixModifier,d=a+l;return i.has(d)?!1:(i.add(d),s(l,u).forEach(function(c){return i.add(a+c)}),!0)}).reverse().map(function(o){return o.originalClassName}).join(" ")}function x3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,s,i,o=a;function a(u){var d=t[0],c=t.slice(1),f=c.reduce(function(p,v){return v(p)},d());return r=v3(f),s=r.cache.get,i=r.cache.set,o=l,l(u)}function l(u){var d=s(u);if(d)return d;var c=b3(u,r);return i(u,c),c}return function(){return o(l3.apply(null,arguments))}}function Ke(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var $S=/^\[(?:([a-z-]+):)?(.+)\]$/i,w3=/^\d+\/\d+$/,E3=new Set(["px","full","screen"]),S3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C3=/\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$/,k3=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Mn(e){return ti(e)||E3.has(e)||w3.test(e)||km(e)}function km(e){return Ri(e,"length",T3)}function _3(e){return Ri(e,"size",IS)}function O3(e){return Ri(e,"position",IS)}function R3(e){return Ri(e,"url",$3)}function Iu(e){return Ri(e,"number",ti)}function ti(e){return!Number.isNaN(Number(e))}function P3(e){return e.endsWith("%")&&ti(e.slice(0,-1))}function Ea(e){return v1(e)||Ri(e,"number",v1)}function Ae(e){return $S.test(e)}function Sa(){return!0}function ns(e){return S3.test(e)}function A3(e){return Ri(e,"",I3)}function Ri(e,t,n){var r=$S.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function T3(e){return C3.test(e)}function IS(){return!1}function $3(e){return e.startsWith("url(")}function v1(e){return Number.isInteger(Number(e))}function I3(e){return k3.test(e)}function M3(){var e=Ke("colors"),t=Ke("spacing"),n=Ke("blur"),r=Ke("brightness"),s=Ke("borderColor"),i=Ke("borderRadius"),o=Ke("borderSpacing"),a=Ke("borderWidth"),l=Ke("contrast"),u=Ke("grayscale"),d=Ke("hueRotate"),c=Ke("invert"),f=Ke("gap"),p=Ke("gradientColorStops"),v=Ke("gradientColorStopPositions"),y=Ke("inset"),b=Ke("margin"),m=Ke("opacity"),g=Ke("padding"),x=Ke("saturate"),E=Ke("scale"),C=Ke("sepia"),O=Ke("skew"),k=Ke("space"),S=Ke("translate"),$=function(){return["auto","contain","none"]},A=function(){return["auto","hidden","clip","visible","scroll"]},T=function(){return["auto",Ae,t]},P=function(){return[Ae,t]},L=function(){return["",Mn]},I=function(){return["auto",ti,Ae]},U=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},z=function(){return["solid","dashed","dotted","double","none"]},X=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},D=function(){return["start","end","center","between","around","evenly","stretch"]},N=function(){return["","0",Ae]},B=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},Z=function(){return[ti,Iu]},Q=function(){return[ti,Ae]};return{cacheSize:500,theme:{colors:[Sa],spacing:[Mn],blur:["none","",ns,Ae],brightness:Z(),borderColor:[e],borderRadius:["none","","full",ns,Ae],borderSpacing:P(),borderWidth:L(),contrast:Z(),grayscale:N(),hueRotate:Q(),invert:N(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[P3,km],inset:T(),margin:T(),opacity:Z(),padding:P(),saturate:Z(),scale:Z(),sepia:N(),skew:Q(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Ae]}],container:["container"],columns:[{columns:[ns]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(U(),[Ae])}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ea]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ae]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",Ea]}],"grid-cols":[{"grid-cols":[Sa]}],"col-start-end":[{col:["auto",{span:["full",Ea]},Ae]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Sa]}],"row-start-end":[{row:["auto",{span:[Ea]},Ae]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ae]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal"].concat(D())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(D(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(D(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Ae,t]}],"min-w":[{"min-w":["min","max","fit",Ae,Mn]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[ns]},ns,Ae]}],h:[{h:[Ae,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Ae,Mn]}],"max-h":[{"max-h":[Ae,t,"min","max","fit"]}],"font-size":[{text:["base",ns,km]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Iu]}],"font-family":[{font:[Sa]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ae]}],"line-clamp":[{"line-clamp":["none",ti,Iu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ae,Mn]}],"list-image":[{"list-image":["none",Ae]}],"list-style-type":[{list:["none","disc","decimal",Ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(z(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Mn]}],"underline-offset":[{"underline-offset":["auto",Ae,Mn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae]}],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",Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(U(),[O3])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},R3]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[m]}],"border-style":[{border:[].concat(z(),["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":[m]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:[""].concat(z())}],"outline-offset":[{"outline-offset":[Ae,Mn]}],"outline-w":[{outline:[Mn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Mn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ns,A3]}],"shadow-color":[{shadow:[Sa]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":X()}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ns,Ae]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[x]}],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":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ae]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",Ae]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Ea,Ae]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ae]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],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",Ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mn,Iu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},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"],"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"],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-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"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var N3=x3(M3);function MS(e,t){return function(){return e.apply(t,arguments)}}const{toString:D3}=Object.prototype,{getPrototypeOf:Av}=Object,lf=(e=>t=>{const n=D3.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sr=e=>(e=e.toLowerCase(),t=>lf(t)===e),uf=e=>t=>typeof t===e,{isArray:aa}=Array,yl=uf("undefined");function j3(e){return e!==null&&!yl(e)&&e.constructor!==null&&!yl(e.constructor)&&Rn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const NS=Sr("ArrayBuffer");function F3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&NS(e.buffer),t}const L3=uf("string"),Rn=uf("function"),DS=uf("number"),cf=e=>e!==null&&typeof e=="object",V3=e=>e===!0||e===!1,mc=e=>{if(lf(e)!=="object")return!1;const t=Av(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},U3=Sr("Date"),z3=Sr("File"),B3=Sr("Blob"),H3=Sr("FileList"),W3=e=>cf(e)&&Rn(e.pipe),q3=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rn(e.append)&&((t=lf(e))==="formdata"||t==="object"&&Rn(e.toString)&&e.toString()==="[object FormData]"))},K3=Sr("URLSearchParams"),G3=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),aa(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function jS(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const FS=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),LS=e=>!yl(e)&&e!==FS;function _m(){const{caseless:e}=LS(this)&&this||{},t={},n=(r,s)=>{const i=e&&jS(t,s)||s;mc(t[i])&&mc(r)?t[i]=_m(t[i],r):mc(r)?t[i]=_m({},r):aa(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&nu(arguments[r],n);return t}const Q3=(e,t,n,{allOwnKeys:r}={})=>(nu(t,(s,i)=>{n&&Rn(s)?e[i]=MS(s,n):e[i]=s},{allOwnKeys:r}),e),Z3=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Y3=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},X3=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Av(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},J3=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},eI=e=>{if(!e)return null;if(aa(e))return e;let t=e.length;if(!DS(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tI=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Av(Uint8Array)),nI=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},rI=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sI=Sr("HTMLFormElement"),iI=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),y1=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),oI=Sr("RegExp"),VS=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};nu(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},aI=e=>{VS(e,(t,n)=>{if(Rn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Rn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},lI=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return aa(e)?r(e):r(String(e).split(t)),n},uI=()=>{},cI=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Ah="abcdefghijklmnopqrstuvwxyz",b1="0123456789",US={DIGIT:b1,ALPHA:Ah,ALPHA_DIGIT:Ah+Ah.toUpperCase()+b1},dI=(e=16,t=US.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function fI(e){return!!(e&&Rn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const hI=e=>{const t=new Array(10),n=(r,s)=>{if(cf(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=aa(r)?[]:{};return nu(r,(o,a)=>{const l=n(o,s+1);!yl(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},pI=Sr("AsyncFunction"),mI=e=>e&&(cf(e)||Rn(e))&&Rn(e.then)&&Rn(e.catch),F={isArray:aa,isArrayBuffer:NS,isBuffer:j3,isFormData:q3,isArrayBufferView:F3,isString:L3,isNumber:DS,isBoolean:V3,isObject:cf,isPlainObject:mc,isUndefined:yl,isDate:U3,isFile:z3,isBlob:B3,isRegExp:oI,isFunction:Rn,isStream:W3,isURLSearchParams:K3,isTypedArray:tI,isFileList:H3,forEach:nu,merge:_m,extend:Q3,trim:G3,stripBOM:Z3,inherits:Y3,toFlatObject:X3,kindOf:lf,kindOfTest:Sr,endsWith:J3,toArray:eI,forEachEntry:nI,matchAll:rI,isHTMLForm:sI,hasOwnProperty:y1,hasOwnProp:y1,reduceDescriptors:VS,freezeMethods:aI,toObjectSet:lI,toCamelCase:iI,noop:uI,toFiniteNumber:cI,findKey:jS,global:FS,isContextDefined:LS,ALPHABET:US,generateString:dI,isSpecCompliantForm:fI,toJSONObject:hI,isAsyncFn:pI,isThenable:mI};function Me(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}F.inherits(Me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const zS=Me.prototype,BS={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{BS[e]={value:e}});Object.defineProperties(Me,BS);Object.defineProperty(zS,"isAxiosError",{value:!0});Me.from=(e,t,n,r,s,i)=>{const o=Object.create(zS);return F.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Me.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const gI=null;function Om(e){return F.isPlainObject(e)||F.isArray(e)}function HS(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function x1(e,t,n){return e?e.concat(t).map(function(s,i){return s=HS(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function vI(e){return F.isArray(e)&&!e.some(Om)}const yI=F.toFlatObject(F,{},null,function(t){return/^is[A-Z]/.test(t)});function df(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,b){return!F.isUndefined(b[y])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(s))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(F.isDate(v))return v.toISOString();if(!l&&F.isBlob(v))throw new Me("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(v)||F.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,y,b){let m=v;if(v&&!b&&typeof v=="object"){if(F.endsWith(y,"{}"))y=r?y:y.slice(0,-2),v=JSON.stringify(v);else if(F.isArray(v)&&vI(v)||(F.isFileList(v)||F.endsWith(y,"[]"))&&(m=F.toArray(v)))return y=HS(y),m.forEach(function(x,E){!(F.isUndefined(x)||x===null)&&t.append(o===!0?x1([y],E,i):o===null?y:y+"[]",u(x))}),!1}return Om(v)?!0:(t.append(x1(b,y,i),u(v)),!1)}const c=[],f=Object.assign(yI,{defaultVisitor:d,convertValue:u,isVisitable:Om});function p(v,y){if(!F.isUndefined(v)){if(c.indexOf(v)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(v),F.forEach(v,function(m,g){(!(F.isUndefined(m)||m===null)&&s.call(t,m,F.isString(g)?g.trim():g,y,f))===!0&&p(m,y?y.concat(g):[g])}),c.pop()}}if(!F.isObject(e))throw new TypeError("data must be an object");return p(e),t}function w1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Tv(e,t){this._pairs=[],e&&df(e,this,t)}const WS=Tv.prototype;WS.append=function(t,n){this._pairs.push([t,n])};WS.toString=function(t){const n=t?function(r){return t.call(this,r,w1)}:w1;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function bI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qS(e,t,n){if(!t)return e;const r=n&&n.encode||bI,s=n&&n.serialize;let i;if(s?i=s(t,n):i=F.isURLSearchParams(t)?t.toString():new Tv(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class xI{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,function(r){r!==null&&t(r)})}}const E1=xI,KS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wI=typeof URLSearchParams<"u"?URLSearchParams:Tv,EI=typeof FormData<"u"?FormData:null,SI=typeof Blob<"u"?Blob:null,CI={isBrowser:!0,classes:{URLSearchParams:wI,FormData:EI,Blob:SI},protocols:["http","https","file","blob","url","data"]},GS=typeof window<"u"&&typeof document<"u",kI=(e=>GS&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),_I=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),OI=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:GS,hasStandardBrowserEnv:kI,hasStandardBrowserWebWorkerEnv:_I},Symbol.toStringTag,{value:"Module"})),ur={...OI,...CI};function RI(e,t){return df(e,new ur.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return ur.isNode&&F.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function PI(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function AI(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function QS(e){function t(n,r,s,i){let o=n[i++];const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&F.isArray(s)?s.length:o,l?(F.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!F.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&F.isArray(s[o])&&(s[o]=AI(s[o])),!a)}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,(r,s)=>{t(PI(r),s,n,0)}),n}return null}function TI(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $v={transitional:KS,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=F.isObject(t);if(i&&F.isHTMLForm(t)&&(t=new FormData(t)),F.isFormData(t))return s&&s?JSON.stringify(QS(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return RI(t,this.formSerializer).toString();if((a=F.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return df(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),TI(t)):t}],transformResponse:[function(t){const n=this.transitional||$v.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&F.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Me.from(a,Me.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ur.classes.FormData,Blob:ur.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],e=>{$v.headers[e]={}});const Iv=$v,$I=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),II=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&$I[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},S1=Symbol("internals");function Ca(e){return e&&String(e).trim().toLowerCase()}function gc(e){return e===!1||e==null?e:F.isArray(e)?e.map(gc):String(e)}function MI(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const NI=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Th(e,t,n,r,s){if(F.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!F.isString(t)){if(F.isString(r))return t.indexOf(r)!==-1;if(F.isRegExp(r))return r.test(t)}}function DI(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function jI(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let ff=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const d=Ca(l);if(!d)throw new Error("header name must be a non-empty string");const c=F.findKey(s,d);(!c||s[c]===void 0||u===!0||u===void 0&&s[c]!==!1)&&(s[c||l]=gc(a))}const o=(a,l)=>F.forEach(a,(u,d)=>i(u,d,l));return F.isPlainObject(t)||t instanceof this.constructor?o(t,n):F.isString(t)&&(t=t.trim())&&!NI(t)?o(II(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Ca(t),t){const r=F.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return MI(s);if(F.isFunction(n))return n.call(this,s,r);if(F.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ca(t),t){const r=F.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Th(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Ca(o),o){const a=F.findKey(r,o);a&&(!n||Th(r,r[a],a,n))&&(delete r[a],s=!0)}}return F.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Th(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return F.forEach(this,(s,i)=>{const o=F.findKey(r,i);if(o){n[o]=gc(s),delete n[i];return}const a=t?DI(i):String(i).trim();a!==i&&delete n[i],n[a]=gc(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return F.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&F.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[S1]=this[S1]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Ca(o);r[a]||(jI(s,o),r[a]=!0)}return F.isArray(t)?t.forEach(i):i(t),this}};ff.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.reduceDescriptors(ff.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});F.freezeMethods(ff);const jr=ff;function $h(e,t){const n=this||Iv,r=t||n,s=jr.from(r.headers);let i=r.data;return F.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function ZS(e){return!!(e&&e.__CANCEL__)}function ru(e,t,n){Me.call(this,e??"canceled",Me.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(ru,Me,{__CANCEL__:!0});function FI(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Me("Request failed with status code "+n.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const LI=ur.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];F.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),F.isString(r)&&o.push("path="+r),F.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function VI(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function UI(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function YS(e,t){return e&&!VI(t)?UI(e,t):t}const zI=ur.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const a=F.isString(o)?s(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function BI(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function HI(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[i];o||(o=u),n[s]=l,r[s]=u;let c=i,f=0;for(;c!==s;)f+=n[c++],c=c%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const p=d&&u-d;return p?Math.round(f*1e3/p):void 0}}function C1(e,t){let n=0;const r=HI(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,a=i-n,l=r(a),u=i<=o;n=i;const d={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:s};d[t?"download":"upload"]=!0,e(d)}}const WI=typeof XMLHttpRequest<"u",qI=WI&&function(e){return new Promise(function(n,r){let s=e.data;const i=jr.from(e.headers).normalize();let{responseType:o,withXSRFToken:a}=e,l;function u(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}let d;if(F.isFormData(s)){if(ur.hasStandardBrowserEnv||ur.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((d=i.getContentType())!==!1){const[y,...b]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([y||"multipart/form-data",...b].join("; "))}}let c=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(y+":"+b))}const f=YS(e.baseURL,e.url);c.open(e.method.toUpperCase(),qS(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;const y=jr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:y,config:e,request:c};FI(function(x){n(x),u()},function(x){r(x),u()},m),c=null}if("onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(r(new Me("Request aborted",Me.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new Me("Network Error",Me.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||KS;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),r(new Me(b,m.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,e,c)),c=null},ur.hasStandardBrowserEnv&&(a&&F.isFunction(a)&&(a=a(e)),a||a!==!1&&zI(f))){const y=e.xsrfHeaderName&&e.xsrfCookieName&&LI.read(e.xsrfCookieName);y&&i.set(e.xsrfHeaderName,y)}s===void 0&&i.setContentType(null),"setRequestHeader"in c&&F.forEach(i.toJSON(),function(b,m){c.setRequestHeader(m,b)}),F.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",C1(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",C1(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=y=>{c&&(r(!y||y.type?new ru(null,e,c):y),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const v=BI(f);if(v&&ur.protocols.indexOf(v)===-1){r(new Me("Unsupported protocol "+v+":",Me.ERR_BAD_REQUEST,e));return}c.send(s||null)})},Rm={http:gI,xhr:qI};F.forEach(Rm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const k1=e=>`- ${e}`,KI=e=>F.isFunction(e)||e===null||e===!1,XS={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!KI(n)&&(r=Rm[(o=String(n)).toLowerCase()],r===void 0))throw new Me(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : +`+i.map(k1).join(` +`):" "+k1(i[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Rm};function Ih(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ru(null,e)}function _1(e){return Ih(e),e.headers=jr.from(e.headers),e.data=$h.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),XS.getAdapter(e.adapter||Iv.adapter)(e).then(function(r){return Ih(e),r.data=$h.call(e,e.transformResponse,r),r.headers=jr.from(r.headers),r},function(r){return ZS(r)||(Ih(e),r&&r.response&&(r.response.data=$h.call(e,e.transformResponse,r.response),r.response.headers=jr.from(r.response.headers))),Promise.reject(r)})}const O1=e=>e instanceof jr?e.toJSON():e;function zo(e,t){t=t||{};const n={};function r(u,d,c){return F.isPlainObject(u)&&F.isPlainObject(d)?F.merge.call({caseless:c},u,d):F.isPlainObject(d)?F.merge({},d):F.isArray(d)?d.slice():d}function s(u,d,c){if(F.isUndefined(d)){if(!F.isUndefined(u))return r(void 0,u,c)}else return r(u,d,c)}function i(u,d){if(!F.isUndefined(d))return r(void 0,d)}function o(u,d){if(F.isUndefined(d)){if(!F.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,c){if(c in t)return r(u,d);if(c in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,d)=>s(O1(u),O1(d),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=l[d]||s,f=c(e[d],t[d],d);F.isUndefined(f)&&c!==a||(n[d]=f)}),n}const JS="1.6.2",Mv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mv[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const R1={};Mv.transitional=function(t,n,r){function s(i,o){return"[Axios v"+JS+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new Me(s(o," has been removed"+(n?" in "+n:"")),Me.ERR_DEPRECATED);return n&&!R1[o]&&(R1[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};function GI(e,t,n){if(typeof e!="object")throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new Me("option "+i+" must be "+l,Me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Me("Unknown option "+i,Me.ERR_BAD_OPTION)}}const Pm={assertOptions:GI,validators:Mv},rs=Pm.validators;let ad=class{constructor(t){this.defaults=t,this.interceptors={request:new E1,response:new E1}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=zo(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Pm.assertOptions(r,{silentJSONParsing:rs.transitional(rs.boolean),forcedJSONParsing:rs.transitional(rs.boolean),clarifyTimeoutError:rs.transitional(rs.boolean)},!1),s!=null&&(F.isFunction(s)?n.paramsSerializer={serialize:s}:Pm.assertOptions(s,{encode:rs.function,serialize:rs.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&F.merge(i.common,i[n.method]);i&&F.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=jr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let d,c=0,f;if(!l){const v=[_1.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,u),f=v.length,d=Promise.resolve(n);c<f;)d=d.then(v[c++],v[c++]);return d}f=a.length;let p=n;for(c=0;c<f;){const v=a[c++],y=a[c++];try{p=v(p)}catch(b){y.call(this,b);break}}try{d=_1.call(this,p)}catch(v){return Promise.reject(v)}for(c=0,f=u.length;c<f;)d=d.then(u[c++],u[c++]);return d}getUri(t){t=zo(this.defaults,t);const n=YS(t.baseURL,t.url);return qS(n,t.params,t.paramsSerializer)}};F.forEach(["delete","get","head","options"],function(t){ad.prototype[t]=function(n,r){return this.request(zo(r||{},{method:t,url:n,data:(r||{}).data}))}});F.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(zo(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}ad.prototype[t]=n(),ad.prototype[t+"Form"]=n(!0)});const vc=ad;let QI=class eC{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new ru(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new eC(function(s){t=s}),cancel:t}}};const ZI=QI;function YI(e){return function(n){return e.apply(null,n)}}function XI(e){return F.isObject(e)&&e.isAxiosError===!0}const Am={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Am).forEach(([e,t])=>{Am[t]=e});const JI=Am;function tC(e){const t=new vc(e),n=MS(vc.prototype.request,t);return F.extend(n,vc.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return tC(zo(e,s))},n}const mt=tC(Iv);mt.Axios=vc;mt.CanceledError=ru;mt.CancelToken=ZI;mt.isCancel=ZS;mt.VERSION=JS;mt.toFormData=df;mt.AxiosError=Me;mt.Cancel=mt.CanceledError;mt.all=function(t){return Promise.all(t)};mt.spread=YI;mt.isAxiosError=XI;mt.mergeConfig=zo;mt.AxiosHeaders=jr;mt.formToJSON=e=>QS(F.isHTMLForm(e)?new FormData(e):e);mt.getAdapter=XS.getAdapter;mt.HttpStatusCode=JI;mt.default=mt;const nC=mt,{Axios:IV,AxiosError:Nv,CanceledError:MV,isCancel:NV,CancelToken:DV,VERSION:jV,all:FV,Cancel:LV,isAxiosError:VV,spread:UV,toFormData:zV,AxiosHeaders:BV,HttpStatusCode:HV,formToJSON:WV,getAdapter:qV,mergeConfig:KV}=nC,ld=nC.create({baseURL:"http://localhost:8080/api/v1"});let Mu;const eM=new Uint8Array(16);function tM(){if(!Mu&&(Mu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mu(eM)}const _t=[];for(let e=0;e<256;++e)_t.push((e+256).toString(16).slice(1));function nM(e,t=0){return _t[e[t+0]]+_t[e[t+1]]+_t[e[t+2]]+_t[e[t+3]]+"-"+_t[e[t+4]]+_t[e[t+5]]+"-"+_t[e[t+6]]+_t[e[t+7]]+"-"+_t[e[t+8]]+_t[e[t+9]]+"-"+_t[e[t+10]]+_t[e[t+11]]+_t[e[t+12]]+_t[e[t+13]]+_t[e[t+14]]+_t[e[t+15]]}const rM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),P1={randomUUID:rM};function Qe(e,t,n){if(P1.randomUUID&&!t&&!e)return P1.randomUUID();e=e||{};const r=e.random||(e.rng||tM)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let s=0;s<16;++s)t[n+s]=r[s];return t}return nM(r)}var sM={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"};const iM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),De=(e,t)=>{const n=h.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,children:a,...l},u)=>h.createElement("svg",{ref:u,...sM,width:s,height:s,stroke:r,strokeWidth:o?Number(i)*24/Number(s):i,className:`lucide lucide-${iM(e)}`,...l},[...t.map(([d,c])=>h.createElement(d,c)),...(Array.isArray(a)?a:[a])||[]]));return n.displayName=`${e}`,n},oM=De("AlertCircle",[["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"}]]),aM=De("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),lM=De("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),uM=De("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),Dv=De("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),cM=De("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),dM=De("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),fM=De("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),hM=De("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"}]]),pM=De("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]),mM=De("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]),gM=De("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",key:"nb9nel"}]]),vM=De("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]),yM=De("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]),bM=De("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]),rC=De("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),xM=De("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]),wM=De("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"}]]),EM=De("MessageCircle",[["path",{d:"m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z",key:"v2veuj"}]]),sC=De("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),jv=De("MoreHorizontal",[["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"}]]),SM=De("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),CM=De("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]),iC=De("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),kM=De("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),_M=De("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),OM=De("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]),oC=De("UserPlus2",[["path",{d:"M14 19a6 6 0 0 0-12 0",key:"vej9p1"}],["circle",{cx:"8",cy:"9",r:"4",key:"143rtg"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]),RM=De("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),PM=De("Wallpaper",[["circle",{cx:"8",cy:"9",r:"2",key:"gjzl9d"}],["path",{d:"m9 17 6.1-6.1a2 2 0 0 1 2.81.01L22 15V5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2",key:"69xh40"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"M12 17v4",key:"1riwvh"}]]),Fv=De("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),AM=De("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),TM="/assets/dark1-d97a968a.png",$M="/assets/dark2-f4da29c7.jpg",IM="/assets/dark3-0a2fff6b.jpg",MM="/assets/coffee-8a3f4512.jpg",NM="/assets/green1-c08a6088.jpg",DM="/assets/leaves-c06cc1fd.jpg",jM="/assets/light1-f64af717.jpg",FM="/assets/light2-4161db47.jpg",LM="/assets/stones-416b7e8b.jpg",VM="/assets/sunset-c83e1366.jpg",UM="/assets/wood-7a6be734.jpg",A1={dark1:TM,dark2:$M,dark3:IM,coffee:MM,green1:NM,leaves:DM,light1:jM,light2:FM,stones:LM,sunset:VM,wood:UM},zM=24*60*60*1e3,GV=e=>({variables:{colorBackground:e==="dark"?"#17191C":"#f9fafb",colorText:e==="dark"?"white":"#030712"}}),BM={control:e=>({...e,backgroundColor:"hsl(var(--input))",borderColor:"transparent",boxShadow:"none"}),menu:e=>({...e,backgroundColor:"hsl(var(--input))"}),multiValue:e=>({...e,backgroundColor:"hsl(var(--input))"}),multiValueLabel:e=>({...e,color:"hsl(var(--secondary-foreground))"})},HM=[{text:"features",link:"#features",id:Qe()},{text:"about",link:"#",id:Qe()},{text:"blog",link:"#",id:Qe()},{text:"contact",link:"#footer",id:Qe()}],T1=[{text:"New Group chat",icon:vM},{text:"Request Feature",icon:mM},{text:"Change Wallpaper",icon:PM},{text:"Logout",icon:rC},{text:"Delete Account",icon:_M}],QV=["#4CAF50","#FFEB3B","#2196F3","#FF9800","#9C27B0","#00BCD4","#E91E63","#8BC34A","#FFC107","#673AB7","#03A9F4","#CDDC39","#FF5722","#009688","#3F51B5"],ZV=["#388E3C","#FBC02D","#1976D2","#F57C00","#7B1FA2","#0097A7","#C2185B","#689F38","#FFA000","#512DA8","#0288D1","#AFB42B","#D84315","#00796B","#303F9F"];function WM(e){if(e.length===0)return"";const t=e[0].toLowerCase();return/aeiou/.test(t)?"an":"a"}function ye(...e){return N3(Rv(e))}function qM(e){const t={lastSeen:"",isOnline:!1};let n=300*1e3;const r=new Date().getTime(),s=typeof e=="string"||typeof e=="number"?new Date(e):e;if(!(s instanceof Date))return t;const i=s.getTime(),o=r-i;return o<=n?(t.lastSeen="Online",t.isOnline=!0,t):(n=60*1e3,Math.ceil(o/n)<=59?(t.lastSeen=`last seen ${Math.ceil(o/n)} minutes ago`,t):(n=n*60,Math.ceil(o/n)<=23?(t.lastSeen=`last seen ${Math.ceil(o/n)} hours ago`,t):(t.lastSeen=`last seen at ${s.toDateString()}`,t)))}async function KM(e){const t=new FormData;t.append("file",e);try{return(await ld.post("/upload",t,{headers:{"Content-Type":"multipart/form-data"}})).data.url}catch{return gv.error("Failed to upload image!"),null}}function aC(e,t="An error occurred"){var r;let n=t;return e instanceof Nv&&((r=e.response)!=null&&r.data.message)?n=e.response.data.message:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function YV(e){let t="";for(let n=0;n<3;n++)t+=Math.floor(Math.random()*10).toString();return e+t}function XV(e,t,n,r,s,i,o){const a={image:"IMAGE",video:"VIDEO"};let l={Sender:{username:e.username,avatar:e.avatar},body:t,chatId:n,id:Qe(),createdAt:new Date,isEditted:!1,readByIds:[],resourceUrl:r,senderId:e.id,type:r!==null?a[s]:"TEXT",sending:!0,isReply:i,parentMessage:null};return i&&o&&(l.parentMessage={body:o.text,avatar:o.avatar,username:o.username}),l}function JV(e,t){let n=e==="DEFAULT"&&t in A1?A1[t]:t;return{backgroundImage:e==="DEFAULT"||e==="UPLOADED"?`url(${n})`:"none",backgroundColor:e==="COLOR"&&n||"transparent"}}const $1=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,I1=Rv,Lv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return I1(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],c=i==null?void 0:i[u];if(d===null)return null;const f=$1(d)||$1(c);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...p}=d;return Object.entries(p).every(v=>{let[y,b]=v;return Array.isArray(b)?b.includes({...i,...a}[y]):{...i,...a}[y]===b})?[...u,c,f]:u},[]);return I1(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},GM="rounded-full border-t-transparent border-b-brand-p1 border-l-brand-p1 border-r-brand-p1 border-2 animate-spin",QM=Lv(GM,{variants:{size:{default:"h-10 w-10",sm:"h-6 w-6",lg:"h-16 w-16"}},defaultVariants:{size:"default"}});function ud({withBackground:e=!0,className:t,size:n}){const r=e?"div":G.Fragment,s=e?{className:"h-screen w-full fixed backdrop-blur-md flex items-center justify-center inset-0 transition-all delay-150 z-[999999999999999999]"}:{};return w.jsx(r,{...s,children:w.jsx("div",{className:ye(QM({className:t,size:n}))})})}const ZM=()=>w.jsxs(w.Fragment,{children:[w.jsx(n$,{children:w.jsx(ud,{})}),w.jsx(e$,{children:w.jsx(_v,{})}),w.jsx(t$,{children:w.jsx(r$,{redirectUrl:"/sign-in"})})]});function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function YM(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hf(...e){return t=>e.forEach(n=>YM(n,t))}function $t(...e){return h.useCallback(hf(...e),e)}const bi=h.forwardRef((e,t)=>{const{children:n,...r}=e,s=h.Children.toArray(n),i=s.find(JM);if(i){const o=i.props.children,a=s.map(l=>l===i?h.Children.count(o)>1?h.Children.only(null):h.isValidElement(o)?o.props.children:null:l);return h.createElement(Tm,V({},r,{ref:t}),h.isValidElement(o)?h.cloneElement(o,void 0,a):null)}return h.createElement(Tm,V({},r,{ref:t}),n)});bi.displayName="Slot";const Tm=h.forwardRef((e,t)=>{const{children:n,...r}=e;return h.isValidElement(n)?h.cloneElement(n,{...eN(r,n.props),ref:t?hf(t,n.ref):n.ref}):h.Children.count(n)>1?h.Children.only(null):null});Tm.displayName="SlotClone";const XM=({children:e})=>h.createElement(h.Fragment,null,e);function JM(e){return h.isValidElement(e)&&e.type===XM}function eN(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}const tN=Lv("inline-flex items-center justify-center 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-brand-p1 text-white hover:bg-brand-p1/70",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"}}),ft=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?bi:"button";return w.jsx(o,{className:ye(tN({variant:t,size:n,className:e})),ref:i,...s})});ft.displayName="Button";function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Pi(e,t=[]){let n=[];function r(i,o){const a=h.createContext(o),l=n.length;n=[...n,o];function u(c){const{scope:f,children:p,...v}=c,y=(f==null?void 0:f[e][l])||a,b=h.useMemo(()=>v,Object.values(v));return h.createElement(y.Provider,{value:b},p)}function d(c,f){const p=(f==null?void 0:f[e][l])||a,v=h.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const s=()=>{const i=n.map(o=>h.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,nN(s,...t)]}function nN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...a,...c}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function yr(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function pf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=rN({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,a=yr(n),l=h.useCallback(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else s(u)},[i,e,s,a]);return[o,l]}function rN({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,s=h.useRef(r),i=yr(t);return h.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}const sN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],wt=sN.reduce((e,t)=>{const n=h.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?bi:t;return h.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),h.createElement(a,V({},o,{ref:s}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lC(e,t){e&&na.flushSync(()=>e.dispatchEvent(t))}function uC(e){const t=e+"CollectionProvider",[n,r]=Pi(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:v,children:y}=p,b=G.useRef(null),m=G.useRef(new Map).current;return G.createElement(s,{scope:v,itemMap:m,collectionRef:b},y)},a=e+"CollectionSlot",l=G.forwardRef((p,v)=>{const{scope:y,children:b}=p,m=i(a,y),g=$t(v,m.collectionRef);return G.createElement(bi,{ref:g},b)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",c=G.forwardRef((p,v)=>{const{scope:y,children:b,...m}=p,g=G.useRef(null),x=$t(v,g),E=i(u,y);return G.useEffect(()=>(E.itemMap.set(g,{ref:g,...m}),()=>void E.itemMap.delete(g))),G.createElement(bi,{[d]:"",ref:x},b)});function f(p){const v=i(e+"CollectionConsumer",p);return G.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const m=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,C)=>m.indexOf(E.ref.current)-m.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:c},f,r]}const iN=h.createContext(void 0);function cC(e){const t=h.useContext(iN);return e||t||"ltr"}function oN(e,t=globalThis==null?void 0:globalThis.document){const n=yr(e);h.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const $m="dismissableLayer.update",aN="dismissableLayer.pointerDownOutside",lN="dismissableLayer.focusOutside";let M1;const uN=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dC=h.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...u}=e,d=h.useContext(uN),[c,f]=h.useState(null),p=(n=c==null?void 0:c.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,v]=h.useState({}),y=$t(t,S=>f(S)),b=Array.from(d.layers),[m]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(m),x=c?b.indexOf(c):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,C=x>=g,O=cN(S=>{const $=S.target,A=[...d.branches].some(T=>T.contains($));!C||A||(i==null||i(S),a==null||a(S),S.defaultPrevented||l==null||l())},p),k=dN(S=>{const $=S.target;[...d.branches].some(T=>T.contains($))||(o==null||o(S),a==null||a(S),S.defaultPrevented||l==null||l())},p);return oN(S=>{x===d.layers.size-1&&(s==null||s(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},p),h.useEffect(()=>{if(c)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(M1=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(c)),d.layers.add(c),N1(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=M1)}},[c,p,r,d]),h.useEffect(()=>()=>{c&&(d.layers.delete(c),d.layersWithOutsidePointerEventsDisabled.delete(c),N1())},[c,d]),h.useEffect(()=>{const S=()=>v({});return document.addEventListener($m,S),()=>document.removeEventListener($m,S)},[]),h.createElement(wt.div,V({},u,{ref:y,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,O.onPointerDownCapture)}))});function cN(e,t=globalThis==null?void 0:globalThis.document){const n=yr(e),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let u=function(){fC(aN,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=u,t.addEventListener("click",s.current,{once:!0})):u()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dN(e,t=globalThis==null?void 0:globalThis.document){const n=yr(e),r=h.useRef(!1);return h.useEffect(()=>{const s=i=>{i.target&&!r.current&&fC(lN,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function N1(){const e=new CustomEvent($m);document.dispatchEvent(e)}function fC(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?lC(s,i):s.dispatchEvent(i)}let Mh=0;function hC(){h.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:D1()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:D1()),Mh++,()=>{Mh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Mh--}},[])}function D1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Nh="focusScope.autoFocusOnMount",Dh="focusScope.autoFocusOnUnmount",j1={bubbles:!1,cancelable:!0},pC=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=h.useState(null),u=yr(s),d=yr(i),c=h.useRef(null),f=$t(t,y=>l(y)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let y=function(x){if(p.paused||!a)return;const E=x.target;a.contains(E)?c.current=E:is(c.current,{select:!0})},b=function(x){if(p.paused||!a)return;const E=x.relatedTarget;E!==null&&(a.contains(E)||is(c.current,{select:!0}))},m=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&is(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const g=new MutationObserver(m);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),g.disconnect()}}},[r,a,p.paused]),h.useEffect(()=>{if(a){L1.add(p);const y=document.activeElement;if(!a.contains(y)){const m=new CustomEvent(Nh,j1);a.addEventListener(Nh,u),a.dispatchEvent(m),m.defaultPrevented||(fN(vN(mC(a)),{select:!0}),document.activeElement===y&&is(a))}return()=>{a.removeEventListener(Nh,u),setTimeout(()=>{const m=new CustomEvent(Dh,j1);a.addEventListener(Dh,d),a.dispatchEvent(m),m.defaultPrevented||is(y??document.body,{select:!0}),a.removeEventListener(Dh,d),L1.remove(p)},0)}}},[a,u,d,p]);const v=h.useCallback(y=>{if(!n&&!r||p.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,m=document.activeElement;if(b&&m){const g=y.currentTarget,[x,E]=hN(g);x&&E?!y.shiftKey&&m===E?(y.preventDefault(),n&&is(x,{select:!0})):y.shiftKey&&m===x&&(y.preventDefault(),n&&is(E,{select:!0})):m===g&&y.preventDefault()}},[n,r,p.paused]);return h.createElement(wt.div,V({tabIndex:-1},o,{ref:f,onKeyDown:v}))});function fN(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(is(r,{select:t}),document.activeElement!==n)return}function hN(e){const t=mC(e),n=F1(t,e),r=F1(t.reverse(),e);return[n,r]}function mC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function F1(e,t){for(const n of e)if(!pN(n,{upTo:t}))return n}function pN(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mN(e){return e instanceof HTMLInputElement&&"select"in e}function is(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mN(e)&&t&&e.select()}}const L1=gN();function gN(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=V1(e,t),e.unshift(t)},remove(t){var n;e=V1(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function V1(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function vN(e){return e.filter(t=>t.tagName!=="A")}const Bo=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},yN=Ac["useId".toString()]||(()=>{});let bN=0;function mo(e){const[t,n]=h.useState(yN());return Bo(()=>{e||n(r=>r??String(bN++))},[e]),e||(t?`radix-${t}`:"")}const xN=["top","right","bottom","left"],cr=Math.min,un=Math.max,cd=Math.round,Nu=Math.floor,Fs=e=>({x:e,y:e}),wN={left:"right",right:"left",bottom:"top",top:"bottom"},EN={start:"end",end:"start"};function Im(e,t,n){return un(e,cr(t,n))}function qr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function la(e){return e.split("-")[1]}function Vv(e){return e==="x"?"y":"x"}function Uv(e){return e==="y"?"height":"width"}function Ls(e){return["top","bottom"].includes(Kr(e))?"y":"x"}function zv(e){return Vv(Ls(e))}function SN(e,t,n){n===void 0&&(n=!1);const r=la(e),s=zv(e),i=Uv(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=dd(o)),[o,dd(o)]}function CN(e){const t=dd(e);return[Mm(e),t,Mm(t)]}function Mm(e){return e.replace(/start|end/g,t=>EN[t])}function kN(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function _N(e,t,n,r){const s=la(e);let i=kN(Kr(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Mm)))),i}function dd(e){return e.replace(/left|right|bottom|top/g,t=>wN[t])}function ON(e){return{top:0,right:0,bottom:0,left:0,...e}}function gC(e){return typeof e!="number"?ON(e):{top:e,right:e,bottom:e,left:e}}function fd(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function U1(e,t,n){let{reference:r,floating:s}=e;const i=Ls(t),o=zv(t),a=Uv(o),l=Kr(t),u=i==="y",d=r.x+r.width/2-s.width/2,c=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-s.width,y:c};break;default:p={x:r.x,y:r.y}}switch(la(t)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const RN=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:c}=U1(u,r,l),f=r,p={},v=0;for(let y=0;y<a.length;y++){const{name:b,fn:m}=a[y],{x:g,y:x,data:E,reset:C}=await m({x:d,y:c,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=g??d,c=x??c,p={...p,[b]:{...p[b],...E}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:c}=U1(u,f,l)),y=-1)}return{x:d,y:c,placement:f,strategy:s,middlewareData:p}};async function bl(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:f=!1,padding:p=0}=qr(t,e),v=gC(p),b=a[f?c==="floating"?"reference":"floating":c],m=fd(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),g=c==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=fd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:l}):g);return{top:(m.top-C.top+v.top)/E.y,bottom:(C.bottom-m.bottom+v.bottom)/E.y,left:(m.left-C.left+v.left)/E.x,right:(C.right-m.right+v.right)/E.x}}const PN=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=qr(e,t)||{};if(u==null)return{};const c=gC(d),f={x:n,y:r},p=zv(s),v=Uv(p),y=await o.getDimensions(u),b=p==="y",m=b?"top":"left",g=b?"bottom":"right",x=b?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[p]-f[p]-i.floating[v],C=f[p]-i.reference[p],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=O?O[x]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=a.floating[x]||i.floating[v]);const S=E/2-C/2,$=k/2-y[v]/2-1,A=cr(c[m],$),T=cr(c[g],$),P=A,L=k-y[v]-T,I=k/2-y[v]/2+S,U=Im(P,I,L),z=!l.arrow&&la(s)!=null&&I!==U&&i.reference[v]/2-(I<P?A:T)-y[v]/2<0,X=z?I<P?I-P:I-L:0;return{[p]:f[p]+X,data:{[p]:U,centerOffset:I-U-X,...z&&{alignmentOffset:X}},reset:z}}}),AN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...b}=qr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=Kr(s),g=Ls(a),x=Kr(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(x||!y?[dd(a)]:CN(a)),O=v!=="none";!f&&O&&C.push(..._N(a,y,v,E));const k=[a,...C],S=await bl(t,b),$=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&$.push(S[m]),c){const I=SN(s,o,E);$.push(S[I[0]],S[I[1]])}if(A=[...A,{placement:s,overflows:$}],!$.every(I=>I<=0)){var T,P;const I=(((T=i.flip)==null?void 0:T.index)||0)+1,U=k[I];if(U)return{data:{index:I,overflows:A},reset:{placement:U}};let z=(P=A.filter(X=>X.overflows[0]<=0).sort((X,D)=>X.overflows[1]-D.overflows[1])[0])==null?void 0:P.placement;if(!z)switch(p){case"bestFit":{var L;const X=(L=A.filter(D=>{if(O){const N=Ls(D.placement);return N===g||N==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(N=>N>0).reduce((N,B)=>N+B,0)]).sort((D,N)=>D[1]-N[1])[0])==null?void 0:L[0];X&&(z=X);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function z1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function B1(e){return xN.some(t=>e[t]>=0)}const TN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=qr(e,t);switch(r){case"referenceHidden":{const i=await bl(t,{...s,elementContext:"reference"}),o=z1(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:B1(o)}}}case"escaped":{const i=await bl(t,{...s,altBoundary:!0}),o=z1(i,n.floating);return{data:{escapedOffsets:o,escaped:B1(o)}}}default:return{}}}}};async function $N(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=Kr(n),a=la(n),l=Ls(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,c=qr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const IN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await $N(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},MN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:m,y:g}=b;return{x:m,y:g}}},...l}=qr(e,t),u={x:n,y:r},d=await bl(t,l),c=Ls(Kr(s)),f=Vv(c);let p=u[f],v=u[c];if(i){const b=f==="y"?"top":"left",m=f==="y"?"bottom":"right",g=p+d[b],x=p-d[m];p=Im(g,p,x)}if(o){const b=c==="y"?"top":"left",m=c==="y"?"bottom":"right",g=v+d[b],x=v-d[m];v=Im(g,v,x)}const y=a.fn({...t,[f]:p,[c]:v});return{...y,data:{x:y.x-n,y:y.y-r}}}}},NN=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=qr(e,t),d={x:n,y:r},c=Ls(s),f=Vv(c);let p=d[f],v=d[c];const y=qr(a,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const x=f==="y"?"height":"width",E=i.reference[f]-i.floating[x]+b.mainAxis,C=i.reference[f]+i.reference[x]-b.mainAxis;p<E?p=E:p>C&&(p=C)}if(u){var m,g;const x=f==="y"?"width":"height",E=["top","left"].includes(Kr(s)),C=i.reference[c]-i.floating[x]+(E&&((m=o.offset)==null?void 0:m[c])||0)+(E?0:b.crossAxis),O=i.reference[c]+i.reference[x]+(E?0:((g=o.offset)==null?void 0:g[c])||0)-(E?b.crossAxis:0);v<C?v=C:v>O&&(v=O)}return{[f]:p,[c]:v}}}},DN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:i}=t,{apply:o=()=>{},...a}=qr(e,t),l=await bl(t,a),u=Kr(n),d=la(n),c=Ls(n)==="y",{width:f,height:p}=r.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=d===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,v=d==="end"?"top":"bottom");const b=p-l.top-l.bottom,m=f-l.left-l.right,g=cr(p-l[v],b),x=cr(f-l[y],m),E=!t.middlewareData.shift;let C=g,O=x;if(c?O=d||E?cr(x,m):m:C=d||E?cr(g,b):b,E&&!d){const S=un(l.left,0),$=un(l.right,0),A=un(l.top,0),T=un(l.bottom,0);c?O=f-2*(S!==0||$!==0?S+$:un(l.left,l.right)):C=p-2*(A!==0||T!==0?A+T:un(l.top,l.bottom))}await o({...t,availableWidth:O,availableHeight:C});const k=await s.getDimensions(i.floating);return f!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function ua(e){return vC(e)?(e.nodeName||"").toLowerCase():"#document"}function hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xr(e){var t;return(t=(vC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vC(e){return e instanceof Node||e instanceof hn(e).Node}function Kn(e){return e instanceof Element||e instanceof hn(e).Element}function br(e){return e instanceof HTMLElement||e instanceof hn(e).HTMLElement}function H1(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hn(e).ShadowRoot}function su(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function jN(e){return["table","td","th"].includes(ua(e))}function mf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Bv(e){const t=Hv(),n=Kn(e)?Gn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function FN(e){let t=Vs(e);for(;br(t)&&!Ho(t);){if(Bv(t))return t;if(mf(t))return null;t=Vs(t)}return null}function Hv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ho(e){return["html","body","#document"].includes(ua(e))}function Gn(e){return hn(e).getComputedStyle(e)}function gf(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vs(e){if(ua(e)==="html")return e;const t=e.assignedSlot||e.parentNode||H1(e)&&e.host||Xr(e);return H1(t)?t.host:t}function yC(e){const t=Vs(e);return Ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:br(t)&&su(t)?t:yC(t)}function xl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=yC(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=hn(s);if(i){const a=LN(o);return t.concat(o,o.visualViewport||[],su(s)?s:[],a&&n?xl(a):[])}return t.concat(s,xl(s,[],n))}function LN(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bC(e){const t=Gn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=br(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=cd(n)!==i||cd(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Wv(e){return Kn(e)?e:e.contextElement}function go(e){const t=Wv(e);if(!br(t))return Fs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=bC(t);let o=(i?cd(n.width):n.width)/r,a=(i?cd(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const VN=Fs(0);function xC(e){const t=hn(e);return!Hv()||!t.visualViewport?VN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hn(e)?!1:t}function xi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Wv(e);let o=Fs(1);t&&(r?Kn(r)&&(o=go(r)):o=go(e));const a=UN(i,n,r)?xC(i):Fs(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,c=s.height/o.y;if(i){const f=hn(i),p=r&&Kn(r)?hn(r):r;let v=f,y=v.frameElement;for(;y&&r&&p!==v;){const b=go(y),m=y.getBoundingClientRect(),g=Gn(y),x=m.left+(y.clientLeft+parseFloat(g.paddingLeft))*b.x,E=m.top+(y.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,c*=b.y,l+=x,u+=E,v=hn(y),y=v.frameElement}}return fd({width:d,height:c,x:l,y:u})}function zN(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Xr(r),a=t?mf(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Fs(1);const d=Fs(0),c=br(r);if((c||!c&&!i)&&((ua(r)!=="body"||su(o))&&(l=gf(r)),br(r))){const f=xi(r);u=go(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function BN(e){return Array.from(e.getClientRects())}function wC(e){return xi(Xr(e)).left+gf(e).scrollLeft}function HN(e){const t=Xr(e),n=gf(e),r=e.ownerDocument.body,s=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+wC(e);const a=-n.scrollTop;return Gn(r).direction==="rtl"&&(o+=un(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function WN(e,t){const n=hn(e),r=Xr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Hv();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function qN(e,t){const n=xi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=br(e)?go(e):Fs(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function W1(e,t,n){let r;if(t==="viewport")r=WN(e,n);else if(t==="document")r=HN(Xr(e));else if(Kn(t))r=qN(t,n);else{const s=xC(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return fd(r)}function EC(e,t){const n=Vs(e);return n===t||!Kn(n)||Ho(n)?!1:Gn(n).position==="fixed"||EC(n,t)}function KN(e,t){const n=t.get(e);if(n)return n;let r=xl(e,[],!1).filter(a=>Kn(a)&&ua(a)!=="body"),s=null;const i=Gn(e).position==="fixed";let o=i?Vs(e):e;for(;Kn(o)&&!Ho(o);){const a=Gn(o),l=Bv(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||su(o)&&!l&&EC(e,o))?r=r.filter(d=>d!==o):s=a,o=Vs(o)}return t.set(e,r),r}function GN(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?mf(t)?[]:KN(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const c=W1(t,d,s);return u.top=un(c.top,u.top),u.right=cr(c.right,u.right),u.bottom=cr(c.bottom,u.bottom),u.left=un(c.left,u.left),u},W1(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function QN(e){const{width:t,height:n}=bC(e);return{width:t,height:n}}function ZN(e,t,n){const r=br(t),s=Xr(t),i=n==="fixed",o=xi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Fs(0);if(r||!r&&!i)if((ua(t)!=="body"||su(s))&&(a=gf(t)),r){const c=xi(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else s&&(l.x=wC(s));const u=o.left+a.scrollLeft-l.x,d=o.top+a.scrollTop-l.y;return{x:u,y:d,width:o.width,height:o.height}}function jh(e){return Gn(e).position==="static"}function q1(e,t){return!br(e)||Gn(e).position==="fixed"?null:t?t(e):e.offsetParent}function SC(e,t){const n=hn(e);if(mf(e))return n;if(!br(e)){let s=Vs(e);for(;s&&!Ho(s);){if(Kn(s)&&!jh(s))return s;s=Vs(s)}return n}let r=q1(e,t);for(;r&&jN(r)&&jh(r);)r=q1(r,t);return r&&Ho(r)&&jh(r)&&!Bv(r)?n:r||FN(e)||n}const YN=async function(e){const t=this.getOffsetParent||SC,n=this.getDimensions,r=await n(e.floating);return{reference:ZN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XN(e){return Gn(e).direction==="rtl"}const JN={convertOffsetParentRelativeRectToViewportRelativeRect:zN,getDocumentElement:Xr,getClippingRect:GN,getOffsetParent:SC,getElementRects:YN,getClientRects:BN,getDimensions:QN,getScale:go,isElement:Kn,isRTL:XN};function e4(e,t){let n=null,r;const s=Xr(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:c,height:f}=e.getBoundingClientRect();if(a||t(),!c||!f)return;const p=Nu(d),v=Nu(s.clientWidth-(u+c)),y=Nu(s.clientHeight-(d+f)),b=Nu(u),g={rootMargin:-p+"px "+-v+"px "+-y+"px "+-b+"px",threshold:un(0,cr(1,l))||1};let x=!0;function E(C){const O=C[0].intersectionRatio;if(O!==l){if(!x)return o();O?o(!1,O):r=setTimeout(()=>{o(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(E,{...g,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,g)}n.observe(e)}return o(!0),i}function CC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Wv(e),d=s||i?[...u?xl(u):[],...xl(t)]:[];d.forEach(m=>{s&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const c=u&&a?e4(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(m=>{let[g]=m;g&&g.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let v,y=l?xi(e):null;l&&b();function b(){const m=xi(e);y&&(m.x!==y.x||m.y!==y.y||m.width!==y.width||m.height!==y.height)&&n(),y=m,v=requestAnimationFrame(b)}return n(),()=>{var m;d.forEach(g=>{s&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),c==null||c(),(m=p)==null||m.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const t4=IN,n4=MN,r4=AN,s4=DN,i4=TN,K1=PN,o4=NN,a4=(e,t,n)=>{const r=new Map,s={platform:JN,...n},i={...s.platform,_c:r};return RN(e,t,{...s,platform:i})},l4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?K1({element:r.current,padding:s}).fn(n):{}:r?K1({element:r,padding:s}).fn(n):{}}}};var yc=typeof document<"u"?h.useLayoutEffect:h.useEffect;function hd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!hd(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!hd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function kC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function G1(e,t){const n=kC(e);return Math.round(t*n)/n}function Q1(e){const t=h.useRef(e);return yc(()=>{t.current=e}),t}function u4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);hd(f,r)||p(r);const[v,y]=h.useState(null),[b,m]=h.useState(null),g=h.useCallback(z=>{z!=O.current&&(O.current=z,y(z))},[y]),x=h.useCallback(z=>{z!==k.current&&(k.current=z,m(z))},[m]),E=i||v,C=o||b,O=h.useRef(null),k=h.useRef(null),S=h.useRef(d),$=Q1(l),A=Q1(s),T=h.useCallback(()=>{if(!O.current||!k.current)return;const z={placement:t,strategy:n,middleware:f};A.current&&(z.platform=A.current),a4(O.current,k.current,z).then(X=>{const D={...X,isPositioned:!0};P.current&&!hd(S.current,D)&&(S.current=D,na.flushSync(()=>{c(D)}))})},[f,t,n,A]);yc(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,c(z=>({...z,isPositioned:!1})))},[u]);const P=h.useRef(!1);yc(()=>(P.current=!0,()=>{P.current=!1}),[]),yc(()=>{if(E&&(O.current=E),C&&(k.current=C),E&&C){if($.current)return $.current(E,C,T);T()}},[E,C,T,$]);const L=h.useMemo(()=>({reference:O,floating:k,setReference:g,setFloating:x}),[g,x]),I=h.useMemo(()=>({reference:E,floating:C}),[E,C]),U=h.useMemo(()=>{const z={position:n,left:0,top:0};if(!I.floating)return z;const X=G1(I.floating,d.x),D=G1(I.floating,d.y);return a?{...z,transform:"translate("+X+"px, "+D+"px)",...kC(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:D}},[n,a,I.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:T,refs:L,elements:I,floatingStyles:U}),[d,T,L,I,U])}function _C(e){const[t,n]=h.useState(void 0);return Bo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const OC="Popper",[RC,PC]=Pi(OC),[c4,AC]=RC(OC),d4=e=>{const{__scopePopper:t,children:n}=e,[r,s]=h.useState(null);return h.createElement(c4,{scope:t,anchor:r,onAnchorChange:s},n)},f4="PopperAnchor",h4=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=AC(f4,n),o=h.useRef(null),a=$t(t,o);return h.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:h.createElement(wt.div,V({},s,{ref:a}))}),TC="PopperContent",[p4,eU]=RC(TC),m4=h.forwardRef((e,t)=>{var n,r,s,i,o,a,l,u;const{__scopePopper:d,side:c="bottom",sideOffset:f=0,align:p="center",alignOffset:v=0,arrowPadding:y=0,avoidCollisions:b=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:E=!1,updatePositionStrategy:C="optimized",onPlaced:O,...k}=e,S=AC(TC,d),[$,A]=h.useState(null),T=$t(t,ve=>A(ve)),[P,L]=h.useState(null),I=_C(P),U=(n=I==null?void 0:I.width)!==null&&n!==void 0?n:0,z=(r=I==null?void 0:I.height)!==null&&r!==void 0?r:0,X=c+(p!=="center"?"-"+p:""),D=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},N=Array.isArray(m)?m:[m],B=N.length>0,Z={padding:D,boundary:N.filter(g4),altBoundary:B},{refs:Q,floatingStyles:se,placement:be,isPositioned:Ce,middlewareData:pe}=u4({strategy:"fixed",placement:X,whileElementsMounted:(...ve)=>CC(...ve,{animationFrame:C==="always"}),elements:{reference:S.anchor},middleware:[t4({mainAxis:f+z,alignmentAxis:v}),b&&n4({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?o4():void 0,...Z}),b&&r4({...Z}),s4({...Z,apply:({elements:ve,rects:qe,availableWidth:bn,availableHeight:ut})=>{const{width:Et,height:_}=qe.reference,M=ve.floating.style;M.setProperty("--radix-popper-available-width",`${bn}px`),M.setProperty("--radix-popper-available-height",`${ut}px`),M.setProperty("--radix-popper-anchor-width",`${Et}px`),M.setProperty("--radix-popper-anchor-height",`${_}px`)}}),P&&l4({element:P,padding:y}),v4({arrowWidth:U,arrowHeight:z}),E&&i4({strategy:"referenceHidden",...Z})]}),[me,xe]=$C(be),ke=yr(O);Bo(()=>{Ce&&(ke==null||ke())},[Ce,ke]);const ze=(s=pe.arrow)===null||s===void 0?void 0:s.x,tt=(i=pe.arrow)===null||i===void 0?void 0:i.y,we=((o=pe.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ae,fe]=h.useState();return Bo(()=>{$&&fe(window.getComputedStyle($).zIndex)},[$]),h.createElement("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:Ce?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(a=pe.transformOrigin)===null||a===void 0?void 0:a.x,(l=pe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},h.createElement(p4,{scope:d,placedSide:me,onArrowChange:L,arrowX:ze,arrowY:tt,shouldHideArrow:we},h.createElement(wt.div,V({"data-side":me,"data-align":xe},k,{ref:T,style:{...k.style,animation:Ce?void 0:"none",opacity:(u=pe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function g4(e){return e!==null}const v4=e=>({name:"transformOrigin",options:e,fn(t){var n,r,s,i,o;const{placement:a,rects:l,middlewareData:u}=t,c=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,f=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[v,y]=$C(a),b={start:"0%",center:"50%",end:"100%"}[y],m=((r=(s=u.arrow)===null||s===void 0?void 0:s.x)!==null&&r!==void 0?r:0)+f/2,g=((i=(o=u.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+p/2;let x="",E="";return v==="bottom"?(x=c?b:`${m}px`,E=`${-p}px`):v==="top"?(x=c?b:`${m}px`,E=`${l.floating.height+p}px`):v==="right"?(x=`${-p}px`,E=c?b:`${g}px`):v==="left"&&(x=`${l.floating.width+p}px`,E=c?b:`${g}px`),{data:{x,y:E}}}});function $C(e){const[t,n="center"]=e.split("-");return[t,n]}const y4=d4,b4=h4,x4=m4,IC=h.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...s}=e;return r?NR.createPortal(h.createElement(wt.div,V({},s,{ref:t})),r):null});function w4(e,t){return h.useReducer((n,r)=>{const s=t[n][r];return s??n},e)}const Gs=e=>{const{present:t,children:n}=e,r=E4(t),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),i=$t(r.ref,s.ref);return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:i}):null};Gs.displayName="Presence";function E4(e){const[t,n]=h.useState(),r=h.useRef({}),s=h.useRef(e),i=h.useRef("none"),o=e?"mounted":"unmounted",[a,l]=w4(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=Du(r.current);i.current=a==="mounted"?u:"none"},[a]),Bo(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,p=Du(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Bo(()=>{if(t){const u=c=>{const p=Du(r.current).includes(c.animationName);c.target===t&&p&&na.flushSync(()=>l("ANIMATION_END"))},d=c=>{c.target===t&&(i.current=Du(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Du(e){return(e==null?void 0:e.animationName)||"none"}const Fh="rovingFocusGroup.onEntryFocus",S4={bubbles:!1,cancelable:!0},qv="RovingFocusGroup",[Nm,MC,C4]=uC(qv),[k4,NC]=Pi(qv,[C4]),[_4,O4]=k4(qv),R4=h.forwardRef((e,t)=>h.createElement(Nm.Provider,{scope:e.__scopeRovingFocusGroup},h.createElement(Nm.Slot,{scope:e.__scopeRovingFocusGroup},h.createElement(P4,V({},e,{ref:t}))))),P4=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,c=h.useRef(null),f=$t(t,c),p=cC(i),[v=null,y]=pf({prop:o,defaultProp:a,onChange:l}),[b,m]=h.useState(!1),g=yr(u),x=MC(n),E=h.useRef(!1),[C,O]=h.useState(0);return h.useEffect(()=>{const k=c.current;if(k)return k.addEventListener(Fh,g),()=>k.removeEventListener(Fh,g)},[g]),h.createElement(_4,{scope:n,orientation:r,dir:p,loop:s,currentTabStopId:v,onItemFocus:h.useCallback(k=>y(k),[y]),onItemShiftTab:h.useCallback(()=>m(!0),[]),onFocusableItemAdd:h.useCallback(()=>O(k=>k+1),[]),onFocusableItemRemove:h.useCallback(()=>O(k=>k-1),[])},h.createElement(wt.div,V({tabIndex:b||C===0?-1:0,"data-orientation":r},d,{ref:f,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{E.current=!0}),onFocus:Oe(e.onFocus,k=>{const S=!E.current;if(k.target===k.currentTarget&&S&&!b){const $=new CustomEvent(Fh,S4);if(k.currentTarget.dispatchEvent($),!$.defaultPrevented){const A=x().filter(U=>U.focusable),T=A.find(U=>U.active),P=A.find(U=>U.id===v),I=[T,P,...A].filter(Boolean).map(U=>U.ref.current);DC(I)}}E.current=!1}),onBlur:Oe(e.onBlur,()=>m(!1))})))}),A4="RovingFocusGroupItem",T4=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...o}=e,a=mo(),l=i||a,u=O4(A4,n),d=u.currentTabStopId===l,c=MC(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=u;return h.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),h.createElement(Nm.ItemSlot,{scope:n,id:l,focusable:r,active:s},h.createElement(wt.span,V({tabIndex:d?0:-1,"data-orientation":u.orientation},o,{ref:t,onMouseDown:Oe(e.onMouseDown,v=>{r?u.onItemFocus(l):v.preventDefault()}),onFocus:Oe(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Oe(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=M4(v,u.orientation,u.dir);if(y!==void 0){v.preventDefault();let m=c().filter(g=>g.focusable).map(g=>g.ref.current);if(y==="last")m.reverse();else if(y==="prev"||y==="next"){y==="prev"&&m.reverse();const g=m.indexOf(v.currentTarget);m=u.loop?N4(m,g+1):m.slice(g+1)}setTimeout(()=>DC(m))}})})))}),$4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function M4(e,t,n){const r=I4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $4[r]}function DC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function N4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const D4=R4,j4=T4;var F4=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Di=new WeakMap,ju=new WeakMap,Fu={},Lh=0,jC=function(e){return e&&(e.host||jC(e.parentNode))},L4=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=jC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},V4=function(e,t,n,r){var s=L4(t,Array.isArray(e)?e:[e]);Fu[n]||(Fu[n]=new WeakMap);var i=Fu[n],o=[],a=new Set,l=new Set(s),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};s.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else{var p=f.getAttribute(r),v=p!==null&&p!=="false",y=(Di.get(f)||0)+1,b=(i.get(f)||0)+1;Di.set(f,y),i.set(f,b),o.push(f),y===1&&v&&ju.set(f,!0),b===1&&f.setAttribute(n,"true"),v||f.setAttribute(r,"true")}})};return d(t),a.clear(),Lh++,function(){o.forEach(function(c){var f=Di.get(c)-1,p=i.get(c)-1;Di.set(c,f),i.set(c,p),f||(ju.has(c)||c.removeAttribute(r),ju.delete(c)),p||c.removeAttribute(n)}),Lh--,Lh||(Di=new WeakMap,Di=new WeakMap,ju=new WeakMap,Fu={})}},FC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=t||F4(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),V4(r,s,n,"aria-hidden")):function(){return null}},Dm=function(e,t){return Dm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},Dm(e,t)};function tU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Dm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var lr=function(){return lr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},lr.apply(this,arguments)};function LC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function nU(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(c){o(c)}}function l(d){try{u(r.throw(d))}catch(c){o(c)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}function rU(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,s=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],s=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Z1(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function sU(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i}function U4(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function jm(e){return this instanceof jm?(this.v=e,this):new jm(e)}function iU(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),s,i=[];return s={},a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(p){return function(v){return Promise.resolve(v).then(p,c)}}function a(p,v){r[p]&&(s[p]=function(y){return new Promise(function(b,m){i.push([p,y,b,m])>1||l(p,y)})},v&&(s[p]=v(s[p])))}function l(p,v){try{u(r[p](v))}catch(y){f(i[0][3],y)}}function u(p){p.value instanceof jm?Promise.resolve(p.value.v).then(d,c):f(i[0][2],p)}function d(p){l("next",p)}function c(p){l("throw",p)}function f(p,v){p(v),i.shift(),i.length&&l(i[0][0],i[0][1])}}function oU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Z1=="function"?Z1(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(o){return new Promise(function(a,l){o=e[i](o),s(a,l,o.done,o.value)})}}function s(i,o,a,l){Promise.resolve(l).then(function(u){i({value:u,done:a})},o)}}var bc="right-scroll-bar-position",xc="width-before-scroll-bar",z4="with-scroll-bars-hidden",B4="--removed-body-scroll-bar-size";function H4(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function W4(e,t){var n=h.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}function q4(e,t){return W4(t||null,function(n){return e.forEach(function(r){return H4(r,n)})})}function K4(e){return e}function G4(e,t){t===void 0&&(t=K4);var n=[],r=!1,s={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]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function Q4(e){e===void 0&&(e={});var t=G4(null);return t.options=lr({async:!0,ssr:!1},e),t}var VC=function(e){var t=e.sideCar,n=LC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,lr({},n))};VC.isSideCarExport=!0;function Z4(e,t){return e.useMedium(t),VC}var UC=Q4(),Vh=function(){},vf=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:Vh,onWheelCapture:Vh,onTouchMoveCapture:Vh}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,p=e.noIsolation,v=e.inert,y=e.allowPinchZoom,b=e.as,m=b===void 0?"div":b,g=LC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,E=q4([n,t]),C=lr(lr({},g),s);return h.createElement(h.Fragment,null,d&&h.createElement(x,{sideCar:UC,removeScrollBar:u,shards:c,noIsolation:p,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),o?h.cloneElement(h.Children.only(a),lr(lr({},C),{ref:E})):h.createElement(m,lr({},C,{className:l,ref:E}),a))});vf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vf.classNames={fullWidth:xc,zeroRight:bc};var Y1,Y4=function(){if(Y1)return Y1;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function X4(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Y4();return t&&e.setAttribute("nonce",t),e}function J4(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=X4())&&(J4(t,n),eD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nD=function(){var e=tD();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zC=function(){var e=nD(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},rD={left:0,top:0,right:0,gap:0},Uh=function(e){return parseInt(e||"",10)||0},sD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Uh(n),Uh(r),Uh(s)]},iD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rD;var t=sD(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oD=zC(),aD=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(z4,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(s,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(bc,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(xc,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(bc," .").concat(bc,` { + right: 0 `).concat(r,`; + } + + .`).concat(xc," .").concat(xc,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(B4,": ").concat(a,`px; + } +`)},lD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r,i=h.useMemo(function(){return iD(s)},[s]);return h.createElement(oD,{styles:aD(i,!t,s,n?"":"!important")})},Fm=!1;if(typeof window<"u")try{var Lu=Object.defineProperty({},"passive",{get:function(){return Fm=!0,!0}});window.addEventListener("test",Lu,Lu),window.removeEventListener("test",Lu,Lu)}catch{Fm=!1}var ji=Fm?{passive:!1}:!1,uD=function(e){return e.tagName==="TEXTAREA"},BC=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uD(e)&&n[t]==="visible")},cD=function(e){return BC(e,"overflowY")},dD=function(e){return BC(e,"overflowX")},X1=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=HC(e,n);if(r){var s=WC(e,n),i=s[1],o=s[2];if(i>o)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},fD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},HC=function(e,t){return e==="v"?cD(t):dD(t)},WC=function(e,t){return e==="v"?fD(t):hD(t)},pD=function(e,t){return e==="h"&&t==="rtl"?-1:1},mD=function(e,t,n,r,s){var i=pD(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),u=!1,d=o>0,c=0,f=0;do{var p=WC(e,a),v=p[0],y=p[1],b=p[2],m=y-b-i*v;(v||m)&&HC(e,a)&&(c+=m,f+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(s&&c===0||!s&&o>c)||!d&&(s&&f===0||!s&&-o>f))&&(u=!0),u},Vu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},J1=function(e){return[e.deltaX,e.deltaY]},eb=function(e){return e&&"current"in e?e.current:e},gD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vD=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},yD=0,Fi=[];function bD(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(yD++)[0],i=h.useState(function(){return zC()})[0],o=h.useRef(e);h.useEffect(function(){o.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=U4([e.lockRef.current],(e.shards||[]).map(eb),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(y,b){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var m=Vu(y),g=n.current,x="deltaX"in y?y.deltaX:g[0]-m[0],E="deltaY"in y?y.deltaY:g[1]-m[1],C,O=y.target,k=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in y&&k==="h"&&O.type==="range")return!1;var S=X1(k,O);if(!S)return!0;if(S?C=k:(C=k==="v"?"h":"v",S=X1(k,O)),!S)return!1;if(!r.current&&"changedTouches"in y&&(x||E)&&(r.current=C),!C)return!0;var $=r.current||C;return mD($,b,y,$==="h"?x:E,!0)},[]),l=h.useCallback(function(y){var b=y;if(!(!Fi.length||Fi[Fi.length-1]!==i)){var m="deltaY"in b?J1(b):Vu(b),g=t.current.filter(function(C){return C.name===b.type&&C.target===b.target&&gD(C.delta,m)})[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var x=(o.current.shards||[]).map(eb).filter(Boolean).filter(function(C){return C.contains(b.target)}),E=x.length>0?a(b,x[0]):!o.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),u=h.useCallback(function(y,b,m,g){var x={name:y,delta:b,target:m,should:g};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),d=h.useCallback(function(y){n.current=Vu(y),r.current=void 0},[]),c=h.useCallback(function(y){u(y.type,J1(y),y.target,a(y,e.lockRef.current))},[]),f=h.useCallback(function(y){u(y.type,Vu(y),y.target,a(y,e.lockRef.current))},[]);h.useEffect(function(){return Fi.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ji),document.addEventListener("touchmove",l,ji),document.addEventListener("touchstart",d,ji),function(){Fi=Fi.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,ji),document.removeEventListener("touchmove",l,ji),document.removeEventListener("touchstart",d,ji)}},[]);var p=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(i,{styles:vD(s)}):null,p?h.createElement(lD,{gapMode:"margin"}):null)}const xD=Z4(UC,bD);var qC=h.forwardRef(function(e,t){return h.createElement(vf,lr({},e,{ref:t,sideCar:xD}))});qC.classNames=vf.classNames;const KC=qC,Lm=["Enter"," "],wD=["ArrowDown","PageUp","Home"],GC=["ArrowUp","PageDown","End"],ED=[...wD,...GC],SD={ltr:[...Lm,"ArrowRight"],rtl:[...Lm,"ArrowLeft"]},CD={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yf="Menu",[wl,kD,_D]=uC(yf),[Ai,QC]=Pi(yf,[_D,PC,NC]),Kv=PC(),ZC=NC(),[OD,Ti]=Ai(yf),[RD,iu]=Ai(yf),PD=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=e,a=Kv(t),[l,u]=h.useState(null),d=h.useRef(!1),c=yr(i),f=cC(s);return h.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),h.createElement(y4,a,h.createElement(OD,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u},h.createElement(RD,{scope:t,onClose:h.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:f,modal:o},r)))},YC=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Kv(n);return h.createElement(b4,V({},s,r,{ref:t}))}),XC="MenuPortal",[AD,JC]=Ai(XC,{forceMount:void 0}),TD=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,i=Ti(XC,t);return h.createElement(AD,{scope:t,forceMount:n},h.createElement(Gs,{present:n||i.open},h.createElement(IC,{asChild:!0,container:s},r)))},Wn="MenuContent",[$D,Gv]=Ai(Wn),ID=h.forwardRef((e,t)=>{const n=JC(Wn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Ti(Wn,e.__scopeMenu),o=iu(Wn,e.__scopeMenu);return h.createElement(wl.Provider,{scope:e.__scopeMenu},h.createElement(Gs,{present:r||i.open},h.createElement(wl.Slot,{scope:e.__scopeMenu},o.modal?h.createElement(MD,V({},s,{ref:t})):h.createElement(ND,V({},s,{ref:t})))))}),MD=h.forwardRef((e,t)=>{const n=Ti(Wn,e.__scopeMenu),r=h.useRef(null),s=$t(t,r);return h.useEffect(()=>{const i=r.current;if(i)return FC(i)},[]),h.createElement(Qv,V({},e,{ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),ND=h.forwardRef((e,t)=>{const n=Ti(Wn,e.__scopeMenu);return h.createElement(Qv,V({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),Qv=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:f,onDismiss:p,disableOutsideScroll:v,...y}=e,b=Ti(Wn,n),m=iu(Wn,n),g=Kv(n),x=ZC(n),E=kD(n),[C,O]=h.useState(null),k=h.useRef(null),S=$t(t,k,b.onContentChange),$=h.useRef(0),A=h.useRef(""),T=h.useRef(0),P=h.useRef(null),L=h.useRef("right"),I=h.useRef(0),U=v?KC:h.Fragment,z=v?{as:bi,allowPinchZoom:!0}:void 0,X=N=>{var B,Z;const Q=A.current+N,se=E().filter(ke=>!ke.disabled),be=document.activeElement,Ce=(B=se.find(ke=>ke.ref.current===be))===null||B===void 0?void 0:B.textValue,pe=se.map(ke=>ke.textValue),me=YD(pe,Q,Ce),xe=(Z=se.find(ke=>ke.textValue===me))===null||Z===void 0?void 0:Z.ref.current;(function ke(ze){A.current=ze,window.clearTimeout($.current),ze!==""&&($.current=window.setTimeout(()=>ke(""),1e3))})(Q),xe&&setTimeout(()=>xe.focus())};h.useEffect(()=>()=>window.clearTimeout($.current),[]),hC();const D=h.useCallback(N=>{var B,Z;return L.current===((B=P.current)===null||B===void 0?void 0:B.side)&&JD(N,(Z=P.current)===null||Z===void 0?void 0:Z.area)},[]);return h.createElement($D,{scope:n,searchRef:A,onItemEnter:h.useCallback(N=>{D(N)&&N.preventDefault()},[D]),onItemLeave:h.useCallback(N=>{var B;D(N)||((B=k.current)===null||B===void 0||B.focus(),O(null))},[D]),onTriggerLeave:h.useCallback(N=>{D(N)&&N.preventDefault()},[D]),pointerGraceTimerRef:T,onPointerGraceIntentChange:h.useCallback(N=>{P.current=N},[])},h.createElement(U,z,h.createElement(pC,{asChild:!0,trapped:s,onMountAutoFocus:Oe(i,N=>{var B;N.preventDefault(),(B=k.current)===null||B===void 0||B.focus()}),onUnmountAutoFocus:o},h.createElement(dC,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:f,onDismiss:p},h.createElement(D4,V({asChild:!0},x,{dir:m.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:O,onEntryFocus:Oe(l,N=>{m.isUsingKeyboardRef.current||N.preventDefault()})}),h.createElement(x4,V({role:"menu","aria-orientation":"vertical","data-state":sk(b.open),"data-radix-menu-content":"",dir:m.dir},g,y,{ref:S,style:{outline:"none",...y.style},onKeyDown:Oe(y.onKeyDown,N=>{const Z=N.target.closest("[data-radix-menu-content]")===N.currentTarget,Q=N.ctrlKey||N.altKey||N.metaKey,se=N.key.length===1;Z&&(N.key==="Tab"&&N.preventDefault(),!Q&&se&&X(N.key));const be=k.current;if(N.target!==be||!ED.includes(N.key))return;N.preventDefault();const pe=E().filter(me=>!me.disabled).map(me=>me.ref.current);GC.includes(N.key)&&pe.reverse(),QD(pe)}),onBlur:Oe(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout($.current),A.current="")}),onPointerMove:Oe(e.onPointerMove,El(N=>{const B=N.target,Z=I.current!==N.clientX;if(N.currentTarget.contains(B)&&Z){const Q=N.clientX>I.current?"right":"left";L.current=Q,I.current=N.clientX}}))})))))))}),DD=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.createElement(wt.div,V({},r,{ref:t}))}),Vm="MenuItem",tb="menu.itemSelect",Zv=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,i=h.useRef(null),o=iu(Vm,e.__scopeMenu),a=Gv(Vm,e.__scopeMenu),l=$t(t,i),u=h.useRef(!1),d=()=>{const c=i.current;if(!n&&c){const f=new CustomEvent(tb,{bubbles:!0,cancelable:!0});c.addEventListener(tb,p=>r==null?void 0:r(p),{once:!0}),lC(c,f),f.defaultPrevented?u.current=!1:o.onClose()}};return h.createElement(ek,V({},s,{ref:l,disabled:n,onClick:Oe(e.onClick,d),onPointerDown:c=>{var f;(f=e.onPointerDown)===null||f===void 0||f.call(e,c),u.current=!0},onPointerUp:Oe(e.onPointerUp,c=>{var f;u.current||(f=c.currentTarget)===null||f===void 0||f.click()}),onKeyDown:Oe(e.onKeyDown,c=>{const f=a.searchRef.current!=="";n||f&&c.key===" "||Lm.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})}))}),ek=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=e,o=Gv(Vm,n),a=ZC(n),l=h.useRef(null),u=$t(t,l),[d,c]=h.useState(!1),[f,p]=h.useState("");return h.useEffect(()=>{const v=l.current;if(v){var y;p(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),h.createElement(wl.ItemSlot,{scope:n,disabled:r,textValue:s??f},h.createElement(j4,V({asChild:!0},a,{focusable:!r}),h.createElement(wt.div,V({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:u,onPointerMove:Oe(e.onPointerMove,El(v=>{r?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Oe(e.onPointerLeave,El(v=>o.onItemLeave(v))),onFocus:Oe(e.onFocus,()=>c(!0)),onBlur:Oe(e.onBlur,()=>c(!1))}))))}),jD=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return h.createElement(nk,{scope:e.__scopeMenu,checked:n},h.createElement(Zv,V({role:"menuitemcheckbox","aria-checked":pd(n)?"mixed":n},s,{ref:t,"data-state":Yv(n),onSelect:Oe(s.onSelect,()=>r==null?void 0:r(pd(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),FD="MenuRadioGroup",[aU,LD]=Ai(FD,{value:void 0,onValueChange:()=>{}}),VD="MenuRadioItem",UD=h.forwardRef((e,t)=>{const{value:n,...r}=e,s=LD(VD,e.__scopeMenu),i=n===s.value;return h.createElement(nk,{scope:e.__scopeMenu,checked:i},h.createElement(Zv,V({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":Yv(i),onSelect:Oe(r.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})))}),tk="MenuItemIndicator",[nk,zD]=Ai(tk,{checked:!1}),BD=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,i=zD(tk,n);return h.createElement(Gs,{present:r||pd(i.checked)||i.checked===!0},h.createElement(wt.span,V({},s,{ref:t,"data-state":Yv(i.checked)})))}),HD=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.createElement(wt.div,V({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),WD="MenuSub",[lU,rk]=Ai(WD),Uu="MenuSubTrigger",qD=h.forwardRef((e,t)=>{const n=Ti(Uu,e.__scopeMenu),r=iu(Uu,e.__scopeMenu),s=rk(Uu,e.__scopeMenu),i=Gv(Uu,e.__scopeMenu),o=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const c=a.current;return()=>{window.clearTimeout(c),l(null)}},[a,l]),h.createElement(YC,V({asChild:!0},u),h.createElement(ek,V({id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":sk(n.open)},e,{ref:hf(t,s.onTriggerChange),onClick:c=>{var f;(f=e.onClick)===null||f===void 0||f.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,El(c=>{i.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:Oe(e.onPointerLeave,El(c=>{var f;d();const p=(f=n.content)===null||f===void 0?void 0:f.getBoundingClientRect();if(p){var v;const y=(v=n.content)===null||v===void 0?void 0:v.dataset.side,b=y==="right",m=b?-5:5,g=p[b?"left":"right"],x=p[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:c.clientX+m,y:c.clientY},{x:g,y:p.top},{x,y:p.top},{x,y:p.bottom},{x:g,y:p.bottom}],side:y}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(c),c.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,c=>{const f=i.searchRef.current!=="";if(!(e.disabled||f&&c.key===" ")&&SD[r.dir].includes(c.key)){var p;n.onOpenChange(!0),(p=n.content)===null||p===void 0||p.focus(),c.preventDefault()}})})))}),KD="MenuSubContent",GD=h.forwardRef((e,t)=>{const n=JC(Wn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Ti(Wn,e.__scopeMenu),o=iu(Wn,e.__scopeMenu),a=rk(KD,e.__scopeMenu),l=h.useRef(null),u=$t(t,l);return h.createElement(wl.Provider,{scope:e.__scopeMenu},h.createElement(Gs,{present:r||i.open},h.createElement(wl.Slot,{scope:e.__scopeMenu},h.createElement(Qv,V({id:a.contentId,"aria-labelledby":a.triggerId},s,{ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var c;o.isUsingKeyboardRef.current&&((c=l.current)===null||c===void 0||c.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,d=>{d.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:Oe(e.onKeyDown,d=>{const c=d.currentTarget.contains(d.target),f=CD[o.dir].includes(d.key);if(c&&f){var p;i.onOpenChange(!1),(p=a.trigger)===null||p===void 0||p.focus(),d.preventDefault()}})})))))});function sk(e){return e?"open":"closed"}function pd(e){return e==="indeterminate"}function Yv(e){return pd(e)?"indeterminate":e?"checked":"unchecked"}function QD(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ZD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function YD(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=ZD(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function XD(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,d=t[o].y;l>r!=d>r&&n<(u-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function JD(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return XD(n,t)}function El(e){return t=>t.pointerType==="mouse"?e(t):void 0}const e6=PD,t6=YC,n6=TD,r6=ID,s6=DD,i6=Zv,o6=jD,a6=UD,l6=BD,u6=HD,c6=qD,d6=GD,ik="DropdownMenu",[f6,uU]=Pi(ik,[QC]),Tn=QC(),[h6,ok]=f6(ik),p6=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=Tn(t),u=h.useRef(null),[d=!1,c]=pf({prop:s,defaultProp:i,onChange:o});return h.createElement(h6,{scope:t,triggerId:mo(),triggerRef:u,contentId:mo(),open:d,onOpenChange:c,onOpenToggle:h.useCallback(()=>c(f=>!f),[c]),modal:a},h.createElement(e6,V({},l,{open:d,onOpenChange:c,dir:r,modal:a}),n))},m6="DropdownMenuTrigger",g6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,i=ok(m6,n),o=Tn(n);return h.createElement(t6,V({asChild:!0},o),h.createElement(wt.button,V({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},s,{ref:hf(t,i.triggerRef),onPointerDown:Oe(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:Oe(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})))}),v6=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tn(t);return h.createElement(n6,V({},r,n))},y6="DropdownMenuContent",b6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ok(y6,n),i=Tn(n),o=h.useRef(!1);return h.createElement(r6,V({id:s.contentId,"aria-labelledby":s.triggerId},i,r,{ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,a=>{var l;o.current||(l=s.triggerRef.current)===null||l===void 0||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!s.modal||d)&&(o.current=!0)}),style:{...e.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)"}}))}),x6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(s6,V({},s,r,{ref:t}))}),w6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(i6,V({},s,r,{ref:t}))}),E6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(o6,V({},s,r,{ref:t}))}),S6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(a6,V({},s,r,{ref:t}))}),C6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(l6,V({},s,r,{ref:t}))}),k6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(u6,V({},s,r,{ref:t}))}),_6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(c6,V({},s,r,{ref:t}))}),O6=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return h.createElement(d6,V({},s,r,{ref:t,style:{...e.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)"}}))}),R6=p6,P6=g6,A6=v6,ak=b6,lk=x6,uk=w6,ck=E6,dk=S6,fk=C6,hk=k6,pk=_6,mk=O6,Xv=R6,Jv=P6,T6=h.forwardRef(({className:e,inset:t,children:n,...r},s)=>w.jsxs(pk,{ref:s,className:ye("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,w.jsx(dM,{className:"ml-auto h-4 w-4"})]}));T6.displayName=pk.displayName;const $6=h.forwardRef(({className:e,...t},n)=>w.jsx(mk,{ref:n,className:ye("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));$6.displayName=mk.displayName;const bf=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(A6,{children:w.jsx(ak,{ref:r,sideOffset:t,className:ye("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));bf.displayName=ak.displayName;const Fr=h.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(uk,{ref:r,className:ye("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Fr.displayName=uk.displayName;const I6=h.forwardRef(({className:e,children:t,checked:n,...r},s)=>w.jsxs(ck,{ref:s,className:ye("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(fk,{children:w.jsx(Dv,{className:"h-4 w-4"})})}),t]}));I6.displayName=ck.displayName;const M6=h.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(dk,{ref:r,className:ye("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(fk,{children:w.jsx(fM,{className:"h-2 w-2 fill-current"})})}),t]}));M6.displayName=dk.displayName;const N6=h.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(lk,{ref:r,className:ye("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));N6.displayName=lk.displayName;const D6=h.forwardRef(({className:e,...t},n)=>w.jsx(hk,{ref:n,className:ye("-mx-1 my-1 h-px bg-muted",e),...t}));D6.displayName=hk.displayName;function ey({size:e=25,...t}){return w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",width:e,height:e,...t,viewBox:"0 0 24 24",children:w.jsx("path",{d:"M19.73,16.663A3.467,3.467,0,0,0,20.5,14.5a3.5,3.5,0,0,0-7,0,3.467,3.467,0,0,0,.77,2.163A6.04,6.04,0,0,0,12,18.69a6.04,6.04,0,0,0-2.27-2.027A3.467,3.467,0,0,0,10.5,14.5a3.5,3.5,0,0,0-7,0,3.467,3.467,0,0,0,.77,2.163A6,6,0,0,0,1,22a1,1,0,0,0,1,1H22a1,1,0,0,0,1-1A6,6,0,0,0,19.73,16.663ZM7,13a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,7,13ZM3.126,21a4,4,0,0,1,7.748,0ZM17,13a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,17,13Zm-3.874,8a4,4,0,0,1,7.748,0ZM6,2V8A1,1,0,0,0,7,9H9.865l1.367,1.641a1,1,0,0,0,1.536,0L14.135,9H17a1,1,0,0,0,1-1V2a1,1,0,0,0-1-1H7A1,1,0,0,0,6,2ZM8,3h8V7H13.667a1,1,0,0,0-.769.359L12,8.438l-.9-1.079A1,1,0,0,0,10.333,7H8Z"})})}var ou=e=>e.type==="checkbox",io=e=>e instanceof Date,Bt=e=>e==null;const gk=e=>typeof e=="object";var xt=e=>!Bt(e)&&!Array.isArray(e)&&gk(e)&&!io(e),j6=e=>xt(e)&&e.target?ou(e.target)?e.target.checked:e.target.value:e,F6=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,L6=(e,t)=>e.has(F6(t)),V6=e=>{const t=e.constructor&&e.constructor.prototype;return xt(t)&&t.hasOwnProperty("isPrototypeOf")},ty=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Or(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ty&&(e instanceof Blob||e instanceof FileList))&&(n||xt(e)))if(t=n?[]:{},!n&&!V6(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Or(e[r]));else return e;return t}var au=e=>Array.isArray(e)?e.filter(Boolean):[],at=e=>e===void 0,re=(e,t,n)=>{if(!t||!xt(e))return n;const r=au(t.split(/[,[\].]+?/)).reduce((s,i)=>Bt(s)?s:s[i],e);return at(r)||r===e?at(e[t])?n:e[t]:r},Ar=e=>typeof e=="boolean";const nb={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Un={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},kr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};G.createContext(null);var U6=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==Un.all&&(t._proxyFormState[o]=!r||Un.all),n&&(n[o]=!0),e[o]}});return s},En=e=>xt(e)&&!Object.keys(e).length,z6=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return En(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||Un.all))},zh=e=>Array.isArray(e)?e:[e];function B6(e){const t=G.useRef(e);t.current=e,G.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var dr=e=>typeof e=="string",H6=(e,t,n,r,s)=>dr(e)?(r&&t.watch.add(e),re(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),re(n,i))):(r&&(t.watchAll=!0),n),ny=e=>/^\w*$/.test(e),vk=e=>au(e.replace(/["|']|\]/g,"").split(/\.|\[/)),He=(e,t,n)=>{let r=-1;const s=ny(t)?[t]:vk(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const u=e[a];l=xt(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}e[a]=l,e=e[a]}return e},yk=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},rb=e=>({isOnSubmit:!e||e===Un.onSubmit,isOnBlur:e===Un.onBlur,isOnChange:e===Un.onChange,isOnAll:e===Un.all,isOnTouch:e===Un.onTouched}),sb=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ga=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=re(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)break;if(o.ref&&t(o.ref,o.name)&&!r)break;Ga(a,t)}else xt(a)&&Ga(a,t)}}};var W6=(e,t,n)=>{const r=au(re(e,n));return He(r,"root",t[n]),He(e,n,r),e},ry=e=>e.type==="file",Cs=e=>typeof e=="function",md=e=>{if(!ty)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},wc=e=>dr(e),sy=e=>e.type==="radio",gd=e=>e instanceof RegExp;const ib={value:!1,isValid:!1},ob={value:!0,isValid:!0};var bk=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!at(e[0].attributes.value)?at(e[0].value)||e[0].value===""?ob:{value:e[0].value,isValid:!0}:ob:ib}return ib};const ab={isValid:!1,value:null};var xk=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ab):ab;function lb(e,t,n="validate"){if(wc(e)||Array.isArray(e)&&e.every(wc)||Ar(e)&&!e)return{type:n,message:wc(e)?e:"",ref:t}}var Li=e=>xt(e)&&!gd(e)?e:{value:e,message:""},ub=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:u,min:d,max:c,pattern:f,validate:p,name:v,valueAsNumber:y,mount:b,disabled:m}=e._f,g=re(t,v);if(!b||m)return{};const x=o?o[0]:i,E=P=>{r&&x.reportValidity&&(x.setCustomValidity(Ar(P)?"":P||""),x.reportValidity())},C={},O=sy(i),k=ou(i),S=O||k,$=(y||ry(i))&&at(i.value)&&at(g)||md(i)&&i.value===""||g===""||Array.isArray(g)&&!g.length,A=yk.bind(null,v,n,C),T=(P,L,I,U=kr.maxLength,z=kr.minLength)=>{const X=P?L:I;C[v]={type:P?U:z,message:X,ref:i,...A(P?U:z,X)}};if(s?!Array.isArray(g)||!g.length:a&&(!S&&($||Bt(g))||Ar(g)&&!g||k&&!bk(o).isValid||O&&!xk(o).isValid)){const{value:P,message:L}=wc(a)?{value:!!a,message:a}:Li(a);if(P&&(C[v]={type:kr.required,message:L,ref:x,...A(kr.required,L)},!n))return E(L),C}if(!$&&(!Bt(d)||!Bt(c))){let P,L;const I=Li(c),U=Li(d);if(!Bt(g)&&!isNaN(g)){const z=i.valueAsNumber||g&&+g;Bt(I.value)||(P=z>I.value),Bt(U.value)||(L=z<U.value)}else{const z=i.valueAsDate||new Date(g),X=B=>new Date(new Date().toDateString()+" "+B),D=i.type=="time",N=i.type=="week";dr(I.value)&&g&&(P=D?X(g)>X(I.value):N?g>I.value:z>new Date(I.value)),dr(U.value)&&g&&(L=D?X(g)<X(U.value):N?g<U.value:z<new Date(U.value))}if((P||L)&&(T(!!P,I.message,U.message,kr.max,kr.min),!n))return E(C[v].message),C}if((l||u)&&!$&&(dr(g)||s&&Array.isArray(g))){const P=Li(l),L=Li(u),I=!Bt(P.value)&&g.length>+P.value,U=!Bt(L.value)&&g.length<+L.value;if((I||U)&&(T(I,P.message,L.message),!n))return E(C[v].message),C}if(f&&!$&&dr(g)){const{value:P,message:L}=Li(f);if(gd(P)&&!g.match(P)&&(C[v]={type:kr.pattern,message:L,ref:i,...A(kr.pattern,L)},!n))return E(L),C}if(p){if(Cs(p)){const P=await p(g,t),L=lb(P,x);if(L&&(C[v]={...L,...A(kr.validate,L.message)},!n))return E(L.message),C}else if(xt(p)){let P={};for(const L in p){if(!En(P)&&!n)break;const I=lb(await p[L](g,t),x,L);I&&(P={...I,...A(L,I.message)},E(I.message),n&&(C[v]=P))}if(!En(P)&&(C[v]={ref:x,...P},!n))return C}}return E(!0),C};function q6(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=at(e)?r++:e[t[r++]];return e}function K6(e){for(const t in e)if(e.hasOwnProperty(t)&&!at(e[t]))return!1;return!0}function Ot(e,t){const n=Array.isArray(t)?t:ny(t)?[t]:vk(t),r=n.length===1?e:q6(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(xt(r)&&En(r)||Array.isArray(r)&&K6(r))&&Ot(e,n.slice(0,-1)),e}var Bh=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},vd=e=>Bt(e)||!gk(e);function ni(e,t){if(vd(e)||vd(t))return e===t;if(io(e)&&io(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(io(i)&&io(o)||xt(i)&&xt(o)||Array.isArray(i)&&Array.isArray(o)?!ni(i,o):i!==o)return!1}}return!0}var wk=e=>e.type==="select-multiple",G6=e=>sy(e)||ou(e),Hh=e=>md(e)&&e.isConnected,Ek=e=>{for(const t in e)if(Cs(e[t]))return!0;return!1};function yd(e,t={}){const n=Array.isArray(e);if(xt(e)||n)for(const r in e)Array.isArray(e[r])||xt(e[r])&&!Ek(e[r])?(t[r]=Array.isArray(e[r])?[]:{},yd(e[r],t[r])):Bt(e[r])||(t[r]=!0);return t}function Sk(e,t,n){const r=Array.isArray(e);if(xt(e)||r)for(const s in e)Array.isArray(e[s])||xt(e[s])&&!Ek(e[s])?at(t)||vd(n[s])?n[s]=Array.isArray(e[s])?yd(e[s],[]):{...yd(e[s])}:Sk(e[s],Bt(t)?{}:t[s],n[s]):n[s]=!ni(e[s],t[s]);return n}var Wh=(e,t)=>Sk(e,t,yd(t)),Ck=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>at(e)?e:t?e===""?NaN:e&&+e:n&&dr(e)?new Date(e):r?r(e):e;function qh(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return ry(t)?t.files:sy(t)?xk(e.refs).value:wk(t)?[...t.selectedOptions].map(({value:n})=>n):ou(t)?bk(e.refs).value:Ck(at(t.value)?e.ref.value:t.value,e)}var Q6=(e,t,n,r)=>{const s={};for(const i of e){const o=re(t,i);o&&He(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},ka=e=>at(e)?e:gd(e)?e.source:xt(e)?gd(e.value)?e.value.source:e.value:e,Z6=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function cb(e,t,n){const r=re(e,n);if(r||ny(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=re(t,i),a=re(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var Y6=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,X6=(e,t)=>!au(re(e,t)).length&&Ot(e,t);const J6={mode:Un.onSubmit,reValidateMode:Un.onChange,shouldFocusError:!0};function e5(e={},t){let n={...J6,...e},r={submitCount:0,isDirty:!1,isLoading:Cs(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:n.errors||{},disabled:!1},s={},i=xt(n.defaultValues)||xt(n.values)?Or(n.defaultValues||n.values)||{}:{},o=n.shouldUnregister?{}:Or(i),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Bh(),array:Bh(),state:Bh()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,v=rb(n.mode),y=rb(n.reValidateMode),b=n.criteriaMode===Un.all,m=_=>M=>{clearTimeout(d),d=setTimeout(_,M)},g=async _=>{if(c.isValid||_){const M=n.resolver?En((await A()).errors):await P(s,!0);M!==r.isValid&&f.state.next({isValid:M})}},x=_=>c.isValidating&&f.state.next({isValidating:_}),E=(_,M=[],j,J,q=!0,H=!0)=>{if(J&&j){if(a.action=!0,H&&Array.isArray(re(s,_))){const ue=j(re(s,_),J.argA,J.argB);q&&He(s,_,ue)}if(H&&Array.isArray(re(r.errors,_))){const ue=j(re(r.errors,_),J.argA,J.argB);q&&He(r.errors,_,ue),X6(r.errors,_)}if(c.touchedFields&&H&&Array.isArray(re(r.touchedFields,_))){const ue=j(re(r.touchedFields,_),J.argA,J.argB);q&&He(r.touchedFields,_,ue)}c.dirtyFields&&(r.dirtyFields=Wh(i,o)),f.state.next({name:_,isDirty:I(_,M),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else He(o,_,M)},C=(_,M)=>{He(r.errors,_,M),f.state.next({errors:r.errors})},O=_=>{r.errors=_,f.state.next({errors:r.errors,isValid:!1})},k=(_,M,j,J)=>{const q=re(s,_);if(q){const H=re(o,_,at(j)?re(i,_):j);at(H)||J&&J.defaultChecked||M?He(o,_,M?H:qh(q._f)):X(_,H),a.mount&&g()}},S=(_,M,j,J,q)=>{let H=!1,ue=!1;const Be={name:_},nt=!!(re(s,_)&&re(s,_)._f.disabled);if(!j||J){c.isDirty&&(ue=r.isDirty,r.isDirty=Be.isDirty=I(),H=ue!==Be.isDirty);const Zn=nt||ni(re(i,_),M);ue=!!(!nt&&re(r.dirtyFields,_)),Zn||nt?Ot(r.dirtyFields,_):He(r.dirtyFields,_,!0),Be.dirtyFields=r.dirtyFields,H=H||c.dirtyFields&&ue!==!Zn}if(j){const Zn=re(r.touchedFields,_);Zn||(He(r.touchedFields,_,j),Be.touchedFields=r.touchedFields,H=H||c.touchedFields&&Zn!==j)}return H&&q&&f.state.next(Be),H?Be:{}},$=(_,M,j,J)=>{const q=re(r.errors,_),H=c.isValid&&Ar(M)&&r.isValid!==M;if(e.delayError&&j?(u=m(()=>C(_,j)),u(e.delayError)):(clearTimeout(d),u=null,j?He(r.errors,_,j):Ot(r.errors,_)),(j?!ni(q,j):q)||!En(J)||H){const ue={...J,...H&&Ar(M)?{isValid:M}:{},errors:r.errors,name:_};r={...r,...ue},f.state.next(ue)}x(!1)},A=async _=>n.resolver(o,n.context,Q6(_||l.mount,s,n.criteriaMode,n.shouldUseNativeValidation)),T=async _=>{const{errors:M}=await A(_);if(_)for(const j of _){const J=re(M,j);J?He(r.errors,j,J):Ot(r.errors,j)}else r.errors=M;return M},P=async(_,M,j={valid:!0})=>{for(const J in _){const q=_[J];if(q){const{_f:H,...ue}=q;if(H){const Be=l.array.has(H.name),nt=await ub(q,o,b,n.shouldUseNativeValidation&&!M,Be);if(nt[H.name]&&(j.valid=!1,M))break;!M&&(re(nt,H.name)?Be?W6(r.errors,nt,H.name):He(r.errors,H.name,nt[H.name]):Ot(r.errors,H.name))}ue&&await P(ue,M,j)}}return j.valid},L=()=>{for(const _ of l.unMount){const M=re(s,_);M&&(M._f.refs?M._f.refs.every(j=>!Hh(j)):!Hh(M._f.ref))&&xe(_)}l.unMount=new Set},I=(_,M)=>(_&&M&&He(o,_,M),!ni(se(),i)),U=(_,M,j)=>H6(_,l,{...a.mount?o:at(M)?i:dr(_)?{[_]:M}:M},j,M),z=_=>au(re(a.mount?o:i,_,e.shouldUnregister?re(i,_,[]):[])),X=(_,M,j={})=>{const J=re(s,_);let q=M;if(J){const H=J._f;H&&(!H.disabled&&He(o,_,Ck(M,H)),q=md(H.ref)&&Bt(M)?"":M,wk(H.ref)?[...H.ref.options].forEach(ue=>ue.selected=q.includes(ue.value)):H.refs?ou(H.ref)?H.refs.length>1?H.refs.forEach(ue=>(!ue.defaultChecked||!ue.disabled)&&(ue.checked=Array.isArray(q)?!!q.find(Be=>Be===ue.value):q===ue.value)):H.refs[0]&&(H.refs[0].checked=!!q):H.refs.forEach(ue=>ue.checked=ue.value===q):ry(H.ref)?H.ref.value="":(H.ref.value=q,H.ref.type||f.values.next({name:_,values:{...o}})))}(j.shouldDirty||j.shouldTouch)&&S(_,q,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&Q(_)},D=(_,M,j)=>{for(const J in M){const q=M[J],H=`${_}.${J}`,ue=re(s,H);(l.array.has(_)||!vd(q)||ue&&!ue._f)&&!io(q)?D(H,q,j):X(H,q,j)}},N=(_,M,j={})=>{const J=re(s,_),q=l.array.has(_),H=Or(M);He(o,_,H),q?(f.array.next({name:_,values:{...o}}),(c.isDirty||c.dirtyFields)&&j.shouldDirty&&f.state.next({name:_,dirtyFields:Wh(i,o),isDirty:I(_,H)})):J&&!J._f&&!Bt(H)?D(_,H,j):X(_,H,j),sb(_,l)&&f.state.next({...r}),f.values.next({name:_,values:{...o}}),!a.mount&&t()},B=async _=>{const M=_.target;let j=M.name,J=!0;const q=re(s,j),H=()=>M.type?qh(q._f):j6(_),ue=Be=>{J=Number.isNaN(Be)||Be===re(o,j,Be)};if(q){let Be,nt;const Zn=H(),Ii=_.type===nb.BLUR||_.type===nb.FOCUS_OUT,o_=!Z6(q._f)&&!n.resolver&&!re(r.errors,j)&&!q._f.deps||Y6(Ii,re(r.touchedFields,j),r.isSubmitted,y,v),qf=sb(j,l,Ii);He(o,j,Zn),Ii?(q._f.onBlur&&q._f.onBlur(_),u&&u(0)):q._f.onChange&&q._f.onChange(_);const Kf=S(j,Zn,Ii,!1),a_=!En(Kf)||qf;if(!Ii&&f.values.next({name:j,type:_.type,values:{...o}}),o_)return c.isValid&&g(),a_&&f.state.next({name:j,...qf?{}:Kf});if(!Ii&&qf&&f.state.next({...r}),x(!0),n.resolver){const{errors:Iy}=await A([j]);if(ue(Zn),J){const l_=cb(r.errors,s,j),My=cb(Iy,s,l_.name||j);Be=My.error,j=My.name,nt=En(Iy)}}else Be=(await ub(q,o,b,n.shouldUseNativeValidation))[j],ue(Zn),J&&(Be?nt=!1:c.isValid&&(nt=await P(s,!0)));J&&(q._f.deps&&Q(q._f.deps),$(j,nt,Be,Kf))}},Z=(_,M)=>{if(re(r.errors,M)&&_.focus)return _.focus(),1},Q=async(_,M={})=>{let j,J;const q=zh(_);if(x(!0),n.resolver){const H=await T(at(_)?_:q);j=En(H),J=_?!q.some(ue=>re(H,ue)):j}else _?(J=(await Promise.all(q.map(async H=>{const ue=re(s,H);return await P(ue&&ue._f?{[H]:ue}:ue)}))).every(Boolean),!(!J&&!r.isValid)&&g()):J=j=await P(s);return f.state.next({...!dr(_)||c.isValid&&j!==r.isValid?{}:{name:_},...n.resolver||!_?{isValid:j}:{},errors:r.errors,isValidating:!1}),M.shouldFocus&&!J&&Ga(s,Z,_?q:l.mount),J},se=_=>{const M={...i,...a.mount?o:{}};return at(_)?M:dr(_)?re(M,_):_.map(j=>re(M,j))},be=(_,M)=>({invalid:!!re((M||r).errors,_),isDirty:!!re((M||r).dirtyFields,_),isTouched:!!re((M||r).touchedFields,_),error:re((M||r).errors,_)}),Ce=_=>{_&&zh(_).forEach(M=>Ot(r.errors,M)),f.state.next({errors:_?r.errors:{}})},pe=(_,M,j)=>{const J=(re(s,_,{_f:{}})._f||{}).ref;He(r.errors,_,{...M,ref:J}),f.state.next({name:_,errors:r.errors,isValid:!1}),j&&j.shouldFocus&&J&&J.focus&&J.focus()},me=(_,M)=>Cs(_)?f.values.subscribe({next:j=>_(U(void 0,M),j)}):U(_,M,!0),xe=(_,M={})=>{for(const j of _?zh(_):l.mount)l.mount.delete(j),l.array.delete(j),M.keepValue||(Ot(s,j),Ot(o,j)),!M.keepError&&Ot(r.errors,j),!M.keepDirty&&Ot(r.dirtyFields,j),!M.keepTouched&&Ot(r.touchedFields,j),!n.shouldUnregister&&!M.keepDefaultValue&&Ot(i,j);f.values.next({values:{...o}}),f.state.next({...r,...M.keepDirty?{isDirty:I()}:{}}),!M.keepIsValid&&g()},ke=({disabled:_,name:M,field:j,fields:J,value:q})=>{if(Ar(_)){const H=_?void 0:at(q)?qh(j?j._f:re(J,M)._f):q;He(o,M,H),S(M,H,!1,!1,!0)}},ze=(_,M={})=>{let j=re(s,_);const J=Ar(M.disabled);return He(s,_,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:_}},name:_,mount:!0,...M}}),l.mount.add(_),j?ke({field:j,disabled:M.disabled,name:_,value:M.value}):k(_,!0,M.value),{...J?{disabled:M.disabled}:{},...n.progressive?{required:!!M.required,min:ka(M.min),max:ka(M.max),minLength:ka(M.minLength),maxLength:ka(M.maxLength),pattern:ka(M.pattern)}:{},name:_,onChange:B,onBlur:B,ref:q=>{if(q){ze(_,M),j=re(s,_);const H=at(q.value)&&q.querySelectorAll&&q.querySelectorAll("input,select,textarea")[0]||q,ue=G6(H),Be=j._f.refs||[];if(ue?Be.find(nt=>nt===H):H===j._f.ref)return;He(s,_,{_f:{...j._f,...ue?{refs:[...Be.filter(Hh),H,...Array.isArray(re(i,_))?[{}]:[]],ref:{type:H.type,name:_}}:{ref:H}}}),k(_,!1,void 0,H)}else j=re(s,_,{}),j._f&&(j._f.mount=!1),(n.shouldUnregister||M.shouldUnregister)&&!(L6(l.array,_)&&a.action)&&l.unMount.add(_)}}},tt=()=>n.shouldFocusError&&Ga(s,Z,l.mount),we=_=>{Ar(_)&&(f.state.next({disabled:_}),Ga(s,(M,j)=>{let J=_;const q=re(s,j);q&&Ar(q._f.disabled)&&(J||(J=q._f.disabled)),M.disabled=J},0,!1))},ae=(_,M)=>async j=>{j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let J=Or(o);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:q,values:H}=await A();r.errors=q,J=H}else await P(s);Ot(r.errors,"root"),En(r.errors)?(f.state.next({errors:{}}),await _(J,j)):(M&&await M({...r.errors},j),tt(),setTimeout(tt)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:En(r.errors),submitCount:r.submitCount+1,errors:r.errors})},fe=(_,M={})=>{re(s,_)&&(at(M.defaultValue)?N(_,re(i,_)):(N(_,M.defaultValue),He(i,_,M.defaultValue)),M.keepTouched||Ot(r.touchedFields,_),M.keepDirty||(Ot(r.dirtyFields,_),r.isDirty=M.defaultValue?I(_,re(i,_)):I()),M.keepError||(Ot(r.errors,_),c.isValid&&g()),f.state.next({...r}))},ve=(_,M={})=>{const j=_?Or(_):i,J=Or(j),q=_&&!En(_)?J:i;if(M.keepDefaultValues||(i=j),!M.keepValues){if(M.keepDirtyValues||p)for(const H of l.mount)re(r.dirtyFields,H)?He(q,H,re(o,H)):N(H,re(q,H));else{if(ty&&at(_))for(const H of l.mount){const ue=re(s,H);if(ue&&ue._f){const Be=Array.isArray(ue._f.refs)?ue._f.refs[0]:ue._f.ref;if(md(Be)){const nt=Be.closest("form");if(nt){nt.reset();break}}}}s={}}o=e.shouldUnregister?M.keepDefaultValues?Or(i):{}:Or(q),f.array.next({values:{...q}}),f.values.next({values:{...q}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!M.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:M.keepSubmitCount?r.submitCount:0,isDirty:M.keepDirty?r.isDirty:!!(M.keepDefaultValues&&!ni(_,i)),isSubmitted:M.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M.keepDirtyValues?r.dirtyFields:M.keepDefaultValues&&_?Wh(i,_):{},touchedFields:M.keepTouched?r.touchedFields:{},errors:M.keepErrors?r.errors:{},isSubmitSuccessful:M.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},qe=(_,M)=>ve(Cs(_)?_(o):_,M);return{control:{register:ze,unregister:xe,getFieldState:be,handleSubmit:ae,setError:pe,_executeSchema:A,_getWatch:U,_getDirty:I,_updateValid:g,_removeUnmounted:L,_updateFieldArray:E,_updateDisabledField:ke,_getFieldArray:z,_reset:ve,_resetDefaultValues:()=>Cs(n.defaultValues)&&n.defaultValues().then(_=>{qe(_,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:_=>{r={...r,..._}},_disableForm:we,_subjects:f,_proxyFormState:c,_setErrors:O,get _fields(){return s},get _formValues(){return o},get _state(){return a},set _state(_){a=_},get _defaultValues(){return i},get _names(){return l},set _names(_){l=_},get _formState(){return r},set _formState(_){r=_},get _options(){return n},set _options(_){n={...n,..._}}},trigger:Q,register:ze,handleSubmit:ae,watch:me,setValue:N,getValues:se,reset:qe,resetField:fe,clearErrors:Ce,unregister:xe,setError:pe,setFocus:(_,M={})=>{const j=re(s,_),J=j&&j._f;if(J){const q=J.refs?J.refs[0]:J.ref;q.focus&&(q.focus(),M.shouldSelect&&q.select())}},getFieldState:be}}function t5(e={}){const t=G.useRef(),n=G.useRef(),[r,s]=G.useState({isDirty:!1,isValidating:!1,isLoading:Cs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:!1,defaultValues:Cs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e5(e,()=>s(o=>({...o}))),formState:r});const i=t.current.control;return i._options=e,B6({subject:i._subjects.state,next:o=>{z6(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),G.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),G.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),G.useEffect(()=>{e.values&&!ni(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),G.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),G.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=U6(r,i),t.current}const kk="Dialog",[_k,cU]=Pi(kk),[n5,Qn]=_k(kk),r5=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=h.useRef(null),l=h.useRef(null),[u=!1,d]=pf({prop:r,defaultProp:s,onChange:i});return h.createElement(n5,{scope:t,triggerRef:a,contentRef:l,contentId:mo(),titleId:mo(),descriptionId:mo(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(c=>!c),[d]),modal:o},n)},s5="DialogTrigger",i5=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qn(s5,n),i=$t(t,s.triggerRef);return h.createElement(wt.button,V({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":iy(s.open)},r,{ref:i,onClick:Oe(e.onClick,s.onOpenToggle)}))}),Ok="DialogPortal",[o5,Rk]=_k(Ok,{forceMount:void 0}),a5=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=Qn(Ok,t);return h.createElement(o5,{scope:t,forceMount:n},h.Children.map(r,o=>h.createElement(Gs,{present:n||i.open},h.createElement(IC,{asChild:!0,container:s},o))))},Um="DialogOverlay",l5=h.forwardRef((e,t)=>{const n=Rk(Um,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Qn(Um,e.__scopeDialog);return i.modal?h.createElement(Gs,{present:r||i.open},h.createElement(u5,V({},s,{ref:t}))):null}),u5=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qn(Um,n);return h.createElement(KC,{as:bi,allowPinchZoom:!0,shards:[s.contentRef]},h.createElement(wt.div,V({"data-state":iy(s.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Sl="DialogContent",c5=h.forwardRef((e,t)=>{const n=Rk(Sl,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Qn(Sl,e.__scopeDialog);return h.createElement(Gs,{present:r||i.open},i.modal?h.createElement(d5,V({},s,{ref:t})):h.createElement(f5,V({},s,{ref:t})))}),d5=h.forwardRef((e,t)=>{const n=Qn(Sl,e.__scopeDialog),r=h.useRef(null),s=$t(t,n.contentRef,r);return h.useEffect(()=>{const i=r.current;if(i)return FC(i)},[]),h.createElement(Pk,V({},e,{ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,i=>i.preventDefault())}))}),f5=h.forwardRef((e,t)=>{const n=Qn(Sl,e.__scopeDialog),r=h.useRef(!1),s=h.useRef(!1);return h.createElement(Pk,V({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),Pk=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Qn(Sl,n),l=h.useRef(null),u=$t(t,l);return hC(),h.createElement(h.Fragment,null,h.createElement(pC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i},h.createElement(dC,V({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":iy(a.open)},o,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),h5="DialogTitle",p5=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qn(h5,n);return h.createElement(wt.h2,V({id:s.titleId},r,{ref:t}))}),m5="DialogDescription",g5=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qn(m5,n);return h.createElement(wt.p,V({id:s.descriptionId},r,{ref:t}))}),v5="DialogClose",y5=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Qn(v5,n);return h.createElement(wt.button,V({type:"button"},r,{ref:t,onClick:Oe(e.onClick,()=>s.onOpenChange(!1))}))});function iy(e){return e?"open":"closed"}const Ak=r5,b5=i5,Tk=a5,xf=l5,wf=c5,Ef=p5,Sf=g5,oy=y5,ay=Ak,dU=b5,x5=Tk,fU=oy,$k=h.forwardRef(({className:e,...t},n)=>w.jsx(xf,{ref:n,className:ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));$k.displayName=xf.displayName;const Cf=h.forwardRef(({className:e,children:t,disableClose:n,...r},s)=>w.jsxs(x5,{children:[w.jsx($k,{}),w.jsxs(wf,{ref:s,className:ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,w.jsxs(oy,{disabled:n,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:[w.jsx(Fv,{className:"h-4 w-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Cf.displayName=wf.displayName;const kf=({className:e,...t})=>w.jsx("div",{className:ye("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});kf.displayName="DialogHeader";const Ik=({className:e,...t})=>w.jsx("div",{className:ye("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ik.displayName="DialogFooter";const Mk=h.forwardRef(({className:e,...t},n)=>w.jsx(Ef,{ref:n,className:ye("text-lg font-semibold leading-none tracking-tight",e),...t}));Mk.displayName=Ef.displayName;const Nk=h.forwardRef(({className:e,...t},n)=>w.jsx(Sf,{ref:n,className:ye("text-sm text-muted-foreground",e),...t}));Nk.displayName=Sf.displayName;function w5({label:e,id:t,type:n,required:r,register:s,errors:i,disabled:o,className:a}){return w.jsxs("div",{children:[w.jsx("label",{htmlFor:t,className:"block font-medium leading-6 text-gray-900 dark:text-gray-100",children:e}),w.jsx("div",{className:"mt-2",children:w.jsx("input",{id:t,type:n,autoComplete:t,disabled:o,...s(t,{required:r}),className:ye("block w-full rounded-md border-0 py-1.5 px-3 text-gray-900 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand-p2 sm:text-sm sm:leading-6 bg-input",i[t]&&"focus:ring-rose-500",o&&"opacity-50 cursor-default",a)})})]})}function E5({label:e,id:t,required:n,register:r,errors:s,disabled:i,height:o=10,width:a=10,resize:l=!1,className:u}){return w.jsxs("div",{children:[w.jsx("label",{htmlFor:t,className:"block font-medium leading-6 text-gray-900 dark:text-gray-100",children:e}),w.jsx("div",{className:"mt-2",children:w.jsx("textarea",{id:t,autoComplete:t,cols:o,rows:a,disabled:i,...r(t,{required:n}),className:ye("block w-full px-3 resize-none rounded-md border-0 py-1.5 text-gray-900 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand-p2 sm:text-sm sm:leading-6 bg-input",s[t]&&"focus:ring-rose-500",i&&"opacity-50 cursor-default",l&&"resize",u)})})]})}function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(e)}function S5(e,t){if(wi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(wi(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dk(e){var t=S5(e,"string");return wi(t)=="symbol"?t:String(t)}function Ma(e,t,n){return t=Dk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function db(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?db(Object(n),!0).forEach(function(r){Ma(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):db(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C5(e){if(Array.isArray(e))return e}function k5(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,i,o,a=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){u=!0,s=d}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw s}}return a}}function zm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jk(e,t){if(e){if(typeof e=="string")return zm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zm(e,t)}}function _5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lr(e,t){return C5(e)||k5(e,t)||jk(e,t)||_5()}function O5(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Jr(e,t){if(e==null)return{};var n=O5(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var R5=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function P5(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,s=r===void 0?!1:r,i=e.defaultValue,o=i===void 0?null:i,a=e.inputValue,l=e.menuIsOpen,u=e.onChange,d=e.onInputChange,c=e.onMenuClose,f=e.onMenuOpen,p=e.value,v=Jr(e,R5),y=h.useState(a!==void 0?a:n),b=Lr(y,2),m=b[0],g=b[1],x=h.useState(l!==void 0?l:s),E=Lr(x,2),C=E[0],O=E[1],k=h.useState(p!==void 0?p:o),S=Lr(k,2),$=S[0],A=S[1],T=h.useCallback(function(D,N){typeof u=="function"&&u(D,N),A(D)},[u]),P=h.useCallback(function(D,N){var B;typeof d=="function"&&(B=d(D,N)),g(B!==void 0?B:D)},[d]),L=h.useCallback(function(){typeof f=="function"&&f(),O(!0)},[f]),I=h.useCallback(function(){typeof c=="function"&&c(),O(!1)},[c]),U=a!==void 0?a:m,z=l!==void 0?l:C,X=p!==void 0?p:$;return he(he({},v),{},{inputValue:U,menuIsOpen:z,onChange:T,onInputChange:P,onMenuClose:I,onMenuOpen:L,value:X})}function A5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dk(r.key),r)}}function T5(e,t,n){return t&&fb(e.prototype,t),n&&fb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bm(e,t){return Bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},Bm(e,t)}function $5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}function bd(e){return bd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bd(e)}function I5(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N5(e,t){if(t&&(wi(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M5(e)}function D5(e){var t=I5();return function(){var r=bd(e),s;if(t){var i=bd(this).constructor;s=Reflect.construct(r,arguments,i)}else s=r.apply(this,arguments);return N5(this,s)}}function j5(e){if(Array.isArray(e))return zm(e)}function F5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L5(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ly(e){return j5(e)||F5(e)||jk(e)||L5()}function V5(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function U5(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var z5=function(){function e(n){var r=this;this._insertTag=function(s){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,i),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(U5(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var i=V5(s);try{i.insertRule(r,i.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Dt="-ms-",xd="-moz-",je="-webkit-",Fk="comm",uy="rule",cy="decl",B5="@import",Lk="@keyframes",H5="@layer",W5=Math.abs,_f=String.fromCharCode,q5=Object.assign;function K5(e,t){return Pt(e,0)^45?(((t<<2^Pt(e,0))<<2^Pt(e,1))<<2^Pt(e,2))<<2^Pt(e,3):0}function Vk(e){return e.trim()}function G5(e,t){return(e=t.exec(e))?e[0]:e}function Fe(e,t,n){return e.replace(t,n)}function Hm(e,t){return e.indexOf(t)}function Pt(e,t){return e.charCodeAt(t)|0}function Cl(e,t,n){return e.slice(t,n)}function sr(e){return e.length}function dy(e){return e.length}function zu(e,t){return t.push(e),e}function Q5(e,t){return e.map(t).join("")}var Of=1,Wo=1,Uk=0,sn=0,ct=0,ca="";function Rf(e,t,n,r,s,i,o){return{value:e,root:t,parent:n,type:r,props:s,children:i,line:Of,column:Wo,length:o,return:""}}function _a(e,t){return q5(Rf("",null,null,"",null,null,0),e,{length:-e.length},t)}function Z5(){return ct}function Y5(){return ct=sn>0?Pt(ca,--sn):0,Wo--,ct===10&&(Wo=1,Of--),ct}function pn(){return ct=sn<Uk?Pt(ca,sn++):0,Wo++,ct===10&&(Wo=1,Of++),ct}function pr(){return Pt(ca,sn)}function Ec(){return sn}function lu(e,t){return Cl(ca,e,t)}function kl(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zk(e){return Of=Wo=1,Uk=sr(ca=e),sn=0,[]}function Bk(e){return ca="",e}function Sc(e){return Vk(lu(sn-1,Wm(e===91?e+2:e===40?e+1:e)))}function X5(e){for(;(ct=pr())&&ct<33;)pn();return kl(e)>2||kl(ct)>3?"":" "}function J5(e,t){for(;--t&&pn()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return lu(e,Ec()+(t<6&&pr()==32&&pn()==32))}function Wm(e){for(;pn();)switch(ct){case e:return sn;case 34:case 39:e!==34&&e!==39&&Wm(ct);break;case 40:e===41&&Wm(e);break;case 92:pn();break}return sn}function ej(e,t){for(;pn()&&e+ct!==47+10;)if(e+ct===42+42&&pr()===47)break;return"/*"+lu(t,sn-1)+"*"+_f(e===47?e:pn())}function tj(e){for(;!kl(pr());)pn();return lu(e,sn)}function nj(e){return Bk(Cc("",null,null,null,[""],e=zk(e),0,[0],e))}function Cc(e,t,n,r,s,i,o,a,l){for(var u=0,d=0,c=o,f=0,p=0,v=0,y=1,b=1,m=1,g=0,x="",E=s,C=i,O=r,k=x;b;)switch(v=g,g=pn()){case 40:if(v!=108&&Pt(k,c-1)==58){Hm(k+=Fe(Sc(g),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:k+=Sc(g);break;case 9:case 10:case 13:case 32:k+=X5(v);break;case 92:k+=J5(Ec()-1,7);continue;case 47:switch(pr()){case 42:case 47:zu(rj(ej(pn(),Ec()),t,n),l);break;default:k+="/"}break;case 123*y:a[u++]=sr(k)*m;case 125*y:case 59:case 0:switch(g){case 0:case 125:b=0;case 59+d:m==-1&&(k=Fe(k,/\f/g,"")),p>0&&sr(k)-c&&zu(p>32?pb(k+";",r,n,c-1):pb(Fe(k," ","")+";",r,n,c-2),l);break;case 59:k+=";";default:if(zu(O=hb(k,t,n,u,d,s,a,x,E=[],C=[],c),i),g===123)if(d===0)Cc(k,t,O,O,E,i,c,a,C);else switch(f===99&&Pt(k,3)===110?100:f){case 100:case 108:case 109:case 115:Cc(e,O,O,r&&zu(hb(e,O,O,0,0,s,a,x,s,E=[],c),C),s,C,c,a,r?E:C);break;default:Cc(k,O,O,O,[""],C,0,a,C)}}u=d=p=0,y=m=1,x=k="",c=o;break;case 58:c=1+sr(k),p=v;default:if(y<1){if(g==123)--y;else if(g==125&&y++==0&&Y5()==125)continue}switch(k+=_f(g),g*y){case 38:m=d>0?1:(k+="\f",-1);break;case 44:a[u++]=(sr(k)-1)*m,m=1;break;case 64:pr()===45&&(k+=Sc(pn())),f=pr(),d=c=sr(x=k+=tj(Ec())),g++;break;case 45:v===45&&sr(k)==2&&(y=0)}}return i}function hb(e,t,n,r,s,i,o,a,l,u,d){for(var c=s-1,f=s===0?i:[""],p=dy(f),v=0,y=0,b=0;v<r;++v)for(var m=0,g=Cl(e,c+1,c=W5(y=o[v])),x=e;m<p;++m)(x=Vk(y>0?f[m]+" "+g:Fe(g,/&\f/g,f[m])))&&(l[b++]=x);return Rf(e,t,n,s===0?uy:a,l,u,d)}function rj(e,t,n){return Rf(e,t,n,Fk,_f(Z5()),Cl(e,2,-2),0)}function pb(e,t,n,r){return Rf(e,t,n,cy,Cl(e,0,r),Cl(e,r+1,-1),r)}function vo(e,t){for(var n="",r=dy(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function sj(e,t,n,r){switch(e.type){case H5:if(e.children.length)break;case B5:case cy:return e.return=e.return||e.value;case Fk:return"";case Lk:return e.return=e.value+"{"+vo(e.children,r)+"}";case uy:e.value=e.props.join(",")}return sr(n=vo(e.children,r))?e.return=e.value+"{"+n+"}":""}function ij(e){var t=dy(e);return function(n,r,s,i){for(var o="",a=0;a<t;a++)o+=e[a](n,r,s,i)||"";return o}}function oj(e){return function(t){t.root||(t=t.return)&&e(t)}}function aj(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var lj=function(t,n,r){for(var s=0,i=0;s=i,i=pr(),s===38&&i===12&&(n[r]=1),!kl(i);)pn();return lu(t,sn)},uj=function(t,n){var r=-1,s=44;do switch(kl(s)){case 0:s===38&&pr()===12&&(n[r]=1),t[r]+=lj(sn-1,n,r);break;case 2:t[r]+=Sc(s);break;case 4:if(s===44){t[++r]=pr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=_f(s)}while(s=pn());return t},cj=function(t,n){return Bk(uj(zk(t),n))},mb=new WeakMap,dj=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,s=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!mb.get(r))&&!s){mb.set(t,!0);for(var i=[],o=cj(n,i),a=r.props,l=0,u=0;l<o.length;l++)for(var d=0;d<a.length;d++,u++)t.props[u]=i[l]?o[l].replace(/&\f/g,a[d]):a[d]+" "+o[l]}}},fj=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Hk(e,t){switch(K5(e,t)){case 5103:return je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return je+e+xd+e+Dt+e+e;case 6828:case 4268:return je+e+Dt+e+e;case 6165:return je+e+Dt+"flex-"+e+e;case 5187:return je+e+Fe(e,/(\w+).+(:[^]+)/,je+"box-$1$2"+Dt+"flex-$1$2")+e;case 5443:return je+e+Dt+"flex-item-"+Fe(e,/flex-|-self/,"")+e;case 4675:return je+e+Dt+"flex-line-pack"+Fe(e,/align-content|flex-|-self/,"")+e;case 5548:return je+e+Dt+Fe(e,"shrink","negative")+e;case 5292:return je+e+Dt+Fe(e,"basis","preferred-size")+e;case 6060:return je+"box-"+Fe(e,"-grow","")+je+e+Dt+Fe(e,"grow","positive")+e;case 4554:return je+Fe(e,/([^-])(transform)/g,"$1"+je+"$2")+e;case 6187:return Fe(Fe(Fe(e,/(zoom-|grab)/,je+"$1"),/(image-set)/,je+"$1"),e,"")+e;case 5495:case 3959:return Fe(e,/(image-set\([^]*)/,je+"$1$`$1");case 4968:return Fe(Fe(e,/(.+:)(flex-)?(.*)/,je+"box-pack:$3"+Dt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+je+e+e;case 4095:case 3583:case 4068:case 2532:return Fe(e,/(.+)-inline(.+)/,je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(sr(e)-1-t>6)switch(Pt(e,t+1)){case 109:if(Pt(e,t+4)!==45)break;case 102:return Fe(e,/(.+:)(.+)-([^]+)/,"$1"+je+"$2-$3$1"+xd+(Pt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Hm(e,"stretch")?Hk(Fe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pt(e,t+1)!==115)break;case 6444:switch(Pt(e,sr(e)-3-(~Hm(e,"!important")&&10))){case 107:return Fe(e,":",":"+je)+e;case 101:return Fe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+je+(Pt(e,14)===45?"inline-":"")+"box$3$1"+je+"$2$3$1"+Dt+"$2box$3")+e}break;case 5936:switch(Pt(e,t+11)){case 114:return je+e+Dt+Fe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return je+e+Dt+Fe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return je+e+Dt+Fe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return je+e+Dt+e+e}return e}var hj=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case cy:t.return=Hk(t.value,t.length);break;case Lk:return vo([_a(t,{value:Fe(t.value,"@","@"+je)})],s);case uy:if(t.length)return Q5(t.props,function(i){switch(G5(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return vo([_a(t,{props:[Fe(i,/:(read-\w+)/,":"+xd+"$1")]})],s);case"::placeholder":return vo([_a(t,{props:[Fe(i,/:(plac\w+)/,":"+je+"input-$1")]}),_a(t,{props:[Fe(i,/:(plac\w+)/,":"+xd+"$1")]}),_a(t,{props:[Fe(i,/:(plac\w+)/,Dt+"input-$1")]})],s)}return""})}},pj=[hj],mj=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var b=y.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var s=t.stylisPlugins||pj,i={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var b=y.getAttribute("data-emotion").split(" "),m=1;m<b.length;m++)i[b[m]]=!0;a.push(y)});var l,u=[dj,fj];{var d,c=[sj,oj(function(y){d.insert(y)})],f=ij(u.concat(s,c)),p=function(b){return vo(nj(b),f)};l=function(b,m,g,x){d=g,p(b?b+"{"+m.styles+"}":m.styles),x&&(v.inserted[m.name]=!0)}}var v={key:n,sheet:new z5({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return v.sheet.hydrate(a),v},Wk={exports:{}},Ue={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kt=typeof Symbol=="function"&&Symbol.for,fy=kt?Symbol.for("react.element"):60103,hy=kt?Symbol.for("react.portal"):60106,Pf=kt?Symbol.for("react.fragment"):60107,Af=kt?Symbol.for("react.strict_mode"):60108,Tf=kt?Symbol.for("react.profiler"):60114,$f=kt?Symbol.for("react.provider"):60109,If=kt?Symbol.for("react.context"):60110,py=kt?Symbol.for("react.async_mode"):60111,Mf=kt?Symbol.for("react.concurrent_mode"):60111,Nf=kt?Symbol.for("react.forward_ref"):60112,Df=kt?Symbol.for("react.suspense"):60113,gj=kt?Symbol.for("react.suspense_list"):60120,jf=kt?Symbol.for("react.memo"):60115,Ff=kt?Symbol.for("react.lazy"):60116,vj=kt?Symbol.for("react.block"):60121,yj=kt?Symbol.for("react.fundamental"):60117,bj=kt?Symbol.for("react.responder"):60118,xj=kt?Symbol.for("react.scope"):60119;function yn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case fy:switch(e=e.type,e){case py:case Mf:case Pf:case Tf:case Af:case Df:return e;default:switch(e=e&&e.$$typeof,e){case If:case Nf:case Ff:case jf:case $f:return e;default:return t}}case hy:return t}}}function qk(e){return yn(e)===Mf}Ue.AsyncMode=py;Ue.ConcurrentMode=Mf;Ue.ContextConsumer=If;Ue.ContextProvider=$f;Ue.Element=fy;Ue.ForwardRef=Nf;Ue.Fragment=Pf;Ue.Lazy=Ff;Ue.Memo=jf;Ue.Portal=hy;Ue.Profiler=Tf;Ue.StrictMode=Af;Ue.Suspense=Df;Ue.isAsyncMode=function(e){return qk(e)||yn(e)===py};Ue.isConcurrentMode=qk;Ue.isContextConsumer=function(e){return yn(e)===If};Ue.isContextProvider=function(e){return yn(e)===$f};Ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===fy};Ue.isForwardRef=function(e){return yn(e)===Nf};Ue.isFragment=function(e){return yn(e)===Pf};Ue.isLazy=function(e){return yn(e)===Ff};Ue.isMemo=function(e){return yn(e)===jf};Ue.isPortal=function(e){return yn(e)===hy};Ue.isProfiler=function(e){return yn(e)===Tf};Ue.isStrictMode=function(e){return yn(e)===Af};Ue.isSuspense=function(e){return yn(e)===Df};Ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pf||e===Mf||e===Tf||e===Af||e===Df||e===gj||typeof e=="object"&&e!==null&&(e.$$typeof===Ff||e.$$typeof===jf||e.$$typeof===$f||e.$$typeof===If||e.$$typeof===Nf||e.$$typeof===yj||e.$$typeof===bj||e.$$typeof===xj||e.$$typeof===vj)};Ue.typeOf=yn;Wk.exports=Ue;var wj=Wk.exports,Kk=wj,Ej={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Sj={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Gk={};Gk[Kk.ForwardRef]=Ej;Gk[Kk.Memo]=Sj;var Cj=!0;function kj(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):r+=s+" "}),r}var Qk=function(t,n,r){var s=t.key+"-"+n.name;(r===!1||Cj===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},_j=function(t,n,r){Qk(t,n,r);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+s:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function Oj(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Rj={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Pj=/[A-Z]|^ms/g,Aj=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zk=function(t){return t.charCodeAt(1)===45},gb=function(t){return t!=null&&typeof t!="boolean"},Kh=aj(function(e){return Zk(e)?e:e.replace(Pj,"-$&").toLowerCase()}),vb=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Aj,function(r,s,i){return ir={name:s,styles:i,next:ir},s})}return Rj[t]!==1&&!Zk(t)&&typeof n=="number"&&n!==0?n+"px":n};function _l(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ir={name:n.name,styles:n.styles,next:ir},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ir={name:r.name,styles:r.styles,next:ir},r=r.next;var s=n.styles+";";return s}return Tj(e,t,n)}case"function":{if(e!==void 0){var i=ir,o=n(e);return ir=i,_l(e,t,o)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function Tj(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=_l(e,t,n[s])+";";else for(var i in n){var o=n[i];if(typeof o!="object")t!=null&&t[o]!==void 0?r+=i+"{"+t[o]+"}":gb(o)&&(r+=Kh(i)+":"+vb(i,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var a=0;a<o.length;a++)gb(o[a])&&(r+=Kh(i)+":"+vb(i,o[a])+";");else{var l=_l(e,t,o);switch(i){case"animation":case"animationName":{r+=Kh(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var yb=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ir,Yk=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var s=!0,i="";ir=void 0;var o=t[0];o==null||o.raw===void 0?(s=!1,i+=_l(r,n,o)):i+=o[0];for(var a=1;a<t.length;a++)i+=_l(r,n,t[a]),s&&(i+=o[a]);yb.lastIndex=0;for(var l="",u;(u=yb.exec(i))!==null;)l+="-"+u[1];var d=Oj(i)+l;return{name:d,styles:i,next:ir}},$j=function(t){return t()},Ij=Ac["useInsertionEffect"]?Ac["useInsertionEffect"]:!1,Mj=Ij||$j,my={}.hasOwnProperty,Xk=h.createContext(typeof HTMLElement<"u"?mj({key:"css"}):null);Xk.Provider;var Nj=function(t){return h.forwardRef(function(n,r){var s=h.useContext(Xk);return t(n,s,r)})},Dj=h.createContext({}),qm="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",jj=function(t,n){var r={};for(var s in n)my.call(n,s)&&(r[s]=n[s]);return r[qm]=t,r},Fj=function(t){var n=t.cache,r=t.serialized,s=t.isStringTag;return Qk(n,r,s),Mj(function(){return _j(n,r,s)}),null},Lj=Nj(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var s=e[qm],i=[r],o="";typeof e.className=="string"?o=kj(t.registered,i,e.className):e.className!=null&&(o=e.className+" ");var a=Yk(i,void 0,h.useContext(Dj));o+=t.key+"-"+a.name;var l={};for(var u in e)my.call(e,u)&&u!=="css"&&u!==qm&&(l[u]=e[u]);return l.ref=n,l.className=o,h.createElement(h.Fragment,null,h.createElement(Fj,{cache:t,serialized:a,isStringTag:typeof s=="string"}),h.createElement(s,l))}),Vj=Lj,de=function(t,n){var r=arguments;if(n==null||!my.call(n,"css"))return h.createElement.apply(void 0,r);var s=r.length,i=new Array(s);i[0]=Vj,i[1]=jj(t,n);for(var o=2;o<s;o++)i[o]=r[o];return h.createElement.apply(null,i)};function gy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Yk(t)}var Uj=function(){var t=gy.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function zj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Km=h.useLayoutEffect,Bj=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],wd=function(){};function Hj(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function Wj(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];var i=[].concat(r);if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&i.push("".concat(Hj(e,o)));return i.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var bb=function(t){return eF(t)?t.filter(Boolean):wi(t)==="object"&&t!==null?[t]:[]},Jk=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Jr(t,Bj);return he({},n)},ot=function(t,n,r){var s=t.cx,i=t.getStyles,o=t.getClassNames,a=t.className;return{css:i(n,t),className:s(r??{},o(n,t),a)}};function Lf(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function qj(e){return Lf(e)?window.innerHeight:e.clientHeight}function e2(e){return Lf(e)?window.pageYOffset:e.scrollTop}function Ed(e,t){if(Lf(e)){window.scrollTo(0,t);return}e.scrollTop=t}function Kj(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var s=e;s=s.parentElement;)if(t=getComputedStyle(s),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return s;return document.documentElement}function Gj(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Bu(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:wd,s=e2(e),i=t-s,o=10,a=0;function l(){a+=o;var u=Gj(a,s,i,n);Ed(e,u),a<n?window.requestAnimationFrame(l):r(e)}l()}function xb(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s=t.offsetHeight/3;r.bottom+s>n.bottom?Ed(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+s,e.scrollHeight)):r.top-s<n.top&&Ed(e,Math.max(t.offsetTop-s,0))}function Qj(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function wb(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Zj(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var t2=!1,Yj={get passive(){return t2=!0}},Hu=typeof window<"u"?window:{};Hu.addEventListener&&Hu.removeEventListener&&(Hu.addEventListener("p",wd,Yj),Hu.removeEventListener("p",wd,!1));var Xj=t2;function Jj(e){return e!=null}function eF(e){return Array.isArray(e)}function Wu(e,t,n){return e?t:n}var tF=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];var i=Object.entries(t).filter(function(o){var a=Lr(o,1),l=a[0];return!r.includes(l)});return i.reduce(function(o,a){var l=Lr(a,2),u=l[0],d=l[1];return o[u]=d,o},{})},nF=["children","innerProps"],rF=["children","innerProps"];function sF(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,s=e.placement,i=e.shouldScroll,o=e.isFixedPosition,a=e.controlHeight,l=Kj(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=l.getBoundingClientRect(),c=d.height,f=n.getBoundingClientRect(),p=f.bottom,v=f.height,y=f.top,b=n.offsetParent.getBoundingClientRect(),m=b.top,g=o?window.innerHeight:qj(l),x=e2(l),E=parseInt(getComputedStyle(n).marginBottom,10),C=parseInt(getComputedStyle(n).marginTop,10),O=m-C,k=g-y,S=O+x,$=c-x-y,A=p-g+x+E,T=x+y-C,P=160;switch(s){case"auto":case"bottom":if(k>=v)return{placement:"bottom",maxHeight:t};if($>=v&&!o)return i&&Bu(l,A,P),{placement:"bottom",maxHeight:t};if(!o&&$>=r||o&&k>=r){i&&Bu(l,A,P);var L=o?k-E:$-E;return{placement:"bottom",maxHeight:L}}if(s==="auto"||o){var I=t,U=o?O:S;return U>=r&&(I=Math.min(U-E-a,t)),{placement:"top",maxHeight:I}}if(s==="bottom")return i&&Ed(l,A),{placement:"bottom",maxHeight:t};break;case"top":if(O>=v)return{placement:"top",maxHeight:t};if(S>=v&&!o)return i&&Bu(l,T,P),{placement:"top",maxHeight:t};if(!o&&S>=r||o&&O>=r){var z=t;return(!o&&S>=r||o&&O>=r)&&(z=o?O-C:S-C),i&&Bu(l,T,P),{placement:"top",maxHeight:z}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(s,'".'))}return u}function iF(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var n2=function(t){return t==="auto"?"bottom":t},oF=function(t,n){var r,s=t.placement,i=t.theme,o=i.borderRadius,a=i.spacing,l=i.colors;return he((r={label:"menu"},Ma(r,iF(s),"100%"),Ma(r,"position","absolute"),Ma(r,"width","100%"),Ma(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},r2=h.createContext(null),aF=function(t){var n=t.children,r=t.minMenuHeight,s=t.maxMenuHeight,i=t.menuPlacement,o=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,u=h.useContext(r2)||{},d=u.setPortalPlacement,c=h.useRef(null),f=h.useState(s),p=Lr(f,2),v=p[0],y=p[1],b=h.useState(null),m=Lr(b,2),g=m[0],x=m[1],E=l.spacing.controlHeight;return Km(function(){var C=c.current;if(C){var O=o==="fixed",k=a&&!O,S=sF({maxHeight:s,menuEl:C,minHeight:r,placement:i,shouldScroll:k,isFixedPosition:O,controlHeight:E});y(S.maxHeight),x(S.placement),d==null||d(S.placement)}},[s,i,o,a,r,d,E]),n({ref:c,placerProps:he(he({},t),{},{placement:g||n2(i),maxHeight:v})})},lF=function(t){var n=t.children,r=t.innerRef,s=t.innerProps;return de("div",V({},ot(t,"menu",{menu:!0}),{ref:r},s),n)},uF=lF,cF=function(t,n){var r=t.maxHeight,s=t.theme.spacing.baseUnit;return he({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:s,paddingTop:s})},dF=function(t){var n=t.children,r=t.innerProps,s=t.innerRef,i=t.isMulti;return de("div",V({},ot(t,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:s},r),n)},s2=function(t,n){var r=t.theme,s=r.spacing.baseUnit,i=r.colors;return he({textAlign:"center"},n?{}:{color:i.neutral40,padding:"".concat(s*2,"px ").concat(s*3,"px")})},fF=s2,hF=s2,pF=function(t){var n=t.children,r=n===void 0?"No options":n,s=t.innerProps,i=Jr(t,nF);return de("div",V({},ot(he(he({},i),{},{children:r,innerProps:s}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),s),r)},mF=function(t){var n=t.children,r=n===void 0?"Loading...":n,s=t.innerProps,i=Jr(t,rF);return de("div",V({},ot(he(he({},i),{},{children:r,innerProps:s}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),s),r)},gF=function(t){var n=t.rect,r=t.offset,s=t.position;return{left:n.left,position:s,top:r,width:n.width,zIndex:1}},vF=function(t){var n=t.appendTo,r=t.children,s=t.controlElement,i=t.innerProps,o=t.menuPlacement,a=t.menuPosition,l=h.useRef(null),u=h.useRef(null),d=h.useState(n2(o)),c=Lr(d,2),f=c[0],p=c[1],v=h.useMemo(function(){return{setPortalPlacement:p}},[]),y=h.useState(null),b=Lr(y,2),m=b[0],g=b[1],x=h.useCallback(function(){if(s){var k=Qj(s),S=a==="fixed"?0:window.pageYOffset,$=k[f]+S;($!==(m==null?void 0:m.offset)||k.left!==(m==null?void 0:m.rect.left)||k.width!==(m==null?void 0:m.rect.width))&&g({offset:$,rect:k})}},[s,a,f,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);Km(function(){x()},[x]);var E=h.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),s&&l.current&&(u.current=CC(s,l.current,x,{elementResize:"ResizeObserver"in window}))},[s,x]);Km(function(){E()},[E]);var C=h.useCallback(function(k){l.current=k,E()},[E]);if(!n&&a!=="fixed"||!m)return null;var O=de("div",V({ref:C},ot(he(he({},t),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),i),r);return de(r2.Provider,{value:v},n?na.createPortal(O,n):O)},yF=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},bF=function(t){var n=t.children,r=t.innerProps,s=t.isDisabled,i=t.isRtl;return de("div",V({},ot(t,"container",{"--is-disabled":s,"--is-rtl":i}),r),n)},xF=function(t,n){var r=t.theme.spacing,s=t.isMulti,i=t.hasValue,o=t.selectProps.controlShouldRenderValue;return he({alignItems:"center",display:s&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},wF=function(t){var n=t.children,r=t.innerProps,s=t.isMulti,i=t.hasValue;return de("div",V({},ot(t,"valueContainer",{"value-container":!0,"value-container--is-multi":s,"value-container--has-value":i}),r),n)},EF=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},SF=function(t){var n=t.children,r=t.innerProps;return de("div",V({},ot(t,"indicatorsContainer",{indicators:!0}),r),n)},Eb,CF=["size"],kF=["innerProps","isRtl","size"],_F={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},i2=function(t){var n=t.size,r=Jr(t,CF);return de("svg",V({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:_F},r))},vy=function(t){return de(i2,V({size:20},t),de("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},o2=function(t){return de(i2,V({size:20},t),de("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},a2=function(t,n){var r=t.isFocused,s=t.theme,i=s.spacing.baseUnit,o=s.colors;return he({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:i*2,":hover":{color:r?o.neutral80:o.neutral40}})},OF=a2,RF=function(t){var n=t.children,r=t.innerProps;return de("div",V({},ot(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||de(o2,null))},PF=a2,AF=function(t){var n=t.children,r=t.innerProps;return de("div",V({},ot(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||de(vy,null))},TF=function(t,n){var r=t.isDisabled,s=t.theme,i=s.spacing.baseUnit,o=s.colors;return he({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:i*2,marginTop:i*2})},$F=function(t){var n=t.innerProps;return de("span",V({},n,ot(t,"indicatorSeparator",{"indicator-separator":!0})))},IF=Uj(Eb||(Eb=zj([` + 0%, 80%, 100% { opacity: 0; } + 40% { opacity: 1; } +`]))),MF=function(t,n){var r=t.isFocused,s=t.size,i=t.theme,o=i.colors,a=i.spacing.baseUnit;return he({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:a*2})},Gh=function(t){var n=t.delay,r=t.offset;return de("span",{css:gy({animation:"".concat(IF," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},NF=function(t){var n=t.innerProps,r=t.isRtl,s=t.size,i=s===void 0?4:s,o=Jr(t,kF);return de("div",V({},ot(he(he({},o),{},{innerProps:n,isRtl:r,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),de(Gh,{delay:0,offset:r}),de(Gh,{delay:160,offset:!0}),de(Gh,{delay:320,offset:!r}))},DF=function(t,n){var r=t.isDisabled,s=t.isFocused,i=t.theme,o=i.colors,a=i.borderRadius,l=i.spacing;return he({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:s?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:s?o.primary:o.neutral30}})},jF=function(t){var n=t.children,r=t.isDisabled,s=t.isFocused,i=t.innerRef,o=t.innerProps,a=t.menuIsOpen;return de("div",V({ref:i},ot(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":s,"control--menu-is-open":a}),o,{"aria-disabled":r||void 0}),n)},FF=jF,LF=["data"],VF=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},UF=function(t){var n=t.children,r=t.cx,s=t.getStyles,i=t.getClassNames,o=t.Heading,a=t.headingProps,l=t.innerProps,u=t.label,d=t.theme,c=t.selectProps;return de("div",V({},ot(t,"group",{group:!0}),l),de(o,V({},a,{selectProps:c,theme:d,getStyles:s,getClassNames:i,cx:r}),u),de("div",null,n))},zF=function(t,n){var r=t.theme,s=r.colors,i=r.spacing;return he({label:"group",cursor:"default",display:"block"},n?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},BF=function(t){var n=Jk(t);n.data;var r=Jr(n,LF);return de("div",V({},ot(t,"groupHeading",{"group-heading":!0}),r))},HF=UF,WF=["innerRef","isDisabled","isHidden","inputClassName"],qF=function(t,n){var r=t.isDisabled,s=t.value,i=t.theme,o=i.spacing,a=i.colors;return he(he({visibility:r?"hidden":"visible",transform:s?"translateZ(0)":""},KF),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},l2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},KF={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":he({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},l2)},GF=function(t){return he({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},l2)},QF=function(t){var n=t.cx,r=t.value,s=Jk(t),i=s.innerRef,o=s.isDisabled,a=s.isHidden,l=s.inputClassName,u=Jr(s,WF);return de("div",V({},ot(t,"input",{"input-container":!0}),{"data-value":r||""}),de("input",V({className:n({input:!0},l),ref:i,style:GF(a),disabled:o},u)))},ZF=QF,YF=function(t,n){var r=t.theme,s=r.spacing,i=r.borderRadius,o=r.colors;return he({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:s.baseUnit/2})},XF=function(t,n){var r=t.theme,s=r.borderRadius,i=r.colors,o=t.cropWithEllipsis;return he({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:s/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},JF=function(t,n){var r=t.theme,s=r.spacing,i=r.borderRadius,o=r.colors,a=t.isFocused;return he({alignItems:"center",display:"flex"},n?{}:{borderRadius:i/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},u2=function(t){var n=t.children,r=t.innerProps;return de("div",r,n)},eL=u2,tL=u2;function nL(e){var t=e.children,n=e.innerProps;return de("div",V({role:"button"},n),t||de(vy,{size:14}))}var rL=function(t){var n=t.children,r=t.components,s=t.data,i=t.innerProps,o=t.isDisabled,a=t.removeProps,l=t.selectProps,u=r.Container,d=r.Label,c=r.Remove;return de(u,{data:s,innerProps:he(he({},ot(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:l},de(d,{data:s,innerProps:he({},ot(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),de(c,{data:s,innerProps:he(he({},ot(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},sL=rL,iL=function(t,n){var r=t.isDisabled,s=t.isFocused,i=t.isSelected,o=t.theme,a=o.spacing,l=o.colors;return he({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:i?l.primary:s?l.primary25:"transparent",color:r?l.neutral20:i?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:i?l.primary:l.primary50}})},oL=function(t){var n=t.children,r=t.isDisabled,s=t.isFocused,i=t.isSelected,o=t.innerRef,a=t.innerProps;return de("div",V({},ot(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":s,"option--is-selected":i}),{ref:o,"aria-disabled":r},a),n)},aL=oL,lL=function(t,n){var r=t.theme,s=r.spacing,i=r.colors;return he({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:i.neutral50,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},uL=function(t){var n=t.children,r=t.innerProps;return de("div",V({},ot(t,"placeholder",{placeholder:!0}),r),n)},cL=uL,dL=function(t,n){var r=t.isDisabled,s=t.theme,i=s.spacing,o=s.colors;return he({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},fL=function(t){var n=t.children,r=t.isDisabled,s=t.innerProps;return de("div",V({},ot(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),s),n)},hL=fL,pL={ClearIndicator:AF,Control:FF,DropdownIndicator:RF,DownChevron:o2,CrossIcon:vy,Group:HF,GroupHeading:BF,IndicatorsContainer:SF,IndicatorSeparator:$F,Input:ZF,LoadingIndicator:NF,Menu:uF,MenuList:dF,MenuPortal:vF,LoadingMessage:mF,NoOptionsMessage:pF,MultiValue:sL,MultiValueContainer:eL,MultiValueLabel:tL,MultiValueRemove:nL,Option:aL,Placeholder:cL,SelectContainer:bF,SingleValue:hL,ValueContainer:wF},mL=function(t){return he(he({},pL),t.components)},Sb=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function gL(e,t){return!!(e===t||Sb(e)&&Sb(t))}function vL(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!gL(e[n],t[n]))return!1;return!0}function yL(e,t){t===void 0&&(t=vL);var n=null;function r(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(n&&n.lastThis===this&&t(s,n.lastArgs))return n.lastResult;var o=e.apply(this,s);return n={lastResult:o,lastArgs:s,lastThis:this},o}return r.clear=function(){n=null},r}var bL={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},xL=function(t){return de("span",V({css:bL},t))},Cb=xL,wL={guidance:function(t){var n=t.isSearchable,r=t.isMulti,s=t.tabSelectsValue,i=t.context,o=t.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(s?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,s=r===void 0?"":r,i=t.labels,o=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(s,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return o?"option ".concat(s," is disabled. Select another option."):"option ".concat(s,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,s=t.options,i=t.label,o=i===void 0?"":i,a=t.selectValue,l=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,c=function(y,b){return y&&y.length?"".concat(y.indexOf(b)+1," of ").concat(y.length):""};if(n==="value"&&a)return"value ".concat(o," focused, ").concat(c(a,r),".");if(n==="menu"&&d){var f=l?" disabled":"",p="".concat(u?" selected":"").concat(f);return"".concat(o).concat(p,", ").concat(c(s,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},EL=function(t){var n=t.ariaSelection,r=t.focusedOption,s=t.focusedValue,i=t.focusableOptions,o=t.isFocused,a=t.selectValue,l=t.selectProps,u=t.id,d=t.isAppleDevice,c=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,v=l.isMulti,y=l.isOptionDisabled,b=l.isSearchable,m=l.menuIsOpen,g=l.options,x=l.screenReaderStatus,E=l.tabSelectsValue,C=l.isLoading,O=l["aria-label"],k=l["aria-live"],S=h.useMemo(function(){return he(he({},wL),c||{})},[c]),$=h.useMemo(function(){var U="";if(n&&S.onChange){var z=n.option,X=n.options,D=n.removedValue,N=n.removedValues,B=n.value,Z=function(xe){return Array.isArray(xe)?null:xe},Q=D||z||Z(B),se=Q?f(Q):"",be=X||N||void 0,Ce=be?be.map(f):[],pe=he({isDisabled:Q&&y(Q,a),label:se,labels:Ce},n);U=S.onChange(pe)}return U},[n,S,y,a,f]),A=h.useMemo(function(){var U="",z=r||s,X=!!(r&&a&&a.includes(r));if(z&&S.onFocus){var D={focused:z,label:f(z),isDisabled:y(z,a),isSelected:X,options:i,context:z===r?"menu":"value",selectValue:a,isAppleDevice:d};U=S.onFocus(D)}return U},[r,s,f,y,S,i,a,d]),T=h.useMemo(function(){var U="";if(m&&g.length&&!C&&S.onFilter){var z=x({count:i.length});U=S.onFilter({inputValue:p,resultsMessage:z})}return U},[i,p,m,S,g,x,C]),P=(n==null?void 0:n.action)==="initial-input-focus",L=h.useMemo(function(){var U="";if(S.guidance){var z=s?"value":m?"menu":"input";U=S.guidance({"aria-label":O,context:z,isDisabled:r&&y(r,a),isMulti:v,isSearchable:b,tabSelectsValue:E,isInitialFocus:P})}return U},[O,r,s,v,y,b,m,S,a,E,P]),I=de(h.Fragment,null,de("span",{id:"aria-selection"},$),de("span",{id:"aria-focused"},A),de("span",{id:"aria-results"},T),de("span",{id:"aria-guidance"},L));return de(h.Fragment,null,de(Cb,{id:u},P&&I),de(Cb,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!P&&I))},SL=EL,Gm=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],CL=new RegExp("["+Gm.map(function(e){return e.letters}).join("")+"]","g"),c2={};for(var Qh=0;Qh<Gm.length;Qh++)for(var Zh=Gm[Qh],Yh=0;Yh<Zh.letters.length;Yh++)c2[Zh.letters[Yh]]=Zh.base;var d2=function(t){return t.replace(CL,function(n){return c2[n]})},kL=yL(d2),kb=function(t){return t.replace(/^\s+|\s+$/g,"")},_L=function(t){return"".concat(t.label," ").concat(t.value)},OL=function(t){return function(n,r){if(n.data.__isNew__)return!0;var s=he({ignoreCase:!0,ignoreAccents:!0,stringify:_L,trim:!0,matchFrom:"any"},t),i=s.ignoreCase,o=s.ignoreAccents,a=s.stringify,l=s.trim,u=s.matchFrom,d=l?kb(r):r,c=l?kb(a(n)):a(n);return i&&(d=d.toLowerCase(),c=c.toLowerCase()),o&&(d=kL(d),c=d2(c)),u==="start"?c.substr(0,d.length)===d:c.indexOf(d)>-1}},RL=["innerRef"];function PL(e){var t=e.innerRef,n=Jr(e,RL),r=tF(n,"onExited","in","enter","exit","appear");return de("input",V({ref:t},r,{css:gy({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var AL=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function TL(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,s=e.onTopArrive,i=e.onTopLeave,o=h.useRef(!1),a=h.useRef(!1),l=h.useRef(0),u=h.useRef(null),d=h.useCallback(function(b,m){if(u.current!==null){var g=u.current,x=g.scrollTop,E=g.scrollHeight,C=g.clientHeight,O=u.current,k=m>0,S=E-C-x,$=!1;S>m&&o.current&&(r&&r(b),o.current=!1),k&&a.current&&(i&&i(b),a.current=!1),k&&m>S?(n&&!o.current&&n(b),O.scrollTop=E,$=!0,o.current=!0):!k&&-m>x&&(s&&!a.current&&s(b),O.scrollTop=0,$=!0,a.current=!0),$&&AL(b)}},[n,r,s,i]),c=h.useCallback(function(b){d(b,b.deltaY)},[d]),f=h.useCallback(function(b){l.current=b.changedTouches[0].clientY},[]),p=h.useCallback(function(b){var m=l.current-b.changedTouches[0].clientY;d(b,m)},[d]),v=h.useCallback(function(b){if(b){var m=Xj?{passive:!1}:!1;b.addEventListener("wheel",c,m),b.addEventListener("touchstart",f,m),b.addEventListener("touchmove",p,m)}},[p,f,c]),y=h.useCallback(function(b){b&&(b.removeEventListener("wheel",c,!1),b.removeEventListener("touchstart",f,!1),b.removeEventListener("touchmove",p,!1))},[p,f,c]);return h.useEffect(function(){if(t){var b=u.current;return v(b),function(){y(b)}}},[t,v,y]),function(b){u.current=b}}var _b=["boxSizing","height","overflow","paddingRight","position"],Ob={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Rb(e){e.preventDefault()}function Pb(e){e.stopPropagation()}function Ab(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Tb(){return"ontouchstart"in window||navigator.maxTouchPoints}var $b=!!(typeof window<"u"&&window.document&&window.document.createElement),Oa=0,Vi={capture:!1,passive:!1};function $L(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,s=h.useRef({}),i=h.useRef(null),o=h.useCallback(function(l){if($b){var u=document.body,d=u&&u.style;if(r&&_b.forEach(function(v){var y=d&&d[v];s.current[v]=y}),r&&Oa<1){var c=parseInt(s.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,p=window.innerWidth-f+c||0;Object.keys(Ob).forEach(function(v){var y=Ob[v];d&&(d[v]=y)}),d&&(d.paddingRight="".concat(p,"px"))}u&&Tb()&&(u.addEventListener("touchmove",Rb,Vi),l&&(l.addEventListener("touchstart",Ab,Vi),l.addEventListener("touchmove",Pb,Vi))),Oa+=1}},[r]),a=h.useCallback(function(l){if($b){var u=document.body,d=u&&u.style;Oa=Math.max(Oa-1,0),r&&Oa<1&&_b.forEach(function(c){var f=s.current[c];d&&(d[c]=f)}),u&&Tb()&&(u.removeEventListener("touchmove",Rb,Vi),l&&(l.removeEventListener("touchstart",Ab,Vi),l.removeEventListener("touchmove",Pb,Vi)))}},[r]);return h.useEffect(function(){if(t){var l=i.current;return o(l),function(){a(l)}}},[t,o,a]),function(l){i.current=l}}var IL=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},ML={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function NL(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,s=r===void 0?!0:r,i=e.onBottomArrive,o=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,u=TL({isEnabled:s,onBottomArrive:i,onBottomLeave:o,onTopArrive:a,onTopLeave:l}),d=$L({isEnabled:n}),c=function(p){u(p),d(p)};return de(h.Fragment,null,n&&de("div",{onClick:IL,css:ML}),t(c))}var DL={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},jL=function(t){var n=t.name,r=t.onFocus;return de("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:DL,value:"",onChange:function(){}})},FL=jL;function yy(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function LL(){return yy(/^iPhone/i)}function f2(){return yy(/^Mac/i)}function VL(){return yy(/^iPad/i)||f2()&&navigator.maxTouchPoints>1}function UL(){return LL()||VL()}function zL(){return f2()||UL()}var BL=function(t){return t.label},HL=function(t){return t.label},WL=function(t){return t.value},qL=function(t){return!!t.isDisabled},KL={clearIndicator:PF,container:yF,control:DF,dropdownIndicator:OF,group:VF,groupHeading:zF,indicatorsContainer:EF,indicatorSeparator:TF,input:qF,loadingIndicator:MF,loadingMessage:hF,menu:oF,menuList:cF,menuPortal:gF,multiValue:YF,multiValueLabel:XF,multiValueRemove:JF,noOptionsMessage:fF,option:iL,placeholder:lL,singleValue:dL,valueContainer:xF},GL={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},QL=4,h2=4,ZL=38,YL=h2*2,XL={baseUnit:h2,controlHeight:ZL,menuGutter:YL},Xh={borderRadius:QL,colors:GL,spacing:XL},JL={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:wb(),captureMenuScroll:!wb(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:OL(),formatGroupLabel:BL,getOptionLabel:HL,getOptionValue:WL,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:qL,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Zj(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ib(e,t,n,r){var s=g2(e,t,n),i=v2(e,t,n),o=m2(e,t),a=Sd(e,t);return{type:"option",data:t,isDisabled:s,isSelected:i,label:o,value:a,index:r}}function kc(e,t){return e.options.map(function(n,r){if("options"in n){var s=n.options.map(function(o,a){return Ib(e,o,t,a)}).filter(function(o){return Nb(e,o)});return s.length>0?{type:"group",data:n,options:s,index:r}:void 0}var i=Ib(e,n,t,r);return Nb(e,i)?i:void 0}).filter(Jj)}function p2(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ly(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Mb(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ly(r.options.map(function(s){return{data:s.data,id:"".concat(t,"-").concat(r.index,"-").concat(s.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function e8(e,t){return p2(kc(e,t))}function Nb(e,t){var n=e.inputValue,r=n===void 0?"":n,s=t.data,i=t.isSelected,o=t.label,a=t.value;return(!b2(e)||!i)&&y2(e,{label:o,value:a,data:s},r)}function t8(e,t){var n=e.focusedValue,r=e.selectValue,s=r.indexOf(n);if(s>-1){var i=t.indexOf(n);if(i>-1)return n;if(s<t.length)return t[s]}return null}function n8(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Jh=function(t,n){var r,s=(r=t.find(function(i){return i.data===n}))===null||r===void 0?void 0:r.id;return s||null},m2=function(t,n){return t.getOptionLabel(n)},Sd=function(t,n){return t.getOptionValue(n)};function g2(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function v2(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Sd(e,t);return n.some(function(s){return Sd(e,s)===r})}function y2(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var b2=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},r8=1,x2=function(e){$5(n,e);var t=D5(n);function n(r){var s;if(A5(this,n),s=t.call(this,r),s.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},s.blockOptionHover=!1,s.isComposing=!1,s.commonProps=void 0,s.initialTouchX=0,s.initialTouchY=0,s.openAfterFocus=!1,s.scrollToFocusedOptionOnUpdate=!1,s.userIsDragging=void 0,s.isAppleDevice=zL(),s.controlRef=null,s.getControlRef=function(l){s.controlRef=l},s.focusedOptionRef=null,s.getFocusedOptionRef=function(l){s.focusedOptionRef=l},s.menuListRef=null,s.getMenuListRef=function(l){s.menuListRef=l},s.inputRef=null,s.getInputRef=function(l){s.inputRef=l},s.focus=s.focusInput,s.blur=s.blurInput,s.onChange=function(l,u){var d=s.props,c=d.onChange,f=d.name;u.name=f,s.ariaOnChange(l,u),c(l,u)},s.setValue=function(l,u,d){var c=s.props,f=c.closeMenuOnSelect,p=c.isMulti,v=c.inputValue;s.onInputChange("",{action:"set-value",prevInputValue:v}),f&&(s.setState({inputIsHiddenAfterUpdate:!p}),s.onMenuClose()),s.setState({clearFocusValueOnUpdate:!0}),s.onChange(l,{action:u,option:d})},s.selectOption=function(l){var u=s.props,d=u.blurInputOnSelect,c=u.isMulti,f=u.name,p=s.state.selectValue,v=c&&s.isOptionSelected(l,p),y=s.isOptionDisabled(l,p);if(v){var b=s.getOptionValue(l);s.setValue(p.filter(function(m){return s.getOptionValue(m)!==b}),"deselect-option",l)}else if(!y)c?s.setValue([].concat(ly(p),[l]),"select-option",l):s.setValue(l,"select-option");else{s.ariaOnChange(l,{action:"select-option",option:l,name:f});return}d&&s.blurInput()},s.removeValue=function(l){var u=s.props.isMulti,d=s.state.selectValue,c=s.getOptionValue(l),f=d.filter(function(v){return s.getOptionValue(v)!==c}),p=Wu(u,f,f[0]||null);s.onChange(p,{action:"remove-value",removedValue:l}),s.focusInput()},s.clearValue=function(){var l=s.state.selectValue;s.onChange(Wu(s.props.isMulti,[],null),{action:"clear",removedValues:l})},s.popValue=function(){var l=s.props.isMulti,u=s.state.selectValue,d=u[u.length-1],c=u.slice(0,u.length-1),f=Wu(l,c,c[0]||null);s.onChange(f,{action:"pop-value",removedValue:d})},s.getFocusedOptionId=function(l){return Jh(s.state.focusableOptionsWithIds,l)},s.getFocusableOptionsWithIds=function(){return Mb(kc(s.props,s.state.selectValue),s.getElementId("option"))},s.getValue=function(){return s.state.selectValue},s.cx=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return Wj.apply(void 0,[s.props.classNamePrefix].concat(u))},s.getOptionLabel=function(l){return m2(s.props,l)},s.getOptionValue=function(l){return Sd(s.props,l)},s.getStyles=function(l,u){var d=s.props.unstyled,c=KL[l](u,d);c.boxSizing="border-box";var f=s.props.styles[l];return f?f(c,u):c},s.getClassNames=function(l,u){var d,c;return(d=(c=s.props.classNames)[l])===null||d===void 0?void 0:d.call(c,u)},s.getElementId=function(l){return"".concat(s.state.instancePrefix,"-").concat(l)},s.getComponents=function(){return mL(s.props)},s.buildCategorizedOptions=function(){return kc(s.props,s.state.selectValue)},s.getCategorizedOptions=function(){return s.props.menuIsOpen?s.buildCategorizedOptions():[]},s.buildFocusableOptions=function(){return p2(s.buildCategorizedOptions())},s.getFocusableOptions=function(){return s.props.menuIsOpen?s.buildFocusableOptions():[]},s.ariaOnChange=function(l,u){s.setState({ariaSelection:he({value:l},u)})},s.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),s.focusInput())},s.onMenuMouseMove=function(l){s.blockOptionHover=!1},s.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=s.props.openMenuOnClick;s.state.isFocused?s.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&s.onMenuClose():u&&s.openMenu("first"):(u&&(s.openAfterFocus=!0),s.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},s.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!s.props.isDisabled){var u=s.props,d=u.isMulti,c=u.menuIsOpen;s.focusInput(),c?(s.setState({inputIsHiddenAfterUpdate:!d}),s.onMenuClose()):s.openMenu("first"),l.preventDefault()}},s.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(s.clearValue(),l.preventDefault(),s.openAfterFocus=!1,l.type==="touchend"?s.focusInput():setTimeout(function(){return s.focusInput()}))},s.onScroll=function(l){typeof s.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Lf(l.target)&&s.props.onMenuClose():typeof s.props.closeMenuOnScroll=="function"&&s.props.closeMenuOnScroll(l)&&s.props.onMenuClose()},s.onCompositionStart=function(){s.isComposing=!0},s.onCompositionEnd=function(){s.isComposing=!1},s.onTouchStart=function(l){var u=l.touches,d=u&&u.item(0);d&&(s.initialTouchX=d.clientX,s.initialTouchY=d.clientY,s.userIsDragging=!1)},s.onTouchMove=function(l){var u=l.touches,d=u&&u.item(0);if(d){var c=Math.abs(d.clientX-s.initialTouchX),f=Math.abs(d.clientY-s.initialTouchY),p=5;s.userIsDragging=c>p||f>p}},s.onTouchEnd=function(l){s.userIsDragging||(s.controlRef&&!s.controlRef.contains(l.target)&&s.menuListRef&&!s.menuListRef.contains(l.target)&&s.blurInput(),s.initialTouchX=0,s.initialTouchY=0)},s.onControlTouchEnd=function(l){s.userIsDragging||s.onControlMouseDown(l)},s.onClearIndicatorTouchEnd=function(l){s.userIsDragging||s.onClearIndicatorMouseDown(l)},s.onDropdownIndicatorTouchEnd=function(l){s.userIsDragging||s.onDropdownIndicatorMouseDown(l)},s.handleInputChange=function(l){var u=s.props.inputValue,d=l.currentTarget.value;s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange(d,{action:"input-change",prevInputValue:u}),s.props.menuIsOpen||s.onMenuOpen()},s.onInputFocus=function(l){s.props.onFocus&&s.props.onFocus(l),s.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(s.openAfterFocus||s.props.openMenuOnFocus)&&s.openMenu("first"),s.openAfterFocus=!1},s.onInputBlur=function(l){var u=s.props.inputValue;if(s.menuListRef&&s.menuListRef.contains(document.activeElement)){s.inputRef.focus();return}s.props.onBlur&&s.props.onBlur(l),s.onInputChange("",{action:"input-blur",prevInputValue:u}),s.onMenuClose(),s.setState({focusedValue:null,isFocused:!1})},s.onOptionHover=function(l){if(!(s.blockOptionHover||s.state.focusedOption===l)){var u=s.getFocusableOptions(),d=u.indexOf(l);s.setState({focusedOption:l,focusedOptionId:d>-1?s.getFocusedOptionId(l):null})}},s.shouldHideSelectedOptions=function(){return b2(s.props)},s.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),s.focus()},s.onKeyDown=function(l){var u=s.props,d=u.isMulti,c=u.backspaceRemovesValue,f=u.escapeClearsValue,p=u.inputValue,v=u.isClearable,y=u.isDisabled,b=u.menuIsOpen,m=u.onKeyDown,g=u.tabSelectsValue,x=u.openMenuOnFocus,E=s.state,C=E.focusedOption,O=E.focusedValue,k=E.selectValue;if(!y&&!(typeof m=="function"&&(m(l),l.defaultPrevented))){switch(s.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||p)return;s.focusValue("previous");break;case"ArrowRight":if(!d||p)return;s.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(O)s.removeValue(O);else{if(!c)return;d?s.popValue():v&&s.clearValue()}break;case"Tab":if(s.isComposing||l.shiftKey||!b||!g||!C||x&&s.isOptionSelected(C,k))return;s.selectOption(C);break;case"Enter":if(l.keyCode===229)break;if(b){if(!C||s.isComposing)return;s.selectOption(C);break}return;case"Escape":b?(s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange("",{action:"menu-close",prevInputValue:p}),s.onMenuClose()):v&&f&&s.clearValue();break;case" ":if(p)return;if(!b){s.openMenu("first");break}if(!C)return;s.selectOption(C);break;case"ArrowUp":b?s.focusOption("up"):s.openMenu("last");break;case"ArrowDown":b?s.focusOption("down"):s.openMenu("first");break;case"PageUp":if(!b)return;s.focusOption("pageup");break;case"PageDown":if(!b)return;s.focusOption("pagedown");break;case"Home":if(!b)return;s.focusOption("first");break;case"End":if(!b)return;s.focusOption("last");break;default:return}l.preventDefault()}},s.state.instancePrefix="react-select-"+(s.props.instanceId||++r8),s.state.selectValue=bb(r.value),r.menuIsOpen&&s.state.selectValue.length){var i=s.getFocusableOptionsWithIds(),o=s.buildFocusableOptions(),a=o.indexOf(s.state.selectValue[0]);s.state.focusableOptionsWithIds=i,s.state.focusedOption=o[a],s.state.focusedOptionId=Jh(i,o[a])}return s}return T5(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&xb(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(s){var i=this.props,o=i.isDisabled,a=i.menuIsOpen,l=this.state.isFocused;(l&&!o&&s.isDisabled||l&&a&&!s.menuIsOpen)&&this.focusInput(),l&&o&&!s.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&s.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(xb(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(s,i){this.props.onInputChange(s,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(s){var i=this,o=this.state,a=o.selectValue,l=o.isFocused,u=this.buildFocusableOptions(),d=s==="first"?0:u.length-1;if(!this.props.isMulti){var c=u.indexOf(a[0]);c>-1&&(d=c)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(s){var i=this.state,o=i.selectValue,a=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(a);a||(l=-1);var u=o.length-1,d=-1;if(o.length){switch(s){case"previous":l===0?d=0:l===-1?d=u:d=l-1;break;case"next":l>-1&&l<u&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:o[d]})}}}},{key:"focusOption",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,o=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,u=a.indexOf(o);o||(u=-1),s==="up"?l=u>0?u-1:a.length-1:s==="down"?l=(u+1)%a.length:s==="pageup"?(l=u-i,l<0&&(l=0)):s==="pagedown"?(l=u+i,l>a.length-1&&(l=a.length-1)):s==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Xh):he(he({},Xh),this.props.theme):Xh}},{key:"getCommonProps",value:function(){var s=this.clearValue,i=this.cx,o=this.getStyles,a=this.getClassNames,l=this.getValue,u=this.selectOption,d=this.setValue,c=this.props,f=c.isMulti,p=c.isRtl,v=c.options,y=this.hasValue();return{clearValue:s,cx:i,getStyles:o,getClassNames:a,getValue:l,hasValue:y,isMulti:f,isRtl:p,options:v,selectOption:u,selectProps:c,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var s=this.state.selectValue;return s.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var s=this.props,i=s.isClearable,o=s.isMulti;return i===void 0?o:i}},{key:"isOptionDisabled",value:function(s,i){return g2(this.props,s,i)}},{key:"isOptionSelected",value:function(s,i){return v2(this.props,s,i)}},{key:"filterOption",value:function(s,i){return y2(this.props,s,i)}},{key:"formatOptionLabel",value:function(s,i){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(s,{context:i,inputValue:o,selectValue:a})}else return this.getOptionLabel(s)}},{key:"formatGroupLabel",value:function(s){return this.props.formatGroupLabel(s)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var s=this.props,i=s.isDisabled,o=s.isSearchable,a=s.inputId,l=s.inputValue,u=s.tabIndex,d=s.form,c=s.menuIsOpen,f=s.required,p=this.getComponents(),v=p.Input,y=this.state,b=y.inputIsHidden,m=y.ariaSelection,g=this.commonProps,x=a||this.getElementId("input"),E=he(he(he({"aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?h.createElement(v,V({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:i,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:l},E)):h.createElement(PL,V({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:wd,onFocus:this.onInputFocus,disabled:i,tabIndex:u,inputMode:"none",form:d,value:""},E))}},{key:"renderPlaceholderOrValue",value:function(){var s=this,i=this.getComponents(),o=i.MultiValue,a=i.MultiValueContainer,l=i.MultiValueLabel,u=i.MultiValueRemove,d=i.SingleValue,c=i.Placeholder,f=this.commonProps,p=this.props,v=p.controlShouldRenderValue,y=p.isDisabled,b=p.isMulti,m=p.inputValue,g=p.placeholder,x=this.state,E=x.selectValue,C=x.focusedValue,O=x.isFocused;if(!this.hasValue()||!v)return m?null:h.createElement(c,V({},f,{key:"placeholder",isDisabled:y,isFocused:O,innerProps:{id:this.getElementId("placeholder")}}),g);if(b)return E.map(function(S,$){var A=S===C,T="".concat(s.getOptionLabel(S),"-").concat(s.getOptionValue(S));return h.createElement(o,V({},f,{components:{Container:a,Label:l,Remove:u},isFocused:A,isDisabled:y,key:T,index:$,removeProps:{onClick:function(){return s.removeValue(S)},onTouchEnd:function(){return s.removeValue(S)},onMouseDown:function(L){L.preventDefault()}},data:S}),s.formatOptionLabel(S,"value"))});if(m)return null;var k=E[0];return h.createElement(d,V({},f,{data:k,isDisabled:y}),this.formatOptionLabel(k,"value"))}},{key:"renderClearIndicator",value:function(){var s=this.getComponents(),i=s.ClearIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,d=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||u)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return h.createElement(i,V({},o,{innerProps:c,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var s=this.getComponents(),i=s.LoadingIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,d=this.state.isFocused;if(!i||!u)return null;var c={"aria-hidden":"true"};return h.createElement(i,V({},o,{innerProps:c,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var s=this.getComponents(),i=s.DropdownIndicator,o=s.IndicatorSeparator;if(!i||!o)return null;var a=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return h.createElement(o,V({},a,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var s=this.getComponents(),i=s.DropdownIndicator;if(!i)return null;var o=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return h.createElement(i,V({},o,{innerProps:u,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var s=this,i=this.getComponents(),o=i.Group,a=i.GroupHeading,l=i.Menu,u=i.MenuList,d=i.MenuPortal,c=i.LoadingMessage,f=i.NoOptionsMessage,p=i.Option,v=this.commonProps,y=this.state.focusedOption,b=this.props,m=b.captureMenuScroll,g=b.inputValue,x=b.isLoading,E=b.loadingMessage,C=b.minMenuHeight,O=b.maxMenuHeight,k=b.menuIsOpen,S=b.menuPlacement,$=b.menuPosition,A=b.menuPortalTarget,T=b.menuShouldBlockScroll,P=b.menuShouldScrollIntoView,L=b.noOptionsMessage,I=b.onMenuScrollToTop,U=b.onMenuScrollToBottom;if(!k)return null;var z=function(se,be){var Ce=se.type,pe=se.data,me=se.isDisabled,xe=se.isSelected,ke=se.label,ze=se.value,tt=y===pe,we=me?void 0:function(){return s.onOptionHover(pe)},ae=me?void 0:function(){return s.selectOption(pe)},fe="".concat(s.getElementId("option"),"-").concat(be),ve={id:fe,onClick:ae,onMouseMove:we,onMouseOver:we,tabIndex:-1,role:"option","aria-selected":s.isAppleDevice?void 0:xe};return h.createElement(p,V({},v,{innerProps:ve,data:pe,isDisabled:me,isSelected:xe,key:fe,label:ke,type:Ce,value:ze,isFocused:tt,innerRef:tt?s.getFocusedOptionRef:void 0}),s.formatOptionLabel(se.data,"menu"))},X;if(this.hasOptions())X=this.getCategorizedOptions().map(function(Q){if(Q.type==="group"){var se=Q.data,be=Q.options,Ce=Q.index,pe="".concat(s.getElementId("group"),"-").concat(Ce),me="".concat(pe,"-heading");return h.createElement(o,V({},v,{key:pe,data:se,options:be,Heading:a,headingProps:{id:me,data:Q.data},label:s.formatGroupLabel(Q.data)}),Q.options.map(function(xe){return z(xe,"".concat(Ce,"-").concat(xe.index))}))}else if(Q.type==="option")return z(Q,"".concat(Q.index))});else if(x){var D=E({inputValue:g});if(D===null)return null;X=h.createElement(c,v,D)}else{var N=L({inputValue:g});if(N===null)return null;X=h.createElement(f,v,N)}var B={minMenuHeight:C,maxMenuHeight:O,menuPlacement:S,menuPosition:$,menuShouldScrollIntoView:P},Z=h.createElement(aF,V({},v,B),function(Q){var se=Q.ref,be=Q.placerProps,Ce=be.placement,pe=be.maxHeight;return h.createElement(l,V({},v,B,{innerRef:se,innerProps:{onMouseDown:s.onMenuMouseDown,onMouseMove:s.onMenuMouseMove},isLoading:x,placement:Ce}),h.createElement(NL,{captureEnabled:m,onTopArrive:I,onBottomArrive:U,lockEnabled:T},function(me){return h.createElement(u,V({},v,{innerRef:function(ke){s.getMenuListRef(ke),me(ke)},innerProps:{role:"listbox","aria-multiselectable":v.isMulti,id:s.getElementId("listbox")},isLoading:x,maxHeight:pe,focusedOption:y}),X)}))});return A||$==="fixed"?h.createElement(d,V({},v,{appendTo:A,controlElement:this.controlRef,menuPlacement:S,menuPosition:$}),Z):Z}},{key:"renderFormField",value:function(){var s=this,i=this.props,o=i.delimiter,a=i.isDisabled,l=i.isMulti,u=i.name,d=i.required,c=this.state.selectValue;if(d&&!this.hasValue()&&!a)return h.createElement(FL,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(l)if(o){var f=c.map(function(y){return s.getOptionValue(y)}).join(o);return h.createElement("input",{name:u,type:"hidden",value:f})}else{var p=c.length>0?c.map(function(y,b){return h.createElement("input",{key:"i-".concat(b),name:u,type:"hidden",value:s.getOptionValue(y)})}):h.createElement("input",{name:u,type:"hidden",value:""});return h.createElement("div",null,p)}else{var v=c[0]?this.getOptionValue(c[0]):"";return h.createElement("input",{name:u,type:"hidden",value:v})}}},{key:"renderLiveRegion",value:function(){var s=this.commonProps,i=this.state,o=i.ariaSelection,a=i.focusedOption,l=i.focusedValue,u=i.isFocused,d=i.selectValue,c=this.getFocusableOptions();return h.createElement(SL,V({},s,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:a,focusedValue:l,isFocused:u,selectValue:d,focusableOptions:c,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var s=this.getComponents(),i=s.Control,o=s.IndicatorsContainer,a=s.SelectContainer,l=s.ValueContainer,u=this.props,d=u.className,c=u.id,f=u.isDisabled,p=u.menuIsOpen,v=this.state.isFocused,y=this.commonProps=this.getCommonProps();return h.createElement(a,V({},y,{className:d,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:v}),this.renderLiveRegion(),h.createElement(i,V({},y,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:v,menuIsOpen:p}),h.createElement(l,V({},y,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),h.createElement(o,V({},y,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(s,i){var o=i.prevProps,a=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,u=i.ariaSelection,d=i.isFocused,c=i.prevWasFocused,f=i.instancePrefix,p=s.options,v=s.value,y=s.menuIsOpen,b=s.inputValue,m=s.isMulti,g=bb(v),x={};if(o&&(v!==o.value||p!==o.options||y!==o.menuIsOpen||b!==o.inputValue)){var E=y?e8(s,g):[],C=y?Mb(kc(s,g),"".concat(f,"-option")):[],O=a?t8(i,g):null,k=n8(i,E),S=Jh(C,k);x={selectValue:g,focusedOption:k,focusedOptionId:S,focusableOptionsWithIds:C,focusedValue:O,clearFocusValueOnUpdate:!1}}var $=l!=null&&s!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},A=u,T=d&&c;return d&&!T&&(A={value:Wu(m,g,g[0]||null),options:g,action:"initial-input-focus"},T=!c),(u==null?void 0:u.action)==="initial-input-focus"&&(A=null),he(he(he({},x),$),{},{prevProps:s,ariaSelection:A,prevWasFocused:T})}}]),n}(h.Component);x2.defaultProps=JL;var s8=h.forwardRef(function(e,t){var n=P5(e);return h.createElement(x2,V({ref:t},n))}),i8=s8,Le;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Le||(Le={}));var Db;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Db||(Db={}));const Y=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ys=e=>{switch(typeof e){case"undefined":return Y.undefined;case"string":return Y.string;case"number":return isNaN(e)?Y.nan:Y.number;case"boolean":return Y.boolean;case"function":return Y.function;case"bigint":return Y.bigint;case"symbol":return Y.symbol;case"object":return Array.isArray(e)?Y.array:e===null?Y.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Y.promise:typeof Map<"u"&&e instanceof Map?Y.map:typeof Set<"u"&&e instanceof Set?Y.set:typeof Date<"u"&&e instanceof Date?Y.date:Y.object;default:return Y.unknown}},K=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class mr extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}mr.create=e=>new mr(e);const Cd=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===Y.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Le.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Le.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Le.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Le.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Le.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,Le.assertNever(e)}return{message:n}};let o8=Cd;function Qm(){return o8}const Zm=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:s.message||a}};function ne(e,t){const n=Zm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Qm(),Cd].filter(r=>!!r)});e.common.issues.push(n)}class qt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return Se;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n)r.push({key:await s.key,value:await s.value});return qt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Se;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const Se=Object.freeze({status:"aborted"}),a8=e=>({status:"dirty",value:e}),on=e=>({status:"valid",value:e}),jb=e=>e.status==="aborted",Fb=e=>e.status==="dirty",kd=e=>e.status==="valid",Ym=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class xr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Lb=(e,t)=>{if(kd(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new mr(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??a.defaultError},description:s}}class Pe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ys(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ys(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:Ys(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ym(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ys(t)},i=this._parseSync({data:t,path:s.path,parent:s});return Lb(s,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ys(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Ym(s)?s:Promise.resolve(s));return Lb(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:K.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Qr({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ms.create(this,this._def)}nullable(){return Qo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gr.create(this,this._def)}promise(){return Rl.create(this,this._def)}or(t){return Rd.create([this,t],this._def)}and(t){return Pd.create(this,t,this._def)}transform(t){return new Qr({...Ee(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Md({...Ee(this._def),innerType:this,defaultValue:n,typeName:ge.ZodDefault})}brand(){return new b8({typeName:ge.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sg({...Ee(this._def),innerType:this,catchValue:n,typeName:ge.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Vf.create(this,t)}readonly(){return og.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const l8=/^c[^\s-]{8,}$/i,u8=/^[a-z][a-z0-9]*$/,c8=/^[0-9A-HJKMNP-TV-Z]{26}$/,d8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,f8=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,h8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ep;const p8=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,m8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,g8=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function v8(e,t){return!!((t==="v4"||!t)&&p8.test(e)||(t==="v6"||!t)&&m8.test(e))}class Mr extends Pe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Y.string){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:Y.string,received:i.parsedType}),Se}const r=new qt;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ne(s,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ne(s,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?ne(s,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ne(s,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")f8.test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")ep||(ep=new RegExp(h8,"u")),ep.test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")d8.test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")l8.test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")u8.test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")c8.test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ne(s,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ne(s,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ne(s,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ne(s,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?g8(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ne(s,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?v8(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ne(s,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):Le.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:K.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new Mr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new Mr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Mr.create=e=>{var t;return new Mr({checks:[],typeName:ge.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function y8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class qo extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Y.number){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:Y.number,received:i.parsedType}),Se}let r;const s=new qt;for(const i of this._def.checks)i.kind==="int"?Le.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?y8(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_finite,message:i.message}),s.dirty()):Le.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,s){return new qo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(s)}]})}_addCheck(t){return new qo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Le.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}qo.create=e=>new qo({checks:[],typeName:ge.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Ko extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Y.bigint){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:Y.bigint,received:i.parsedType}),Se}let r;const s=new qt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Le.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,s){return new Ko({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(s)}]})}_addCheck(t){return new Ko({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ko.create=e=>{var t;return new Ko({checks:[],typeName:ge.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class Xm extends Pe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Y.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:Y.boolean,received:r.parsedType}),Se}return on(t.data)}}Xm.create=e=>new Xm({typeName:ge.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Ol extends Pe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Y.date){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:Y.date,received:i.parsedType}),Se}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_date}),Se}const r=new qt;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ne(s,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ne(s,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Le.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ol({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ol.create=e=>new Ol({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ge.ZodDate,...Ee(e)});class Jm extends Pe{_parse(t){if(this._getType(t)!==Y.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:Y.symbol,received:r.parsedType}),Se}return on(t.data)}}Jm.create=e=>new Jm({typeName:ge.ZodSymbol,...Ee(e)});class _d extends Pe{_parse(t){if(this._getType(t)!==Y.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:Y.undefined,received:r.parsedType}),Se}return on(t.data)}}_d.create=e=>new _d({typeName:ge.ZodUndefined,...Ee(e)});class Od extends Pe{_parse(t){if(this._getType(t)!==Y.null){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:Y.null,received:r.parsedType}),Se}return on(t.data)}}Od.create=e=>new Od({typeName:ge.ZodNull,...Ee(e)});class eg extends Pe{constructor(){super(...arguments),this._any=!0}_parse(t){return on(t.data)}}eg.create=e=>new eg({typeName:ge.ZodAny,...Ee(e)});class yo extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return on(t.data)}}yo.create=e=>new yo({typeName:ge.ZodUnknown,...Ee(e)});class Us extends Pe{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:K.invalid_type,expected:Y.never,received:n.parsedType}),Se}}Us.create=e=>new Us({typeName:ge.ZodNever,...Ee(e)});class tg extends Pe{_parse(t){if(this._getType(t)!==Y.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:Y.void,received:r.parsedType}),Se}return on(t.data)}}tg.create=e=>new tg({typeName:ge.ZodVoid,...Ee(e)});class gr extends Pe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Y.array)return ne(n,{code:K.invalid_type,expected:Y.array,received:n.parsedType}),Se;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(ne(n,{code:o?K.too_big:K.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ne(n,{code:K.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ne(n,{code:K.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new xr(n,o,n.path,a)))).then(o=>qt.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new xr(n,o,n.path,a)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new gr({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new gr({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new gr({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}gr.create=(e,t)=>new gr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...Ee(t)});function Hi(e){if(e instanceof st){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ms.create(Hi(r))}return new st({...e._def,shape:()=>t})}else return e instanceof gr?new gr({...e._def,type:Hi(e.element)}):e instanceof Ms?Ms.create(Hi(e.unwrap())):e instanceof Qo?Qo.create(Hi(e.unwrap())):e instanceof Gr?Gr.create(e.items.map(t=>Hi(t))):e}class st extends Pe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Le.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Y.object){const u=this._getOrReturnCtx(t);return ne(u,{code:K.invalid_type,expected:Y.object,received:u.parsedType}),Se}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Us&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const d=i[u],c=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new xr(s,c,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Us){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ne(s,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const c=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new xr(s,c,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const c=await d.key;u.push({key:c,value:await d.value,alwaysSet:d.alwaysSet})}return u}).then(u=>qt.mergeObjectSync(r,u)):qt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new st({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ce.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new st({...this._def,unknownKeys:"strip"})}passthrough(){return new st({...this._def,unknownKeys:"passthrough"})}extend(t){return new st({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new st({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ge.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new st({...this._def,catchall:t})}pick(t){const n={};return Le.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new st({...this._def,shape:()=>n})}omit(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new st({...this._def,shape:()=>n})}deepPartial(){return Hi(this)}partial(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new st({...this._def,shape:()=>n})}required(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ms;)i=i._def.innerType;n[r]=i}}),new st({...this._def,shape:()=>n})}keyof(){return w2(Le.objectKeys(this.shape))}}st.create=(e,t)=>new st({shape:()=>e,unknownKeys:"strip",catchall:Us.create(),typeName:ge.ZodObject,...Ee(t)});st.strictCreate=(e,t)=>new st({shape:()=>e,unknownKeys:"strict",catchall:Us.create(),typeName:ge.ZodObject,...Ee(t)});st.lazycreate=(e,t)=>new st({shape:e,unknownKeys:"strip",catchall:Us.create(),typeName:ge.ZodObject,...Ee(t)});class Rd extends Pe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new mr(a.ctx.common.issues));return ne(n,{code:K.invalid_union,unionErrors:o}),Se}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new mr(l));return ne(n,{code:K.invalid_union,unionErrors:a}),Se}}get options(){return this._def.options}}Rd.create=(e,t)=>new Rd({options:e,typeName:ge.ZodUnion,...Ee(t)});const _c=e=>e instanceof Td?_c(e.schema):e instanceof Qr?_c(e.innerType()):e instanceof $d?[e.value]:e instanceof Ei?e.options:e instanceof Id?Object.keys(e.enum):e instanceof Md?_c(e._def.innerType):e instanceof _d?[void 0]:e instanceof Od?[null]:null;class by extends Pe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Y.object)return ne(n,{code:K.invalid_type,expected:Y.object,received:n.parsedType}),Se;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=_c(i.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new by({typeName:ge.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ee(r)})}}function ng(e,t){const n=Ys(e),r=Ys(t);if(e===t)return{valid:!0,data:e};if(n===Y.object&&r===Y.object){const s=Le.objectKeys(t),i=Le.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=ng(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===Y.array&&r===Y.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],a=t[i],l=ng(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===Y.date&&r===Y.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Pd extends Pe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(jb(i)||jb(o))return Se;const a=ng(i.value,o.value);return a.valid?((Fb(i)||Fb(o))&&n.dirty(),{status:n.value,value:a.data}):(ne(r,{code:K.invalid_intersection_types}),Se)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Pd.create=(e,t,n)=>new Pd({left:e,right:t,typeName:ge.ZodIntersection,...Ee(n)});class Gr extends Pe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Y.array)return ne(r,{code:K.invalid_type,expected:Y.array,received:r.parsedType}),Se;if(r.data.length<this._def.items.length)return ne(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new xr(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>qt.mergeArray(n,o)):qt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Gr({...this._def,rest:t})}}Gr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gr({items:e,typeName:ge.ZodTuple,rest:null,...Ee(t)})};class Ad extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Y.object)return ne(r,{code:K.invalid_type,expected:Y.object,received:r.parsedType}),Se;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new xr(r,a,r.path,a)),value:o._parse(new xr(r,r.data[a],r.path,a))});return r.common.async?qt.mergeObjectAsync(n,s):qt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Pe?new Ad({keyType:t,valueType:n,typeName:ge.ZodRecord,...Ee(r)}):new Ad({keyType:Mr.create(),valueType:t,typeName:ge.ZodRecord,...Ee(n)})}}class rg extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Y.map)return ne(r,{code:K.invalid_type,expected:Y.map,received:r.parsedType}),Se;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new xr(r,a,r.path,[u,"key"])),value:i._parse(new xr(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return Se;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return Se;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}rg.create=(e,t,n)=>new rg({valueType:t,keyType:e,typeName:ge.ZodMap,...Ee(n)});class Go extends Pe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Y.set)return ne(r,{code:K.invalid_type,expected:Y.set,received:r.parsedType}),Se;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ne(r,{code:K.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ne(r,{code:K.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const d of l){if(d.status==="aborted")return Se;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>i._parse(new xr(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new Go({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new Go({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Go.create=(e,t)=>new Go({valueType:e,minSize:null,maxSize:null,typeName:ge.ZodSet,...Ee(t)});class Qa extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Y.function)return ne(n,{code:K.invalid_type,expected:Y.function,received:n.parsedType}),Se;function r(a,l){return Zm({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qm(),Cd].filter(u=>!!u),issueData:{code:K.invalid_arguments,argumentsError:l}})}function s(a,l){return Zm({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qm(),Cd].filter(u=>!!u),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Rl){const a=this;return on(async function(...l){const u=new mr([]),d=await a._def.args.parseAsync(l,i).catch(p=>{throw u.addIssue(r(l,p)),u}),c=await Reflect.apply(o,this,d);return await a._def.returns._def.type.parseAsync(c,i).catch(p=>{throw u.addIssue(s(c,p)),u})})}else{const a=this;return on(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new mr([r(l,u.error)]);const d=Reflect.apply(o,this,u.data),c=a._def.returns.safeParse(d,i);if(!c.success)throw new mr([s(d,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Qa({...this._def,args:Gr.create(t).rest(yo.create())})}returns(t){return new Qa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Qa({args:t||Gr.create([]).rest(yo.create()),returns:n||yo.create(),typeName:ge.ZodFunction,...Ee(r)})}}class Td extends Pe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Td.create=(e,t)=>new Td({getter:e,typeName:ge.ZodLazy,...Ee(t)});class $d extends Pe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ne(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:t.data}}get value(){return this._def.value}}$d.create=(e,t)=>new $d({value:e,typeName:ge.ZodLiteral,...Ee(t)});function w2(e,t){return new Ei({values:e,typeName:ge.ZodEnum,...Ee(t)})}class Ei extends Pe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:Le.joinValues(r),received:n.parsedType,code:K.invalid_type}),Se}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{received:n.data,code:K.invalid_enum_value,options:r}),Se}return on(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Ei.create(t)}exclude(t){return Ei.create(this.options.filter(n=>!t.includes(n)))}}Ei.create=w2;class Id extends Pe{_parse(t){const n=Le.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Y.string&&r.parsedType!==Y.number){const s=Le.objectValues(n);return ne(r,{expected:Le.joinValues(s),received:r.parsedType,code:K.invalid_type}),Se}if(n.indexOf(t.data)===-1){const s=Le.objectValues(n);return ne(r,{received:r.data,code:K.invalid_enum_value,options:s}),Se}return on(t.data)}get enum(){return this._def.values}}Id.create=(e,t)=>new Id({values:e,typeName:ge.ZodNativeEnum,...Ee(t)});class Rl extends Pe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Y.promise&&n.common.async===!1)return ne(n,{code:K.invalid_type,expected:Y.promise,received:n.parsedType}),Se;const r=n.parsedType===Y.promise?n.data:Promise.resolve(n.data);return on(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Rl.create=(e,t)=>new Rl({type:e,typeName:ge.ZodPromise,...Ee(t)});class Qr extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ne(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Se:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Se:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!kd(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>kd(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);Le.assertNever(s)}}Qr.create=(e,t,n)=>new Qr({schema:e,typeName:ge.ZodEffects,effect:t,...Ee(n)});Qr.createWithPreprocess=(e,t,n)=>new Qr({schema:t,effect:{type:"preprocess",transform:e},typeName:ge.ZodEffects,...Ee(n)});class Ms extends Pe{_parse(t){return this._getType(t)===Y.undefined?on(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ms.create=(e,t)=>new Ms({innerType:e,typeName:ge.ZodOptional,...Ee(t)});class Qo extends Pe{_parse(t){return this._getType(t)===Y.null?on(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qo.create=(e,t)=>new Qo({innerType:e,typeName:ge.ZodNullable,...Ee(t)});class Md extends Pe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Y.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Md.create=(e,t)=>new Md({innerType:e,typeName:ge.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class sg extends Pe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ym(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new mr(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new mr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sg.create=(e,t)=>new sg({innerType:e,typeName:ge.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class ig extends Pe{_parse(t){if(this._getType(t)!==Y.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:Y.nan,received:r.parsedType}),Se}return{status:"valid",value:t.data}}}ig.create=e=>new ig({typeName:ge.ZodNaN,...Ee(e)});class b8 extends Pe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Vf extends Pe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Se:i.status==="dirty"?(n.dirty(),a8(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Se:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Vf({in:t,out:n,typeName:ge.ZodPipeline})}}class og extends Pe{_parse(t){const n=this._def.innerType._parse(t);return kd(n)&&(n.value=Object.freeze(n.value)),n}}og.create=(e,t)=>new og({innerType:e,typeName:ge.ZodReadonly,...Ee(t)});st.lazycreate;var ge;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ge||(ge={}));const Nd=Mr.create;qo.create;ig.create;Ko.create;Xm.create;Ol.create;Jm.create;_d.create;Od.create;eg.create;yo.create;Us.create;tg.create;const x8=gr.create,Vb=st.create;st.strictCreate;Rd.create;by.create;Pd.create;Gr.create;Ad.create;rg.create;Go.create;Qa.create;Td.create;$d.create;const w8=Ei.create;Id.create;Rl.create;Qr.create;Ms.create;Qo.create;Qr.createWithPreprocess;Vf.create;var Ub=function(e,t,n){if(e&&"reportValidity"in e){var r=re(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},E2=function(e,t){var n=function(s){var i=t.fields[s];i&&i.ref&&"reportValidity"in i.ref?Ub(i.ref,s,e):i.refs&&i.refs.forEach(function(o){return Ub(o,s,e)})};for(var r in t.fields)n(r)},E8=function(e,t){t.shouldUseNativeValidation&&E2(e,t);var n={};for(var r in e){var s=re(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(C8(t.names||Object.keys(e),r)){var o=Object.assign({},S8(re(n,r)));He(o,"root",i),He(n,r,o)}else He(n,r,i)}return n},S8=function(e){return Array.isArray(e)?e.filter(Boolean):[]},C8=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},k8=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(c){return e.push(c)})}),t){var l=n[o].types,u=l&&l[r.code];n[o]=yk(o,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},_8=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&E2({},i),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return a.errors!=null}(o))return{values:{},errors:E8(k8(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}};const Pl=({children:e,className:t,...n})=>w.jsx("h2",{className:ye("scroll-m-20 text-3xl font-semibold tracking-tight transition-colors",t),...n,children:e});function S2({shouldFetchToken:e=!0}){const{getToken:t,isSignedIn:n}=Jl(),[r,s]=G.useState(null);async function i(){if(!e)return;console.log("refetching...");const o=await t({template:"auth-token"});s(o)}return G.useEffect(()=>{let o=!0;async function a(){const u=await t({template:"auth-token"});console.log("gottenToken: ",u),o&&s(u)}async function l(){const u=localStorage.getItem("firstUseDate"),d=new Date().getTime();if(u){const c=new Date(u).getTime();d-c>zM*1e3&&(await i(),console.log("fetching token after expiry time..."),localStorage.setItem("firstUseDate",new Date().toISOString()))}}if(e)return a(),n&&l(),()=>{o=!1}},[t,n,e]),{token:r,refetchToken:i}}function Al({onSuccess:e,defaultMessage:t="something went wrong!",route:n,method:r="post",onSettled:s,onError:i,displayToast:o=!0,reqOptions:a={},noToken:l=!1}){const{token:u,refetchToken:d}=S2({shouldFetchToken:!l}),{isPending:c,isSuccess:f,mutate:p,mutateAsync:v,...y}=bP({mutationFn:b=>{const m={headers:{Authorization:l?void 0:`Bearer ${u}`},...a};return r!=="delete"?ld[r](n,b,m):ld[r](n,m)},onSuccess:b=>{e&&e(b)},onError:b=>{var m,g,x;b instanceof Nv&&(((g=(m=b.response)==null?void 0:m.data)!=null&&g.unauthenticated||((x=b==null?void 0:b.response)==null?void 0:x.status)===401)&&d(),i&&i(b)),o&&gv.error(aC(b,t))},onSettled:()=>{s&&s()}});return{isPending:c,isSuccess:f,mutate:p,mutateAsync:v,...y}}const zb=e=>{let t;const n=new Set,r=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const c=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(f=>f(t,c))}},s=()=>t,a={setState:r,getState:s,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,s,a),a},O8=e=>e?zb(e):zb;var C2={exports:{}},k2={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Uf=h,R8=vv;function P8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var A8=typeof Object.is=="function"?Object.is:P8,T8=R8.useSyncExternalStore,$8=Uf.useRef,I8=Uf.useEffect,M8=Uf.useMemo,N8=Uf.useDebugValue;k2.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=$8(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=M8(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),s!==void 0&&o.hasValue){var v=o.value;if(s(v,p))return c=v}return c=p}if(v=c,A8(d,p))return v;var y=r(p);return s!==void 0&&s(v,y)?v:(d=p,c=y)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,s]);var a=T8(e,i[0],i[1]);return I8(function(){o.hasValue=!0,o.value=a},[a]),N8(a),a};C2.exports=k2;var D8=C2.exports;const j8=Ld(D8),{useDebugValue:F8}=G,{useSyncExternalStoreWithSelector:L8}=j8;function V8(e,t=e.getState,n){const r=L8(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return F8(r),r}const Bb=e=>{const t=typeof e=="function"?O8(e):e,n=(r,s)=>V8(t,r,s);return Object.assign(n,t),n},uu=e=>e?Bb(e):Bb;var U8=e=>uu(e);const wr=Object.create(null);wr.open="0";wr.close="1";wr.ping="2";wr.pong="3";wr.message="4";wr.upgrade="5";wr.noop="6";const Oc=Object.create(null);Object.keys(wr).forEach(e=>{Oc[wr[e]]=e});const ag={type:"error",data:"parser error"},_2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",O2=typeof ArrayBuffer=="function",R2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xy=({type:e,data:t},n,r)=>_2&&t instanceof Blob?n?r(t):Hb(t,r):O2&&(t instanceof ArrayBuffer||R2(t))?n?r(t):Hb(new Blob([t]),r):r(wr[e]+(t||"")),Hb=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Wb(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let tp;function z8(e,t){if(_2&&e.data instanceof Blob)return e.data.arrayBuffer().then(Wb).then(t);if(O2&&(e.data instanceof ArrayBuffer||R2(e.data)))return t(Wb(e.data));xy(e,!1,n=>{tp||(tp=new TextEncoder),t(tp.encode(n))})}const qb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Na=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<qb.length;e++)Na[qb.charCodeAt(e)]=e;const B8=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)i=Na[e.charCodeAt(r)],o=Na[e.charCodeAt(r+1)],a=Na[e.charCodeAt(r+2)],l=Na[e.charCodeAt(r+3)],d[s++]=i<<2|o>>4,d[s++]=(o&15)<<4|a>>2,d[s++]=(a&3)<<6|l&63;return u},H8=typeof ArrayBuffer=="function",wy=(e,t)=>{if(typeof e!="string")return{type:"message",data:P2(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:W8(e.substring(1),t)}:Oc[n]?e.length>1?{type:Oc[n],data:e.substring(1)}:{type:Oc[n]}:ag},W8=(e,t)=>{if(H8){const n=B8(e);return P2(n,t)}else return{base64:!0,data:e}},P2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},A2=String.fromCharCode(30),q8=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{xy(i,!1,a=>{r[o]=a,++s===n&&t(r.join(A2))})})},K8=(e,t)=>{const n=e.split(A2),r=[];for(let s=0;s<n.length;s++){const i=wy(n[s],t);if(r.push(i),i.type==="error")break}return r};function G8(){return new TransformStream({transform(e,t){z8(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let np;function qu(e){return e.reduce((t,n)=>t+n.length,0)}function Ku(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Q8(e,t){np||(np=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(qu(n)<1)break;const l=Ku(n,1);i=(l[0]&128)===128,s=l[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(qu(n)<2)break;const l=Ku(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(qu(n)<8)break;const l=Ku(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,53-32)-1){a.enqueue(ag);break}s=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(qu(n)<s)break;const l=Ku(n,s);a.enqueue(wy(i?l:np.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(ag);break}}}})}const T2=4;function ht(e){if(e)return Z8(e)}function Z8(e){for(var t in ht.prototype)e[t]=ht.prototype[t];return e}ht.prototype.on=ht.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ht.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ht.prototype.off=ht.prototype.removeListener=ht.prototype.removeAllListeners=ht.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ht.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};ht.prototype.emitReserved=ht.prototype.emit;ht.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ht.prototype.hasListeners=function(e){return!!this.listeners(e).length};const kn=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function $2(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Y8=kn.setTimeout,X8=kn.clearTimeout;function zf(e,t){t.useNativeTimers?(e.setTimeoutFn=Y8.bind(kn),e.clearTimeoutFn=X8.bind(kn)):(e.setTimeoutFn=kn.setTimeout.bind(kn),e.clearTimeoutFn=kn.clearTimeout.bind(kn))}const J8=1.33;function e7(e){return typeof e=="string"?t7(e):Math.ceil((e.byteLength||e.size)*J8)}function t7(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function n7(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function r7(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class s7 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ey extends ht{constructor(t){super(),this.writable=!1,zf(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new s7(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=wy(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=n7(t);return n.length?"?"+n:""}}const I2="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),lg=64,i7={};let Kb=0,Gu=0,Gb;function Qb(e){let t="";do t=I2[e%lg]+t,e=Math.floor(e/lg);while(e>0);return t}function M2(){const e=Qb(+new Date);return e!==Gb?(Kb=0,Gb=e):e+"."+Qb(Kb++)}for(;Gu<lg;Gu++)i7[I2[Gu]]=Gu;let N2=!1;try{N2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const o7=N2;function D2(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||o7))return new XMLHttpRequest}catch{}if(!t)try{return new kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function a7(){}const l7=function(){return new D2({xdomain:!1}).responseType!=null}();class u7 extends Ey{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let s=location.port;s||(s=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}const n=t&&t.forceBase64;this.supportsBinary=l7&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};K8(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,q8(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=M2()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new vr(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class vr extends ht{constructor(t,n){super(),zf(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=$2(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new D2(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this.opts.extraHeaders[s])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this.opts.cookieJar)===null||s===void 0||s.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(s){this.setTimeoutFn(()=>{this.onError(s)},0);return}typeof document<"u"&&(this.index=vr.requestsCount++,vr.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=a7,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete vr.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}vr.requestsCount=0;vr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Zb);else if(typeof addEventListener=="function"){const e="onpagehide"in kn?"pagehide":"unload";addEventListener(e,Zb,!1)}}function Zb(){for(let e in vr.requests)vr.requests.hasOwnProperty(e)&&vr.requests[e].abort()}const Sy=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qu=kn.WebSocket||kn.MozWebSocket,Yb=!0,c7="arraybuffer",Xb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class d7 extends Ey{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=Xb?{}:$2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Yb&&!Xb?n?new Qu(t,n):new Qu(t):new Qu(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;xy(r,this.supportsBinary,i=>{const o={};try{Yb&&this.ws.send(i)}catch{}s&&Sy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=M2()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!Qu}}class f7 extends Ey{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=Q8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=G8();s.readable.pipeTo(t.writable),this.writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this.writer.write(r).then(()=>{s&&Sy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const h7={websocket:d7,webtransport:f7,polling:u7},p7=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,m7=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ug(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=p7.exec(e||""),i={},o=14;for(;o--;)i[m7[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=g7(i,i.path),i.queryKey=v7(i,i.query),i}function g7(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function v7(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}let j2=class Wi extends ht{constructor(t,n={}){super(),this.binaryType=c7,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=ug(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=ug(n.host).host),zf(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=r7(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=T2,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new h7[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Wi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Wi.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Wi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,d(),n.close(),n=null)}const o=c=>{const f=new Error("probe error: "+c);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&i()}const d=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Wi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=e7(s)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Wi.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const s=t.length;for(;r<s;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};j2.protocol=T2;function y7(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=ug(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const b7=typeof ArrayBuffer=="function",x7=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,F2=Object.prototype.toString,w7=typeof Blob=="function"||typeof Blob<"u"&&F2.call(Blob)==="[object BlobConstructor]",E7=typeof File=="function"||typeof File<"u"&&F2.call(File)==="[object FileConstructor]";function Cy(e){return b7&&(e instanceof ArrayBuffer||x7(e))||w7&&e instanceof Blob||E7&&e instanceof File}function Rc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Rc(e[n]))return!0;return!1}if(Cy(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Rc(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Rc(e[n]))return!0;return!1}function S7(e){const t=[],n=e.data,r=e;return r.data=cg(n,t),r.attachments=t.length,{packet:r,buffers:t}}function cg(e,t){if(!e)return e;if(Cy(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=cg(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=cg(e[r],t));return n}return e}function C7(e,t){return e.data=dg(e.data,t),delete e.attachments,e}function dg(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=dg(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=dg(e[n],t));return e}const k7=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],_7=5;var Ie;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ie||(Ie={}));class O7{constructor(t){this.replacer=t}encode(t){return(t.type===Ie.EVENT||t.type===Ie.ACK)&&Rc(t)?this.encodeAsBinary({type:t.type===Ie.EVENT?Ie.BINARY_EVENT:Ie.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ie.BINARY_EVENT||t.type===Ie.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=S7(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function Jb(e){return Object.prototype.toString.call(e)==="[object Object]"}class ky extends ht{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ie.BINARY_EVENT;r||n.type===Ie.BINARY_ACK?(n.type=r?Ie.EVENT:Ie.ACK,this.reconstructor=new R7(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Cy(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ie[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ie.BINARY_EVENT||r.type===Ie.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(ky.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Ie.CONNECT:return Jb(n);case Ie.DISCONNECT:return n===void 0;case Ie.CONNECT_ERROR:return typeof n=="string"||Jb(n);case Ie.EVENT:case Ie.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&k7.indexOf(n[0])===-1);case Ie.ACK:case Ie.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class R7{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=C7(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const P7=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ky,Encoder:O7,get PacketType(){return Ie},protocol:_7},Symbol.toStringTag,{value:"Module"}));function Fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const A7=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class L2 extends ht{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Fn(t,"open",this.onopen.bind(this)),Fn(t,"packet",this.onpacket.bind(this)),Fn(t,"error",this.onerror.bind(this)),Fn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(A7.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Ie.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),r.id=o}const s=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!s||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ie.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ie.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ie.EVENT:case Ie.BINARY_EVENT:this.onevent(t);break;case Ie.ACK:case Ie.BINARY_ACK:this.onack(t);break;case Ie.DISCONNECT:this.ondisconnect();break;case Ie.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:Ie.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ie.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function da(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}da.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};da.prototype.reset=function(){this.attempts=0};da.prototype.setMin=function(e){this.ms=e};da.prototype.setMax=function(e){this.max=e};da.prototype.setJitter=function(e){this.jitter=e};class fg extends ht{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,zf(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new da({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||P7;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new j2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Fn(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Fn(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Fn(t,"ping",this.onping.bind(this)),Fn(t,"data",this.ondata.bind(this)),Fn(t,"error",this.onerror.bind(this)),Fn(t,"close",this.onclose.bind(this)),Fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Sy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new L2(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ra={};function Pc(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=y7(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=Ra[s]&&i in Ra[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new fg(r,t):(Ra[s]||(Ra[s]=new fg(r,t)),l=Ra[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Pc,{Manager:fg,Socket:L2,io:Pc,connect:Pc});const es=uu(e=>({socket:null,isConnected:!1,connect:(t,n)=>{const r=Pc(t);r.on("connect",()=>{r.emit("userConnected",n),e({isConnected:!0})}),r.on("disconnect",()=>{e({isConnected:!1})}),e({socket:r})},disconnect:()=>{const{socket:t}=es.getState();t&&(t.disconnect(),e({socket:null,isConnected:!1}))}}));function V2(e,t){let n;try{n=e()}catch{return}return{getItem:s=>{var i;const o=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),a=(i=n.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>n.setItem(s,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:s=>n.removeItem(s)}}const Tl=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Tl(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Tl(r)(n)}}}},T7=(e,t)=>(n,r,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:b=>b,version:0,merge:(b,m)=>({...m,...b}),...t},o=!1;const a=new Set,l=new Set;let u;try{u=i.getStorage()}catch{}if(!u)return e((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...b)},r,s);const d=Tl(i.serialize),c=()=>{const b=i.partialize({...r()});let m;const g=d({state:b,version:i.version}).then(x=>u.setItem(i.name,x)).catch(x=>{m=x});if(m)throw m;return g},f=s.setState;s.setState=(b,m)=>{f(b,m),c()};const p=e((...b)=>{n(...b),c()},r,s);let v;const y=()=>{var b;if(!u)return;o=!1,a.forEach(g=>g(r()));const m=((b=i.onRehydrateStorage)==null?void 0:b.call(i,r()))||void 0;return Tl(u.getItem.bind(u))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var x;return v=i.merge(g,(x=r())!=null?x:p),n(v,!0),c()}).then(()=>{m==null||m(v,void 0),o=!0,l.forEach(g=>g(v))}).catch(g=>{m==null||m(void 0,g)})};return s.persist={setOptions:b=>{i={...i,...b},b.getStorage&&(u=b.getStorage())},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:b=>(a.add(b),()=>{a.delete(b)}),onFinishHydration:b=>(l.add(b),()=>{l.delete(b)})},y(),v||p},$7=(e,t)=>(n,r,s)=>{let i={storage:V2(()=>localStorage),partialize:y=>y,version:0,merge:(y,b)=>({...b,...y}),...t},o=!1;const a=new Set,l=new Set;let u=i.storage;if(!u)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...y)},r,s);const d=()=>{const y=i.partialize({...r()});return u.setItem(i.name,{state:y,version:i.version})},c=s.setState;s.setState=(y,b)=>{c(y,b),d()};const f=e((...y)=>{n(...y),d()},r,s);let p;const v=()=>{var y,b;if(!u)return;o=!1,a.forEach(g=>{var x;return g((x=r())!=null?x:f)});const m=((b=i.onRehydrateStorage)==null?void 0:b.call(i,(y=r())!=null?y:f))||void 0;return Tl(u.getItem.bind(u))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var x;return p=i.merge(g,(x=r())!=null?x:f),n(p,!0),d()}).then(()=>{m==null||m(p,void 0),p=r(),o=!0,l.forEach(g=>g(p))}).catch(g=>{m==null||m(void 0,g)})};return s.persist={setOptions:y=>{i={...i,...y},y.storage&&(u=y.storage)},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},i.skipHydration||v(),p||f},I7=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?T7(e,t):$7(e,t),U2=I7,M7=null,$n=uu()(U2(e=>({profile:M7,setProfile:t=>e(()=>({profile:t})),updateProfile:t=>e(n=>({profile:n.profile===null?null:{...n.profile,...t}})),removeProfile:()=>e({profile:null})}),{name:"profile-storage",storage:V2(()=>localStorage)}));function N7({displayToast:e=!1,defaultMessage:t="failed to fetch",isError:n,error:r,refetch:s,refetchToken:i}){const{signOut:o}=Jl(),a=Qt(),[l,u]=h.useState(0);h.useEffect(()=>{var d,c,f;e&&n&&r&&(console.error("[errorlog]",r),r instanceof Nv&&(console.log((d=r==null?void 0:r.response)==null?void 0:d.data),(f=(c=r.response)==null?void 0:c.data)!=null&&f.unauthenticated&&(l<3?(i(),s(),u(p=>p+1)):(console.error("Max retries reached. Stopping further retries."),o(),a("/sign-in")))),gv.error(aC(r,t)))},[e,n,r])}function Bf({enabled:e,route:t,queryKey:n,defaultMessage:r="failed to fetch",displayToast:s=!1,refetchOnMount:i=!1}){const[o,a]=h.useState(!1),{token:l,refetchToken:u}=S2({shouldFetchToken:!0});h.useEffect(()=>{a(!!(l!==null&&e))},[l,e]);const{data:d,isPending:c,refetch:f,error:p,isError:v,...y}=yP({enabled:o,queryKey:n,queryFn:()=>ld.get(t,{headers:{Authorization:`Bearer ${l}`}}),refetchOnMount:i});return N7({error:p,isError:v,refetch:f,refetchToken:u,defaultMessage:r,displayToast:s}),{data:d,isPending:c,refetch:f,error:p,isError:v,...y}}const bt=({children:e,className:t,...n})=>w.jsx("p",{className:ye("leading-7 ",t),...n,children:e}),ex={groupInfo:null,dmInfo:null};let D7=e=>({activeChat:ex,setActiveChat:t=>e(()=>({activeChat:t})),updateLastSeen:t=>{e(n=>{var r;return(r=n.activeChat)!=null&&r.dmInfo&&(n.activeChat.dmInfo.lastSeen=t),n})},reset:()=>{e({activeChat:ex})}});const fa=uu()(U2(D7,{name:"activeChat"}));function j7(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const z2="Switch",[F7,hU]=Pi(z2),[L7,V7]=F7(z2),U7=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:u,...d}=e,[c,f]=h.useState(null),p=$t(t,g=>f(g)),v=h.useRef(!1),y=c?!!c.closest("form"):!0,[b=!1,m]=pf({prop:s,defaultProp:i,onChange:u});return h.createElement(L7,{scope:n,checked:b,disabled:a},h.createElement(wt.button,V({type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":B2(b),"data-disabled":a?"":void 0,disabled:a,value:l},d,{ref:p,onClick:Oe(e.onClick,g=>{m(x=>!x),y&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})})),y&&h.createElement(H7,{control:c,bubbles:!v.current,name:r,value:l,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),z7="SwitchThumb",B7=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=V7(z7,n);return h.createElement(wt.span,V({"data-state":B2(s.checked),"data-disabled":s.disabled?"":void 0},r,{ref:t}))}),H7=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,i=h.useRef(null),o=j7(n),a=_C(t);return h.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&c){const f=new Event("click",{bubbles:r});c.call(l,n),l.dispatchEvent(f)}},[o,n,r]),h.createElement("input",V({type:"checkbox","aria-hidden":!0,defaultChecked:n},s,{tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function B2(e){return e?"checked":"unchecked"}const H2=U7,W7=B7,_y=h.forwardRef(({className:e,...t},n)=>w.jsx(H2,{className:ye("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",e),...t,ref:n,children:w.jsx(W7,{className:ye("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")})}));_y.displayName=H2.displayName;const q7=({children:e,className:t,...n})=>w.jsx("small",{className:ye("text-sm font-medium leading-none",t),...n,children:e});function zs({type:e,src:t,className:n="",size:r=32,alt:s="user's avatar"}){const[i,o]=h.useState(!1),a=()=>{o(!0)};return w.jsx("figure",{children:!i&&t?w.jsx("img",{src:t,alt:s,style:{height:`${r}px`,width:`${r}px`},className:ye("rounded-[50%] mx-auto object-cover border-2 border-slate-500 dark:border-slate-700",n),onError:a}):e==="User"?w.jsx(RM,{size:r,className:ye("rounded-[50%] p-1 mx-auto object-cover border-2 border-slate-500 dark:border-slate-700",n)}):w.jsx(ey,{size:r,className:ye("rounded-[50%] p-1 mx-auto object-cover border-2 border-slate-500 dark:border-slate-700",n)})})}function K7(e,t=64){const[n,r]=h.useState(e),[s,i]=h.useState(null),o=u=>{var c;const d=(c=u.target.files)==null?void 0:c[0];d&&(i(d),r(URL.createObjectURL(d)))};return{AvatarUploaderComponent:({type:u="User"})=>w.jsxs("label",{className:"relative cursor-pointer block mx-auto max-w-fit max-h-fit",style:{width:t,height:t},children:[w.jsx(zs,{src:n,type:u,size:t}),w.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:o}),w.jsx("div",{className:"absolute -bottom-2 -right-2 rounded-full p-2 h-8 w-8 bg-primary flex items-center justify-center",children:w.jsx(lM,{className:"w-6 h-6 text-white opacity-75"})})]}),uploadAvatar:async()=>s?await KM(s):null}}const W2=Vb({members:x8(Vb({label:Nd(),value:Nd()})).min(1).readonly()}),G7=W2.extend({name:Nd(),description:Nd().min(8,"Description must be at least 8 characters").max(500).optional(),privacy:w8(["PRIVATE","PUBLIC"]).default("PRIVATE")});function q2({open:e,setModal:t,isCreateGroup:n=!0,initialMemberIds:r}){const s=n?G7:W2,{register:i,formState:{errors:o},handleSubmit:a,setValue:l,watch:u}=t5({resolver:_8(s),defaultValues:{privacy:"PUBLIC"}}),[d,c]=h.useState([]),{AvatarUploaderComponent:f,uploadAvatar:p}=K7(null,75),{profile:v}=$n(),y=Qt(),{socket:b}=es(),{setActiveChat:m}=fa(),[g,x]=h.useState(!1),{data:E,isPending:C}=Bf({enabled:n,route:"/users?memberInfo=true",queryKey:["users"],defaultMessage:"Failed to fetch users"}),{mutate:O,isPending:k}=Al({route:"/chats/create-groupchat",method:"post",defaultMessage:"Failed to create group chat",onSuccess(T){var P,L,I,U,z,X,D,N,B,Z,Q,se,be,Ce,pe,me,xe;S.forEach(ke=>{var ze,tt;b==null||b.emit("joinChat",{chatId:(tt=(ze=T.data)==null?void 0:ze.groupChat)==null?void 0:tt.id,userId:ke.value})}),b==null||b.emit("sendMessage",{message:(P=T.data)==null?void 0:P.firstMessage,chatInfo:(L=T.data)==null?void 0:L.groupChat}),t(!1,!0),m({groupInfo:{id:(U=(I=T.data)==null?void 0:I.groupChat)==null?void 0:U.id,isGroup:!0,name:(X=(z=T.data)==null?void 0:z.groupChat)==null?void 0:X.name,imageUrl:(N=(D=T.data)==null?void 0:D.groupChat)==null?void 0:N.imageUrl,members:(B=T.data)==null?void 0:B.members,description:(Q=(Z=T.data)==null?void 0:Z.groupChat)==null?void 0:Q.description,inviteCode:(be=(se=T.data)==null?void 0:se.groupChat)==null?void 0:be.inviteCode,privacy:(pe=(Ce=T.data)==null?void 0:Ce.groupChat)==null?void 0:pe.privacy},dmInfo:null}),y(`/${v==null?void 0:v.id}/chats/${(xe=(me=T.data)==null?void 0:me.groupChat)==null?void 0:xe.id}`)}});h.useEffect(()=>{var T,P;if(E){let L=(P=(T=E.data)==null?void 0:T.users)==null?void 0:P.map(I=>({label:I.username,value:I.id}));r&&(L=L.filter(I=>!r.includes(I.value))),c(L)}},[E,r]);const S=u("members"),$=u("privacy");async function A(T){console.log(T),x(!0);try{if(n){const P=await p();O({...T,members:[...T.members,{label:v==null?void 0:v.username,value:v==null?void 0:v.id,isOwner:!0}],ownerName:v==null?void 0:v.username,ownerId:v==null?void 0:v.id,imageUrl:P})}}catch{}finally{x(!1)}console.log(T)}return w.jsx(ay,{open:e,onOpenChange:T=>t(T,!0),children:w.jsxs(Cf,{className:ye("h-[500px] overflow-auto pb-5",!n&&"h-[300px]"),children:[w.jsxs(kf,{className:"mt-2 flex items-center gap-x-2 flex-row",children:[" ",w.jsx(ey,{size:28}),w.jsx(Pl,{className:"text-2xl",children:n?"New Group Chat":"Add Members"})]}),w.jsxs("form",{className:"space-y-4",onSubmit:a(A),children:[n&&w.jsxs(w.Fragment,{children:[w.jsx(f,{type:"Group"}),w.jsx(w5,{label:"name",errors:o,id:"name",register:i,type:"text"}),w.jsx(E5,{label:"description",errors:o,id:"description",register:i,height:10,width:50,className:"max-h-[100px]"}),w.jsxs("div",{className:"flex items-center justify-between p-3 text-gray-600 dark:text-gray-100 font-medium",children:[w.jsxs(bt,{className:"flex items-center gap-5",children:[w.jsx("span",{children:w.jsx(hM,{size:20})})," ",w.jsx("span",{children:"Make Group Private"})]}),w.jsx(_y,{checked:$==="PRIVATE",value:$,onCheckedChange:()=>{if($==="PRIVATE"){l("privacy","PUBLIC");return}l("privacy","PRIVATE")}})]}),$==="PUBLIC"&&w.jsx(q7,{className:"text-neutral-500 my-1.5",children:"Anyone can join this group without being added."})]}),w.jsx("div",{children:C?w.jsx("div",{children:w.jsx(bt,{children:"Fetching Members..."})}):w.jsxs(w.Fragment,{children:[w.jsx("label",{htmlFor:"members",children:"Members"}),w.jsx(i8,{isMulti:!0,name:"members",id:"members",options:d,onChange:T=>l("members",T),value:S,className:"text-foreground",styles:BM})]})}),w.jsx("div",{className:"flex items-center justify-end",children:w.jsx(ft,{className:"ml-auto px-8 py-3",disabled:k||g,children:k||g?"Creating...":n?"Create":"Add"})})]})]})})}function K2(e,t){const n=e instanceof Function?e():e,[r,s]=h.useState(n);return h.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}const hg=({children:e,className:t,...n})=>w.jsx("h3",{className:ye("scroll-m-20 text-2xl font-semibold tracking-tight",t),...n,children:e}),Q7="/assets/groupchats-c07878ef.png",Z7="/assets/privateMessage-a9faf387.png",Y7="/assets/videoMessage-5bc969b2.png",Oy="/assets/chatly-svg-955006a9.svg",X7="/assets/Image-cae88ee7.png",J7="/assets/Stars-0242bce2.svg",pg="/assets/avatar1-3bf75947.png",mg="/assets/avatar2-10b39eb0.png",G2="/assets/avatar3-b6ffe2e2.png",Ry=U8(e=>({chatList:[],setChatList:t=>e({chatList:t}),addChat:t=>e(n=>({chatList:[...n.chatList,t]})),updateChat:t=>e(n=>({chatList:n.chatList.map(r=>r.id===t.id?t:r)})),removeChat:t=>e(n=>({chatList:n.chatList.filter(r=>r.id!==t)}))})),Hf=uu(e=>({messages:null,setMessages:t=>e(()=>({messages:t})),addMessage:t=>e(n=>({messages:n.messages?[...n.messages,t]:[t]})),resetMessages:()=>e(()=>({messages:null}))}));function e9({members:e,onComplete:t}){const{profile:n}=$n(),{setActiveChat:r}=fa(),{setMessages:s}=Hf(),{chatList:i,setChatList:o}=Ry(),{socket:a}=es(),l=Qt(),{mutate:u,isPending:d}=Al({defaultMessage:"Failed to create dm!",method:"post",route:"/chats/create-dm",onSuccess(f){var g,x,E,C,O,k,S,$;const p=(g=f.data)==null?void 0:g.privateChat;console.log(p);const v=p==null?void 0:p.members.find(A=>A.user.username!==(n==null?void 0:n.username)),y={id:p==null?void 0:p.id,avatarUrl:((x=v==null?void 0:v.user)==null?void 0:x.avatar)??"",username:((E=v==null?void 0:v.user)==null?void 0:E.username)??"",lastSeen:(C=v==null?void 0:v.user)==null?void 0:C.lastSeen,bio:(O=v==null?void 0:v.user)==null?void 0:O.bio,email:(k=v==null?void 0:v.user)==null?void 0:k.email};r({groupInfo:null,dmInfo:y});const b=i.slice();i.find(A=>A.id===(p==null?void 0:p.id))||(b.push({...y,name:y.username,isGroup:!1,message:{body:null,createdAt:new Date,id:Qe(),readByIds:[],senderId:(n==null?void 0:n.id)??"",type:"SYSTEM"}}),o(b)),p.members.forEach(A=>{a==null||a.emit("joinChat",{chatId:p.id,userId:A.user.id})}),s(null),l(`/${n==null?void 0:n.id}/chats/${($=(S=f.data)==null?void 0:S.privateChat)==null?void 0:$.id}`)},onSettled(){t&&t()}});async function c(){u({members:e})}return{handleCreate:c,isPending:d}}function t9({chatId:e,onComplete:t}){const{profile:n}=$n(),{setActiveChat:r}=fa(),{setMessages:s}=Hf(),i=Qt(),{socket:o}=es(),{mutate:a,isPending:l}=Al({defaultMessage:"Failed to join group chat!",method:"post",route:`/chats/${e}/join`,onSuccess(d){var f,p;const c=(f=d.data)==null?void 0:f.groupChat;console.log(c),r({groupInfo:{imageUrl:c==null?void 0:c.imageUrl,description:c==null?void 0:c.description,id:c==null?void 0:c.id,isGroup:!0,members:c==null?void 0:c.members,name:(c==null?void 0:c.name)??""},dmInfo:null}),o==null||o.emit("joinChat",{chatId:c==null?void 0:c.id,userId:n==null?void 0:n.id}),o==null||o.emit("newMessage",{message:(p=d.data)==null?void 0:p.joinedMessage,chatInfo:c}),s([]),i(`/${n==null?void 0:n.id}/chats/${c==null?void 0:c.id}`)},onSettled(){t&&t()}});async function u(){a({userId:n==null?void 0:n.id,username:n==null?void 0:n.username})}return{handleJoin:u,isPending:l}}function gg(e){const t=e.type==="group",{profile:n}=$n(),{handleCreate:r}=e9({members:[{userId:(n==null?void 0:n.id)??""},{userId:e.id}],onComplete:()=>{e.toggleLoading(!1)}}),{handleJoin:s}=t9({chatId:t?e.chatId:"",onComplete(){e.toggleLoading(!1)}});async function i(){e.toggleLoading(!0),t?s():r()}const o=t?null:qM(e.lastSeen);return w.jsxs("div",{className:` + w-full + relative + flex + items-center + space-x-3 + py-3 + px-1 + hover:bg-neutral-200 + dark:hover:bg-[#272A20] + rounded-lg + transition + cursor-pointer + `,onClick:e.disable?void 0:i,children:[w.jsx("div",{className:"relative",children:t?w.jsx(w.Fragment,{children:w.jsx(zs,{type:"Group",src:e.imageUrl})}):w.jsxs(w.Fragment,{children:[w.jsx(zs,{type:"User",src:e.avatarUrl}),(o==null?void 0:o.isOnline)&&w.jsx("div",{className:"bg-brand-p1 rounded-full ring-2 ring-white h-3 block w-3 shadow-[0_0_20px_#4C8DC3] right-0 top-0 absolute z-30"})]})}),w.jsxs("div",{children:[w.jsxs(hg,{className:"text-xl font-medium mb-1 text-gray-900 truncate dark:text-gray-100",children:[w.jsx("span",{children:t?e.name:e.username})," ",!t&&e.showRole&&e.role!=="MEMBER"&&w.jsx("span",{className:ye(" !capitalize rounded-md border text-xs px-1 tracking-tight leading-snug",e.role==="OWNER"&&"border-[#ac9619] font-medium text-[#ac9619]",e.role==="ADMIN"&&"border-brand-p1 text-brand-p1"),children:e.role})]}),w.jsx(bt,{className:ye(` + text-xs + text-[#17191c] dark:text-gray-500 fontlight + `,(o==null?void 0:o.isOnline)&&"text-brand-p1 font-medium"),children:t?e.description:o==null?void 0:o.lastSeen})]})]})}Qe(),Qe(),new Date(new Date().getTime()-30*60*1e3),Qe(),new Date(new Date().getTime()-40*60*1e3),Qe(),new Date(new Date().getTime()-100*60*1e3),Qe(),new Date(new Date().getTime()-24*60*60*1e3);function Q2({keyword:e,usersOnly:t,enabled:n=!0}){const{data:r,refetch:s,isError:i,isPending:o,...a}=Bf({enabled:n,queryKey:["search"],route:`/search?keyword=${e}&usersOnly=${t}`,displayToast:!1});return{searchData:r,refetch:s,isError:i,isPending:o,...a}}function n9({open:e,setModal:t,toggleLoading:n}){const[r,s]=h.useState(""),i=K2(r,500);console.log(r.length>0);const{searchData:o,isError:a,isLoading:l}=Q2({keyword:i,usersOnly:!0,enabled:r.length>0&&i.length>0});console.log("loading:",l);const u=h.useMemo(()=>o!=null&&o.data?o.data.users:null,[o==null?void 0:o.data]);return w.jsx(ay,{open:e,onOpenChange:d=>t(d,!1),children:w.jsxs(Cf,{className:"h-[450px] block gap-0 overflow-auto pb-5",children:[w.jsxs(kf,{className:"mt-2 mb-6 flex items-center gap-x-2 flex-row",children:[" ",w.jsx(oC,{size:28}),w.jsx(Pl,{className:"text-2xl",children:"New Direct Message"})]}),w.jsx("form",{className:" w-full h-10 flex-shrink-0 mb-3",children:w.jsxs("label",{className:"w-full relative ",children:[w.jsxs(ft,{variant:"ghost",className:"absolute focus:outline-none left-0 top-0 ml-2 bottom-0 my-auto h-fit w-fit mr-4 p-0 text-gray-500 hover:bg-transparent hover:text-gray-500",children:[w.jsx(iC,{size:16}),w.jsx("p",{className:"sr-only",children:"Search"})]}),w.jsx("input",{type:"text",name:"keywords",placeholder:"Search by Username",onChange:d=>s(d.target.value),value:r,className:"w-full py-2 pl-9 pr-4 h-10 dark:bg-gray-50 placeholder-gray-400 text-gray-600 border border-gray-300 focus:border-transparent rounded-3xl outline-none focus:ring-brand-p2 focus:ring-2"})]})}),w.jsx("div",{className:"px-5 py-0 min-h-[200px] flex items-center flex-col",children:l?w.jsxs(bt,{className:"opacity-80 text-neutral-500 leading-snug tracking-wide flex items-center gap-x-1",children:["Finding users"," ",w.jsx("span",{children:w.jsx(jv,{className:"animate-bounce"})})]}):u===null?a?w.jsxs("div",{className:"flex flex-col justify-start mt-2 w-full flex-shrink-0",children:[w.jsx(bt,{className:"mb-2 text-lg font-medium",children:"Something went wrong!"}),w.jsxs(ft,{className:"max-w-fit gap-x-1.5",children:["Retry ",w.jsx(CM,{size:16})]})]}):w.jsx(bt,{className:"font-medium opacity-80 mx-auto w-full ",children:"Type the names of your friends or family and start a chat now!"}):u.length===0?w.jsxs(bt,{children:["No Users fits this search term"," ",w.jsx("span",{className:"font-semibold text-brand-p2",children:r})]}):u.map(d=>w.jsx(gg,{type:"user",avatarUrl:d.avatarUrl,id:d.id,lastSeen:d.lastSeen,username:d.username,toggleLoading:n},d.id))})]})})}function r9({openDrawer:e,handleSearch:t,showBack:n,goBackToChats:r}){const[s,i]=h.useState(""),{profile:o}=$n(),[a,l]=h.useState(!1);function u(g){l(g)}const[d,c]=h.useState(!1),[f,p]=h.useState(!1),v=Qt();function y(g){g.preventDefault(),t(s)}function b(){r(""),i("")}function m(g,x){if(x){c(g);return}p(g)}return w.jsxs(w.Fragment,{children:[w.jsxs("header",{className:"flex px-3 items-center justify-between h-16 lg:gap-2",children:[n?w.jsxs(ft,{onClick:b,variant:"ghost",className:"p-0 text-gray-500 hover:bg-transparent hover:text-gray-500",children:[w.jsx(cM,{size:26}),w.jsx("span",{className:"sr-only",children:"Back"})]}):w.jsx(ft,{onClick:()=>e(!0),variant:"ghost",className:"p-0 text-gray-500 border-none h-fit w-fit flex-shrink-0 hover:bg-transparent hover:opacity-50 border-2 border-slate-500 dark:border-slate-700",children:w.jsx(zs,{type:"User",src:(o==null?void 0:o.avatar)??"",size:40})}),w.jsx("form",{onSubmit:y,className:" w-[calc(90%-96px)] lg:w-[70%] flex-shrink-0",children:w.jsxs("label",{className:"w-full relative ",children:[w.jsxs(ft,{variant:"ghost",type:"button",className:"absolute left-0 top-0 ml-2 bottom-0 my-auto h-fit w-fit mr-4 p-0 text-gray-500 hover:bg-transparent hover:text-gray-500",children:[w.jsx(iC,{size:16}),w.jsx("p",{className:"sr-only",children:"Search"})]}),w.jsx("input",{type:"text",name:"keywords",placeholder:"Search for users or groups",onChange:g=>i(g.target.value),value:s,onKeyDown:g=>{g.key==="Enter"&&y(g)},className:"w-full py-2 pl-9 pr-4 h-10 dark:bg-gray-50 placeholder-gray-400 text-gray-600 border border-gray-300 focus:border-transparent rounded-3xl outline-none focus:ring-brand-p2 focus:ring-2"})]})}),w.jsxs(Xv,{children:[w.jsx(Jv,{asChild:!0,children:w.jsx(ft,{variant:"ghost",size:"icon",className:"rounded-full bg-neutral-200 hover:opacity-50 dark:bg-neutral-700 border-2",children:w.jsx(jv,{})})}),w.jsxs(bf,{className:"py-3 space-y-2",children:[w.jsxs(Fr,{onClick:()=>m(!0,!1),className:"gap-2 py-2 px-4 justify-start hover:opacity-80 cursor-pointer dark:hover:bg-[#272A20]",children:[w.jsx(oC,{className:"!opacity-50 h-5 w-5"}),"New DM"]}),w.jsxs(Fr,{onClick:()=>m(!0,!0),className:"gap-2 py-2 px-4 justify-start hover:opacity-80 cursor-pointer dark:hover:bg-[#272A20]",children:[w.jsx(ey,{className:"!opacity-50 h-5 w-5"}),"New Group Chat"]}),w.jsxs(Fr,{onClick:()=>v("/discover"),className:"gap-2 py-2 px-4 justify-start hover:opacity-80 cursor-pointer dark:hover:bg-[#272A20]",children:[w.jsx(gM,{className:"!opacity-50 h-5 w-5"}),"Discover People"]})]})]})]}),w.jsx(q2,{open:d,setModal:m}),w.jsx(n9,{open:f,setModal:m,toggleLoading:u}),a&&w.jsx(bM,{})]})}const s9=Ak,i9=Tk,Z2=h.forwardRef(({className:e,...t},n)=>w.jsx(xf,{className:ye("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Z2.displayName=xf.displayName;const o9=Lv("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"}}),Y2=h.forwardRef(({side:e="right",className:t,children:n,...r},s)=>w.jsxs(i9,{children:[w.jsx(Z2,{}),w.jsxs(wf,{ref:s,className:ye(o9({side:e}),t),...r,children:[n,w.jsxs(oy,{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:[w.jsx(Fv,{className:"h-4 w-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Y2.displayName=wf.displayName;const X2=({className:e,...t})=>w.jsx("div",{className:ye("flex flex-col space-y-2 text-center sm:text-left",e),...t});X2.displayName="SheetHeader";const a9=h.forwardRef(({className:e,...t},n)=>w.jsx(Ef,{ref:n,className:ye("text-lg font-semibold text-foreground",e),...t}));a9.displayName=Ef.displayName;const l9=h.forwardRef(({className:e,...t},n)=>w.jsx(Sf,{ref:n,className:ye("text-sm text-muted-foreground",e),...t}));l9.displayName=Sf.displayName;function u9({value:e}){const t=h.useRef(null);return h.useEffect(()=>{t.current!==null&&(t.current.style.height=t.current.scrollHeight+"px")},[e]),{textAreaRef:t}}function tx({label:e,defaultValue:t,onChange:n,isLinkable:r=!1,isEditable:s=!0,showLabel:i=!0,inputClassName:o="",labelClassName:a=""}){const[l,u]=h.useState(!1),{textAreaRef:d}=u9({value:t});return w.jsxs("div",{children:[i&&w.jsx("label",{className:ye("text-gray-900 dark:text-gray-200 font-medium text-sm",a),children:e}),w.jsxs("div",{className:"relative mt-1",children:[w.jsx("textarea",{value:t,disabled:!l,onChange:c=>n(e.toLowerCase(),c.target.value),rows:10,cols:10,contentEditable:s,ref:d,className:ye("w-full resize-none border-none overflow-hidden py-2 pr-10 pl-2 h-[20px] placeholder-neutral-400 dark:text-gray-300 !bg-transparent text-gray-500 border border-gray-300 focus:border-transparent rounded-lg outline-none focus:ring-brand-p2 focus:ring-2",r&&"!text-brand-p1 underline",o)}),s&&w.jsx(ft,{onClick:()=>u(c=>!c),variant:"ghost",className:"absolute right-0 top-0 mr-4 bottom-0 my-auto h-fit w-fit ml-4 p-0 text-gray-500",children:l?w.jsx(Dv,{size:20,className:"text-brand-p2"}):w.jsx(SM,{size:20})})]})]})}function nx({text:e,Icon:t,size:n=25,handleClick:r,danger:s}){return w.jsxs("div",{className:`p-3 rounded-lg w-full flex items-center gap-5\r + dark:hover:bg-[#272A20] cursor-pointer hover:bg-gray-300`,role:"button",onClick:()=>r?r(e):null,children:[typeof t=="string"?w.jsx("img",{src:t,alt:"icon",className:"",style:{height:n,width:n}}):w.jsx(t,{size:n,className:ye("text-gray-600 dark:text-gray-100",s&&"text-red-600 dark:text-red-700")}),w.jsx(bt,{className:ye("text-gray-600 dark:text-gray-100 font-medium mt-0",s&&"text-red-600 dark:text-red-700"),children:e})]})}function c9({open:e,onOpenChange:t,deleteFn:n,title:r="Are you absolutely sure?",message:s="This action cannot be undone. This will permanently delete this item.",isPending:i}){async function o(){await n(),t(!1)}return w.jsx(ay,{open:e,onOpenChange:a=>!i&&t(a),children:w.jsxs(Cf,{children:[w.jsxs(kf,{children:[w.jsx(Mk,{children:r}),w.jsx(Nk,{children:s})]}),w.jsxs(Ik,{children:[w.jsx(ft,{variant:"secondary",onClick:()=>t(!1),children:"Cancel"}),w.jsx(ft,{disabled:i,variant:"destructive",onClick:o,children:i?"Deleting...":"Continue"})]})]})})}function d9({isHomePage:e=!1}){const{signOut:t}=Jl(),n=Qt(),{removeProfile:r}=$n();async function s(){await t(),r(),e||n("/sign-in")}return{handleLogout:s}}function f9({isOpen:e,openDrawer:t}){const n=Yl(),{profile:r,updateProfile:s}=$n(),{handleLogout:i}=d9({isHomePage:!1}),{theme:o,setTheme:a}=OE(),l=h.useRef(r==null?void 0:r.username),u=h.useRef(r==null?void 0:r.bio),d=Qt(),[c,f]=h.useState({username:"@"+(r==null?void 0:r.username)||"",bio:(r==null?void 0:r.bio)||""}),[p,v]=h.useState({groupChat:!1,deleteAccount:!1}),{mutate:y,isPending:b}=Al({method:"delete",route:"/users"}),{mutate:m,isPending:g}=Al({method:"patch",route:"/users",onSuccess(){l.current=c.username.slice(1),u.current=c.bio,n.setQueryData(["profile"],A=>({data:{user:{...r,username:c.username,bio:c.bio}}})),s({username:c.username.slice(1),bio:c.bio})}}),x=l.current!==c.username.slice(1)||u.current!==c.bio,E=g||b;async function C(A){switch(A){case"New Group chat":v(T=>({...T,groupChat:!0}));return;case"Request Feature":window.open("https://www.github.com/nathan-somto/chatly/issues","__blank");return;case"Logout":await i();return;case"Delete Account":v(T=>({...T,deleteAccount:!0}));return;case"Change Wallpaper":d(`/${r==null?void 0:r.id}/wallpaper`);return}}function O(A,T){f(P=>({...P,[A]:T}))}async function k(A){!A.username||!A.bio||(A.username=A.username.slice(1),m(A),console.log(A))}async function S(){y()}function $(A){v(T=>({...T,groupChat:A}))}return w.jsxs(w.Fragment,{children:[w.jsx(q2,{open:p.groupChat,setModal:$}),w.jsx(c9,{open:p.deleteAccount,deleteFn:S,isPending:b,onOpenChange:A=>{v(T=>({...T,deleteAccount:A}))},title:"Delete Account",message:"Are you sure you want to delete your account? This action cannot be undone."}),w.jsx(s9,{open:e,onOpenChange:A=>t(A),children:w.jsxs(Y2,{side:"left",className:"p-0",children:[w.jsx(X2,{className:"w-full py-2 h-14 px-6 text-center bg-brand-p1 dark:bg-[rgb(60,116,161)] text-gray-100 text-xl",children:"Settings"}),w.jsxs("div",{className:"overflow-auto h-[calc(100%-64px)] relative",children:[x&&w.jsx(ft,{onClick:()=>k(c),disabled:E,className:"absolute top-5 right-5 font-semibold text-[15.5px] px-6 bg-brand-p2 text-white",children:g?"Saving...":"Save"}),w.jsxs("div",{className:"px-5 space-y-5 mt-8 border-b-2 mb-5 pb-3",children:[w.jsx(zs,{type:"User",src:(r==null?void 0:r.avatar)??null,size:128}),w.jsx(tx,{label:"Username",defaultValue:c.username,onChange:O,isLinkable:!0}),w.jsx(tx,{label:"Bio",defaultValue:c.bio,onChange:O})]}),w.jsxs("div",{className:"space-y-2 px-4 mt-10",children:[T1.slice(0,3).map(A=>w.jsx(nx,{text:A.text,Icon:A.icon,handleClick:C},Qe())),w.jsxs("div",{className:"flex items-center justify-between p-3 text-gray-600 dark:text-gray-100 font-medium",children:[w.jsxs(bt,{className:"flex items-center gap-5",children:[w.jsx("span",{children:w.jsx(sC,{})})," ",w.jsx("span",{children:"Dark Mode"})]}),w.jsx(_y,{checked:o==="dark",value:o,onCheckedChange:()=>{if(o==="dark"){a("light");return}a("dark")}})]}),w.jsx("div",{className:"h-12"}),T1.slice(3,5).map(A=>w.jsx(nx,{text:A.text,Icon:A.icon,danger:A.text==="Delete Account",handleClick:C},Qe()))]}),w.jsxs("div",{className:"mt-6",children:[w.jsxs(bt,{className:"font-medium px-8 ",children:[" ","Version"," ",w.jsx("span",{className:"bg-neutral-200 text-black/80 ml-5 text-sm rounded-sm p-[0.45rem] font-mono font-light",children:"1.0.0"})," "]}),w.jsx("footer",{className:"bg-brand-p1 mt-7 w-full font-semibold text-white py-[0.45rem] text-center",children:w.jsxs(bt,{children:["Created by"," ",w.jsx("a",{href:"https://github.com/nathan-somto",target:"_blank",className:"text-white/70",children:"Nathan Somto"})]})})]})]})]})})]})}function h9({id:e,isGroup:t,name:n,message:{body:r,createdAt:s,readByIds:i,type:o,senderId:a},avatarUrl:l,lastSeen:u,members:d,bio:c,email:f,description:p,inviteCode:v,imageUrl:y,privacy:b}){console.log("imageUrl: ",y);const m=fa(A=>A.setActiveChat),{pathname:g}=tu(),x=Qt(),{profile:E}=$n(),C=a===(E==null?void 0:E.id),O=g.includes(e);function k(){m({dmInfo:t?null:{avatarUrl:l,username:n??"Chatly User",id:e,lastSeen:u,email:f,bio:c},groupInfo:t?{id:e,isGroup:!0,name:n??"Group Chat",imageUrl:y,members:d,description:p??"No Description",inviteCode:v??null,privacy:b}:null}),x(`/${E==null?void 0:E.id}/chats/${e}`)}const S=h.useMemo(()=>i.length>0,[i]),$=o.toLowerCase();return w.jsxs("div",{onClick:k,className:ye(` + w-full + relative + flex + items-center + space-x-3 + py-3 + px-1 + hover:bg-neutral-200 + dark:hover:bg-[#272A20] + rounded-lg + transition + cursor-pointer + `,O?"bg-neutral-200 dark:bg-[#272A20]":""),children:[w.jsx(zs,{type:t?"Group":"User",src:(t?y:l)??null,alt:"user's avatar",size:48}),w.jsx("div",{className:"min-w-0 flex-1",children:w.jsxs("div",{className:"focus:outline-none",children:[w.jsx("span",{className:"absolute inset-0","aria-hidden":"true"}),w.jsxs("div",{className:"flex justify-between items-center mb-1",children:[w.jsx("p",{className:"text-[15px] font-medium text-gray-900 truncate dark:text-gray-100",children:n}),w.jsxs("div",{className:"flex items-center gap-x-1.5",children:[C&&w.jsx("span",{className:"ml-2 flex",children:S?w.jsx(uM,{className:"w-4 h-4 text-brand-p1"}):w.jsx(Dv,{className:"w-4 h-4 text-brand-p1 opacity-80"})}),s&&w.jsx("p",{className:`\r + text-xs \r + text-gray-400 \r + font-light\r + `,children:new Date(s).toLocaleTimeString()})]})]}),w.jsx("div",{className:"flex items-center",children:w.jsx("p",{className:ye(` + truncate + text-sm + `,S?"text-gray-500":"text-black font-medium dark:text-gray-400"),children:o==="TEXT"||o==="SYSTEM"?r===null?"start a conversation!":r:`sent ${WM($)} ${$}!`})})]})})]})}const J2=new Set,rn=new WeakMap,Zo=new WeakMap,Si=new WeakMap,vg=new WeakMap,p9=new WeakMap,Yo=new WeakMap,Dd=new WeakMap,Da=new WeakSet;let Bs,Py=0,Ay=0;const Nr="__aa_tgt",$l="__aa_del",jd="__aa_new",m9=e=>{const t=w9(e);t&&t.forEach(n=>E9(n))},g9=e=>{e.forEach(t=>{t.target===Bs&&y9(),rn.has(t.target)&&$i(t.target)})};function v9(e){const t=vg.get(e);t==null||t.disconnect();let n=rn.get(e),r=0;const s=5;n||(n=Xo(e),rn.set(e,n));const{offsetWidth:i,offsetHeight:o}=Bs,l=[n.top-s,i-(n.left+s+n.width),o-(n.top+s+n.height),n.left-s].map(d=>`${-1*Math.floor(d)}px`).join(" "),u=new IntersectionObserver(()=>{++r>1&&$i(e)},{root:Bs,threshold:1,rootMargin:l});u.observe(e),vg.set(e,u)}function $i(e){clearTimeout(Dd.get(e));const t=Wf(e),n=Il(t)?500:t.duration;Dd.set(e,setTimeout(async()=>{const r=Si.get(e);try{await(r==null?void 0:r.finished),rn.set(e,Xo(e)),v9(e)}catch{}},n))}function y9(){clearTimeout(Dd.get(Bs)),Dd.set(Bs,setTimeout(()=>{J2.forEach(e=>r_(e,t=>e_(()=>$i(t))))},100))}function b9(e){setTimeout(()=>{p9.set(e,setInterval(()=>e_($i.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function e_(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let yg,oo;const x9=typeof window<"u"&&"ResizeObserver"in window;x9&&(Bs=document.documentElement,yg=new MutationObserver(m9),oo=new ResizeObserver(g9),window.addEventListener("scroll",()=>{Ay=window.scrollY,Py=window.scrollX}),oo.observe(Bs));function w9(e){return e.reduce((r,s)=>[...r,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:e.reduce((r,s)=>{if(r===!1)return!1;if(s.target instanceof Element){if(rp(s.target),!r.has(s.target)){r.add(s.target);for(let i=0;i<s.target.children.length;i++){const o=s.target.children.item(i);if(o){if($l in o)return!1;rp(s.target,o),r.add(o)}}}if(s.removedNodes.length)for(let i=0;i<s.removedNodes.length;i++){const o=s.removedNodes[i];if($l in o)return!1;o instanceof Element&&(r.add(o),rp(s.target,o),Zo.set(o,[s.previousSibling,s.nextSibling]))}}return r},new Set)}function rp(e,t){!t&&!(Nr in e)?Object.defineProperty(e,Nr,{value:e}):t&&!(Nr in t)&&Object.defineProperty(t,Nr,{value:e})}function E9(e){var t;const n=e.isConnected,r=rn.has(e);n&&Zo.has(e)&&Zo.delete(e),Si.has(e)&&((t=Si.get(e))===null||t===void 0||t.cancel()),jd in e?rx(e):r&&n?C9(e):r&&!n?k9(e):rx(e)}function Jn(e){return Number(e.replace(/[^0-9.\-]/g,""))}function S9(e){let t=e.parentElement;for(;t;){if(t.scrollLeft||t.scrollTop)return{x:t.scrollLeft,y:t.scrollTop};t=t.parentElement}return{x:0,y:0}}function Xo(e){const t=e.getBoundingClientRect(),{x:n,y:r}=S9(e);return{top:t.top+r,left:t.left+n,width:t.width,height:t.height}}function t_(e,t,n){let r=t.width,s=t.height,i=n.width,o=n.height;const a=getComputedStyle(e);if(a.getPropertyValue("box-sizing")==="content-box"){const u=Jn(a.paddingTop)+Jn(a.paddingBottom)+Jn(a.borderTopWidth)+Jn(a.borderBottomWidth),d=Jn(a.paddingLeft)+Jn(a.paddingRight)+Jn(a.borderRightWidth)+Jn(a.borderLeftWidth);r-=d,i-=d,s-=u,o-=u}return[r,i,s,o].map(Math.round)}function Wf(e){return Nr in e&&Yo.has(e[Nr])?Yo.get(e[Nr]):{duration:250,easing:"ease-in-out"}}function n_(e){if(Nr in e)return e[Nr]}function Ty(e){const t=n_(e);return t?Da.has(t):!1}function r_(e,...t){t.forEach(n=>n(e,Yo.has(e)));for(let n=0;n<e.children.length;n++){const r=e.children.item(n);r&&t.forEach(s=>s(r,Yo.has(r)))}}function $y(e){return Array.isArray(e)?e:[e]}function Il(e){return typeof e=="function"}function C9(e){const t=rn.get(e),n=Xo(e);if(!Ty(e))return rn.set(e,n);let r;if(!t)return;const s=Wf(e);if(typeof s!="function"){const i=t.left-n.left,o=t.top-n.top,[a,l,u,d]=t_(e,t,n),c={transform:`translate(${i}px, ${o}px)`},f={transform:"translate(0, 0)"};a!==l&&(c.width=`${a}px`,f.width=`${l}px`),u!==d&&(c.height=`${u}px`,f.height=`${d}px`),r=e.animate([c,f],{duration:s.duration,easing:s.easing})}else{const[i]=$y(s(e,"remain",t,n));r=new Animation(i),r.play()}Si.set(e,r),rn.set(e,n),r.addEventListener("finish",$i.bind(null,e))}function rx(e){jd in e&&delete e[jd];const t=Xo(e);rn.set(e,t);const n=Wf(e);if(!Ty(e))return;let r;if(typeof n!="function")r=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"});else{const[s]=$y(n(e,"add",t));r=new Animation(s),r.play()}Si.set(e,r),r.addEventListener("finish",$i.bind(null,e))}function sx(e,t){var n;e.remove(),rn.delete(e),Zo.delete(e),Si.delete(e),(n=vg.get(e))===null||n===void 0||n.disconnect(),setTimeout(()=>{if($l in e&&delete e[$l],Object.defineProperty(e,jd,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(const r in t)e.style[r]=""},0)}function k9(e){var t;if(!Zo.has(e)||!rn.has(e))return;const[n,r]=Zo.get(e);Object.defineProperty(e,$l,{value:!0,configurable:!0});const s=window.scrollX,i=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=n_(e))===null||t===void 0||t.appendChild(e),!Ty(e))return sx(e);const[o,a,l,u]=O9(e),d=Wf(e),c=rn.get(e);(s!==Py||i!==Ay)&&_9(e,s,i,d);let f,p={position:"absolute",top:`${o}px`,left:`${a}px`,width:`${l}px`,height:`${u}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!Il(d))Object.assign(e.style,p),f=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:d.duration,easing:"ease-out"});else{const[v,y]=$y(d(e,"remove",c));(y==null?void 0:y.styleReset)!==!1&&(p=(y==null?void 0:y.styleReset)||p,Object.assign(e.style,p)),f=new Animation(v),f.play()}Si.set(e,f),f.addEventListener("finish",sx.bind(null,e,p))}function _9(e,t,n,r){const s=Py-t,i=Ay-n,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(Bs).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+s,window.scrollY+i),!e.parentElement)return;const l=e.parentElement;let u=l.clientHeight,d=l.clientWidth;const c=performance.now();function f(){requestAnimationFrame(()=>{if(!Il(r)){const p=u-l.clientHeight,v=d-l.clientWidth;c+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-v,top:window.scrollY-p}),u=l.clientHeight,d=l.clientWidth,f()):document.documentElement.style.scrollBehavior=o}})}f()}function O9(e){const t=rn.get(e),[n,,r]=t_(e,t,Xo(e));let s=e.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const i=getComputedStyle(s),o=rn.get(s)||Xo(s),a=Math.round(t.top-o.top)-Jn(i.borderTopWidth),l=Math.round(t.left-o.left)-Jn(i.borderLeftWidth);return[a,l,n,r]}function R9(e,t={}){return yg&&oo&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!Il(t)&&!t.disrespectUserMotionPreference||(Da.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),r_(e,$i,b9,s=>oo==null?void 0:oo.observe(s)),Il(t)?Yo.set(e,t):Yo.set(e,{duration:250,easing:"ease-in-out",...t}),yg.observe(e,{childList:!0}),J2.add(e))),Object.freeze({parent:e,enable:()=>{Da.add(e)},disable:()=>{Da.delete(e)},isEnabled:()=>Da.has(e)})}function P9(e){const[t,n]=h.useState(),r=h.useMemo(()=>e,[]),s=h.useCallback(o=>{o instanceof HTMLElement?n(R9(o,r)):n(void 0)},[r]),i=h.useCallback(o=>{t&&(o?t.enable():t.disable())},[t]);return[s,i]}function A9({children:e}){const[t]=P9({easing:"ease-out",duration:350});return w.jsx("section",{ref:t,className:"mt-8 px-3 space-y-1 lg:h-[calc(100vh-16*0.25rem)] lg:overflow-auto ",children:e})}function T9(e){const{messages:t}=Hf(),{activeChat:n}=fa(),{socket:r}=es(),s=h.useRef([]),i=h.useRef(null),o=Yl();h.useEffect(()=>{s.current=(t==null?void 0:t.slice())??[]},[t]),h.useEffect(()=>{i.current=n},[n]);const a=h.useCallback(f=>{var y,b,m,g;const p=((b=(y=i.current)==null?void 0:y.dmInfo)==null?void 0:b.id)===f,v=((g=(m=i.current)==null?void 0:m.groupInfo)==null?void 0:g.id)===f;return p||v},[]),l=h.useCallback((f,p,v=!0)=>{var b;let y;return v&&(y=(b=s.current)==null?void 0:b.find(m=>m.id===f)),!(!a(p)||v&&y)},[]),u=h.useCallback(f=>{console.log("handle new message: ",f),l(f.message.id,f.chatInfo.id)&&(o.setQueryData(["messages",f.chatInfo.id],p=>{var y;if(console.log("old data: ",p),!p||!p.pages||p.pages.length===0)return p;const v=((y=p.pages[0].data)==null?void 0:y.messages)??[];return{pageParams:p.pageParams,pages:[...p.pages.slice(1),{data:{messages:[...v,f.message]}}]}}),e!=null&&e.hasNewMessage&&e.hasNewMessage())},[l]),d=h.useCallback(f=>{console.log("update message: ",f),l(f.message.id,f.chatInfo.id,!1)&&o.setQueryData(["messages",f.chatInfo.id],p=>{if(console.log("old data: ",p),!p||!p.pages||p.pages.length===0)return p;const v=p.pages.map(y=>{var m;return{data:{messages:(m=y.data)==null?void 0:m.messages.map(g=>g.id===f.message.id?f.message:g)}}});return{pageParams:p.pageParams,pages:v}})},[l]),c=h.useCallback(f=>{console.log("delete message: ",f),l(f.deletedMessageId,f.chatId,!1)&&o.setQueryData(["messages",f.chatId],p=>{if(console.log("old data: ",p),!p||!p.pages||p.pages.length===0)return p;const v=p.pages.map(y=>{var m;return{data:{messages:(m=y.data)==null?void 0:m.messages.filter(g=>g.id!==f.deletedMessageId)}}});return{pageParams:p.pageParams,pages:v}})},[l]);return h.useEffect(()=>{if(e!=null&&e.attachListeners&&r)return r.on("messageDeleted",c),r.on("messageUpdated",d),r.on("newMessage",u),()=>{r.off("messageDeleted",c),r.off("messageUpdated",d),r.off("newMessage",u)}},[e==null?void 0:e.attachListeners,r,u,d,c]),{isActiveChat:a,handleNewMessage:u,handleUpdateMessage:d,handleDeleteMessage:c}}function $9(){const e=Qt(),{socket:t}=es(),{profile:n}=$n(),{activeChat:r,updateLastSeen:s,reset:i}=fa(),{removeChat:o}=Ry(),{setMessages:a}=Hf(),l=Yl(),{handleDeleteMessage:u,handleUpdateMessage:d,handleNewMessage:c,isActiveChat:f}=T9({attachListeners:!1}),p=h.useCallback(m=>{l.setQueryData(["chats"],g=>{var C,O,k,S;console.log("handle new message: ",(C=g==null?void 0:g.data)==null?void 0:C.chats);const x=((k=(O=g==null?void 0:g.data)==null?void 0:O.chats)==null?void 0:k.slice())??[],E=x.findIndex($=>$.id===m.chatInfo.id);if(E!==-1){const $=x[E];m.message.senderId===(n==null?void 0:n.id)?m.chatInfo={...$}:((S=r==null?void 0:r.dmInfo)==null?void 0:S.id)===m.chatInfo.id&&s(new Date),x.splice(E,1)}return x.unshift({message:{body:m.message.body,senderId:m.message.senderId,createdAt:m.message.createdAt,type:m.message.type,readByIds:m.message.readByIds,id:m.message.id},...m.chatInfo}),{...g,data:{chats:x}}}),f(m.chatInfo.id)||c(m)},[r,n,l,s]),v=h.useCallback(({chatId:m,userId:g})=>{g===(n==null?void 0:n.id)&&(l.setQueryData(["chats"],x=>{var C,O;const E=(O=(C=x==null?void 0:x.data)==null?void 0:C.chats)==null?void 0:O.filter(k=>k.id!==m);return{...x,data:{chats:E}}}),l.setQueryData(["messages",m],x=>({pageParams:[],pages:[]})),f(m)&&(i(),a(null),e(`/${n==null?void 0:n.id}/chats`)))},[r,l,o,i,n]),y=h.useCallback(m=>{l.setQueryData(["chats"],g=>{var C,O,k;const x=((O=(C=g==null?void 0:g.data)==null?void 0:C.chats)==null?void 0:O.slice())??[],E=x.findIndex(S=>S.id===m.chatInfo.id);if(E!==-1){const S=x[E];S.message.id===m.message.id&&(x[E]={...S,message:{body:m.message.body,senderId:m.message.senderId,createdAt:m.message.createdAt,type:m.message.type,readByIds:m.message.readByIds,id:m.message.id}},m.message.senderId!==(n==null?void 0:n.id)&&!S.isGroup&&(x[E].lastSeen=new Date,((k=r.dmInfo)==null?void 0:k.id)===m.chatInfo.id&&s(new Date)))}return{data:{chats:x}}}),f(m.chatInfo.id)||d(m)},[r,n,l,s]),b=h.useCallback(({chatId:m,deletedMessageId:g,prevMessage:x,userId:E})=>{l.setQueryData(["chats"],C=>{var S,$;const O=(($=(S=C==null?void 0:C.data)==null?void 0:S.chats)==null?void 0:$.slice())??[],k=O.findIndex(A=>A.id===m);if(k!==-1){const A=O[k];A.message.id===g&&(O[k]={...A,message:x===null?{body:null,senderId:null,createdAt:new Date,type:"TEXT",readByIds:[],id:Qe()}:{body:x.body,senderId:x.senderId,createdAt:x.createdAt,type:x.type,readByIds:x.readByIds,id:x.id}})}return{data:{chats:O}}}),f(m)||u({chatId:m,deletedMessageId:g,prevMessage:x,userId:E})},[l]);h.useEffect(()=>{if(t)return t.on("newMessage",p),t.on("leftChat",v),t.on("messageUpdated",y),t.on("messageDeleted",b),()=>{t.off("newMessage",p),t.off("leftChat",v),t.off("messageUpdated",y),t.off("messageDeleted",b)}},[t,p,v,y,b])}function I9(){const{profile:e}=$n(),{chatList:t,setChatList:n}=Ry(),{data:r,isPending:s,refetch:i,isError:o}=Bf({route:"/users/chats",enabled:!0,queryKey:["chats"]}),{socket:a}=es();return $9(),h.useEffect(()=>{r&&(n(r.data.chats.sort((l,u)=>new Date(u.message.createdAt).getTime()-new Date(l.message.createdAt).getTime())),r.data.chats.forEach(l=>{a==null||a.emit("joinChat",{chatId:l.id,userId:e==null?void 0:e.id})}))},[r]),s?w.jsxs(bt,{className:"text-center text-neutral-500 lg:h-[calc(100vh-16*0.25rem)] gap-x-1.5 flex items-center justify-center",children:["Loading Chats"," ",w.jsx("span",{children:w.jsx(jv,{className:"animate-bounce"})})]}):w.jsx(A9,{children:t.length===0?w.jsx(bt,{className:"text-center text-lg h-[80%] flex items-center justify-center text-brand-p1 font-semibold mt-2",children:"No Chats"}):t.map(l=>h.createElement(h9,{...l,key:l.id}))})}function M9({keyword:e,data:t,isSearching:n,isError:r,resultLength:s}){const[i,o]=h.useState(!1);function a(u){o(u)}function l(u){return u.isGroup!==void 0}return w.jsxs(w.Fragment,{children:[w.jsx("div",{children:w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"border-b mb-2 pb-4 px-3 mt-3",children:w.jsxs(bt,{className:"font-medium ",children:[" ",s," result",s>1?"s":""," "]})}),n?w.jsx("div",{className:"h-full items-center flex justify-center",children:w.jsx(ud,{withBackground:!1,size:"sm"})}):t.length>0?t.map(u=>l(u)?w.jsx(gg,{type:"group",imageUrl:u==null?void 0:u.imageUrl,chatId:u.chatId,description:u.description,id:u.id,isGroup:!0,name:u.name,toggleLoading:a},u.id):w.jsx(gg,{type:"user",avatarUrl:u.avatarUrl,id:u.id,lastSeen:u.lastSeen,username:u.username,toggleLoading:a},u.id)):null,!n||r||s===0&&w.jsxs("p",{className:"mt-8",children:[" no results for ",e]})]})}),i&&w.jsx(ud,{withBackground:!0,size:"lg"})]})}function N9(){const[e,t]=h.useState(!1),[n,r]=h.useState(""),s=K2(n,500),{chatId:i}=CS(),{searchData:o,isPending:a,isError:l}=Q2({keyword:n,usersOnly:!1,enabled:n.length>0&&s===n});async function u(p){r(p)}const d=typeof i<"u",c=h.useMemo(()=>{var p;return o!=null&&o.data?[...o.data.users,...((p=o.data)==null?void 0:p.groupChats)??[]]:[]},[o==null?void 0:o.data]),f=c.length;return w.jsxs(w.Fragment,{children:[w.jsxs("aside",{className:ye("lg:w-[350px] py-6 lg:fixed lg:left-0 lg:top-0 w-full bg-gray-100 dark:bg-[#17191C] border-r min-h-screen",d&&"hidden lg:block"),children:[w.jsx(r9,{openDrawer:t,handleSearch:u,showBack:n!=="",goBackToChats:r}),s.length>0?w.jsx(M9,{isError:l,isSearching:a,keyword:n,data:c,resultLength:f}):w.jsx(I9,{})]}),w.jsx(f9,{isOpen:e,openDrawer:t})]})}function D9(){const[e,t]=h.useState(!0),{isConnected:n}=es();return h.useEffect(()=>{let r=!0;if(n&&r){t(!0);const s=setTimeout(()=>{t(!1)},7e3);return()=>{clearTimeout(s),r=!1}}},[n]),e?w.jsx("header",{className:"bg-gray-50 dark:bg-background border-b top-0 fixed h-7 px-2 w-full z-[9999999999] border-gray-200 dark:border-gray-700",children:w.jsxs("div",{className:"flex items-center gap-2 h-full",children:[w.jsx("div",{className:`w-2 h-2 rounded-full ${n?"bg-green-500":"bg-red-500"}`}),w.jsx("p",{className:"text-xs text-gray-700 dark:text-gray-300",children:n?"Connected":"Disconnected"})]})}):null}function j9(){const{chatId:e}=CS(),t=typeof e<"u",{connect:n,disconnect:r,socket:s}=es(),{setProfile:i,profile:o}=$n(),{data:a,isError:l,refetch:u}=Bf({enabled:o===null,queryKey:["profile"],route:"/users/profile",displayToast:!0});return h.useEffect(()=>{const d=a==null?void 0:a.data;d&&i(d==null?void 0:d.user)},[a]),h.useEffect(()=>{let d=!0;const c=()=>{o!=null&&o.id&&d&&n("http://localhost:8080",o.id)};return d&&(o!=null&&o.id)&&(n("http://localhost:8080",o==null?void 0:o.id),s==null||s.on("disconnect",c)),()=>{d=!1,r(),s==null||s.off("disconnect",c)}},[o==null?void 0:o.id]),w.jsxs("div",{children:[s&&w.jsx(D9,{}),w.jsx(N9,{}),w.jsx("main",{className:ye("lg:block hidden w-full lg:ml-[350px] bg-gray-50 min-h-screen dark:bg-background lg:w-[calc(100%-350px)]",t&&"block"),children:w.jsx(_v,{})})]})}function F9(){const{setTheme:e}=OE();return w.jsxs(Xv,{children:[w.jsx(Jv,{asChild:!0,children:w.jsxs(ft,{variant:"outline",size:"icon",children:[w.jsx(kM,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),w.jsx(sC,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),w.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),w.jsxs(bf,{align:"end",children:[w.jsx(Fr,{onClick:()=>e("light"),children:"Light"}),w.jsx(Fr,{onClick:()=>e("dark"),children:"Dark"}),w.jsx(Fr,{onClick:()=>e("system"),children:"System"})]})]})}function L9({children:e}){return w.jsxs("header",{className:`\r + h-16 \r + top-0 \r + z-[8] \r + w-full \r + px-5 \r + py-3\r + flex\r + justify-between\r + items-center\r + inset-x-0\r + border-b\r + `,children:[e,w.jsx(F9,{})]})}function V9(){return w.jsx(L9,{children:w.jsx(Ov,{to:"/",children:w.jsx("img",{src:Oy,alt:"logo",className:`\r + h-[80px]\r + w-[80px]\r + object-cover\r + `})})})}function U9(){return w.jsxs("div",{className:"min-h-screen w-full bg-background pb-8",children:[w.jsx(V9,{}),w.jsx("main",{className:"min-h-screen flex items-center justify-center bg-background",children:w.jsx(_v,{})})]})}const z9=({children:e,className:t,...n})=>w.jsx("div",{className:ye("text-lg font-semibold",t),...n,children:e}),B9=[{imgUrl:Y7,heading2:"Visual Vibes, Instantly",para:"Send and receive vibrant video messages to add a personal touch to your conversations. Embrace the moment with Chatly's seamless video messaging.",id:Qe(),altText:"video messages",btnText:"Start Video Chatting"},{imgUrl:Z7,heading2:"Your Space, Your Rules",para:"Enjoy intimate conversations with the ones you hold close. With private conversations on Chatly, your messages stay between you and your chosen confidantes",id:Qe(),altText:"private messages",btnText:"Start Private Messaging"},{imgUrl:Q7,heading2:"Gather Round, Chat Away",para:"Bring your favorite people together with group conversations on Chatly. Share laughs, make plans, and stay connected with everyone at once.",id:Qe(),altText:"group chats",btnText:"Create a Group Chat"}];function H9(){const e=Qt(),{isSignedIn:t}=Jl();return w.jsxs("section",{className:"",id:"features",children:[w.jsx(Pl,{"data-aos":"fade-up",className:"text-center text-[#1B1C20] dark:text-gray-200 xl:text-5xl/normal text-4xl my-16",children:"What Chatly Offers?"}),B9.map((n,r)=>w.jsxs("article",{className:ye("flex px-10 mt-8 lg:gap-[5%] max-w-[1440px] items-center lg:justify-around mx-auto py-8 lg:py-16 text-center lg:text-left dark:bg-[#1e1e1f] bg-gray-100 lg:flex-row flex-col",r%2!==0&&"lg:flex-row-reverse bg-white dark:bg-background"),children:[w.jsx("figure",{"data-aos":r%2===0?"slide-right":"slide-left",className:"w-[22rem] h-[15rem] sm:w-[32rem] sm:h-[22rem] flex-shrink-0",children:w.jsx("img",{src:n.imgUrl,alt:n.altText,className:"h-full w-full object-contain"})}),w.jsxs("div",{"data-aos":r%2===0?"slide-left":"slide-right","data-aos-delay":200,className:"lg:w-[500px] w-full max-w-[500px] mt-12 lg:mt-0",children:[w.jsx(Pl,{className:"text-[#1B1C20] dark:text-gray-200 text-4xl lg:mb-3 xl:mb-4 w-[80%] mb-5 mx-auto lg:mx-0 lg:w-[90%] xl:text-5xl/normal",children:n.heading2}),w.jsx(z9,{className:"w-[90%] mx-auto text-base dark:text-gray-400 xl:text-lg lg:mx-0 text-[#383A47] font-medium",children:n.para}),w.jsx(ft,{className:"mt-2.5",onClick:()=>e(t?"/chats-redirect":"/sign-up"),children:n.btnText})]})]},n.id))]})}const W9=[{text:"features",link:"#features",id:Qe()},{text:"about",link:"#",id:Qe()},{text:"works",link:"#",id:Qe()},{text:"Support",link:"#",id:Qe()}],q9=[{link:"http://facebook.com",icon:G.createElement(pM),id:Qe()},{link:"https://twitter.com",icon:G.createElement(OM),id:Qe()},{link:"https://instagram.com",icon:G.createElement(yM),id:Qe()},{link:"https://youtube.com",icon:G.createElement(AM),id:Qe()}];function K9(){return w.jsxs(w.Fragment,{children:[w.jsxs("div",{id:"footer-top",className:"max-w-[1440px] mx-auto my-4 px-10 py-10 text-center",children:[w.jsx(Pl,{"data-aos":"fade-up","data-aos-anchor":"#footer-top",className:"max-w-[46rem] mx-auto mb-9 text-[#1B1C20] dark:text-gray-200 xl:text-5xl/normal text-4xl",children:"Ready to Start Chatting about with Friends and Family"}),w.jsx(ft,{"data-aos":"zoom-in","data-aos-delay":300,"data-aos-anchor":"#footer-top",className:"mx-auto lg:text-lg text-white",children:"Start Chatting now!"})]}),w.jsxs("footer",{"data-aos":"fade","data-aos-delay":400,className:"flex sm:flex-row gap-5 sm:gap-0 flex-col justify-between max-w-[1440px] mx-auto px-10",children:[w.jsx("figure",{className:"h-28 w-28",children:w.jsx("img",{src:Oy,alt:"logo",className:"w-full h-full"})}),w.jsx("ul",{className:"flex items-center flex-wrap sm:justify-center gap-4",children:W9.map(e=>w.jsx("li",{className:"border-b-2 text-[16.25px] border-transparent hover:opacity-50 md:hover:opacity-100 md:hover:border-b-brand-p1 font-medium",children:w.jsx(Ov,{to:e.link,children:e.text})},e.id))}),w.jsx("ul",{className:"flex items-center flex-wrap gap-4",children:q9.map(e=>w.jsx("a",{target:"_blank",href:e.link,className:"h-8 w-8 !text-brand-p2 hover:scale-125 ease-in-out transition-all",children:e.icon},e.id))})]}),w.jsx("footer",{className:"bg-brand-p1 mt-6 w-full font-semibold text-white max-w-[1440px] px-10 py-2 text-center",children:w.jsxs(bt,{className:"text-lg",children:["Created by"," ",w.jsx("a",{href:"https://github.com/nathan-somto",target:"_blank",className:"text-white/70",children:"Nathan Somto"})]})})]})}const s_=({children:e,className:t,...n})=>w.jsx("h1",{className:ye("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-6xl",t),...n,children:e});function G9(){const e=Qt();return w.jsxs("header",{id:"hero",className:"mt-20 flex flex-col pt-12 max-w-[1440px] mx-auto gap-12 lg:pt-0 lg:gap-0 px-10 lg:flex-row lg:justify-between lg:items-center",children:[w.jsxs("div",{"data-aos":"slide-right","data-aos-anchor":"#hero",className:`w-[90%] lg:w-[450px] xl:w-[600px] flex-shrink-0 self-start lg:mt-[80px]\r + `,children:[w.jsx(s_,{className:"xl:text-6xl text-4xl sm:text-5xl max-sm:w-[300px] max-lg:max-w-[600px] w-full mb-4 lg:mb-6 lg:text-[42px]",children:"Start chatting with friends, family, anytime, anywhere."}),w.jsx(bt,{className:"text-[#383A47] dark:text-gray-300 opacity-80 mb-4 w-[90%]",children:"Connecting you with friends and family, bringing the fun to every chat anytime, anywhere! Start your amazing conversations now."}),w.jsxs(ft,{onClick:()=>e("/sign-in"),children:["Start Chatting Now ",w.jsx(aM,{})]}),w.jsxs("div",{className:"flex sm:flex-row flex-col sm:items-center gap-8 sm:gap-5 mt-12 sm:divide-x-2 sm:divide-[#383A47] ",children:[w.jsxs("div",{className:"flex items-center gap-4",children:[w.jsxs("figure",{className:"flex items-center",children:[w.jsx("img",{src:mg,alt:"avatar 2",className:"z-[0] relative h-[3.7rem] w-[3.7rem] object-cover"}),w.jsx("img",{src:pg,alt:"avatar 1",className:"z-[2] relative -ml-7 h-[3.7rem] w-[3.7rem] object-cover"}),w.jsx("img",{src:G2,alt:"avatar 3",className:"z-[3] relative -ml-6 h-[3.5rem] w-[3.5rem] object-cover"})]}),w.jsxs("div",{className:"space-y-1",children:[w.jsx(hg,{className:"text-xl",children:"2.8K"}),w.jsx(bt,{children:"Active Users"})]})]}),w.jsxs("div",{className:"space-y-1 sm:pl-5",children:[w.jsx(hg,{className:"text-xl",children:"4.8 / 5.0"}),w.jsxs(bt,{className:"flex items-center gap-2",children:[w.jsx("img",{src:J7,alt:"stars"}),w.jsx("span",{children:"Rating"})]})]})]})]}),w.jsx("figure",{"data-aos":"zoom-in",className:"h-[450px] lg:w-[550px] w-full max-w-[1000px] lg:max-w-none lg:h-auto",children:w.jsx("img",{src:X7,alt:"",className:"h-full object-left w-full object-contain"})})]})}const Q9=()=>{const{profile:e}=$n(),t=Qt();return e?(console.log(e.avatar),w.jsxs(Xv,{children:[w.jsx(Jv,{asChild:!0,children:w.jsx(ft,{variant:"ghost",className:"flex items-center space-x-2 focus:outline-none",children:w.jsx(zs,{type:"User",src:e.avatar,alt:e.username,size:40})})}),w.jsxs(bf,{className:"w-[300px] -bottom-20 p-4 mr-10 max-w-none z-[1000000]",children:[w.jsxs("div",{className:"flex items-center space-x-4 mb-2 py-2",children:[w.jsx("div",{className:"flex-shrink-0",children:w.jsx(zs,{type:"User",src:e.avatar,alt:e.username,size:64})}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{className:"font-medium truncate",children:e.username}),w.jsx("span",{className:"text-sm text-gray-500 truncate",children:e.email})]})]}),w.jsxs(Fr,{onClick:()=>t(`/${e.id}/chats`),className:"gap-x-1.5 cursor-pointer mb-1.5",children:[w.jsx(EM,{}),"View Chats"]}),w.jsxs(Fr,{onClick:()=>t("/signout"),className:"text-destructive text-sm gap-x-1.5 cursor-pointer",children:[w.jsx(rC,{}),"Sign Out"]})]})]})):null},Z9=()=>{const{isSignedIn:e}=Jl(),[t,n]=h.useState(!1),r=Qt();return w.jsxs("nav",{className:"fixed top-0 left-0 right-0 max-w-[1440px] mx-auto overflow-hidden w-full flex items-center justify-between px-10 py-4 h-20 z-[99999] bg-background",children:[w.jsx("img",{src:Oy,alt:"chatly logo",className:"h-24 w-24 scale-110 object-contain"}),w.jsxs("div",{className:Rv({"gap-5 md:gap-0 transition-all ease-in duration-300 dark:text-gray-50 justify-center items-center text-center text-2xl md:text-base md:text-black md:items-center md:justify-between md:flex-[0.8] fixed top-20 h-screen right-0 flex-col md:flex-row md:top-auto md:right-auto overflow-auto max-md:w-full z-[20] md:relative md:flex":!0,"flex max-md:bg-brand-p1 max-md:opacity-100":t,"hidden max-md:bg-transparent max-md:opacity-0":!t}),children:[w.jsx("ul",{className:"md:flex-[0.8] md:items-center flex-col md:flex-row md:justify-center gap-5 md:gap-6 flex",children:HM.map(s=>w.jsx("li",{className:"border-b-2 capitalize border-transparent hover:opacity-50 md:hover:opacity-100 md:hover:border-b-brand-p1 font-medium",children:w.jsx(Ov,{to:s.link,children:s.text})},s.id))}),w.jsx("div",{className:"flex flex-col md:flex-row items-center md:gap-3 gap-5",children:e?w.jsx(w.Fragment,{children:w.jsx(Q9,{})}):w.jsxs(w.Fragment,{children:[w.jsx(ft,{onClick:()=>r("/sign-in"),variant:"ghost",className:"max-md:!p-0 max-md:!text-2xl max-md:!h-auto max-md:hover:!bg-transparent max-md:hover:!text-white max-md:hover:opacity-50",children:"Login"}),w.jsx(ft,{onClick:()=>r("/sign-up"),className:"text-white max-md:!p-0 max-md:!text-2xl max-md:!h-auto max-md:hover:!bg-transparent max-md:hover:!text-white max-md:hover:opacity-50",children:"Get Started"})]})})]}),w.jsx("button",{onClick:()=>n(s=>!s),className:"h-10 w-10 md:hidden block",children:t?w.jsx(Fv,{}):w.jsx(wM,{})})]})};var i_={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ip,function(){return function(n){function r(i){if(s[i])return s[i].exports;var o=s[i]={exports:{},id:i,loaded:!1};return n[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var s={};return r.m=n,r.c=s,r.p="dist/",r(0)}([function(n,r,s){function i(I){return I&&I.__esModule?I:{default:I}}var o=Object.assign||function(I){for(var U=1;U<arguments.length;U++){var z=arguments[U];for(var X in z)Object.prototype.hasOwnProperty.call(z,X)&&(I[X]=z[X])}return I},a=s(1),l=(i(a),s(6)),u=i(l),d=s(7),c=i(d),f=s(8),p=i(f),v=s(9),y=i(v),b=s(10),m=i(b),g=s(11),x=i(g),E=s(14),C=i(E),O=[],k=!1,S={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},$=function(){var I=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(I&&(k=!0),k)return O=(0,x.default)(O,S),(0,m.default)(O,S.once),O},A=function(){O=(0,C.default)(),$()},T=function(){O.forEach(function(I,U){I.node.removeAttribute("data-aos"),I.node.removeAttribute("data-aos-easing"),I.node.removeAttribute("data-aos-duration"),I.node.removeAttribute("data-aos-delay")})},P=function(I){return I===!0||I==="mobile"&&y.default.mobile()||I==="phone"&&y.default.phone()||I==="tablet"&&y.default.tablet()||typeof I=="function"&&I()===!0},L=function(I){S=o(S,I),O=(0,C.default)();var U=document.all&&!window.atob;return P(S.disable)||U?T():(S.disableMutationObserver||p.default.isSupported()||(console.info(` + aos: MutationObserver is not supported on this browser, + code mutations observing has been disabled. + You may have to call "refreshHard()" by yourself. + `),S.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",S.easing),document.querySelector("body").setAttribute("data-aos-duration",S.duration),document.querySelector("body").setAttribute("data-aos-delay",S.delay),S.startEvent==="DOMContentLoaded"&&["complete","interactive"].indexOf(document.readyState)>-1?$(!0):S.startEvent==="load"?window.addEventListener(S.startEvent,function(){$(!0)}):document.addEventListener(S.startEvent,function(){$(!0)}),window.addEventListener("resize",(0,c.default)($,S.debounceDelay,!0)),window.addEventListener("orientationchange",(0,c.default)($,S.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,m.default)(O,S.once)},S.throttleDelay)),S.disableMutationObserver||p.default.ready("[data-aos]",A),O)};n.exports={init:L,refresh:$,refreshHard:A}},function(n,r){},,,,,function(n,r){(function(s){function i(P,L,I){function U(fe){var ve=be,qe=Ce;return be=Ce=void 0,ze=fe,me=P.apply(qe,ve)}function z(fe){return ze=fe,xe=setTimeout(N,L),tt?U(fe):me}function X(fe){var ve=fe-ke,qe=fe-ze,bn=L-ve;return we?A(bn,pe-qe):bn}function D(fe){var ve=fe-ke,qe=fe-ze;return ke===void 0||ve>=L||ve<0||we&&qe>=pe}function N(){var fe=T();return D(fe)?B(fe):void(xe=setTimeout(N,X(fe)))}function B(fe){return xe=void 0,ae&&be?U(fe):(be=Ce=void 0,me)}function Z(){xe!==void 0&&clearTimeout(xe),ze=0,be=ke=Ce=xe=void 0}function Q(){return xe===void 0?me:B(T())}function se(){var fe=T(),ve=D(fe);if(be=arguments,Ce=this,ke=fe,ve){if(xe===void 0)return z(ke);if(we)return xe=setTimeout(N,L),U(ke)}return xe===void 0&&(xe=setTimeout(N,L)),me}var be,Ce,pe,me,xe,ke,ze=0,tt=!1,we=!1,ae=!0;if(typeof P!="function")throw new TypeError(f);return L=d(L)||0,a(I)&&(tt=!!I.leading,we="maxWait"in I,pe=we?$(d(I.maxWait)||0,L):pe,ae="trailing"in I?!!I.trailing:ae),se.cancel=Z,se.flush=Q,se}function o(P,L,I){var U=!0,z=!0;if(typeof P!="function")throw new TypeError(f);return a(I)&&(U="leading"in I?!!I.leading:U,z="trailing"in I?!!I.trailing:z),i(P,L,{leading:U,maxWait:L,trailing:z})}function a(P){var L=typeof P>"u"?"undefined":c(P);return!!P&&(L=="object"||L=="function")}function l(P){return!!P&&(typeof P>"u"?"undefined":c(P))=="object"}function u(P){return(typeof P>"u"?"undefined":c(P))=="symbol"||l(P)&&S.call(P)==v}function d(P){if(typeof P=="number")return P;if(u(P))return p;if(a(P)){var L=typeof P.valueOf=="function"?P.valueOf():P;P=a(L)?L+"":L}if(typeof P!="string")return P===0?P:+P;P=P.replace(y,"");var I=m.test(P);return I||g.test(P)?x(P.slice(2),I?2:8):b.test(P)?p:+P}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},f="Expected a function",p=NaN,v="[object Symbol]",y=/^\s+|\s+$/g,b=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,g=/^0o[0-7]+$/i,x=parseInt,E=(typeof s>"u"?"undefined":c(s))=="object"&&s&&s.Object===Object&&s,C=(typeof self>"u"?"undefined":c(self))=="object"&&self&&self.Object===Object&&self,O=E||C||Function("return this")(),k=Object.prototype,S=k.toString,$=Math.max,A=Math.min,T=function(){return O.Date.now()};n.exports=o}).call(r,function(){return this}())},function(n,r){(function(s){function i(T,P,L){function I(ae){var fe=se,ve=be;return se=be=void 0,ke=ae,pe=T.apply(ve,fe)}function U(ae){return ke=ae,me=setTimeout(D,P),ze?I(ae):pe}function z(ae){var fe=ae-xe,ve=ae-ke,qe=P-fe;return tt?$(qe,Ce-ve):qe}function X(ae){var fe=ae-xe,ve=ae-ke;return xe===void 0||fe>=P||fe<0||tt&&ve>=Ce}function D(){var ae=A();return X(ae)?N(ae):void(me=setTimeout(D,z(ae)))}function N(ae){return me=void 0,we&&se?I(ae):(se=be=void 0,pe)}function B(){me!==void 0&&clearTimeout(me),ke=0,se=xe=be=me=void 0}function Z(){return me===void 0?pe:N(A())}function Q(){var ae=A(),fe=X(ae);if(se=arguments,be=this,xe=ae,fe){if(me===void 0)return U(xe);if(tt)return me=setTimeout(D,P),I(xe)}return me===void 0&&(me=setTimeout(D,P)),pe}var se,be,Ce,pe,me,xe,ke=0,ze=!1,tt=!1,we=!0;if(typeof T!="function")throw new TypeError(c);return P=u(P)||0,o(L)&&(ze=!!L.leading,tt="maxWait"in L,Ce=tt?S(u(L.maxWait)||0,P):Ce,we="trailing"in L?!!L.trailing:we),Q.cancel=B,Q.flush=Z,Q}function o(T){var P=typeof T>"u"?"undefined":d(T);return!!T&&(P=="object"||P=="function")}function a(T){return!!T&&(typeof T>"u"?"undefined":d(T))=="object"}function l(T){return(typeof T>"u"?"undefined":d(T))=="symbol"||a(T)&&k.call(T)==p}function u(T){if(typeof T=="number")return T;if(l(T))return f;if(o(T)){var P=typeof T.valueOf=="function"?T.valueOf():T;T=o(P)?P+"":P}if(typeof T!="string")return T===0?T:+T;T=T.replace(v,"");var L=b.test(T);return L||m.test(T)?g(T.slice(2),L?2:8):y.test(T)?f:+T}var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},c="Expected a function",f=NaN,p="[object Symbol]",v=/^\s+|\s+$/g,y=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt,x=(typeof s>"u"?"undefined":d(s))=="object"&&s&&s.Object===Object&&s,E=(typeof self>"u"?"undefined":d(self))=="object"&&self&&self.Object===Object&&self,C=x||E||Function("return this")(),O=Object.prototype,k=O.toString,S=Math.max,$=Math.min,A=function(){return C.Date.now()};n.exports=i}).call(r,function(){return this}())},function(n,r){function s(d){var c=void 0,f=void 0;for(c=0;c<d.length;c+=1)if(f=d[c],f.dataset&&f.dataset.aos||f.children&&s(f.children))return!0;return!1}function i(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function o(){return!!i()}function a(d,c){var f=window.document,p=i(),v=new p(l);u=c,v.observe(f.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function l(d){d&&d.forEach(function(c){var f=Array.prototype.slice.call(c.addedNodes),p=Array.prototype.slice.call(c.removedNodes),v=f.concat(p);if(s(v))return u()})}Object.defineProperty(r,"__esModule",{value:!0});var u=function(){};r.default={isSupported:o,ready:a}},function(n,r){function s(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function i(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function f(p,v){for(var y=0;y<v.length;y++){var b=v[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,v,y){return v&&f(p.prototype,v),y&&f(p,y),p}}(),a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,l=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,u=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,d=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,c=function(){function f(){s(this,f)}return o(f,[{key:"phone",value:function(){var p=i();return!(!a.test(p)&&!l.test(p.substr(0,4)))}},{key:"mobile",value:function(){var p=i();return!(!u.test(p)&&!d.test(p.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),f}();r.default=new c},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var s=function(o,a,l){var u=o.node.getAttribute("data-aos-once");a>o.position?o.node.classList.add("aos-animate"):typeof u<"u"&&(u==="false"||!l&&u!=="true")&&o.node.classList.remove("aos-animate")},i=function(o,a){var l=window.pageYOffset,u=window.innerHeight;o.forEach(function(d,c){s(d,u+l,a)})};r.default=i},function(n,r,s){function i(u){return u&&u.__esModule?u:{default:u}}Object.defineProperty(r,"__esModule",{value:!0});var o=s(12),a=i(o),l=function(u,d){return u.forEach(function(c,f){c.node.classList.add("aos-init"),c.position=(0,a.default)(c.node,d.offset)}),u};r.default=l},function(n,r,s){function i(u){return u&&u.__esModule?u:{default:u}}Object.defineProperty(r,"__esModule",{value:!0});var o=s(13),a=i(o),l=function(u,d){var c=0,f=0,p=window.innerHeight,v={offset:u.getAttribute("data-aos-offset"),anchor:u.getAttribute("data-aos-anchor"),anchorPlacement:u.getAttribute("data-aos-anchor-placement")};switch(v.offset&&!isNaN(v.offset)&&(f=parseInt(v.offset)),v.anchor&&document.querySelectorAll(v.anchor)&&(u=document.querySelectorAll(v.anchor)[0]),c=(0,a.default)(u).top,v.anchorPlacement){case"top-bottom":break;case"center-bottom":c+=u.offsetHeight/2;break;case"bottom-bottom":c+=u.offsetHeight;break;case"top-center":c+=p/2;break;case"bottom-center":c+=p/2+u.offsetHeight;break;case"center-center":c+=p/2+u.offsetHeight/2;break;case"top-top":c+=p;break;case"bottom-top":c+=u.offsetHeight+p;break;case"center-top":c+=u.offsetHeight/2+p}return v.anchorPlacement||v.offset||isNaN(d)||(f=d),c+f};r.default=l},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var s=function(i){for(var o=0,a=0;i&&!isNaN(i.offsetLeft)&&!isNaN(i.offsetTop);)o+=i.offsetLeft-(i.tagName!="BODY"?i.scrollLeft:0),a+=i.offsetTop-(i.tagName!="BODY"?i.scrollTop:0),i=i.offsetParent;return{top:a,left:o}};r.default=s},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var s=function(i){return i=i||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(i,function(o){return{node:o}})};r.default=s}])})})(i_);var Y9=i_.exports;const X9=Ld(Y9);const J9=()=>{const e=h.useRef(0);return h.useEffect(()=>{e.current<=0&&(X9.init(),e.current+=1)},[]),console.log(e.current),w.jsxs("div",{className:"bg-background text-black/90 dark:text-gray-50 overflow-x-hidden",children:[w.jsx(Z9,{}),w.jsx(G9,{}),w.jsx("main",{children:w.jsx(H9,{})}),w.jsx(K9,{})]})},eV=h.lazy(()=>Er(()=>import("./Wallpaper-8532f884.js"),["assets/Wallpaper-8532f884.js","assets/message-4e5b8c88.js"])),tV=h.lazy(()=>Er(()=>import("./VideoChat-0e4f6606.js"),["assets/VideoChat-0e4f6606.js","assets/logo-loader-7d8003e8.js","assets/VideoChat-c8ce9e46.css"])),nV=h.lazy(()=>Er(()=>import("./SignIn-d75c59be.js"),["assets/SignIn-d75c59be.js","assets/useCustomPages-a847fb21.js"])),rV=h.lazy(()=>Er(()=>import("./SignUp-7be7bc55.js"),["assets/SignUp-7be7bc55.js","assets/useCustomPages-a847fb21.js"])),sV=h.lazy(()=>Er(()=>import("./Chats-4b82511c.js"),["assets/Chats-4b82511c.js","assets/empty-state-27cd4c62.js"])),iV=h.lazy(()=>Er(()=>import("./Chat-9581ceea.js"),["assets/Chat-9581ceea.js","assets/message-4e5b8c88.js"])),oV=h.lazy(()=>Er(()=>import("./Discover-b210392b.js"),["assets/Discover-b210392b.js","assets/empty-state-27cd4c62.js"])),aV=h.lazy(()=>Er(()=>import("./Onboarding-9be3fd6d.js"),["assets/Onboarding-9be3fd6d.js","assets/logo-loader-7d8003e8.js"])),lV=h.lazy(()=>Er(()=>import("./InviteRedirect-d6a691ed.js"),["assets/InviteRedirect-d6a691ed.js","assets/logo-loader-7d8003e8.js"])),uV=h.lazy(()=>Er(()=>import("./ChatsRedirect-94e829b3.js"),["assets/ChatsRedirect-94e829b3.js","assets/logo-loader-7d8003e8.js"]));function cV(){return w.jsx(t3,{children:w.jsx(a3,{children:w.jsx(h.Suspense,{fallback:w.jsx(ud,{}),children:w.jsxs(Q$,{children:[w.jsx(Nt,{path:"/",element:w.jsx(J9,{})}),w.jsxs(Nt,{element:w.jsx(U9,{}),children:[w.jsx(Nt,{path:"/sign-in/*",element:w.jsx(nV,{})}),w.jsx(Nt,{path:"/sign-up/*",element:w.jsx(rV,{})})]}),w.jsxs(Nt,{element:w.jsx(ZM,{}),children:[w.jsx(Nt,{path:"/onboarding/*",element:w.jsx(aV,{})}),w.jsx(Nt,{path:"/chats-redirect/*",element:w.jsx(uV,{})}),w.jsx(Nt,{path:"/discover",element:w.jsx(oV,{})}),w.jsx(Nt,{path:"/:userId/wallpaper",element:w.jsx(eV,{})}),w.jsxs(Nt,{path:"/:userId/chats",element:w.jsx(j9,{}),children:[w.jsx(Nt,{index:!0,element:w.jsx(sV,{})}),w.jsxs(Nt,{path:":chatId",children:[w.jsx(Nt,{index:!0,element:w.jsx(iV,{})}),w.jsx(Nt,{path:"video-chat",element:w.jsx(tV,{})})]})]}),w.jsx(Nt,{path:"/invite-link/:chatId/:inviteCode",element:w.jsx(lV,{})})]})]})})})})}function dV(){return w.jsx("div",{className:"h-screen grid place-items-center",children:w.jsxs("div",{className:"h-fit mx-auto justify-center item-center max-w-[600px] border bg-red-100 dark:bg-red-200 border-red-400 text-red-700 px-4 py-6 rounded relative",children:[w.jsx(oM,{size:120,className:"text-destructive mb-4"}),w.jsxs("div",{children:[w.jsx(s_,{className:"w-[80%] text-balance mb-5",children:"Oops Something nasty went wrong!"}),w.jsx(bt,{className:"dark:text-red-800 text-red-500 mb-3 w-[90%]",children:"Not to worry our engineers will handle it, just open your console and take a screenshot of the error and click the button below"}),w.jsxs(ft,{variant:"secondary",onClick:()=>window.open("https://www.github.com/nathan-somto/chatly/issues/new","__blank"),children:[w.jsx(xM,{className:"mr-2"})," Report"]})]})]})})}const fV=h.createContext(null),sp={didCatch:!1,error:null};class hV extends h.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=sp}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(sp)}}componentDidCatch(t,n){var r,s;(r=(s=this.props).onError)===null||r===void 0||r.call(s,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:s}=this.props;if(r&&n.error!==null&&pV(t.resetKeys,s)){var i,o;(i=(o=this.props).onReset)===null||i===void 0||i.call(o,{next:s,prev:t.resetKeys,reason:"keys"}),this.setState(sp)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:s}=this.props,{didCatch:i,error:o}=this.state;let a=t;if(i){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=h.createElement(r,l);else if(s===null||h.isValidElement(s))a=s;else throw o}return h.createElement(fV.Provider,{value:{didCatch:i,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}}function pV(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}op.createRoot(document.getElementById("root")).render(w.jsx(hV,{FallbackComponent:dV,onReset:()=>{window.location.reload()},onError:(e,t)=>{console.log("The is the cause of the error, please screenshot your console and add it to the issue"),console.error(e,t)},children:w.jsx(cV,{})}));export{gV as $,nU as A,ft as B,cM as C,ay as D,oU as E,a4 as F,t4 as G,L9 as H,r4 as I,n4 as J,CS as K,ld as L,GV as M,bV as N,ia as O,bt as P,xV as Q,G as R,wV as S,EV as T,SV as U,CV as V,kV as W,_V as X,tP as Y,JR as Z,Z1 as _,Ac as a,_M as a$,vV as a0,vP as a1,Ik as a2,S2 as a3,N7 as a4,Hf as a5,es as a6,JV as a7,T9 as a8,ud as a9,Pl as aA,u9 as aB,Fv as aC,lM as aD,aC as aE,XV as aF,u4 as aG,CC as aH,s4 as aI,l4 as aJ,i4 as aK,o4 as aL,NR as aM,Q4 as aN,LC as aO,q4 as aP,lr as aQ,xc as aR,bc as aS,zC as aT,lD as aU,Z4 as aV,FC as aW,dM as aX,Dv as aY,fM as aZ,uu as a_,c9 as aa,kf as ab,Mk as ac,Nk as ad,fU as ae,gv as af,fa as ag,Ry as ah,Bf as ai,q2 as aj,zs as ak,tx as al,hM as am,_y as an,oC as ao,hg as ap,gg as aq,Xv as ar,Jv as as,jv as at,bf as au,Fr as av,rC as aw,qM as ax,s9 as ay,Y2 as az,na as b,e9 as b0,oM as b1,uM as b2,A9 as b3,OV as b4,Vb as b5,Nd as b6,t5 as b7,w5 as b8,E5 as b9,_8 as ba,YV as bb,V9 as bc,s_ as bd,Nv as be,Oy as bf,De as c,ye as d,OE as e,Qt as f,$n as g,QV as h,Al as i,w as j,A1 as k,dU as l,Cf as m,KM as n,ip as o,Ld as p,U4 as q,h as r,ZV as s,sU as t,Yl as u,Qe as v,tU as w,iU as x,rU as y,jm as z}; diff --git a/backend/src/public/dist/assets/index-e4a4bdfa.css b/backend/src/public/dist/assets/index-e4a4bdfa.css new file mode 100644 index 0000000..752b7ab --- /dev/null +++ b/backend/src/public/dist/assets/index-e4a4bdfa.css @@ -0,0 +1 @@ +[data-aos][data-aos][data-aos-duration="50"],body[data-aos-duration="50"] [data-aos]{transition-duration:50ms}[data-aos][data-aos][data-aos-delay="50"],body[data-aos-delay="50"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="50"].aos-animate,body[data-aos-delay="50"] [data-aos].aos-animate{transition-delay:50ms}[data-aos][data-aos][data-aos-duration="100"],body[data-aos-duration="100"] [data-aos]{transition-duration:.1s}[data-aos][data-aos][data-aos-delay="100"],body[data-aos-delay="100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="100"].aos-animate,body[data-aos-delay="100"] [data-aos].aos-animate{transition-delay:.1s}[data-aos][data-aos][data-aos-duration="150"],body[data-aos-duration="150"] [data-aos]{transition-duration:.15s}[data-aos][data-aos][data-aos-delay="150"],body[data-aos-delay="150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="150"].aos-animate,body[data-aos-delay="150"] [data-aos].aos-animate{transition-delay:.15s}[data-aos][data-aos][data-aos-duration="200"],body[data-aos-duration="200"] [data-aos]{transition-duration:.2s}[data-aos][data-aos][data-aos-delay="200"],body[data-aos-delay="200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="200"].aos-animate,body[data-aos-delay="200"] [data-aos].aos-animate{transition-delay:.2s}[data-aos][data-aos][data-aos-duration="250"],body[data-aos-duration="250"] [data-aos]{transition-duration:.25s}[data-aos][data-aos][data-aos-delay="250"],body[data-aos-delay="250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="250"].aos-animate,body[data-aos-delay="250"] [data-aos].aos-animate{transition-delay:.25s}[data-aos][data-aos][data-aos-duration="300"],body[data-aos-duration="300"] [data-aos]{transition-duration:.3s}[data-aos][data-aos][data-aos-delay="300"],body[data-aos-delay="300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="300"].aos-animate,body[data-aos-delay="300"] [data-aos].aos-animate{transition-delay:.3s}[data-aos][data-aos][data-aos-duration="350"],body[data-aos-duration="350"] [data-aos]{transition-duration:.35s}[data-aos][data-aos][data-aos-delay="350"],body[data-aos-delay="350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="350"].aos-animate,body[data-aos-delay="350"] [data-aos].aos-animate{transition-delay:.35s}[data-aos][data-aos][data-aos-duration="400"],body[data-aos-duration="400"] [data-aos]{transition-duration:.4s}[data-aos][data-aos][data-aos-delay="400"],body[data-aos-delay="400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="400"].aos-animate,body[data-aos-delay="400"] [data-aos].aos-animate{transition-delay:.4s}[data-aos][data-aos][data-aos-duration="450"],body[data-aos-duration="450"] [data-aos]{transition-duration:.45s}[data-aos][data-aos][data-aos-delay="450"],body[data-aos-delay="450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="450"].aos-animate,body[data-aos-delay="450"] [data-aos].aos-animate{transition-delay:.45s}[data-aos][data-aos][data-aos-duration="500"],body[data-aos-duration="500"] [data-aos]{transition-duration:.5s}[data-aos][data-aos][data-aos-delay="500"],body[data-aos-delay="500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="500"].aos-animate,body[data-aos-delay="500"] [data-aos].aos-animate{transition-delay:.5s}[data-aos][data-aos][data-aos-duration="550"],body[data-aos-duration="550"] [data-aos]{transition-duration:.55s}[data-aos][data-aos][data-aos-delay="550"],body[data-aos-delay="550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="550"].aos-animate,body[data-aos-delay="550"] [data-aos].aos-animate{transition-delay:.55s}[data-aos][data-aos][data-aos-duration="600"],body[data-aos-duration="600"] [data-aos]{transition-duration:.6s}[data-aos][data-aos][data-aos-delay="600"],body[data-aos-delay="600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="600"].aos-animate,body[data-aos-delay="600"] [data-aos].aos-animate{transition-delay:.6s}[data-aos][data-aos][data-aos-duration="650"],body[data-aos-duration="650"] [data-aos]{transition-duration:.65s}[data-aos][data-aos][data-aos-delay="650"],body[data-aos-delay="650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="650"].aos-animate,body[data-aos-delay="650"] [data-aos].aos-animate{transition-delay:.65s}[data-aos][data-aos][data-aos-duration="700"],body[data-aos-duration="700"] [data-aos]{transition-duration:.7s}[data-aos][data-aos][data-aos-delay="700"],body[data-aos-delay="700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="700"].aos-animate,body[data-aos-delay="700"] [data-aos].aos-animate{transition-delay:.7s}[data-aos][data-aos][data-aos-duration="750"],body[data-aos-duration="750"] [data-aos]{transition-duration:.75s}[data-aos][data-aos][data-aos-delay="750"],body[data-aos-delay="750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="750"].aos-animate,body[data-aos-delay="750"] [data-aos].aos-animate{transition-delay:.75s}[data-aos][data-aos][data-aos-duration="800"],body[data-aos-duration="800"] [data-aos]{transition-duration:.8s}[data-aos][data-aos][data-aos-delay="800"],body[data-aos-delay="800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="800"].aos-animate,body[data-aos-delay="800"] [data-aos].aos-animate{transition-delay:.8s}[data-aos][data-aos][data-aos-duration="850"],body[data-aos-duration="850"] [data-aos]{transition-duration:.85s}[data-aos][data-aos][data-aos-delay="850"],body[data-aos-delay="850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="850"].aos-animate,body[data-aos-delay="850"] [data-aos].aos-animate{transition-delay:.85s}[data-aos][data-aos][data-aos-duration="900"],body[data-aos-duration="900"] [data-aos]{transition-duration:.9s}[data-aos][data-aos][data-aos-delay="900"],body[data-aos-delay="900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="900"].aos-animate,body[data-aos-delay="900"] [data-aos].aos-animate{transition-delay:.9s}[data-aos][data-aos][data-aos-duration="950"],body[data-aos-duration="950"] [data-aos]{transition-duration:.95s}[data-aos][data-aos][data-aos-delay="950"],body[data-aos-delay="950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="950"].aos-animate,body[data-aos-delay="950"] [data-aos].aos-animate{transition-delay:.95s}[data-aos][data-aos][data-aos-duration="1000"],body[data-aos-duration="1000"] [data-aos]{transition-duration:1s}[data-aos][data-aos][data-aos-delay="1000"],body[data-aos-delay="1000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1000"].aos-animate,body[data-aos-delay="1000"] [data-aos].aos-animate{transition-delay:1s}[data-aos][data-aos][data-aos-duration="1050"],body[data-aos-duration="1050"] [data-aos]{transition-duration:1.05s}[data-aos][data-aos][data-aos-delay="1050"],body[data-aos-delay="1050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1050"].aos-animate,body[data-aos-delay="1050"] [data-aos].aos-animate{transition-delay:1.05s}[data-aos][data-aos][data-aos-duration="1100"],body[data-aos-duration="1100"] [data-aos]{transition-duration:1.1s}[data-aos][data-aos][data-aos-delay="1100"],body[data-aos-delay="1100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1100"].aos-animate,body[data-aos-delay="1100"] [data-aos].aos-animate{transition-delay:1.1s}[data-aos][data-aos][data-aos-duration="1150"],body[data-aos-duration="1150"] [data-aos]{transition-duration:1.15s}[data-aos][data-aos][data-aos-delay="1150"],body[data-aos-delay="1150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1150"].aos-animate,body[data-aos-delay="1150"] [data-aos].aos-animate{transition-delay:1.15s}[data-aos][data-aos][data-aos-duration="1200"],body[data-aos-duration="1200"] [data-aos]{transition-duration:1.2s}[data-aos][data-aos][data-aos-delay="1200"],body[data-aos-delay="1200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1200"].aos-animate,body[data-aos-delay="1200"] [data-aos].aos-animate{transition-delay:1.2s}[data-aos][data-aos][data-aos-duration="1250"],body[data-aos-duration="1250"] [data-aos]{transition-duration:1.25s}[data-aos][data-aos][data-aos-delay="1250"],body[data-aos-delay="1250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1250"].aos-animate,body[data-aos-delay="1250"] [data-aos].aos-animate{transition-delay:1.25s}[data-aos][data-aos][data-aos-duration="1300"],body[data-aos-duration="1300"] [data-aos]{transition-duration:1.3s}[data-aos][data-aos][data-aos-delay="1300"],body[data-aos-delay="1300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1300"].aos-animate,body[data-aos-delay="1300"] [data-aos].aos-animate{transition-delay:1.3s}[data-aos][data-aos][data-aos-duration="1350"],body[data-aos-duration="1350"] [data-aos]{transition-duration:1.35s}[data-aos][data-aos][data-aos-delay="1350"],body[data-aos-delay="1350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1350"].aos-animate,body[data-aos-delay="1350"] [data-aos].aos-animate{transition-delay:1.35s}[data-aos][data-aos][data-aos-duration="1400"],body[data-aos-duration="1400"] [data-aos]{transition-duration:1.4s}[data-aos][data-aos][data-aos-delay="1400"],body[data-aos-delay="1400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1400"].aos-animate,body[data-aos-delay="1400"] [data-aos].aos-animate{transition-delay:1.4s}[data-aos][data-aos][data-aos-duration="1450"],body[data-aos-duration="1450"] [data-aos]{transition-duration:1.45s}[data-aos][data-aos][data-aos-delay="1450"],body[data-aos-delay="1450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1450"].aos-animate,body[data-aos-delay="1450"] [data-aos].aos-animate{transition-delay:1.45s}[data-aos][data-aos][data-aos-duration="1500"],body[data-aos-duration="1500"] [data-aos]{transition-duration:1.5s}[data-aos][data-aos][data-aos-delay="1500"],body[data-aos-delay="1500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1500"].aos-animate,body[data-aos-delay="1500"] [data-aos].aos-animate{transition-delay:1.5s}[data-aos][data-aos][data-aos-duration="1550"],body[data-aos-duration="1550"] [data-aos]{transition-duration:1.55s}[data-aos][data-aos][data-aos-delay="1550"],body[data-aos-delay="1550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1550"].aos-animate,body[data-aos-delay="1550"] [data-aos].aos-animate{transition-delay:1.55s}[data-aos][data-aos][data-aos-duration="1600"],body[data-aos-duration="1600"] [data-aos]{transition-duration:1.6s}[data-aos][data-aos][data-aos-delay="1600"],body[data-aos-delay="1600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1600"].aos-animate,body[data-aos-delay="1600"] [data-aos].aos-animate{transition-delay:1.6s}[data-aos][data-aos][data-aos-duration="1650"],body[data-aos-duration="1650"] [data-aos]{transition-duration:1.65s}[data-aos][data-aos][data-aos-delay="1650"],body[data-aos-delay="1650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1650"].aos-animate,body[data-aos-delay="1650"] [data-aos].aos-animate{transition-delay:1.65s}[data-aos][data-aos][data-aos-duration="1700"],body[data-aos-duration="1700"] [data-aos]{transition-duration:1.7s}[data-aos][data-aos][data-aos-delay="1700"],body[data-aos-delay="1700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1700"].aos-animate,body[data-aos-delay="1700"] [data-aos].aos-animate{transition-delay:1.7s}[data-aos][data-aos][data-aos-duration="1750"],body[data-aos-duration="1750"] [data-aos]{transition-duration:1.75s}[data-aos][data-aos][data-aos-delay="1750"],body[data-aos-delay="1750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1750"].aos-animate,body[data-aos-delay="1750"] [data-aos].aos-animate{transition-delay:1.75s}[data-aos][data-aos][data-aos-duration="1800"],body[data-aos-duration="1800"] [data-aos]{transition-duration:1.8s}[data-aos][data-aos][data-aos-delay="1800"],body[data-aos-delay="1800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1800"].aos-animate,body[data-aos-delay="1800"] [data-aos].aos-animate{transition-delay:1.8s}[data-aos][data-aos][data-aos-duration="1850"],body[data-aos-duration="1850"] [data-aos]{transition-duration:1.85s}[data-aos][data-aos][data-aos-delay="1850"],body[data-aos-delay="1850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1850"].aos-animate,body[data-aos-delay="1850"] [data-aos].aos-animate{transition-delay:1.85s}[data-aos][data-aos][data-aos-duration="1900"],body[data-aos-duration="1900"] [data-aos]{transition-duration:1.9s}[data-aos][data-aos][data-aos-delay="1900"],body[data-aos-delay="1900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1900"].aos-animate,body[data-aos-delay="1900"] [data-aos].aos-animate{transition-delay:1.9s}[data-aos][data-aos][data-aos-duration="1950"],body[data-aos-duration="1950"] [data-aos]{transition-duration:1.95s}[data-aos][data-aos][data-aos-delay="1950"],body[data-aos-delay="1950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1950"].aos-animate,body[data-aos-delay="1950"] [data-aos].aos-animate{transition-delay:1.95s}[data-aos][data-aos][data-aos-duration="2000"],body[data-aos-duration="2000"] [data-aos]{transition-duration:2s}[data-aos][data-aos][data-aos-delay="2000"],body[data-aos-delay="2000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2000"].aos-animate,body[data-aos-delay="2000"] [data-aos].aos-animate{transition-delay:2s}[data-aos][data-aos][data-aos-duration="2050"],body[data-aos-duration="2050"] [data-aos]{transition-duration:2.05s}[data-aos][data-aos][data-aos-delay="2050"],body[data-aos-delay="2050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2050"].aos-animate,body[data-aos-delay="2050"] [data-aos].aos-animate{transition-delay:2.05s}[data-aos][data-aos][data-aos-duration="2100"],body[data-aos-duration="2100"] [data-aos]{transition-duration:2.1s}[data-aos][data-aos][data-aos-delay="2100"],body[data-aos-delay="2100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2100"].aos-animate,body[data-aos-delay="2100"] [data-aos].aos-animate{transition-delay:2.1s}[data-aos][data-aos][data-aos-duration="2150"],body[data-aos-duration="2150"] [data-aos]{transition-duration:2.15s}[data-aos][data-aos][data-aos-delay="2150"],body[data-aos-delay="2150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2150"].aos-animate,body[data-aos-delay="2150"] [data-aos].aos-animate{transition-delay:2.15s}[data-aos][data-aos][data-aos-duration="2200"],body[data-aos-duration="2200"] [data-aos]{transition-duration:2.2s}[data-aos][data-aos][data-aos-delay="2200"],body[data-aos-delay="2200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2200"].aos-animate,body[data-aos-delay="2200"] [data-aos].aos-animate{transition-delay:2.2s}[data-aos][data-aos][data-aos-duration="2250"],body[data-aos-duration="2250"] [data-aos]{transition-duration:2.25s}[data-aos][data-aos][data-aos-delay="2250"],body[data-aos-delay="2250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2250"].aos-animate,body[data-aos-delay="2250"] [data-aos].aos-animate{transition-delay:2.25s}[data-aos][data-aos][data-aos-duration="2300"],body[data-aos-duration="2300"] [data-aos]{transition-duration:2.3s}[data-aos][data-aos][data-aos-delay="2300"],body[data-aos-delay="2300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2300"].aos-animate,body[data-aos-delay="2300"] [data-aos].aos-animate{transition-delay:2.3s}[data-aos][data-aos][data-aos-duration="2350"],body[data-aos-duration="2350"] [data-aos]{transition-duration:2.35s}[data-aos][data-aos][data-aos-delay="2350"],body[data-aos-delay="2350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2350"].aos-animate,body[data-aos-delay="2350"] [data-aos].aos-animate{transition-delay:2.35s}[data-aos][data-aos][data-aos-duration="2400"],body[data-aos-duration="2400"] [data-aos]{transition-duration:2.4s}[data-aos][data-aos][data-aos-delay="2400"],body[data-aos-delay="2400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2400"].aos-animate,body[data-aos-delay="2400"] [data-aos].aos-animate{transition-delay:2.4s}[data-aos][data-aos][data-aos-duration="2450"],body[data-aos-duration="2450"] [data-aos]{transition-duration:2.45s}[data-aos][data-aos][data-aos-delay="2450"],body[data-aos-delay="2450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2450"].aos-animate,body[data-aos-delay="2450"] [data-aos].aos-animate{transition-delay:2.45s}[data-aos][data-aos][data-aos-duration="2500"],body[data-aos-duration="2500"] [data-aos]{transition-duration:2.5s}[data-aos][data-aos][data-aos-delay="2500"],body[data-aos-delay="2500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2500"].aos-animate,body[data-aos-delay="2500"] [data-aos].aos-animate{transition-delay:2.5s}[data-aos][data-aos][data-aos-duration="2550"],body[data-aos-duration="2550"] [data-aos]{transition-duration:2.55s}[data-aos][data-aos][data-aos-delay="2550"],body[data-aos-delay="2550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2550"].aos-animate,body[data-aos-delay="2550"] [data-aos].aos-animate{transition-delay:2.55s}[data-aos][data-aos][data-aos-duration="2600"],body[data-aos-duration="2600"] [data-aos]{transition-duration:2.6s}[data-aos][data-aos][data-aos-delay="2600"],body[data-aos-delay="2600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2600"].aos-animate,body[data-aos-delay="2600"] [data-aos].aos-animate{transition-delay:2.6s}[data-aos][data-aos][data-aos-duration="2650"],body[data-aos-duration="2650"] [data-aos]{transition-duration:2.65s}[data-aos][data-aos][data-aos-delay="2650"],body[data-aos-delay="2650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2650"].aos-animate,body[data-aos-delay="2650"] [data-aos].aos-animate{transition-delay:2.65s}[data-aos][data-aos][data-aos-duration="2700"],body[data-aos-duration="2700"] [data-aos]{transition-duration:2.7s}[data-aos][data-aos][data-aos-delay="2700"],body[data-aos-delay="2700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2700"].aos-animate,body[data-aos-delay="2700"] [data-aos].aos-animate{transition-delay:2.7s}[data-aos][data-aos][data-aos-duration="2750"],body[data-aos-duration="2750"] [data-aos]{transition-duration:2.75s}[data-aos][data-aos][data-aos-delay="2750"],body[data-aos-delay="2750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2750"].aos-animate,body[data-aos-delay="2750"] [data-aos].aos-animate{transition-delay:2.75s}[data-aos][data-aos][data-aos-duration="2800"],body[data-aos-duration="2800"] [data-aos]{transition-duration:2.8s}[data-aos][data-aos][data-aos-delay="2800"],body[data-aos-delay="2800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2800"].aos-animate,body[data-aos-delay="2800"] [data-aos].aos-animate{transition-delay:2.8s}[data-aos][data-aos][data-aos-duration="2850"],body[data-aos-duration="2850"] [data-aos]{transition-duration:2.85s}[data-aos][data-aos][data-aos-delay="2850"],body[data-aos-delay="2850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2850"].aos-animate,body[data-aos-delay="2850"] [data-aos].aos-animate{transition-delay:2.85s}[data-aos][data-aos][data-aos-duration="2900"],body[data-aos-duration="2900"] [data-aos]{transition-duration:2.9s}[data-aos][data-aos][data-aos-delay="2900"],body[data-aos-delay="2900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2900"].aos-animate,body[data-aos-delay="2900"] [data-aos].aos-animate{transition-delay:2.9s}[data-aos][data-aos][data-aos-duration="2950"],body[data-aos-duration="2950"] [data-aos]{transition-duration:2.95s}[data-aos][data-aos][data-aos-delay="2950"],body[data-aos-delay="2950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2950"].aos-animate,body[data-aos-delay="2950"] [data-aos].aos-animate{transition-delay:2.95s}[data-aos][data-aos][data-aos-duration="3000"],body[data-aos-duration="3000"] [data-aos]{transition-duration:3s}[data-aos][data-aos][data-aos-delay="3000"],body[data-aos-delay="3000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="3000"].aos-animate,body[data-aos-delay="3000"] [data-aos].aos-animate{transition-delay:3s}[data-aos][data-aos][data-aos-easing=linear],body[data-aos-easing=linear] [data-aos]{transition-timing-function:cubic-bezier(.25,.25,.75,.75)}[data-aos][data-aos][data-aos-easing=ease],body[data-aos-easing=ease] [data-aos]{transition-timing-function:ease}[data-aos][data-aos][data-aos-easing=ease-in],body[data-aos-easing=ease-in] [data-aos]{transition-timing-function:ease-in}[data-aos][data-aos][data-aos-easing=ease-out],body[data-aos-easing=ease-out] [data-aos]{transition-timing-function:ease-out}[data-aos][data-aos][data-aos-easing=ease-in-out],body[data-aos-easing=ease-in-out] [data-aos]{transition-timing-function:ease-in-out}[data-aos][data-aos][data-aos-easing=ease-in-back],body[data-aos-easing=ease-in-back] [data-aos]{transition-timing-function:cubic-bezier(.6,-.28,.735,.045)}[data-aos][data-aos][data-aos-easing=ease-out-back],body[data-aos-easing=ease-out-back] [data-aos]{transition-timing-function:cubic-bezier(.175,.885,.32,1.275)}[data-aos][data-aos][data-aos-easing=ease-in-out-back],body[data-aos-easing=ease-in-out-back] [data-aos]{transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}[data-aos][data-aos][data-aos-easing=ease-in-sine],body[data-aos-easing=ease-in-sine] [data-aos]{transition-timing-function:cubic-bezier(.47,0,.745,.715)}[data-aos][data-aos][data-aos-easing=ease-out-sine],body[data-aos-easing=ease-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.39,.575,.565,1)}[data-aos][data-aos][data-aos-easing=ease-in-out-sine],body[data-aos-easing=ease-in-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.445,.05,.55,.95)}[data-aos][data-aos][data-aos-easing=ease-in-quad],body[data-aos-easing=ease-in-quad] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quad],body[data-aos-easing=ease-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quad],body[data-aos-easing=ease-in-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-cubic],body[data-aos-easing=ease-in-cubic] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-cubic],body[data-aos-easing=ease-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-cubic],body[data-aos-easing=ease-in-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-quart],body[data-aos-easing=ease-in-quart] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quart],body[data-aos-easing=ease-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quart],body[data-aos-easing=ease-in-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos^=fade][data-aos^=fade]{opacity:0;transition-property:opacity,transform}[data-aos^=fade][data-aos^=fade].aos-animate{opacity:1;transform:translateZ(0)}[data-aos=fade-up]{transform:translate3d(0,100px,0)}[data-aos=fade-down]{transform:translate3d(0,-100px,0)}[data-aos=fade-right]{transform:translate3d(-100px,0,0)}[data-aos=fade-left]{transform:translate3d(100px,0,0)}[data-aos=fade-up-right]{transform:translate3d(-100px,100px,0)}[data-aos=fade-up-left]{transform:translate3d(100px,100px,0)}[data-aos=fade-down-right]{transform:translate3d(-100px,-100px,0)}[data-aos=fade-down-left]{transform:translate3d(100px,-100px,0)}[data-aos^=zoom][data-aos^=zoom]{opacity:0;transition-property:opacity,transform}[data-aos^=zoom][data-aos^=zoom].aos-animate{opacity:1;transform:translateZ(0) scale(1)}[data-aos=zoom-in]{transform:scale(.6)}[data-aos=zoom-in-up]{transform:translate3d(0,100px,0) scale(.6)}[data-aos=zoom-in-down]{transform:translate3d(0,-100px,0) scale(.6)}[data-aos=zoom-in-right]{transform:translate3d(-100px,0,0) scale(.6)}[data-aos=zoom-in-left]{transform:translate3d(100px,0,0) scale(.6)}[data-aos=zoom-out]{transform:scale(1.2)}[data-aos=zoom-out-up]{transform:translate3d(0,100px,0) scale(1.2)}[data-aos=zoom-out-down]{transform:translate3d(0,-100px,0) scale(1.2)}[data-aos=zoom-out-right]{transform:translate3d(-100px,0,0) scale(1.2)}[data-aos=zoom-out-left]{transform:translate3d(100px,0,0) scale(1.2)}[data-aos^=slide][data-aos^=slide]{transition-property:transform}[data-aos^=slide][data-aos^=slide].aos-animate{transform:translateZ(0)}[data-aos=slide-up]{transform:translate3d(0,100%,0)}[data-aos=slide-down]{transform:translate3d(0,-100%,0)}[data-aos=slide-right]{transform:translate3d(-100%,0,0)}[data-aos=slide-left]{transform:translate3d(100%,0,0)}[data-aos^=flip][data-aos^=flip]{backface-visibility:hidden;transition-property:transform}[data-aos=flip-left]{transform:perspective(2500px) rotateY(-100deg)}[data-aos=flip-left].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-right]{transform:perspective(2500px) rotateY(100deg)}[data-aos=flip-right].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-up]{transform:perspective(2500px) rotateX(-100deg)}[data-aos=flip-up].aos-animate{transform:perspective(2500px) rotateX(0)}[data-aos=flip-down]{transform:perspective(2500px) rotateX(100deg)}[data-aos=flip-down].aos-animate{transform:perspective(2500px) rotateX(0)}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;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";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 220 14% 96%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--radius: .5rem}.dark{--background: 0 6.67% 2.94%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-bottom-2{bottom:-.5rem}.-bottom-20{bottom:-5rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-right-2{right:-.5rem}.-top-1{top:-.25rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-2\/4,.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-1{top:.25rem}.top-2{top:.5rem}.top-2\/4{top:50%}.top-20{top:5rem}.top-4{top:1rem}.top-5{top:1.25rem}.top-\[-350px\]{top:-350px}.top-\[50\%\]{top:50%}.z-30{z-index:30}.z-50{z-index:50}.z-\[0\]{z-index:0}.z-\[1000000\]{z-index:1000000}.z-\[10000\]{z-index:10000}.z-\[10\]{z-index:10}.z-\[1\]{z-index:1}.z-\[20\]{z-index:20}.z-\[2\]{z-index:2}.z-\[3\]{z-index:3}.z-\[50\]{z-index:50}.z-\[8\]{z-index:8}.z-\[999999999999999999\]{z-index:999999999999999999}.z-\[9999999999\]{z-index:9999999999}.z-\[99999\]{z-index:99999}.z-\[9999\]{z-index:9999}.order-2{order:2}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-0{margin-left:0;margin-right:0}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.my-16{margin-top:4rem;margin-bottom:4rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.my-auto{margin-top:auto;margin-bottom:auto}.-ml-6{margin-left:-1.5rem}.-ml-7{margin-left:-1.75rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-9{margin-bottom:2.25rem}.mb-\[0\.3rem\]{margin-bottom:.3rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-auto{margin-left:auto}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-\[75px\]{margin-top:75px}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[1\.2rem\]{height:1.2rem}.h-\[100px\]{height:100px}.h-\[15rem\]{height:15rem}.h-\[200px\]{height:200px}.h-\[20px\]{height:20px}.h-\[295px\]{height:295px}.h-\[3\.5rem\]{height:3.5rem}.h-\[3\.7rem\]{height:3.7rem}.h-\[300px\]{height:300px}.h-\[350px\]{height:350px}.h-\[450px\]{height:450px}.h-\[500px\]{height:500px}.h-\[70px\]{height:70px}.h-\[75px\]{height:75px}.h-\[80\%\]{height:80%}.h-\[80px\]{height:80px}.h-\[calc\(100\%-64px\)\]{height:calc(100% - 64px)}.h-\[calc\(100vh-67px\)\]{height:calc(100vh - 67px)}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-20{max-height:5rem}.max-h-\[100px\]{max-height:100px}.max-h-fit{max-height:-moz-fit-content;max-height:fit-content}.min-h-\[200px\]{min-height:200px}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-\[225px\]{width:225px}.w-\[22rem\]{width:22rem}.w-\[3\.5rem\]{width:3.5rem}.w-\[3\.7rem\]{width:3.7rem}.w-\[300px\]{width:300px}.w-\[350px\]{width:350px}.w-\[70\%\]{width:70%}.w-\[70px\]{width:70px}.w-\[80\%\]{width:80%}.w-\[80px\]{width:80px}.w-\[90\%\]{width:90%}.w-\[calc\(90\%-96px\)\]{width:calc(90% - 96px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[100px\]{min-width:100px}.min-w-\[8rem\]{min-width:8rem}.min-w-full{min-width:100%}.\!max-w-\[500px\]{max-width:500px!important}.max-w-\[1000px\]{max-width:1000px}.max-w-\[1440px\]{max-width:1440px}.max-w-\[46rem\]{max-width:46rem}.max-w-\[500px\]{max-width:500px}.max-w-\[550px\]{max-width:550px}.max-w-\[600px\]{max-width:600px}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-2\/4{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-2\/4{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-\[360deg\]{--tw-rotate: 360deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.scroll-m-20{scroll-margin:5rem}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.content-center{align-content:center}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.gap-\[0\.35rem\]{gap:.35rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-2\.5{-moz-column-gap:.625rem;column-gap:.625rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-y-1{row-gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[50\%\]{border-radius:50%}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-bl-lg{border-bottom-left-radius:var(--radius)}.rounded-br-2xl{border-bottom-right-radius:1rem}.rounded-br-lg{border-bottom-right-radius:var(--radius)}.rounded-br-sm{border-bottom-right-radius:calc(var(--radius) - 4px)}.rounded-tl-2xl{border-top-left-radius:1rem}.rounded-tl-lg{border-top-left-radius:var(--radius)}.rounded-tr-2xl{border-top-right-radius:1rem}.rounded-tr-lg{border-top-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-\[\#ac9619\]{--tw-border-opacity: 1;border-color:rgb(172 150 25 / var(--tw-border-opacity))}.border-\[rgb\(49\,102\,145\)\]{--tw-border-opacity: 1;border-color:rgb(49 102 145 / var(--tw-border-opacity))}.border-brand-p1{--tw-border-opacity: 1;border-color:rgb(76 141 195 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-input{border-color:hsl(var(--input))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-b-brand-p1{--tw-border-opacity: 1;border-bottom-color:rgb(76 141 195 / var(--tw-border-opacity))}.border-l-brand-p1{--tw-border-opacity: 1;border-left-color:rgb(76 141 195 / var(--tw-border-opacity))}.border-r-brand-p1{--tw-border-opacity: 1;border-right-color:rgb(76 141 195 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\!bg-transparent{background-color:transparent!important}.bg-\[\#383A47\]{--tw-bg-opacity: 1;background-color:rgb(56 58 71 / var(--tw-bg-opacity))}.bg-\[\#eee\]{--tw-bg-opacity: 1;background-color:rgb(238 238 238 / var(--tw-bg-opacity))}.bg-\[rgb\(84\,157\,216\)\]{--tw-bg-opacity: 1;background-color:rgb(84 157 216 / var(--tw-bg-opacity))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/50{background-color:#00000080}.bg-black\/80{background-color:#000c}.bg-black\/90{background-color:#000000e6}.bg-border{background-color:hsl(var(--border))}.bg-brand-p1{--tw-bg-opacity: 1;background-color:rgb(76 141 195 / var(--tw-bg-opacity))}.bg-brand-p1\/80{background-color:#4c8dc3cc}.bg-brand-p2{--tw-bg-opacity: 1;background-color:rgb(50 124 184 / var(--tw-bg-opacity))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.bg-input{background-color:hsl(var(--input))}.bg-muted{background-color:hsl(var(--muted))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/60{background-color:#fff9}.bg-opacity-50{--tw-bg-opacity: .5}.bg-cover{background-size:cover}.bg-center{background-position:center}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.object-left{-o-object-position:left;object-position:left}.\!p-0{padding:0!important}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[0\.45rem\]{padding:.45rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[0\.3rem\]{padding-left:.3rem;padding-right:.3rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-7{padding-top:1.75rem;padding-bottom:1.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[0\.2rem\]{padding-top:.2rem;padding-bottom:.2rem}.py-\[0\.45rem\]{padding-top:.45rem;padding-bottom:.45rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-8{padding-bottom:2rem}.pl-2{padding-left:.5rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-12{padding-top:3rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[15\.5px\]{font-size:15.5px}.text-\[15px\]{font-size:15px}.text-\[16\.25px\]{font-size:16.25px}.text-\[16\.5px\]{font-size:16.5px}.text-\[20px\]{font-size:20px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.font-semibold{font-weight:600}.\!capitalize{text-transform:capitalize!important}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.\!text-brand-p1{--tw-text-opacity: 1 !important;color:rgb(76 141 195 / var(--tw-text-opacity))!important}.\!text-brand-p2{--tw-text-opacity: 1 !important;color:rgb(50 124 184 / var(--tw-text-opacity))!important}.\!text-neutral-600{--tw-text-opacity: 1 !important;color:rgb(82 82 82 / var(--tw-text-opacity))!important}.text-\[\#17191c\]{--tw-text-opacity: 1;color:rgb(23 25 28 / var(--tw-text-opacity))}.text-\[\#1B1C20\]{--tw-text-opacity: 1;color:rgb(27 28 32 / var(--tw-text-opacity))}.text-\[\#383A47\]{--tw-text-opacity: 1;color:rgb(56 58 71 / var(--tw-text-opacity))}.text-\[\#ac9619\]{--tw-text-opacity: 1;color:rgb(172 150 25 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-black\/80{color:#000c}.text-black\/90{color:#000000e6}.text-brand-p1{--tw-text-opacity: 1;color:rgb(76 141 195 / var(--tw-text-opacity))}.text-brand-p1\/80{color:#4c8dc3cc}.text-brand-p2{--tw-text-opacity: 1;color:rgb(50 124 184 / var(--tw-text-opacity))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white\/70{color:#ffffffb3}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.placeholder-neutral-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(163 163 163 / var(--tw-placeholder-opacity))}.placeholder-neutral-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(163 163 163 / var(--tw-placeholder-opacity))}.\!opacity-50{opacity:.5!important}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-\[0_0_20px_\#4C8DC3\]{--tw-shadow: 0 0 20px #4C8DC3;--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-\[\#ddd\]\/80{--tw-ring-color: rgb(221 221 221 / .8)}.ring-brand-p2{--tw-ring-opacity: 1;--tw-ring-color: rgb(50 124 184 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-transparent{--tw-ring-color: transparent}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-150{transition-delay:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-80{--tw-enter-opacity: .8}.zoom-in{--tw-enter-scale: 0}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.delay-150{animation-delay:.15s}.ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\[id\:string\]{id:string}@keyframes zoom-in-out{0%{scale:1}to{scale:1.15}}.zoom-in-out{animation:zoom-in-out 1.2s infinite ease-in-out alternate-reverse}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-\[rgb\(102\,174\,233\)\]:hover{--tw-bg-opacity: 1;background-color:rgb(102 174 233 / var(--tw-bg-opacity))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-brand-p1\/70:hover{background-color:#4c8dc3b3}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-zinc-600:hover{--tw-text-opacity: 1;color:rgb(82 82 91 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-50:hover{opacity:.5}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.focus\:border-none:focus{border-style:none}.focus\:border-transparent:focus{border-color:transparent}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-brand-p2:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(50 124 184 / var(--tw-ring-opacity))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-rose-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(244 63 94 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}:is(.dark .dark\:-rotate-90){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:rotate-0){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:scale-0){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:scale-100){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\:border-slate-700){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}:is(.dark .dark\:bg-\[\#17191C\]){--tw-bg-opacity: 1;background-color:rgb(23 25 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#17191c\]){--tw-bg-opacity: 1;background-color:rgb(23 25 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#1e1e1f\]){--tw-bg-opacity: 1;background-color:rgb(30 30 31 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#272A20\]){--tw-bg-opacity: 1;background-color:rgb(39 42 32 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[rgb\(48\,94\,131\)\]){--tw-bg-opacity: 1;background-color:rgb(48 94 131 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[rgb\(60\,116\,161\)\]){--tw-bg-opacity: 1;background-color:rgb(60 116 161 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[rgb\(60\,116\,161\)\]\/80){background-color:#3c74a1cc}:is(.dark .dark\:bg-background){background-color:hsl(var(--background))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-50){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-neutral-700){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-200){--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}:is(.dark .dark\:text-brand-p2){--tw-text-opacity: 1;color:rgb(50 124 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-100){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-50){--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-950){--tw-text-opacity: 1;color:rgb(3 7 18 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-700){--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-800){--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}:is(.dark .dark\:text-rose-300){--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-zinc-400){--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity))}:is(.dark .dark\:ring-gray-500\/80){--tw-ring-color: rgb(107 114 128 / .8)}:is(.dark .dark\:ring-gray-700){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}:is(.dark .dark\:hover\:bg-\[\#272A20\]:hover){--tw-bg-opacity: 1;background-color:rgb(39 42 32 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:text-zinc-300:hover){--tw-text-opacity: 1;color:rgb(212 212 216 / var(--tw-text-opacity))}@media not all and (min-width: 1024px){.max-lg\:w-\[80\%\]{width:80%}.max-lg\:w-\[calc\(80\%-12\*0\.25rem\)\]{width:calc(80% - 3rem)}.max-lg\:max-w-\[600px\]{max-width:600px}.max-lg\:flex-shrink-0{flex-shrink:0}.max-lg\:cursor-pointer{cursor:pointer}.max-lg\:text-center{text-align:center}.max-lg\:hover\:opacity-70:hover{opacity:.7}}@media not all and (min-width: 768px){.max-md\:\!h-auto{height:auto!important}.max-md\:w-full{width:100%}.max-md\:bg-brand-p1{--tw-bg-opacity: 1;background-color:rgb(76 141 195 / var(--tw-bg-opacity))}.max-md\:bg-transparent{background-color:transparent}.max-md\:\!p-0{padding:0!important}.max-md\:\!text-2xl{font-size:1.5rem!important;line-height:2rem!important}.max-md\:opacity-0{opacity:0}.max-md\:opacity-100{opacity:1}.max-md\:hover\:\!bg-transparent:hover{background-color:transparent!important}.max-md\:hover\:\!text-white:hover{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.max-md\:hover\:opacity-50:hover{opacity:.5}}@media not all and (min-width: 640px){.max-sm\:w-\[300px\]{width:300px}.max-sm\:max-w-\[300px\]{max-width:300px}}@media (min-width: 640px){.sm\:h-\[22rem\]{height:22rem}.sm\:\!w-\[500px\]{width:500px!important}.sm\:w-\[32rem\]{width:32rem}.sm\:w-full{width:100%}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-start{justify-content:flex-start}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:gap-0{gap:0px}.sm\:gap-5{gap:1.25rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(2px * var(--tw-divide-x-reverse));border-left-width:calc(2px * calc(1 - var(--tw-divide-x-reverse)))}.sm\:divide-\[\#383A47\]>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(56 58 71 / var(--tw-divide-opacity))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:pl-5{padding-left:1.25rem}.sm\:text-left{text-align:left}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width: 768px){.md\:relative{position:relative}.md\:right-auto{right:auto}.md\:top-auto{top:auto}.md\:flex{display:flex}.md\:hidden{display:none}.md\:flex-\[0\.8\]{flex:.8}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:justify-between{justify-content:space-between}.md\:gap-0{gap:0px}.md\:gap-3{gap:.75rem}.md\:gap-6{gap:1.5rem}.md\:text-base{font-size:1rem;line-height:1.5rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.md\:hover\:border-b-brand-p1:hover{--tw-border-opacity: 1;border-bottom-color:rgb(76 141 195 / var(--tw-border-opacity))}.md\:hover\:opacity-100:hover{opacity:1}}@media (min-width: 1024px){.lg\:fixed{position:fixed}.lg\:left-0{left:0}.lg\:top-0{top:0}.lg\:mx-0{margin-left:0;margin-right:0}.lg\:mb-3{margin-bottom:.75rem}.lg\:mb-6{margin-bottom:1.5rem}.lg\:ml-\[350px\]{margin-left:350px}.lg\:mt-0{margin-top:0}.lg\:mt-\[80px\]{margin-top:80px}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:h-\[calc\(100vh-16\*0\.25rem\)\]{height:calc(100vh - 4rem)}.lg\:h-auto{height:auto}.lg\:w-\[350px\]{width:350px}.lg\:w-\[450px\]{width:450px}.lg\:w-\[500px\]{width:500px}.lg\:w-\[550px\]{width:550px}.lg\:w-\[70\%\]{width:70%}.lg\:w-\[90\%\]{width:90%}.lg\:w-\[calc\(100\%-350px\)\]{width:calc(100% - 350px)}.lg\:max-w-none{max-width:none}.lg\:flex-row{flex-direction:row}.lg\:flex-row-reverse{flex-direction:row-reverse}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:justify-around{justify-content:space-around}.lg\:gap-0{gap:0px}.lg\:gap-2{gap:.5rem}.lg\:gap-5{gap:1.25rem}.lg\:gap-\[5\%\]{gap:5%}.lg\:overflow-auto{overflow:auto}.lg\:py-16{padding-top:4rem;padding-bottom:4rem}.lg\:pt-0{padding-top:0}.lg\:text-left{text-align:left}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:text-\[42px\]{font-size:42px}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 1280px){.xl\:mb-4{margin-bottom:1rem}.xl\:w-\[600px\]{width:600px}.xl\:text-5xl\/normal{font-size:3rem;line-height:1.5}.xl\:text-6xl{font-size:3.75rem;line-height:1}.xl\:text-lg{font-size:1.125rem;line-height:1.75rem}} diff --git a/backend/src/public/dist/assets/leaves-c06cc1fd.jpg b/backend/src/public/dist/assets/leaves-c06cc1fd.jpg new file mode 100644 index 0000000..50a5d3a Binary files /dev/null and b/backend/src/public/dist/assets/leaves-c06cc1fd.jpg differ diff --git a/backend/src/public/dist/assets/light1-f64af717.jpg b/backend/src/public/dist/assets/light1-f64af717.jpg new file mode 100644 index 0000000..1b32103 Binary files /dev/null and b/backend/src/public/dist/assets/light1-f64af717.jpg differ diff --git a/backend/src/public/dist/assets/light2-4161db47.jpg b/backend/src/public/dist/assets/light2-4161db47.jpg new file mode 100644 index 0000000..7e4c50c Binary files /dev/null and b/backend/src/public/dist/assets/light2-4161db47.jpg differ diff --git a/backend/src/public/dist/assets/logo-loader-7d8003e8.js b/backend/src/public/dist/assets/logo-loader-7d8003e8.js new file mode 100644 index 0000000..a967038 --- /dev/null +++ b/backend/src/public/dist/assets/logo-loader-7d8003e8.js @@ -0,0 +1 @@ +import{j as e,bf as o}from"./index-d8866171.js";function i({children:s}){return e.jsx("div",{className:"h-screen w-full fixed bg-background flex items-center justify-center inset-0 transition-all delay-150 z-[999999999999999999]",children:e.jsxs("div",{children:[e.jsx("figure",{children:e.jsx("img",{src:o,alt:"chatly logo",className:"h-32 w-32 scale-110 mx-auto object-contain zoom-in-out"})}),s]})})}export{i as L}; diff --git a/backend/src/public/dist/assets/maleHero-f3bd546e.png b/backend/src/public/dist/assets/maleHero-f3bd546e.png new file mode 100644 index 0000000..8620f46 Binary files /dev/null and b/backend/src/public/dist/assets/maleHero-f3bd546e.png differ diff --git a/backend/src/public/dist/assets/message-4e5b8c88.js b/backend/src/public/dist/assets/message-4e5b8c88.js new file mode 100644 index 0000000..5d6428e --- /dev/null +++ b/backend/src/public/dist/assets/message-4e5b8c88.js @@ -0,0 +1,4 @@ +import{c as ve,r as a,j as s,b as ht,R as X,a as Yn,aG as Xn,aH as Zn,G as qn,J as Jn,I as Qn,aI as er,aJ as tr,aK as nr,aL as rr,aM as or,aN as ar,aO as sr,aP as cr,aQ as ae,aR as ir,aS as ur,aT as lr,q as dr,aU as fr,aV as mr,aW as pr,d as A,aX as hr,aY as vt,aZ as vr,a_ as xr,a$ as gr,af as Cr,g as xt,b0 as yr,ar as br,as as wr,au as Er,ak as Mr,B as Rr,P as ne,at as Sr,b1 as Pr,b2 as Nr}from"./index-d8866171.js";const _r=ve("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"}]]),Ar=ve("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]),Ir=ve("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]),jr=ve("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]),Tr=ve("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function xe(e,t=[]){let n=[];function r(c,u){const i=a.createContext(u),d=n.length;n=[...n,u];function l(f){const{scope:h,children:x,...v}=f,m=(h==null?void 0:h[e][d])||i,C=a.useMemo(()=>v,Object.values(v));return s.jsx(m.Provider,{value:C,children:x})}function p(f,h){const x=(h==null?void 0:h[e][d])||i,v=a.useContext(x);if(v)return v;if(u!==void 0)return u;throw new Error(`\`${f}\` must be used within \`${c}\``)}return l.displayName=c+"Provider",[l,p]}const o=()=>{const c=n.map(u=>a.createContext(u));return function(i){const d=(i==null?void 0:i[e])||c;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return o.scopeName=e,[r,Or(o,...t)]}function Or(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(c){const u=r.reduce((i,{useScope:d,scopeName:l})=>{const f=d(c)[`__scope${l}`];return{...i,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}function Dr(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ke(...e){return t=>e.forEach(n=>Dr(n,t))}function D(...e){return a.useCallback(Ke(...e),e)}var me=a.forwardRef((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),c=o.find(Fr);if(c){const u=c.props.children,i=o.map(d=>d===c?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return s.jsx(Le,{...r,ref:t,children:a.isValidElement(u)?a.cloneElement(u,void 0,i):null})}return s.jsx(Le,{...r,ref:t,children:n})});me.displayName="Slot";var Le=a.forwardRef((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const o=$r(n);return a.cloneElement(n,{...Lr(r,n.props),ref:t?Ke(t,o):o})}return a.Children.count(n)>1?a.Children.only(null):null});Le.displayName="SlotClone";var kr=({children:e})=>s.jsx(s.Fragment,{children:e});function Fr(e){return a.isValidElement(e)&&e.type===kr}function Lr(e,t){const n={...t};for(const r in t){const o=e[r],c=t[r];/^on[A-Z]/.test(r)?o&&c?n[r]=(...i)=>{c(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...c}:r==="className"&&(n[r]=[o,c].filter(Boolean).join(" "))}return{...e,...n}}function $r(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],I=Ur.reduce((e,t)=>{const n=a.forwardRef((r,o)=>{const{asChild:c,...u}=r,i=c?me:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(i,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gt(e,t){e&&ht.flushSync(()=>e.dispatchEvent(t))}function Ct(e){const t=e+"CollectionProvider",[n,r]=xe(t),[o,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=x=>{const{scope:v,children:m}=x,C=X.useRef(null),g=X.useRef(new Map).current;return s.jsx(o,{scope:v,itemMap:g,collectionRef:C,children:m})};u.displayName=t;const i=e+"CollectionSlot",d=X.forwardRef((x,v)=>{const{scope:m,children:C}=x,g=c(i,m),y=D(v,g.collectionRef);return s.jsx(me,{ref:y,children:C})});d.displayName=i;const l=e+"CollectionItemSlot",p="data-radix-collection-item",f=X.forwardRef((x,v)=>{const{scope:m,children:C,...g}=x,y=X.useRef(null),E=D(v,y),w=c(l,m);return X.useEffect(()=>(w.itemMap.set(y,{ref:y,...g}),()=>void w.itemMap.delete(y))),s.jsx(me,{[p]:"",ref:E,children:C})});f.displayName=l;function h(x){const v=c(e+"CollectionConsumer",x);return X.useCallback(()=>{const C=v.collectionRef.current;if(!C)return[];const g=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((w,S)=>g.indexOf(w.ref.current)-g.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:u,Slot:d,ItemSlot:f},h,r]}var Br=a.createContext(void 0);function yt(e){const t=a.useContext(Br);return e||t||"ltr"}function U(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Gr(e,t=globalThis==null?void 0:globalThis.document){const n=U(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Kr="DismissableLayer",$e="dismissableLayer.update",zr="dismissableLayer.pointerDownOutside",Wr="dismissableLayer.focusOutside",rt,bt=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wt=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:u,onDismiss:i,...d}=e,l=a.useContext(bt),[p,f]=a.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=a.useState({}),v=D(t,R=>f(R)),m=Array.from(l.layers),[C]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(C),y=p?m.indexOf(p):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,S=Yr(R=>{const P=R.target,T=[...l.branches].some(k=>k.contains(P));!w||T||(o==null||o(R),u==null||u(R),R.defaultPrevented||i==null||i())},h),N=Xr(R=>{const P=R.target;[...l.branches].some(k=>k.contains(P))||(c==null||c(R),u==null||u(R),R.defaultPrevented||i==null||i())},h);return Gr(R=>{y===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&i&&(R.preventDefault(),i()))},h),a.useEffect(()=>{if(p)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(rt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(p)),l.layers.add(p),ot(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=rt)}},[p,h,n,l]),a.useEffect(()=>()=>{p&&(l.layers.delete(p),l.layersWithOutsidePointerEventsDisabled.delete(p),ot())},[p,l]),a.useEffect(()=>{const R=()=>x({});return document.addEventListener($e,R),()=>document.removeEventListener($e,R)},[]),s.jsx(I.div,{...d,ref:v,style:{pointerEvents:E?w?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,N.onFocusCapture),onBlurCapture:M(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,S.onPointerDownCapture)})});wt.displayName=Kr;var Hr="DismissableLayerBranch",Vr=a.forwardRef((e,t)=>{const n=a.useContext(bt),r=a.useRef(null),o=D(t,r);return a.useEffect(()=>{const c=r.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),s.jsx(I.div,{...e,ref:o})});Vr.displayName=Hr;function Yr(e,t=globalThis==null?void 0:globalThis.document){const n=U(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const c=i=>{if(i.target&&!r.current){let d=function(){Et(zr,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",c),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Xr(e,t=globalThis==null?void 0:globalThis.document){const n=U(e),r=a.useRef(!1);return a.useEffect(()=>{const o=c=>{c.target&&!r.current&&Et(Wr,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ot(){const e=new CustomEvent($e);document.dispatchEvent(e)}function Et(e,t,n,{discrete:r}){const o=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gt(o,c):o.dispatchEvent(c)}var Te=0;function Zr(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??at()),document.body.insertAdjacentElement("beforeend",e[1]??at()),Te++,()=>{Te===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Te--}},[])}function at(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Oe="focusScope.autoFocusOnMount",De="focusScope.autoFocusOnUnmount",st={bubbles:!1,cancelable:!0},qr="FocusScope",Mt=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:c,...u}=e,[i,d]=a.useState(null),l=U(o),p=U(c),f=a.useRef(null),h=D(t,m=>d(m)),x=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let m=function(E){if(x.paused||!i)return;const w=E.target;i.contains(w)?f.current=w:H(f.current,{select:!0})},C=function(E){if(x.paused||!i)return;const w=E.relatedTarget;w!==null&&(i.contains(w)||H(f.current,{select:!0}))},g=function(E){if(document.activeElement===document.body)for(const S of E)S.removedNodes.length>0&&H(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",C);const y=new MutationObserver(g);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",C),y.disconnect()}}},[r,i,x.paused]),a.useEffect(()=>{if(i){it.add(x);const m=document.activeElement;if(!i.contains(m)){const g=new CustomEvent(Oe,st);i.addEventListener(Oe,l),i.dispatchEvent(g),g.defaultPrevented||(Jr(ro(Rt(i)),{select:!0}),document.activeElement===m&&H(i))}return()=>{i.removeEventListener(Oe,l),setTimeout(()=>{const g=new CustomEvent(De,st);i.addEventListener(De,p),i.dispatchEvent(g),g.defaultPrevented||H(m??document.body,{select:!0}),i.removeEventListener(De,p),it.remove(x)},0)}}},[i,l,p,x]);const v=a.useCallback(m=>{if(!n&&!r||x.paused)return;const C=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(C&&g){const y=m.currentTarget,[E,w]=Qr(y);E&&w?!m.shiftKey&&g===w?(m.preventDefault(),n&&H(E,{select:!0})):m.shiftKey&&g===E&&(m.preventDefault(),n&&H(w,{select:!0})):g===y&&m.preventDefault()}},[n,r,x.paused]);return s.jsx(I.div,{tabIndex:-1,...u,ref:h,onKeyDown:v})});Mt.displayName=qr;function Jr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(H(r,{select:t}),document.activeElement!==n)return}function Qr(e){const t=Rt(e),n=ct(t,e),r=ct(t.reverse(),e);return[n,r]}function Rt(e){const t=[],n=document.createTreeWalker(e,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();)t.push(n.currentNode);return t}function ct(e,t){for(const n of e)if(!eo(n,{upTo:t}))return n}function eo(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function to(e){return e instanceof HTMLInputElement&&"select"in e}function H(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&to(e)&&t&&e.select()}}var it=no();function no(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ut(e,t),e.unshift(t)},remove(t){var n;e=ut(e,t),(n=e[0])==null||n.resume()}}}function ut(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ro(e){return e.filter(t=>t.tagName!=="A")}var Z=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},oo=Yn["useId".toString()]||(()=>{}),ao=0;function so(e){const[t,n]=a.useState(oo());return Z(()=>{e||n(r=>r??String(ao++))},[e]),e||(t?`radix-${t}`:"")}var co="Arrow",St=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...c}=e;return s.jsx(I.svg,{...c,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});St.displayName=co;var io=St;function uo(e){const[t,n]=a.useState(void 0);return Z(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let u,i;if("borderBoxSize"in c){const d=c.borderBoxSize,l=Array.isArray(d)?d[0]:d;u=l.inlineSize,i=l.blockSize}else u=e.offsetWidth,i=e.offsetHeight;n({width:u,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ze="Popper",[Pt,Nt]=xe(ze),[lo,_t]=Pt(ze),At=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return s.jsx(lo,{scope:t,anchor:r,onAnchorChange:o,children:n})};At.displayName=ze;var It="PopperAnchor",jt=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,c=_t(It,n),u=a.useRef(null),i=D(t,u);return a.useEffect(()=>{c.onAnchorChange((r==null?void 0:r.current)||u.current)}),r?null:s.jsx(I.div,{...o,ref:i})});jt.displayName=It;var We="PopperContent",[fo,mo]=Pt(We),Tt=a.forwardRef((e,t)=>{var z,ue,L,le,et,tt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:c="center",alignOffset:u=0,arrowPadding:i=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:x="optimized",onPlaced:v,...m}=e,C=_t(We,n),[g,y]=a.useState(null),E=D(t,de=>y(de)),[w,S]=a.useState(null),N=uo(w),R=(N==null?void 0:N.width)??0,P=(N==null?void 0:N.height)??0,T=r+(c!=="center"?"-"+c:""),k=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},W=Array.isArray(l)?l:[l],V=W.length>0,K={padding:k,boundary:W.filter(ho),altBoundary:V},{refs:Q,floatingStyles:ee,placement:B,isPositioned:te,middlewareData:F}=Xn({strategy:"fixed",placement:T,whileElementsMounted:(...de)=>Zn(...de,{animationFrame:x==="always"}),elements:{reference:C.anchor},middleware:[qn({mainAxis:o+P,alignmentAxis:u}),d&&Jn({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?rr():void 0,...K}),d&&Qn({...K}),er({...K,apply:({elements:de,rects:nt,availableWidth:zn,availableHeight:Wn})=>{const{width:Hn,height:Vn}=nt.reference,we=de.floating.style;we.setProperty("--radix-popper-available-width",`${zn}px`),we.setProperty("--radix-popper-available-height",`${Wn}px`),we.setProperty("--radix-popper-anchor-width",`${Hn}px`),we.setProperty("--radix-popper-anchor-height",`${Vn}px`)}}),w&&tr({element:w,padding:i}),vo({arrowWidth:R,arrowHeight:P}),h&&nr({strategy:"referenceHidden",...K})]}),[b,O]=kt(B),_=U(v);Z(()=>{te&&(_==null||_())},[te,_]);const G=(z=F.arrow)==null?void 0:z.x,ce=(ue=F.arrow)==null?void 0:ue.y,ie=((L=F.arrow)==null?void 0:L.centerOffset)!==0,[be,Y]=a.useState();return Z(()=>{g&&Y(window.getComputedStyle(g).zIndex)},[g]),s.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:te?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(le=F.transformOrigin)==null?void 0:le.x,(et=F.transformOrigin)==null?void 0:et.y].join(" "),...((tt=F.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(fo,{scope:n,placedSide:b,onArrowChange:S,arrowX:G,arrowY:ce,shouldHideArrow:ie,children:s.jsx(I.div,{"data-side":b,"data-align":O,...m,ref:E,style:{...m.style,animation:te?void 0:"none"}})})})});Tt.displayName=We;var Ot="PopperArrow",po={top:"bottom",right:"left",bottom:"top",left:"right"},Dt=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,c=mo(Ot,r),u=po[c.placedSide];return s.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:s.jsx(io,{...o,ref:n,style:{...o.style,display:"block"}})})});Dt.displayName=Ot;function ho(e){return e!==null}var vo=e=>({name:"transformOrigin",options:e,fn(t){var C,g,y;const{placement:n,rects:r,middlewareData:o}=t,u=((C=o.arrow)==null?void 0:C.centerOffset)!==0,i=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[l,p]=kt(n),f={start:"0%",center:"50%",end:"100%"}[p],h=(((g=o.arrow)==null?void 0:g.x)??0)+i/2,x=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let v="",m="";return l==="bottom"?(v=u?f:`${h}px`,m=`${-d}px`):l==="top"?(v=u?f:`${h}px`,m=`${r.floating.height+d}px`):l==="right"?(v=`${-d}px`,m=u?f:`${x}px`):l==="left"&&(v=`${r.floating.width+d}px`,m=u?f:`${x}px`),{data:{x:v,y:m}}}});function kt(e){const[t,n="center"]=e.split("-");return[t,n]}var xo=At,go=jt,Co=Tt,yo=Dt,bo="Portal",Ft=a.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,c]=a.useState(!1);Z(()=>c(!0),[]);const u=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?or.createPortal(s.jsx(I.div,{...r,ref:t}),u):null});Ft.displayName=bo;function wo(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var ge=e=>{const{present:t,children:n}=e,r=Eo(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),c=D(r.ref,Mo(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:c}):null};ge.displayName="Presence";function Eo(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),c=a.useRef("none"),u=e?"mounted":"unmounted",[i,d]=wo(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const l=Ee(r.current);c.current=i==="mounted"?l:"none"},[i]),Z(()=>{const l=r.current,p=o.current;if(p!==e){const h=c.current,x=Ee(l);e?d("MOUNT"):x==="none"||(l==null?void 0:l.display)==="none"?d("UNMOUNT"):d(p&&h!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Z(()=>{if(t){const l=f=>{const x=Ee(r.current).includes(f.animationName);f.target===t&&x&&ht.flushSync(()=>d("ANIMATION_END"))},p=f=>{f.target===t&&(c.current=Ee(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Ee(e){return(e==null?void 0:e.animationName)||"none"}function Mo(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ro({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=So({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:r,i=U(n),d=a.useCallback(l=>{if(c){const f=typeof l=="function"?l(e):l;f!==e&&i(f)}else o(l)},[c,e,o,i]);return[u,d]}function So({defaultProp:e,onChange:t}){const n=a.useState(e),[r]=n,o=a.useRef(r),c=U(t);return a.useEffect(()=>{o.current!==r&&(c(r),o.current=r)},[r,o,c]),n}var ke="rovingFocusGroup.onEntryFocus",Po={bubbles:!1,cancelable:!0},_e="RovingFocusGroup",[Ue,Lt,No]=Ct(_e),[_o,$t]=xe(_e,[No]),[Ao,Io]=_o(_e),Ut=a.forwardRef((e,t)=>s.jsx(Ue.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ue.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(jo,{...e,ref:t})})}));Ut.displayName=_e;var jo=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:c,currentTabStopId:u,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:p=!1,...f}=e,h=a.useRef(null),x=D(t,h),v=yt(c),[m=null,C]=Ro({prop:u,defaultProp:i,onChange:d}),[g,y]=a.useState(!1),E=U(l),w=Lt(n),S=a.useRef(!1),[N,R]=a.useState(0);return a.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(ke,E),()=>P.removeEventListener(ke,E)},[E]),s.jsx(Ao,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:a.useCallback(P=>C(P),[C]),onItemShiftTab:a.useCallback(()=>y(!0),[]),onFocusableItemAdd:a.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:a.useCallback(()=>R(P=>P-1),[]),children:s.jsx(I.div,{tabIndex:g||N===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{S.current=!0}),onFocus:M(e.onFocus,P=>{const T=!S.current;if(P.target===P.currentTarget&&T&&!g){const k=new CustomEvent(ke,Po);if(P.currentTarget.dispatchEvent(k),!k.defaultPrevented){const W=w().filter(B=>B.focusable),V=W.find(B=>B.active),K=W.find(B=>B.id===m),ee=[V,K,...W].filter(Boolean).map(B=>B.ref.current);Kt(ee,p)}}S.current=!1}),onBlur:M(e.onBlur,()=>y(!1))})})}),Bt="RovingFocusGroupItem",Gt=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:c,...u}=e,i=so(),d=c||i,l=Io(Bt,n),p=l.currentTabStopId===d,f=Lt(n),{onFocusableItemAdd:h,onFocusableItemRemove:x}=l;return a.useEffect(()=>{if(r)return h(),()=>x()},[r,h,x]),s.jsx(Ue.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:s.jsx(I.span,{tabIndex:p?0:-1,"data-orientation":l.orientation,...u,ref:t,onMouseDown:M(e.onMouseDown,v=>{r?l.onItemFocus(d):v.preventDefault()}),onFocus:M(e.onFocus,()=>l.onItemFocus(d)),onKeyDown:M(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){l.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=Do(v,l.orientation,l.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let g=f().filter(y=>y.focusable).map(y=>y.ref.current);if(m==="last")g.reverse();else if(m==="prev"||m==="next"){m==="prev"&&g.reverse();const y=g.indexOf(v.currentTarget);g=l.loop?ko(g,y+1):g.slice(y+1)}setTimeout(()=>Kt(g))}})})})});Gt.displayName=Bt;var To={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Oo(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Do(e,t,n){const r=Oo(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return To[r]}function Kt(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ko(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Fo=Ut,Lo=Gt,zt=ar(),Fe=function(){},Ae=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Fe,onWheelCapture:Fe,onTouchMoveCapture:Fe}),o=r[0],c=r[1],u=e.forwardProps,i=e.children,d=e.className,l=e.removeScrollBar,p=e.enabled,f=e.shards,h=e.sideCar,x=e.noIsolation,v=e.inert,m=e.allowPinchZoom,C=e.as,g=C===void 0?"div":C,y=e.gapMode,E=sr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,S=cr([n,t]),N=ae(ae({},E),o);return a.createElement(a.Fragment,null,p&&a.createElement(w,{sideCar:zt,removeScrollBar:l,shards:f,noIsolation:x,inert:v,setCallbacks:c,allowPinchZoom:!!m,lockRef:n,gapMode:y}),u?a.cloneElement(a.Children.only(i),ae(ae({},N),{ref:S})):a.createElement(g,ae({},N,{className:d,ref:S}),i))});Ae.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ae.classNames={fullWidth:ir,zeroRight:ur};var Be=!1;if(typeof window<"u")try{var Me=Object.defineProperty({},"passive",{get:function(){return Be=!0,!0}});window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch{Be=!1}var re=Be?{passive:!1}:!1,$o=function(e){return e.tagName==="TEXTAREA"},Wt=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$o(e)&&n[t]==="visible")},Uo=function(e){return Wt(e,"overflowY")},Bo=function(e){return Wt(e,"overflowX")},lt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ht(e,r);if(o){var c=Vt(e,r),u=c[1],i=c[2];if(u>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Go=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ko=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ht=function(e,t){return e==="v"?Uo(t):Bo(t)},Vt=function(e,t){return e==="v"?Go(t):Ko(t)},zo=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wo=function(e,t,n,r,o){var c=zo(e,window.getComputedStyle(t).direction),u=c*r,i=n.target,d=t.contains(i),l=!1,p=u>0,f=0,h=0;do{var x=Vt(e,i),v=x[0],m=x[1],C=x[2],g=m-C-c*v;(v||g)&&Ht(e,i)&&(f+=g,h+=v),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(p&&(o&&Math.abs(f)<1||!o&&u>f)||!p&&(o&&Math.abs(h)<1||!o&&-u>h))&&(l=!0),l},Re=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dt=function(e){return[e.deltaX,e.deltaY]},ft=function(e){return e&&"current"in e?e.current:e},Ho=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vo=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Yo=0,oe=[];function Xo(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(Yo++)[0],c=a.useState(lr)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=dr([e.lockRef.current],(e.shards||[]).map(ft),!0).filter(Boolean);return m.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=a.useCallback(function(m,C){if("touches"in m&&m.touches.length===2)return!u.current.allowPinchZoom;var g=Re(m),y=n.current,E="deltaX"in m?m.deltaX:y[0]-g[0],w="deltaY"in m?m.deltaY:y[1]-g[1],S,N=m.target,R=Math.abs(E)>Math.abs(w)?"h":"v";if("touches"in m&&R==="h"&&N.type==="range")return!1;var P=lt(R,N);if(!P)return!0;if(P?S=R:(S=R==="v"?"h":"v",P=lt(R,N)),!P)return!1;if(!r.current&&"changedTouches"in m&&(E||w)&&(r.current=S),!S)return!0;var T=r.current||S;return Wo(T,C,m,T==="h"?E:w,!0)},[]),d=a.useCallback(function(m){var C=m;if(!(!oe.length||oe[oe.length-1]!==c)){var g="deltaY"in C?dt(C):Re(C),y=t.current.filter(function(S){return S.name===C.type&&(S.target===C.target||C.target===S.shadowParent)&&Ho(S.delta,g)})[0];if(y&&y.should){C.cancelable&&C.preventDefault();return}if(!y){var E=(u.current.shards||[]).map(ft).filter(Boolean).filter(function(S){return S.contains(C.target)}),w=E.length>0?i(C,E[0]):!u.current.noIsolation;w&&C.cancelable&&C.preventDefault()}}},[]),l=a.useCallback(function(m,C,g,y){var E={name:m,delta:C,target:g,should:y,shadowParent:Zo(g)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(w){return w!==E})},1)},[]),p=a.useCallback(function(m){n.current=Re(m),r.current=void 0},[]),f=a.useCallback(function(m){l(m.type,dt(m),m.target,i(m,e.lockRef.current))},[]),h=a.useCallback(function(m){l(m.type,Re(m),m.target,i(m,e.lockRef.current))},[]);a.useEffect(function(){return oe.push(c),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",d,re),document.addEventListener("touchmove",d,re),document.addEventListener("touchstart",p,re),function(){oe=oe.filter(function(m){return m!==c}),document.removeEventListener("wheel",d,re),document.removeEventListener("touchmove",d,re),document.removeEventListener("touchstart",p,re)}},[]);var x=e.removeScrollBar,v=e.inert;return a.createElement(a.Fragment,null,v?a.createElement(c,{styles:Vo(o)}):null,x?a.createElement(fr,{gapMode:e.gapMode}):null)}function Zo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qo=mr(zt,Xo);var Yt=a.forwardRef(function(e,t){return a.createElement(Ae,ae({},e,{ref:t,sideCar:qo}))});Yt.classNames=Ae.classNames;const Jo=Yt;var Ge=["Enter"," "],Qo=["ArrowDown","PageUp","Home"],Xt=["ArrowUp","PageDown","End"],ea=[...Qo,...Xt],ta={ltr:[...Ge,"ArrowRight"],rtl:[...Ge,"ArrowLeft"]},na={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ce="Menu",[pe,ra,oa]=Ct(Ce),[q,Zt]=xe(Ce,[oa,Nt,$t]),Ie=Nt(),qt=$t(),[aa,J]=q(Ce),[sa,ye]=q(Ce),Jt=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:c,modal:u=!0}=e,i=Ie(t),[d,l]=a.useState(null),p=a.useRef(!1),f=U(c),h=yt(o);return a.useEffect(()=>{const x=()=>{p.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>p.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(xo,{...i,children:s.jsx(aa,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:s.jsx(sa,{scope:t,onClose:a.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:h,modal:u,children:r})})})};Jt.displayName=Ce;var ca="MenuAnchor",He=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ie(n);return s.jsx(go,{...o,...r,ref:t})});He.displayName=ca;var Ve="MenuPortal",[ia,Qt]=q(Ve,{forceMount:void 0}),en=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,c=J(Ve,t);return s.jsx(ia,{scope:t,forceMount:n,children:s.jsx(ge,{present:n||c.open,children:s.jsx(Ft,{asChild:!0,container:o,children:r})})})};en.displayName=Ve;var $="MenuContent",[ua,Ye]=q($),tn=a.forwardRef((e,t)=>{const n=Qt($,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,c=J($,e.__scopeMenu),u=ye($,e.__scopeMenu);return s.jsx(pe.Provider,{scope:e.__scopeMenu,children:s.jsx(ge,{present:r||c.open,children:s.jsx(pe.Slot,{scope:e.__scopeMenu,children:u.modal?s.jsx(la,{...o,ref:t}):s.jsx(da,{...o,ref:t})})})})}),la=a.forwardRef((e,t)=>{const n=J($,e.__scopeMenu),r=a.useRef(null),o=D(t,r);return a.useEffect(()=>{const c=r.current;if(c)return pr(c)},[]),s.jsx(Xe,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),da=a.forwardRef((e,t)=>{const n=J($,e.__scopeMenu);return s.jsx(Xe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Xe=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:x,disableOutsideScroll:v,...m}=e,C=J($,n),g=ye($,n),y=Ie(n),E=qt(n),w=ra(n),[S,N]=a.useState(null),R=a.useRef(null),P=D(t,R,C.onContentChange),T=a.useRef(0),k=a.useRef(""),W=a.useRef(0),V=a.useRef(null),K=a.useRef("right"),Q=a.useRef(0),ee=v?Jo:a.Fragment,B=v?{as:me,allowPinchZoom:!0}:void 0,te=b=>{var z,ue;const O=k.current+b,_=w().filter(L=>!L.disabled),G=document.activeElement,ce=(z=_.find(L=>L.ref.current===G))==null?void 0:z.textValue,ie=_.map(L=>L.textValue),be=Ea(ie,O,ce),Y=(ue=_.find(L=>L.textValue===be))==null?void 0:ue.ref.current;(function L(le){k.current=le,window.clearTimeout(T.current),le!==""&&(T.current=window.setTimeout(()=>L(""),1e3))})(O),Y&&setTimeout(()=>Y.focus())};a.useEffect(()=>()=>window.clearTimeout(T.current),[]),Zr();const F=a.useCallback(b=>{var _,G;return K.current===((_=V.current)==null?void 0:_.side)&&Ra(b,(G=V.current)==null?void 0:G.area)},[]);return s.jsx(ua,{scope:n,searchRef:k,onItemEnter:a.useCallback(b=>{F(b)&&b.preventDefault()},[F]),onItemLeave:a.useCallback(b=>{var O;F(b)||((O=R.current)==null||O.focus(),N(null))},[F]),onTriggerLeave:a.useCallback(b=>{F(b)&&b.preventDefault()},[F]),pointerGraceTimerRef:W,onPointerGraceIntentChange:a.useCallback(b=>{V.current=b},[]),children:s.jsx(ee,{...B,children:s.jsx(Mt,{asChild:!0,trapped:o,onMountAutoFocus:M(c,b=>{var O;b.preventDefault(),(O=R.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:s.jsx(wt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:x,children:s.jsx(Fo,{asChild:!0,...E,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:N,onEntryFocus:M(d,b=>{g.isUsingKeyboardRef.current||b.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Co,{role:"menu","aria-orientation":"vertical","data-state":gn(C.open),"data-radix-menu-content":"",dir:g.dir,...y,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:M(m.onKeyDown,b=>{const _=b.target.closest("[data-radix-menu-content]")===b.currentTarget,G=b.ctrlKey||b.altKey||b.metaKey,ce=b.key.length===1;_&&(b.key==="Tab"&&b.preventDefault(),!G&&ce&&te(b.key));const ie=R.current;if(b.target!==ie||!ea.includes(b.key))return;b.preventDefault();const Y=w().filter(z=>!z.disabled).map(z=>z.ref.current);Xt.includes(b.key)&&Y.reverse(),ba(Y)}),onBlur:M(e.onBlur,b=>{b.currentTarget.contains(b.target)||(window.clearTimeout(T.current),k.current="")}),onPointerMove:M(e.onPointerMove,he(b=>{const O=b.target,_=Q.current!==b.clientX;if(b.currentTarget.contains(O)&&_){const G=b.clientX>Q.current?"right":"left";K.current=G,Q.current=b.clientX}}))})})})})})})});tn.displayName=$;var fa="MenuGroup",Ze=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(I.div,{role:"group",...r,ref:t})});Ze.displayName=fa;var ma="MenuLabel",nn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(I.div,{...r,ref:t})});nn.displayName=ma;var Pe="MenuItem",mt="menu.itemSelect",je=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,c=a.useRef(null),u=ye(Pe,e.__scopeMenu),i=Ye(Pe,e.__scopeMenu),d=D(t,c),l=a.useRef(!1),p=()=>{const f=c.current;if(!n&&f){const h=new CustomEvent(mt,{bubbles:!0,cancelable:!0});f.addEventListener(mt,x=>r==null?void 0:r(x),{once:!0}),gt(f,h),h.defaultPrevented?l.current=!1:u.onClose()}};return s.jsx(rn,{...o,ref:d,disabled:n,onClick:M(e.onClick,p),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),l.current=!0},onPointerUp:M(e.onPointerUp,f=>{var h;l.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:M(e.onKeyDown,f=>{const h=i.searchRef.current!=="";n||h&&f.key===" "||Ge.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});je.displayName=Pe;var rn=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...c}=e,u=Ye(Pe,n),i=qt(n),d=a.useRef(null),l=D(t,d),[p,f]=a.useState(!1),[h,x]=a.useState("");return a.useEffect(()=>{const v=d.current;v&&x((v.textContent??"").trim())},[c.children]),s.jsx(pe.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:s.jsx(Lo,{asChild:!0,...i,focusable:!r,children:s.jsx(I.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...c,ref:l,onPointerMove:M(e.onPointerMove,he(v=>{r?u.onItemLeave(v):(u.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,he(v=>u.onItemLeave(v))),onFocus:M(e.onFocus,()=>f(!0)),onBlur:M(e.onBlur,()=>f(!1))})})})}),pa="MenuCheckboxItem",on=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return s.jsx(ln,{scope:e.__scopeMenu,checked:n,children:s.jsx(je,{role:"menuitemcheckbox","aria-checked":Ne(n)?"mixed":n,...o,ref:t,"data-state":Je(n),onSelect:M(o.onSelect,()=>r==null?void 0:r(Ne(n)?!0:!n),{checkForDefaultPrevented:!1})})})});on.displayName=pa;var an="MenuRadioGroup",[ha,va]=q(an,{value:void 0,onValueChange:()=>{}}),sn=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,c=U(r);return s.jsx(ha,{scope:e.__scopeMenu,value:n,onValueChange:c,children:s.jsx(Ze,{...o,ref:t})})});sn.displayName=an;var cn="MenuRadioItem",un=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=va(cn,e.__scopeMenu),c=n===o.value;return s.jsx(ln,{scope:e.__scopeMenu,checked:c,children:s.jsx(je,{role:"menuitemradio","aria-checked":c,...r,ref:t,"data-state":Je(c),onSelect:M(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});un.displayName=cn;var qe="MenuItemIndicator",[ln,xa]=q(qe,{checked:!1}),dn=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,c=xa(qe,n);return s.jsx(ge,{present:r||Ne(c.checked)||c.checked===!0,children:s.jsx(I.span,{...o,ref:t,"data-state":Je(c.checked)})})});dn.displayName=qe;var ga="MenuSeparator",fn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});fn.displayName=ga;var Ca="MenuArrow",mn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ie(n);return s.jsx(yo,{...o,...r,ref:t})});mn.displayName=Ca;var ya="MenuSub",[bs,pn]=q(ya),fe="MenuSubTrigger",hn=a.forwardRef((e,t)=>{const n=J(fe,e.__scopeMenu),r=ye(fe,e.__scopeMenu),o=pn(fe,e.__scopeMenu),c=Ye(fe,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=c,l={__scopeMenu:e.__scopeMenu},p=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>p,[p]),a.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),d(null)}},[i,d]),s.jsx(He,{asChild:!0,...l,children:s.jsx(rn,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gn(n.open),...e,ref:Ke(t,o.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,he(f=>{c.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(c.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:M(e.onPointerLeave,he(f=>{var x,v;p();const h=(x=n.content)==null?void 0:x.getBoundingClientRect();if(h){const m=(v=n.content)==null?void 0:v.dataset.side,C=m==="right",g=C?-5:5,y=h[C?"left":"right"],E=h[C?"right":"left"];c.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:y,y:h.top},{x:E,y:h.top},{x:E,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(f),f.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,f=>{var x;const h=c.searchRef.current!=="";e.disabled||h&&f.key===" "||ta[r.dir].includes(f.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),f.preventDefault())})})})});hn.displayName=fe;var vn="MenuSubContent",xn=a.forwardRef((e,t)=>{const n=Qt($,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,c=J($,e.__scopeMenu),u=ye($,e.__scopeMenu),i=pn(vn,e.__scopeMenu),d=a.useRef(null),l=D(t,d);return s.jsx(pe.Provider,{scope:e.__scopeMenu,children:s.jsx(ge,{present:r||c.open,children:s.jsx(pe.Slot,{scope:e.__scopeMenu,children:s.jsx(Xe,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:l,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var f;u.isUsingKeyboardRef.current&&((f=d.current)==null||f.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:M(e.onFocusOutside,p=>{p.target!==i.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,p=>{u.onClose(),p.preventDefault()}),onKeyDown:M(e.onKeyDown,p=>{var x;const f=p.currentTarget.contains(p.target),h=na[u.dir].includes(p.key);f&&h&&(c.onOpenChange(!1),(x=i.trigger)==null||x.focus(),p.preventDefault())})})})})})});xn.displayName=vn;function gn(e){return e?"open":"closed"}function Ne(e){return e==="indeterminate"}function Je(e){return Ne(e)?"indeterminate":e?"checked":"unchecked"}function ba(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wa(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ea(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=wa(e,Math.max(c,0));o.length===1&&(u=u.filter(l=>l!==n));const d=u.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Ma(e,t){const{x:n,y:r}=e;let o=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const i=t[c].x,d=t[c].y,l=t[u].x,p=t[u].y;d>r!=p>r&&n<(l-i)*(r-d)/(p-d)+i&&(o=!o)}return o}function Ra(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ma(n,t)}function he(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Sa=Jt,Pa=He,Na=en,_a=tn,Aa=Ze,Ia=nn,ja=je,Ta=on,Oa=sn,Da=un,ka=dn,Fa=fn,La=mn,$a=hn,Ua=xn,Qe="ContextMenu",[Ba,ws]=xe(Qe,[Zt]),j=Zt(),[Ga,Cn]=Ba(Qe),yn=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:c=!0}=e,[u,i]=a.useState(!1),d=j(t),l=U(r),p=a.useCallback(f=>{i(f),l(f)},[l]);return s.jsx(Ga,{scope:t,open:u,onOpenChange:p,modal:c,children:s.jsx(Sa,{...d,dir:o,open:u,onOpenChange:p,modal:c,children:n})})};yn.displayName=Qe;var bn="ContextMenuTrigger",wn=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,c=Cn(bn,n),u=j(n),i=a.useRef({x:0,y:0}),d=a.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),l=a.useRef(0),p=a.useCallback(()=>window.clearTimeout(l.current),[]),f=h=>{i.current={x:h.clientX,y:h.clientY},c.onOpenChange(!0)};return a.useEffect(()=>p,[p]),a.useEffect(()=>void(r&&p()),[r,p]),s.jsxs(s.Fragment,{children:[s.jsx(Pa,{...u,virtualRef:d}),s.jsx(I.span,{"data-state":c.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:M(e.onContextMenu,h=>{p(),f(h),h.preventDefault()}),onPointerDown:r?e.onPointerDown:M(e.onPointerDown,Se(h=>{p(),l.current=window.setTimeout(()=>f(h),700)})),onPointerMove:r?e.onPointerMove:M(e.onPointerMove,Se(p)),onPointerCancel:r?e.onPointerCancel:M(e.onPointerCancel,Se(p)),onPointerUp:r?e.onPointerUp:M(e.onPointerUp,Se(p))})]})});wn.displayName=bn;var Ka="ContextMenuPortal",En=e=>{const{__scopeContextMenu:t,...n}=e,r=j(t);return s.jsx(Na,{...r,...n})};En.displayName=Ka;var Mn="ContextMenuContent",Rn=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Cn(Mn,n),c=j(n),u=a.useRef(!1);return s.jsx(_a,{...c,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var d;(d=e.onCloseAutoFocus)==null||d.call(e,i),!i.defaultPrevented&&u.current&&i.preventDefault(),u.current=!1},onInteractOutside:i=>{var d;(d=e.onInteractOutside)==null||d.call(e,i),!i.defaultPrevented&&!o.modal&&(u.current=!0)},style:{...e.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)"}})});Rn.displayName=Mn;var za="ContextMenuGroup",Wa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(Aa,{...o,...r,ref:t})});Wa.displayName=za;var Ha="ContextMenuLabel",Sn=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(Ia,{...o,...r,ref:t})});Sn.displayName=Ha;var Va="ContextMenuItem",Pn=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(ja,{...o,...r,ref:t})});Pn.displayName=Va;var Ya="ContextMenuCheckboxItem",Nn=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(Ta,{...o,...r,ref:t})});Nn.displayName=Ya;var Xa="ContextMenuRadioGroup",Za=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(Oa,{...o,...r,ref:t})});Za.displayName=Xa;var qa="ContextMenuRadioItem",_n=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(Da,{...o,...r,ref:t})});_n.displayName=qa;var Ja="ContextMenuItemIndicator",An=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(ka,{...o,...r,ref:t})});An.displayName=Ja;var Qa="ContextMenuSeparator",In=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(Fa,{...o,...r,ref:t})});In.displayName=Qa;var es="ContextMenuArrow",ts=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(La,{...o,...r,ref:t})});ts.displayName=es;var ns="ContextMenuSubTrigger",jn=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx($a,{...o,...r,ref:t})});jn.displayName=ns;var rs="ContextMenuSubContent",Tn=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=j(n);return s.jsx(Ua,{...o,...r,ref:t,style:{...e.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)"}})});Tn.displayName=rs;function Se(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var os=yn,as=wn,ss=En,On=Rn,Dn=Sn,kn=Pn,Fn=Nn,Ln=_n,$n=An,Un=In,Bn=jn,Gn=Tn;const cs=os,is=as,us=a.forwardRef(({className:e,inset:t,children:n,...r},o)=>s.jsxs(Bn,{ref:o,className:A("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",t&&"pl-8",e),...r,children:[n,s.jsx(hr,{className:"ml-auto h-4 w-4"})]}));us.displayName=Bn.displayName;const ls=a.forwardRef(({className:e,...t},n)=>s.jsx(Gn,{ref:n,className:A("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ls.displayName=Gn.displayName;const Kn=a.forwardRef(({className:e,...t},n)=>s.jsx(ss,{children:s.jsx(On,{ref:n,className:A("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",e),...t})}));Kn.displayName=On.displayName;const se=a.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(kn,{ref:r,className:A("relative flex cursor-pointer 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",t&&"pl-8",e),...n}));se.displayName=kn.displayName;const ds=a.forwardRef(({className:e,children:t,checked:n,...r},o)=>s.jsxs(Fn,{ref:o,className:A("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",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx($n,{children:s.jsx(vt,{className:"h-4 w-4"})})}),t]}));ds.displayName=Fn.displayName;const fs=a.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Ln,{ref:r,className:A("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",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx($n,{children:s.jsx(vr,{className:"h-2 w-2 fill-current"})})}),t]}));fs.displayName=Ln.displayName;const ms=a.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(Dn,{ref:r,className:A("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));ms.displayName=Dn.displayName;const ps=a.forwardRef(({className:e,...t},n)=>s.jsx(Un,{ref:n,className:A("-mx-1 my-1 h-px bg-border",e),...t}));ps.displayName=Un.displayName;const pt={editMessage:null,replyTo:null,deleteModal:{id:"",open:!1,index:-1},disabled:!1},hs=xr(e=>({messageOptions:pt,onEdit:t=>e(n=>({messageOptions:{...n.messageOptions,editMessage:t}})),onReply:t=>e(n=>({messageOptions:{...n.messageOptions,replyTo:t}})),toggleDeleteModal:t=>e(n=>({messageOptions:{...n.messageOptions,deleteModal:t}})),toggleDisabled:t=>e(n=>({messageOptions:{...n.messageOptions,disabled:t}})),resetOptions:()=>e(()=>({messageOptions:pt}))}));function vs({children:e,isOwn:t,bodyText:n,id:r,replyTo:o,editMessage:c,index:u,disabled:i}){const{onEdit:d,onReply:l,toggleDeleteModal:p,messageOptions:f}=hs();function h(){n&&(navigator.clipboard.writeText(n),Cr.success("copied message!"))}return s.jsxs(cs,{children:[s.jsx(is,{asChild:!0,disabled:f.disabled||i,children:e}),s.jsxs(Kn,{className:"bg-gray-50 dark:bg-[#17191C] space-y-1 rounded-md z-[9999] py-3 px-1.5 w-[225px]",children:[s.jsxs(se,{onClick:()=>l(o),className:"gap-2 py-2 px-4 justify-start hover:opacity-80",children:[s.jsx(jr,{className:"!opacity-50 h-5 w-5"}),"Reply"]}),s.jsxs(se,{onClick:h,className:"gap-2 py-2 px-4 justify-start hover:opacity-80 ",children:[s.jsx(_r,{className:"!opacity-50 h-5 w-5"}),"Copy Text"]}),s.jsxs(se,{className:"gap-2 py-2 px-4 justify-start hover:opacity-80",children:[s.jsx(Ar,{className:"!opacity-50 h-5 w-5"}),"Flag Message"]}),t&&s.jsxs(s.Fragment,{children:[s.jsxs(se,{onClick:()=>d(c),className:"gap-2 py-2 px-4 justify-start hover:opacity-80 ",children:[s.jsx(Ir,{className:"!opacity-50 h-5 w-5"}),"Edit Message"]}),s.jsxs(se,{onClick:()=>p({id:r,open:!0,index:u}),className:"text-destructive hover:text-destructive gap-2 py-2 px-4 justify-start hover:opacity-80",children:[s.jsx(gr,{className:"h-5 w-5"}),"Delete Message"]})]})]})]})}const xs=(e,t)=>{const n=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,r=/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi,o=/(\+?\d{1,3}?[-.\s]?(\(?\d{1,4}?\)?[-.\s]?)?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9})/g,c=e.split(/(\b(?:https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])|([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)|(\+?\d{1,3}?[-.\s]?(\(?\d{1,4}?\)?[-.\s]?)?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9})/gi),u=A("underline",!t&&"text-brand-p2");return c.map((i,d)=>n.test(i)?s.jsx("a",{className:u,href:i,target:"_blank",rel:"noopener noreferrer",children:i},d):r.test(i)?s.jsx("a",{className:u,href:`mailto:${i}`,children:i},d):o.test(i)?s.jsx("a",{className:u,href:`tel:${i}`,children:i},d):s.jsx("span",{children:i},d))},gs=({text:e,isOwn:t})=>s.jsx(s.Fragment,{children:xs(e,t)});function Cs({children:e,avatarUrl:t,username:n,id:r}){const{profile:o}=xt(),{handleCreate:c,isPending:u}=yr({members:[{userId:(o==null?void 0:o.id)??""},{userId:r}],onComplete:()=>{}});return s.jsx("div",{className:"relative",children:s.jsxs(br,{children:[s.jsx(wr,{children:s.jsx(s.Fragment,{children:e})}),s.jsxs(Er,{className:"py-3 px-2 min-w-[100px]",children:[s.jsxs("div",{className:"flex flex-col gap-y-1",children:[s.jsx(Mr,{type:"User",src:t,alt:n,size:60,className:"mx-0"}),s.jsx("p",{className:"text-[16.5px] ml-2 opacity-80 font-light",children:n})]}),s.jsx("div",{className:"mt-2",children:s.jsx(Rr,{disabled:u,onClick:async i=>{i.preventDefault(),i.stopPropagation(),o!=null&&o.id&&c()},className:"w-full gap-x-1.5",children:u?"Loading...":s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"Send Message"}),s.jsx(Tr,{size:18})]})})})]})]})})}function Es({Sender:{avatar:e,username:t},senderId:n,body:r,createdAt:o,isEditted:c,readByIds:u,id:i,resourceUrl:d,type:l,isReply:p,parentMessage:f,openModal:h,sending:x,failed:v,index:m,preview:C}){var w;const{profile:g}=xt(),y=(g==null?void 0:g.id)===n,E=u.length>0;return s.jsx(s.Fragment,{children:s.jsx(vs,{isOwn:y,id:i,disabled:!!(x||v||C),replyTo:{parentId:i,text:r??"",avatar:e,username:t},bodyText:r??void 0,editMessage:{id:i,index:m,text:r??""},index:m,children:s.jsxs("article",{className:A("flex gap-3 p-4 w-full items-center",y&&"justify-end"),id:i,children:[!y&&s.jsx(Cs,{avatarUrl:e,username:t,id:n,children:s.jsx("figure",{className:A("rounded-full self-end h-10 w-10 flex-shrink-0 overflow-hidden",y&&"order-2"),children:s.jsx("img",{src:e,alt:t+" avatar",loading:"lazy",className:"h-full w-full object-center object-cover"})})}),s.jsxs("div",{className:"",children:[s.jsxs("div",{className:A("max-w-full overflow-hidden space-y-1 bg-gray-300 dark:bg-[#17191c] text-gray-800 dark:text-gray-100 rounded-bl-lg rounded-br-2xl rounded-tr-2xl rounded-tl-2xl group p-3",y&&"rounded-bl-2xl rounded-br-lg bg-brand-p1 dark:bg-[rgb(60,116,161)] text-gray-200 dark:text-gray-50",d&&""),children:[p&&s.jsxs("div",{className:"flex gap-x-1.5",children:[s.jsx("div",{className:A("dark:bg-gray-800 bg-gray-50 rounded-tr-lg rounded-tl-lg rounded-bl-lg rounded-br-sm py-3 px-1.5",y&&"bg-[rgb(84,157,216)] dark:bg-[rgb(48,94,131)]"),children:s.jsx("p",{className:"font-light",children:f==null?void 0:f.body})}),s.jsx("figure",{className:A("rounded-full self-end h-8 w-8 flex-shrink-0 overflow-hidden"),children:s.jsx("img",{src:f==null?void 0:f.avatar,alt:"reply message avatar",loading:"lazy",className:"h-full w-full object-center object-cover"})})]}),s.jsxs("div",{children:[d!==null?s.jsx("div",{role:"button",onClick:S=>{console.log("clicked"),S.stopPropagation(),S.preventDefault(),h(d)},className:A("p-2 rounded-t-lg mb-3 h-[300px] w-full bg-gray-300 dark:bg-[#17191c]",y&&""),children:l==="IMAGE"?s.jsx("figure",{className:"h-[295px] w-full overflow-hidden rounded-lg",children:s.jsx("img",{src:d,alt:"message image",loading:"lazy",className:"object-cover hover:scale-110 object-center h-full hover:opacity-90 transition-all ease-in duration-200 w-full"})}):l==="VIDEO"?s.jsx("video",{src:d,playsInline:!0,loop:!0}):null}):null,r&&s.jsxs("div",{children:[!y&&s.jsx(ne,{className:"mb-[0.3rem] text-sm font-medium max-w-fit text-gray-900 dark:text-gray-200",children:t}),s.jsx(ne,{className:"",children:s.jsx(gs,{text:r,isOwn:y})}),c&&s.jsx(ne,{className:"opacity-80 text-xs",children:"edited"}),x?s.jsxs(ne,{className:"flex items-center gap-2 opacity-70 text-sm",children:[s.jsx("span",{children:"Sending"})," ",s.jsx("span",{children:s.jsx(Sr,{className:"animate-bounce",size:14})})]}):v?s.jsxs(ne,{className:"flex items-center justify-end gap-2 dark:text-rose-300 text-red-900 text-sm",children:[s.jsx("span",{children:"Failed"})," ",s.jsx("span",{children:s.jsx(Pr,{size:14})})]}):y?s.jsx("div",{className:"flex justify-end items-center",children:E?s.jsx(Nr,{size:14}):s.jsx(vt,{size:14})}):null]})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(ne,{className:"font-light text-sm",children:(w=new Date(o))==null?void 0:w.toLocaleDateString()})})]})]})})})}export{_r as C,Es as M,Ir as P,jr as R,Tr as S,hs as u}; diff --git a/backend/src/public/dist/assets/privateMessage-a9faf387.png b/backend/src/public/dist/assets/privateMessage-a9faf387.png new file mode 100644 index 0000000..9fefabc Binary files /dev/null and b/backend/src/public/dist/assets/privateMessage-a9faf387.png differ diff --git a/backend/src/public/dist/assets/stones-416b7e8b.jpg b/backend/src/public/dist/assets/stones-416b7e8b.jpg new file mode 100644 index 0000000..e8311d8 Binary files /dev/null and b/backend/src/public/dist/assets/stones-416b7e8b.jpg differ diff --git a/backend/src/public/dist/assets/sunset-c83e1366.jpg b/backend/src/public/dist/assets/sunset-c83e1366.jpg new file mode 100644 index 0000000..ed7cf9e Binary files /dev/null and b/backend/src/public/dist/assets/sunset-c83e1366.jpg differ diff --git a/backend/src/public/dist/assets/useCustomPages-a847fb21.js b/backend/src/public/dist/assets/useCustomPages-a847fb21.js new file mode 100644 index 0000000..1f7eab2 --- /dev/null +++ b/backend/src/public/dist/assets/useCustomPages-a847fb21.js @@ -0,0 +1 @@ +import{r as D,R as o,b as A,N as Q,O as m,Q as X,S as q,T as G,U as H,V as J,W as K,X as Y}from"./index-d8866171.js";const L=t=>{const n=Array(t.length).fill(null),[e,r]=D.useState(n);return t.map((s,u)=>({id:s.id,mount:l=>r(g=>g.map((f,I)=>I===u?l:f)),unmount:()=>r(l=>l.map((g,f)=>f===u?null:g)),portal:()=>o.createElement(o.Fragment,null,e[u]?A.createPortal(s.component,e[u]):null)}))};var P=t=>{Q()&&console.error(t)};class c extends o.PureComponent{constructor(){super(...arguments),this.portalRef=o.createRef()}componentDidUpdate(n){var e,r,s,u;(n.props.appearance!==this.props.props.appearance||((r=(e=n.props)==null?void 0:e.customPages)==null?void 0:r.length)!==((u=(s=this.props.props)==null?void 0:s.customPages)==null?void 0:u.length))&&this.props.updateProps({node:this.portalRef.current,props:this.props.props})}componentDidMount(){this.portalRef.current&&this.props.mount(this.portalRef.current,this.props.props)}componentWillUnmount(){this.portalRef.current&&this.props.unmount(this.portalRef.current)}render(){var n,e;return o.createElement(o.Fragment,null,o.createElement("div",{ref:this.portalRef}),(e=(n=this.props)==null?void 0:n.customPagesPortals)==null?void 0:e.map((r,s)=>D.createElement(r,{key:s})))}}const tt=m(({clerk:t,...n})=>o.createElement(c,{mount:t.mountSignIn,unmount:t.unmountSignIn,updateProps:t.__unstable__updateProps,props:n}),"SignIn"),nt=m(({clerk:t,...n})=>o.createElement(c,{mount:t.mountSignUp,unmount:t.unmountSignUp,updateProps:t.__unstable__updateProps,props:n}),"SignUp");function S({children:t}){return P(X),o.createElement(o.Fragment,null,t)}function R({children:t}){return P(q),o.createElement(o.Fragment,null,t)}const Z=m(({clerk:t,...n})=>{const{customPages:e,customPagesPortals:r}=y(n.children);return o.createElement(c,{mount:t.mountUserProfile,unmount:t.unmountUserProfile,updateProps:t.__unstable__updateProps,props:{...n,customPages:e},customPagesPortals:r})},"UserProfile");Object.assign(Z,{Page:S,Link:R});const $=m(({clerk:t,...n})=>{const{customPages:e,customPagesPortals:r}=y(n.children),s=Object.assign(n.userProfileProps||{},{customPages:e});return o.createElement(c,{mount:t.mountUserButton,unmount:t.unmountUserButton,updateProps:t.__unstable__updateProps,props:{...n,userProfileProps:s},customPagesPortals:r})},"UserButton");Object.assign($,{UserProfilePage:S,UserProfileLink:R});function j({children:t}){return P(G),o.createElement(o.Fragment,null,t)}function F({children:t}){return P(H),o.createElement(o.Fragment,null,t)}const v=m(({clerk:t,...n})=>{const{customPages:e,customPagesPortals:r}=B(n.children);return o.createElement(c,{mount:t.mountOrganizationProfile,unmount:t.unmountOrganizationProfile,updateProps:t.__unstable__updateProps,props:{...n,customPages:e},customPagesPortals:r})},"OrganizationProfile");Object.assign(v,{Page:j,Link:F});m(({clerk:t,...n})=>o.createElement(c,{mount:t.mountCreateOrganization,unmount:t.unmountCreateOrganization,updateProps:t.__unstable__updateProps,props:n}),"CreateOrganization");const x=m(({clerk:t,...n})=>{const{customPages:e,customPagesPortals:r}=B(n.children),s=Object.assign(n.organizationProfileProps||{},{customPages:e});return o.createElement(c,{mount:t.mountOrganizationSwitcher,unmount:t.unmountOrganizationSwitcher,updateProps:t.__unstable__updateProps,props:{...n,organizationProfileProps:s},customPagesPortals:r})},"OrganizationSwitcher");Object.assign(x,{OrganizationProfilePage:j,OrganizationProfileLink:F});m(({clerk:t,...n})=>o.createElement(c,{mount:t.mountOrganizationList,unmount:t.unmountOrganizationList,updateProps:t.__unstable__updateProps,props:n}),"OrganizationList");const O=(t,n)=>!!t&&o.isValidElement(t)&&(t==null?void 0:t.type)===n,y=t=>W({children:t,reorderItemsLabels:["account","security"],LinkComponent:R,PageComponent:S,componentName:"UserProfile"}),B=t=>W({children:t,reorderItemsLabels:["members","settings"],LinkComponent:F,PageComponent:j,componentName:"OrganizationProfile"}),W=({children:t,LinkComponent:n,PageComponent:e,reorderItemsLabels:r,componentName:s})=>{const u=[];o.Children.forEach(t,a=>{if(!O(a,e)&&!O(a,n)){a&&P(J(s));return}const{props:i}=a,{children:b,label:p,url:d,labelIcon:h}=i;if(O(a,e))if(w(i,r))u.push({label:p});else if(U(i))u.push({label:p,labelIcon:h,children:b,url:d});else{P(K(s));return}if(O(a,n))if(C(i))u.push({label:p,labelIcon:h,url:d});else{P(Y(s));return}});const l=[],g=[],f=[];u.forEach((a,i)=>{if(U(a)){l.push({component:a.children,id:i}),g.push({component:a.labelIcon,id:i});return}C(a)&&f.push({component:a.labelIcon,id:i})});const I=L(l),M=L(g),N=L(f),_=[],E=[];return u.forEach((a,i)=>{if(w(a,r)){_.push({label:a.label});return}if(U(a)){const{portal:b,mount:p,unmount:d}=I.find(z=>z.id===i),{portal:h,mount:T,unmount:V}=M.find(z=>z.id===i);_.push({label:a.label,url:a.url,mount:p,unmount:d,mountIcon:T,unmountIcon:V}),E.push(b),E.push(h);return}if(C(a)){const{portal:b,mount:p,unmount:d}=N.find(h=>h.id===i);_.push({label:a.label,url:a.url,mountIcon:p,unmountIcon:d}),E.push(b);return}}),{customPages:_,customPagesPortals:E}},w=(t,n)=>{const{children:e,label:r,url:s,labelIcon:u}=t;return!e&&!s&&!u&&n.some(l=>l===r)},U=t=>{const{children:n,label:e,url:r,labelIcon:s}=t;return!!n&&!!r&&!!s&&!!e},C=t=>{const{children:n,label:e,url:r,labelIcon:s}=t;return!n&&!!r&&!!s&&!!e};export{tt as S,nt as a}; diff --git a/backend/src/public/dist/assets/videoMessage-5bc969b2.png b/backend/src/public/dist/assets/videoMessage-5bc969b2.png new file mode 100644 index 0000000..bd1c511 Binary files /dev/null and b/backend/src/public/dist/assets/videoMessage-5bc969b2.png differ diff --git a/backend/src/public/dist/assets/wood-7a6be734.jpg b/backend/src/public/dist/assets/wood-7a6be734.jpg new file mode 100644 index 0000000..7a59d4c Binary files /dev/null and b/backend/src/public/dist/assets/wood-7a6be734.jpg differ diff --git a/backend/src/public/dist/index.html b/backend/src/public/dist/index.html new file mode 100644 index 0000000..075e023 --- /dev/null +++ b/backend/src/public/dist/index.html @@ -0,0 +1,16 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <link rel="icon" type="image/svg+xml" href="/logo.svg" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Chatly - Connecting you with friends and family.</title> + <script src="https://upload-widget.cloudinary.com/latest/global/all.js" type="text/javascript"></script> + <script type="module" crossorigin src="/assets/index-d8866171.js"></script> + <link rel="stylesheet" href="/assets/index-e4a4bdfa.css"> + </head> + <body> + <div id="root"></div> + + </body> +</html> diff --git a/backend/src/public/dist/logo.svg b/backend/src/public/dist/logo.svg new file mode 100644 index 0000000..ba827ae --- /dev/null +++ b/backend/src/public/dist/logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><g/><clipPath id="331c1054ed"><path d="M 11.5 120.113281 L 146.269531 120.113281 L 146.269531 254.886719 L 11.5 254.886719 Z M 11.5 120.113281 " clip-rule="nonzero"/></clipPath><clipPath id="8738ef4055"><path d="M 146.269531 187.5 C 146.269531 224.714844 116.101562 254.886719 78.882812 254.886719 C 41.667969 254.886719 11.5 224.714844 11.5 187.5 C 11.5 150.285156 41.667969 120.113281 78.882812 120.113281 C 116.101562 120.113281 146.269531 150.285156 146.269531 187.5 Z M 146.269531 187.5 " clip-rule="nonzero"/></clipPath><clipPath id="1980cb1dea"><path d="M 11.5 120.113281 L 146.261719 120.113281 L 146.261719 254.875 L 11.5 254.875 Z M 11.5 120.113281 " clip-rule="nonzero"/></clipPath><clipPath id="2493bc90ad"><path d="M 146.261719 187.496094 C 146.261719 224.707031 116.09375 254.875 78.878906 254.875 C 41.667969 254.875 11.5 224.707031 11.5 187.496094 C 11.5 150.28125 41.667969 120.113281 78.878906 120.113281 C 116.09375 120.113281 146.261719 150.28125 146.261719 187.496094 Z M 146.261719 187.496094 " clip-rule="nonzero"/></clipPath><clipPath id="788425f58c"><path d="M 37.40625 150.472656 L 120.085938 150.472656 L 120.085938 231.273438 L 37.40625 231.273438 Z M 37.40625 150.472656 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#331c1054ed)"><g clip-path="url(#8738ef4055)"><path fill="#327cb8" d="M 11.5 120.113281 L 146.269531 120.113281 L 146.269531 254.886719 L 11.5 254.886719 Z M 11.5 120.113281 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#1980cb1dea)"><g clip-path="url(#2493bc90ad)"><path stroke-linecap="butt" transform="matrix(1.879035, 0, 0, 1.879035, 11.498623, 120.114844)" fill="none" stroke-linejoin="miter" d="M 71.719308 35.859496 C 71.719308 55.662712 55.664276 71.717744 35.858981 71.717744 C 16.055765 71.717744 0.000732639 55.662712 0.000732639 35.859496 C 0.000732639 16.054201 16.055765 -0.000831737 35.858981 -0.000831737 C 55.664276 -0.000831737 71.719308 16.054201 71.719308 35.859496 Z M 71.719308 35.859496 " stroke="#e4e4e4" stroke-width="3.193128" stroke-opacity="1" stroke-miterlimit="4"/></g></g><g clip-path="url(#788425f58c)"><path fill="#ffffff" d="M 112.175781 150.472656 L 76.46875 150.472656 C 71.53125 151.777344 68.515625 154.773438 68.175781 160.207031 C 68.210938 161.253906 68.242188 162.300781 68.277344 163.335938 C 68.277344 165.246094 68.265625 167.027344 68.277344 168.816406 C 68.277344 171.570312 68.253906 174.339844 68.265625 177.097656 L 45.558594 177.097656 C 44.585938 177.300781 43.660156 177.632812 42.78125 178.09375 C 41.902344 178.554688 41.101562 179.128906 40.382812 179.8125 C 39.664062 180.5 39.050781 181.269531 38.546875 182.125 C 38.042969 182.980469 37.664062 183.890625 37.410156 184.851562 L 37.410156 208.121094 C 37.546875 209.332031 37.945312 210.445312 38.617188 211.460938 C 39.59375 212.816406 40.859375 213.796875 42.417969 214.398438 C 43.914062 215.117188 45.488281 215.480469 47.144531 215.492188 L 49.746094 215.492188 L 49.746094 222.894531 C 49.8125 225.640625 49.890625 228.398438 49.957031 231.152344 C 51.285156 229.894531 52.421875 228.792969 53.3125 227.925781 C 56.101562 225.191406 57.464844 223.796875 59.152344 221.996094 C 60.582031 220.488281 60.648438 220.398438 61.324219 219.699219 C 64.40625 216.480469 65.21875 216.097656 65.632812 215.929688 C 66.476562 215.570312 67.351562 215.410156 68.265625 215.445312 C 72.070312 215.59375 75.882812 215.511719 79.699219 215.492188 C 80.347656 215.519531 80.992188 215.480469 81.632812 215.371094 C 82.273438 215.265625 82.894531 215.09375 83.5 214.859375 C 84.105469 214.621094 84.679688 214.328125 85.222656 213.972656 C 85.765625 213.613281 86.265625 213.207031 86.726562 212.746094 C 87.183594 212.289062 87.589844 211.785156 87.941406 211.242188 C 88.296875 210.695312 88.589844 210.121094 88.824219 209.515625 C 89.058594 208.910156 89.226562 208.285156 89.332031 207.644531 C 89.4375 207.003906 89.472656 206.359375 89.445312 205.710938 C 89.476562 202.292969 89.453125 198.859375 89.453125 195.4375 L 89.453125 189.96875 L 89.488281 188.820312 C 90.394531 188.785156 91.265625 188.949219 92.097656 189.304688 C 92.503906 189.472656 93.316406 189.847656 96.398438 193.074219 C 97.074219 193.773438 97.152344 193.863281 98.570312 195.371094 C 100.269531 197.171875 101.628906 198.566406 104.421875 201.300781 C 105.296875 202.167969 106.433594 203.269531 107.773438 204.53125 C 107.839844 201.773438 107.910156 199.019531 107.976562 196.269531 L 107.976562 188.867188 L 110.585938 188.867188 C 112.242188 188.855469 113.8125 188.492188 115.300781 187.777344 C 116.859375 187.171875 118.128906 186.191406 119.105469 184.839844 C 119.78125 183.816406 120.183594 182.699219 120.320312 181.484375 L 120.320312 158.226562 C 120.070312 157.265625 119.691406 156.359375 119.183594 155.503906 C 118.679688 154.648438 118.066406 153.878906 117.347656 153.191406 C 116.628906 152.507812 115.828125 151.933594 114.949219 151.472656 C 114.070312 151.011719 113.144531 150.675781 112.175781 150.472656 Z M 86.339844 205.710938 C 86.371094 206.15625 86.351562 206.601562 86.289062 207.042969 C 86.226562 207.488281 86.117188 207.917969 85.960938 208.335938 C 85.804688 208.753906 85.605469 209.152344 85.363281 209.527344 C 85.121094 209.902344 84.84375 210.25 84.527344 210.566406 C 84.210938 210.882812 83.867188 211.160156 83.492188 211.402344 C 83.113281 211.644531 82.71875 211.84375 82.300781 212.003906 C 81.882812 212.160156 81.449219 212.269531 81.007812 212.335938 C 80.566406 212.398438 80.121094 212.414062 79.675781 212.386719 C 75.277344 212.417969 70.886719 212.441406 66.488281 212.363281 C 65.84375 212.328125 65.222656 212.433594 64.628906 212.683594 C 64.03125 212.933594 63.519531 213.296875 63.089844 213.78125 C 61.46875 215.445312 59.667969 216.941406 58.183594 218.730469 C 56.507812 220.746094 54.660156 222.597656 52.648438 224.277344 C 52.679688 223.402344 52.804688 219.261719 52.863281 214.738281 C 52.9375 214.023438 52.742188 213.390625 52.277344 212.847656 C 51.769531 212.453125 51.199219 212.300781 50.566406 212.386719 C 49.40625 212.429688 48.238281 212.40625 47.078125 212.386719 C 46.640625 212.402344 46.203125 212.375 45.773438 212.300781 C 45.339844 212.230469 44.917969 212.113281 44.511719 211.953125 C 44.101562 211.789062 43.714844 211.589844 43.351562 211.347656 C 42.984375 211.105469 42.648438 210.828125 42.339844 210.519531 C 42.03125 210.207031 41.757812 209.867188 41.519531 209.496094 C 41.285156 209.128906 41.085938 208.738281 40.929688 208.328125 C 40.777344 207.917969 40.664062 207.496094 40.597656 207.0625 C 40.527344 206.628906 40.503906 206.195312 40.527344 205.757812 C 40.496094 199.5 40.496094 193.238281 40.527344 186.964844 C 40.503906 186.527344 40.523438 186.089844 40.585938 185.65625 C 40.652344 185.222656 40.761719 184.796875 40.914062 184.386719 C 41.070312 183.976562 41.261719 183.582031 41.496094 183.210938 C 41.734375 182.839844 42.003906 182.5 42.308594 182.183594 C 42.617188 181.871094 42.953125 181.589844 43.316406 181.347656 C 43.683594 181.101562 44.070312 180.898438 44.476562 180.734375 C 44.882812 180.570312 45.304688 180.449219 45.738281 180.375 C 46.167969 180.296875 46.605469 180.265625 47.042969 180.28125 C 54.144531 180.246094 61.246094 180.234375 68.34375 180.246094 C 68.398438 181.035156 68.554688 181.800781 68.804688 182.546875 C 69.058594 183.292969 69.398438 183.996094 69.832031 184.65625 C 70.265625 185.316406 70.773438 185.910156 71.359375 186.4375 C 71.945312 186.964844 72.585938 187.410156 73.285156 187.777344 C 74.777344 188.515625 76.355469 188.878906 78.023438 188.867188 C 79.28125 188.878906 80.542969 188.890625 81.804688 188.890625 C 83.3125 188.910156 84.832031 188.910156 86.339844 188.890625 C 86.371094 194.492188 86.371094 200.101562 86.339844 205.710938 Z M 117.203125 179.132812 C 117.226562 179.570312 117.203125 180.007812 117.136719 180.441406 C 117.066406 180.875 116.953125 181.296875 116.796875 181.707031 C 116.640625 182.117188 116.445312 182.503906 116.207031 182.875 C 115.96875 183.242188 115.695312 183.582031 115.386719 183.894531 C 115.078125 184.207031 114.742188 184.484375 114.375 184.726562 C 114.007812 184.96875 113.621094 185.167969 113.210938 185.328125 C 112.804688 185.488281 112.382812 185.605469 111.949219 185.679688 C 111.519531 185.75 111.082031 185.777344 110.644531 185.761719 C 109.484375 185.785156 108.3125 185.804688 107.15625 185.761719 C 106.523438 185.671875 105.957031 185.824219 105.457031 186.222656 C 104.988281 186.765625 104.789062 187.398438 104.859375 188.113281 C 104.917969 192.636719 105.050781 196.765625 105.074219 197.65625 C 103.0625 195.96875 101.21875 194.121094 99.539062 192.109375 C 98.0625 190.320312 96.25 188.820312 94.640625 187.15625 C 94.210938 186.671875 93.699219 186.308594 93.101562 186.058594 C 92.5 185.808594 91.878906 185.703125 91.234375 185.738281 C 90.636719 185.75 90.039062 185.761719 89.445312 185.761719 C 88.375 185.773438 87.316406 185.785156 86.25 185.785156 C 83.515625 185.796875 80.78125 185.773438 78.046875 185.761719 C 74.375 185.726562 71.921875 183.65625 71.472656 180.246094 C 71.414062 179.863281 71.382812 179.476562 71.382812 179.089844 L 71.382812 177.097656 C 71.359375 171.492188 71.351562 165.890625 71.382812 160.285156 C 71.355469 159.847656 71.375 159.410156 71.4375 158.976562 C 71.503906 158.542969 71.613281 158.117188 71.765625 157.707031 C 71.921875 157.292969 72.117188 156.902344 72.351562 156.535156 C 72.589844 156.164062 72.859375 155.820312 73.167969 155.507812 C 73.476562 155.195312 73.816406 154.917969 74.183594 154.675781 C 74.550781 154.4375 74.9375 154.234375 75.347656 154.074219 C 75.757812 153.917969 76.179688 153.800781 76.613281 153.730469 C 77.046875 153.660156 77.480469 153.636719 77.921875 153.65625 C 88.835938 153.601562 99.757812 153.601562 110.6875 153.65625 C 111.128906 153.644531 111.5625 153.671875 111.996094 153.75 C 112.429688 153.824219 112.847656 153.945312 113.257812 154.109375 C 113.664062 154.273438 114.050781 154.476562 114.414062 154.722656 C 114.78125 154.964844 115.117188 155.246094 115.421875 155.5625 C 115.730469 155.875 116 156.21875 116.234375 156.589844 C 116.46875 156.960938 116.664062 157.351562 116.816406 157.761719 C 116.972656 158.175781 117.082031 158.597656 117.144531 159.03125 C 117.210938 159.464844 117.230469 159.902344 117.203125 160.339844 C 117.238281 166.609375 117.238281 172.875 117.203125 179.132812 Z M 110.472656 165.652344 L 78.585938 165.652344 C 78.363281 165.652344 78.148438 165.609375 77.941406 165.527344 C 77.734375 165.441406 77.550781 165.316406 77.394531 165.160156 C 77.234375 165 77.113281 164.820312 77.027344 164.613281 C 76.941406 164.40625 76.898438 164.191406 76.898438 163.964844 C 76.898438 163.742188 76.941406 163.527344 77.027344 163.320312 C 77.113281 163.113281 77.234375 162.929688 77.394531 162.773438 C 77.550781 162.613281 77.734375 162.492188 77.941406 162.40625 C 78.148438 162.320312 78.363281 162.277344 78.585938 162.277344 L 110.472656 162.277344 C 110.699219 162.277344 110.914062 162.320312 111.121094 162.40625 C 111.328125 162.492188 111.507812 162.613281 111.667969 162.773438 C 111.824219 162.929688 111.949219 163.113281 112.03125 163.320312 C 112.117188 163.527344 112.160156 163.742188 112.160156 163.964844 C 112.160156 164.191406 112.117188 164.40625 112.03125 164.613281 C 111.949219 164.820312 111.824219 165 111.667969 165.160156 C 111.507812 165.316406 111.328125 165.441406 111.121094 165.527344 C 110.914062 165.609375 110.699219 165.652344 110.472656 165.652344 Z M 99.085938 174.601562 L 79.5625 174.601562 C 79.339844 174.601562 79.125 174.558594 78.917969 174.472656 C 78.710938 174.386719 78.527344 174.265625 78.371094 174.109375 C 78.210938 173.949219 78.089844 173.765625 78.003906 173.558594 C 77.917969 173.351562 77.875 173.136719 77.875 172.914062 C 77.875 172.691406 77.917969 172.476562 78.003906 172.269531 C 78.089844 172.0625 78.210938 171.878906 78.371094 171.71875 C 78.527344 171.5625 78.710938 171.441406 78.917969 171.355469 C 79.125 171.269531 79.339844 171.226562 79.5625 171.226562 L 99.085938 171.226562 C 99.308594 171.226562 99.523438 171.269531 99.730469 171.355469 C 99.9375 171.441406 100.121094 171.5625 100.277344 171.71875 C 100.4375 171.878906 100.558594 172.0625 100.644531 172.269531 C 100.730469 172.476562 100.773438 172.691406 100.773438 172.914062 C 100.773438 173.136719 100.730469 173.351562 100.644531 173.558594 C 100.558594 173.765625 100.4375 173.949219 100.277344 174.109375 C 100.121094 174.265625 99.9375 174.386719 99.730469 174.472656 C 99.523438 174.558594 99.308594 174.601562 99.085938 174.601562 Z M 79.140625 202.40625 L 47.253906 202.40625 C 47.027344 202.40625 46.8125 202.363281 46.605469 202.277344 C 46.398438 202.191406 46.21875 202.070312 46.058594 201.910156 C 45.902344 201.753906 45.777344 201.570312 45.691406 201.363281 C 45.605469 201.15625 45.5625 200.941406 45.5625 200.71875 C 45.5625 200.496094 45.605469 200.277344 45.691406 200.070312 C 45.777344 199.867188 45.902344 199.683594 46.058594 199.523438 C 46.21875 199.367188 46.398438 199.246094 46.605469 199.160156 C 46.8125 199.074219 47.027344 199.03125 47.253906 199.03125 L 79.140625 199.03125 C 79.363281 199.03125 79.578125 199.074219 79.785156 199.160156 C 79.992188 199.246094 80.175781 199.367188 80.332031 199.523438 C 80.492188 199.683594 80.613281 199.867188 80.699219 200.070312 C 80.785156 200.277344 80.828125 200.496094 80.828125 200.71875 C 80.828125 200.941406 80.785156 201.15625 80.699219 201.363281 C 80.613281 201.570312 80.492188 201.753906 80.332031 201.910156 C 80.175781 202.070312 79.992188 202.191406 79.785156 202.277344 C 79.578125 202.363281 79.363281 202.40625 79.140625 202.40625 Z M 47.386719 189.96875 L 66.910156 189.96875 C 67.132812 189.96875 67.351562 190.011719 67.554688 190.097656 C 67.761719 190.183594 67.945312 190.304688 68.105469 190.464844 C 68.261719 190.621094 68.382812 190.804688 68.46875 191.011719 C 68.554688 191.21875 68.597656 191.433594 68.597656 191.65625 C 68.597656 191.882812 68.554688 192.097656 68.46875 192.304688 C 68.382812 192.511719 68.261719 192.691406 68.105469 192.851562 C 67.945312 193.007812 67.761719 193.132812 67.554688 193.21875 C 67.351562 193.300781 67.132812 193.34375 66.910156 193.34375 L 47.386719 193.34375 C 47.164062 193.34375 46.949219 193.300781 46.742188 193.21875 C 46.535156 193.132812 46.351562 193.007812 46.195312 192.851562 C 46.035156 192.691406 45.914062 192.511719 45.828125 192.304688 C 45.742188 192.097656 45.699219 191.882812 45.699219 191.65625 C 45.699219 191.433594 45.742188 191.21875 45.828125 191.011719 C 45.914062 190.804688 46.035156 190.621094 46.195312 190.464844 C 46.351562 190.304688 46.535156 190.183594 46.742188 190.097656 C 46.949219 190.011719 47.164062 189.96875 47.386719 189.96875 Z M 47.386719 189.96875 " fill-opacity="1" fill-rule="nonzero"/></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(164.852132, 213.483395)"><g><path d="M 35.109375 -33.859375 C 33.203125 -33.859375 31.789062 -34.867188 30.875 -36.890625 C 30.445312 -37.835938 30.023438 -38.410156 29.609375 -38.609375 C 29.285156 -38.753906 28.445312 -38.828125 27.09375 -38.828125 C 24.425781 -38.828125 21.34375 -36.75 17.84375 -32.59375 C 12.945312 -26.78125 10.5 -21.34375 10.5 -16.28125 C 10.5 -13.96875 11.269531 -11.984375 12.8125 -10.328125 C 14.363281 -8.679688 16.21875 -7.859375 18.375 -7.859375 C 20.476562 -7.859375 22.609375 -8.410156 24.765625 -9.515625 C 25.535156 -9.910156 27.148438 -10.945312 29.609375 -12.625 C 31.253906 -13.726562 32.503906 -14.28125 33.359375 -14.28125 C 34.628906 -14.28125 35.707031 -13.8125 36.59375 -12.875 C 37.425781 -12.007812 37.84375 -11.015625 37.84375 -9.890625 C 37.84375 -8.640625 37.289062 -7.546875 36.1875 -6.609375 C 30.351562 -1.691406 24.414062 0.765625 18.375 0.765625 C 13.601562 0.765625 9.578125 -0.972656 6.296875 -4.453125 C 3.160156 -7.796875 1.59375 -11.738281 1.59375 -16.28125 C 1.59375 -23.382812 4.695312 -30.632812 10.90625 -38.03125 C 16.1875 -44.300781 21.582031 -47.4375 27.09375 -47.4375 C 28.03125 -47.4375 28.875 -47.40625 29.625 -47.34375 C 30.375 -47.28125 31.035156 -47.1875 31.609375 -47.0625 C 32.535156 -47.976562 33.660156 -48.4375 34.984375 -48.4375 C 37.140625 -48.4375 38.472656 -47.191406 38.984375 -44.703125 C 39.347656 -42.921875 39.53125 -40.847656 39.53125 -38.484375 C 39.53125 -37.421875 39.222656 -36.453125 38.609375 -35.578125 C 37.796875 -34.429688 36.628906 -33.859375 35.109375 -33.859375 Z M 35.109375 -33.859375 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(205.138958, 213.483395)"><g><path d="M 12.6875 -29.09375 C 14.238281 -30.625 15.894531 -31.765625 17.65625 -32.515625 C 19.425781 -33.265625 21.320312 -33.640625 23.34375 -33.640625 C 26.96875 -33.640625 29.570312 -32.625 31.15625 -30.59375 C 32.34375 -29.0625 33.066406 -26.71875 33.328125 -23.5625 C 33.429688 -20.957031 33.546875 -18.335938 33.671875 -15.703125 C 34.015625 -12.296875 34.226562 -10.21875 34.3125 -9.46875 C 34.601562 -7.125 34.960938 -5.070312 35.390625 -3.3125 C 35.492188 -2.863281 35.546875 -2.46875 35.546875 -2.125 C 35.546875 -0.9375 35.09375 0.0390625 34.1875 0.8125 C 33.289062 1.582031 32.238281 1.96875 31.03125 1.96875 C 28.894531 1.96875 27.507812 0.910156 26.875 -1.203125 C 26.363281 -2.921875 25.894531 -5.335938 25.46875 -8.453125 C 25.09375 -11.441406 24.90625 -13.90625 24.90625 -15.84375 C 24.90625 -16.363281 24.929688 -17.160156 24.984375 -18.234375 C 25.035156 -19.304688 25.0625 -20.109375 25.0625 -20.640625 C 25.0625 -22.203125 25.039062 -23.113281 25 -23.375 C 24.800781 -24.539062 24.25 -25.125 23.34375 -25.125 C 20.988281 -25.125 18.859375 -24.039062 16.953125 -21.875 C 15.972656 -20.789062 14.632812 -18.734375 12.9375 -15.703125 C 12.9375 -8.035156 12.566406 -3.414062 11.828125 -1.84375 C 11.003906 -0.101562 9.691406 0.765625 7.890625 0.765625 C 6.703125 0.765625 5.644531 0.367188 4.71875 -0.421875 C 3.800781 -1.222656 3.34375 -2.207031 3.34375 -3.375 C 3.34375 -3.769531 3.457031 -4.332031 3.6875 -5.0625 C 3.832031 -5.519531 3.960938 -8.378906 4.078125 -13.640625 C 3.960938 -17.898438 3.984375 -24.992188 4.140625 -34.921875 L 4.203125 -35.96875 C 4.328125 -38.46875 4.390625 -40.140625 4.390625 -40.984375 C 4.390625 -41.640625 4.285156 -42.609375 4.078125 -43.890625 C 3.878906 -45.179688 3.78125 -46.15625 3.78125 -46.8125 C 3.78125 -48.019531 4.210938 -49.007812 5.078125 -49.78125 C 5.953125 -50.550781 7.003906 -50.9375 8.234375 -50.9375 C 10.335938 -50.9375 11.75 -49.816406 12.46875 -47.578125 C 12.863281 -46.296875 13.0625 -44.34375 13.0625 -41.71875 C 13.0625 -39.601562 13 -37.453125 12.875 -35.265625 C 12.75 -33.191406 12.6875 -31.132812 12.6875 -29.09375 Z M 12.6875 -29.09375 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(242.754836, 213.483395)"><g><path d="M 30.6875 2.09375 C 29.707031 2.09375 28.160156 1.035156 26.046875 -1.078125 C 24.097656 -0.148438 22.378906 0.550781 20.890625 1.03125 C 19.410156 1.507812 18.148438 1.75 17.109375 1.75 C 11.992188 1.75 8.160156 0.382812 5.609375 -2.34375 C 3.054688 -5.082031 1.78125 -9.175781 1.78125 -14.625 C 1.78125 -19.738281 3.664062 -24.113281 7.4375 -27.75 C 11.207031 -31.382812 15.722656 -33.203125 20.984375 -33.203125 C 23.003906 -33.203125 25.335938 -32.628906 27.984375 -31.484375 C 31.179688 -30.109375 32.78125 -28.503906 32.78125 -26.671875 C 32.78125 -25.910156 32.535156 -25.242188 32.046875 -24.671875 C 31.835938 -23.828125 31.675781 -22.765625 31.5625 -21.484375 C 31.445312 -20.203125 31.390625 -18.703125 31.390625 -16.984375 C 31.390625 -12.929688 31.675781 -10.015625 32.25 -8.234375 C 32.3125 -8.046875 32.796875 -6.941406 33.703125 -4.921875 C 34.535156 -3.097656 34.953125 -2.0625 34.953125 -1.8125 C 34.953125 -0.6875 34.519531 0.242188 33.65625 0.984375 C 32.800781 1.722656 31.8125 2.09375 30.6875 2.09375 Z M 22.796875 -19.71875 C 22.796875 -20.394531 22.84375 -21.171875 22.9375 -22.046875 C 23.039062 -22.929688 23.1875 -23.914062 23.375 -25 C 22.945312 -25.207031 22.566406 -25.359375 22.234375 -25.453125 C 21.910156 -25.546875 21.632812 -25.59375 21.40625 -25.59375 C 18.519531 -25.59375 15.992188 -24.460938 13.828125 -22.203125 C 11.671875 -19.953125 10.59375 -17.34375 10.59375 -14.375 C 10.59375 -11.53125 11.097656 -9.390625 12.109375 -7.953125 C 13.128906 -6.523438 14.65625 -5.8125 16.6875 -5.8125 C 18.007812 -5.8125 19.257812 -6.03125 20.4375 -6.46875 C 21.613281 -6.90625 22.71875 -7.546875 23.75 -8.390625 C 23.113281 -13.441406 22.796875 -17.21875 22.796875 -19.71875 Z M 22.796875 -19.71875 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(278.939847, 213.483395)"><g><path d="M 25.6875 -25.59375 C 25.25 -25.59375 24.726562 -25.609375 24.125 -25.640625 C 23.519531 -25.671875 22.992188 -25.6875 22.546875 -25.6875 C 21.671875 -25.6875 20.664062 -25.601562 19.53125 -25.4375 C 19.90625 -16.875 20.09375 -11.28125 20.09375 -8.65625 C 20.09375 -8.375 20.101562 -7.859375 20.125 -7.109375 C 20.144531 -6.359375 20.15625 -5.75 20.15625 -5.28125 C 20.15625 -0.40625 18.617188 2.03125 15.546875 2.03125 C 14.378906 2.03125 13.375 1.671875 12.53125 0.953125 C 11.59375 0.191406 11.125 -0.757812 11.125 -1.90625 C 11.125 -2.664062 11.15625 -3.804688 11.21875 -5.328125 C 11.289062 -6.859375 11.328125 -8.007812 11.328125 -8.78125 C 11.328125 -11.34375 11.132812 -16.832031 10.75 -25.25 C 9.4375 -25.3125 7.445312 -25.484375 4.78125 -25.765625 C 2.125 -26.054688 0.796875 -27.429688 0.796875 -29.890625 C 0.796875 -31.078125 1.195312 -32.082031 2 -32.90625 C 2.8125 -33.738281 3.851562 -34.15625 5.125 -34.15625 C 5.90625 -34.15625 7.707031 -34.023438 10.53125 -33.765625 C 10.507812 -34.441406 10.453125 -35.566406 10.359375 -37.140625 C 10.273438 -38.492188 10.234375 -39.546875 10.234375 -40.296875 C 10.234375 -41.484375 10.664062 -42.46875 11.53125 -43.25 C 12.40625 -44.03125 13.457031 -44.421875 14.6875 -44.421875 C 17.820312 -44.421875 19.390625 -41.78125 19.390625 -36.5 L 19.328125 -33.890625 C 20.648438 -34.085938 21.722656 -34.1875 22.546875 -34.1875 C 24.984375 -34.1875 26.644531 -34.023438 27.53125 -33.703125 C 29.226562 -33.109375 30.078125 -31.816406 30.078125 -29.828125 C 30.078125 -28.617188 29.664062 -27.609375 28.84375 -26.796875 C 28.019531 -25.992188 26.96875 -25.59375 25.6875 -25.59375 Z M 25.6875 -25.59375 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(309.623974, 213.483395)"><g><path d="M 13.03125 -4.671875 C 13.03125 -0.640625 11.570312 1.375 8.65625 1.375 C 7.375 1.375 6.320312 0.96875 5.5 0.15625 C 4.675781 -0.644531 4.265625 -1.679688 4.265625 -2.953125 L 4.265625 -46.9375 C 4.265625 -48.164062 4.707031 -49.171875 5.59375 -49.953125 C 6.445312 -50.671875 7.5 -51.03125 8.75 -51.03125 C 10 -51.03125 11.023438 -50.65625 11.828125 -49.90625 C 12.628906 -49.15625 13.03125 -48.164062 13.03125 -46.9375 Z M 13.03125 -4.671875 "/></g></g></g><g fill="#327dbb" fill-opacity="1"><g transform="translate(327.462103, 213.483395)"><g><path d="M 34.859375 -26.875 C 32.546875 -22.0625 28.882812 -14.503906 23.875 -4.203125 C 21.164062 1.335938 19.101562 5.929688 17.6875 9.578125 C 17.238281 10.890625 16.535156 12.835938 15.578125 15.421875 C 14.816406 17.410156 13.460938 18.40625 11.515625 18.40625 C 10.304688 18.40625 9.242188 18.015625 8.328125 17.234375 C 7.421875 16.453125 6.96875 15.46875 6.96875 14.28125 C 6.96875 12.3125 9.210938 6.46875 13.703125 -3.25 C 11.367188 -7.84375 7.671875 -14.613281 2.609375 -23.5625 C 2.097656 -24.363281 1.578125 -25.179688 1.046875 -26.015625 C 0.472656 -26.984375 0.1875 -27.875 0.1875 -28.6875 C 0.1875 -29.832031 0.640625 -30.835938 1.546875 -31.703125 C 2.460938 -32.566406 3.515625 -33 4.703125 -33 C 6.109375 -33 7.203125 -32.484375 7.984375 -31.453125 C 10.992188 -27.441406 14.5 -21.410156 18.5 -13.359375 C 20.769531 -18.378906 22.148438 -21.410156 22.640625 -22.453125 C 24.148438 -25.609375 25.625 -28.382812 27.0625 -30.78125 C 27.96875 -32.3125 29.21875 -33.078125 30.8125 -33.078125 C 32 -33.078125 33.054688 -32.671875 33.984375 -31.859375 C 34.921875 -31.054688 35.390625 -30.070312 35.390625 -28.90625 C 35.390625 -28.289062 35.210938 -27.613281 34.859375 -26.875 Z M 34.859375 -26.875 "/></g></g></g></svg> \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore index 650e52f..ad46d25 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -1,3 +1,5 @@ node_modules/ -.env \ No newline at end of file +.env + +dist/ \ No newline at end of file diff --git a/frontend/src/components/chat/chat-body.tsx b/frontend/src/components/chat/chat-body.tsx index a93b23d..d235c72 100644 --- a/frontend/src/components/chat/chat-body.tsx +++ b/frontend/src/components/chat/chat-body.tsx @@ -105,8 +105,9 @@ function ChatBody() { .filter((message) => message !== undefined); // add the new messages to the store console.log("data in chat body: ", msgsData); - if (msgsData) { - setMessages(msgsData.reverse()); + if (msgsData !== undefined) { + msgsData.reverse() + setMessages(msgsData as Message[]); } if (response.pages.length === 1) { scrollToBottom(); diff --git a/frontend/src/components/chat/chat-header.tsx b/frontend/src/components/chat/chat-header.tsx index 065feb8..057e73f 100644 --- a/frontend/src/components/chat/chat-header.tsx +++ b/frontend/src/components/chat/chat-header.tsx @@ -3,7 +3,6 @@ import P from "../ui/typo/P"; import H2 from "../ui/typo/H2"; import { Button } from "../ui/button"; import { ChevronLeft, MoreHorizontal } from "lucide-react"; -import AvatarGroup from "../common/avatar-group"; import { useActiveChat } from "@/hooks/useActiveChat"; import { useMemo, useState } from "react"; import { cn, formatLastSeen } from "@/lib/utils"; diff --git a/frontend/src/components/chat/message-form.tsx b/frontend/src/components/chat/message-form.tsx index d937f16..04a0c79 100644 --- a/frontend/src/components/chat/message-form.tsx +++ b/frontend/src/components/chat/message-form.tsx @@ -91,7 +91,7 @@ function MessageForm() { id: chatId ?? "", isGroup: true, name: groupInfo?.name ?? "", - avatars: groupInfo?.avatars ?? [], + imageUrl: groupInfo?.imageUrl ?? null, description: groupInfo?.description, inviteCode: groupInfo?.inviteCode, privacy: groupInfo?.privacy ?? null, @@ -100,7 +100,7 @@ function MessageForm() { // this means it is a dm if (dmInfo) { chatInfo.name = profile?.username ?? ""; - chatInfo.avatars = [profile?.avatar ?? ""]; + chatInfo.avatarUrl = profile?.avatar ?? null; chatInfo.bio = profile?.bio ?? null; chatInfo.email = profile?.email ?? null; chatInfo.lastSeen = new Date(); diff --git a/frontend/src/components/chats/index.d.ts b/frontend/src/components/chats/index.d.ts index ebddc2f..b28789b 100644 --- a/frontend/src/components/chats/index.d.ts +++ b/frontend/src/components/chats/index.d.ts @@ -20,7 +20,7 @@ type ChatBoxType = bio?:string | null; inviteCode?: string | null; privacy?: PrivacyType | null; - avatarUrl: string; // for the other user + avatarUrl?: string | null; // for the other user imageUrl?: string | null; // for the group chat } type SearchDataType = (UserBox | (GroupBox & {isGroup: boolean}))[] diff --git a/frontend/src/components/chats/sampleData.ts b/frontend/src/components/chats/sampleData.ts deleted file mode 100644 index f5b6d07..0000000 --- a/frontend/src/components/chats/sampleData.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { avatar1, avatar2, avatar3 } from "@/assets"; -import { ChatBoxType } from "."; -import { v4 as uuidv4 } from "uuid"; -const data: ChatBoxType[] = [ - { - id: uuidv4(), - isGroup: false, - message: { - createdAt: new Date(), - body: "hey whats up", - readByIds: ["123", "1234", "123456"], - type: "TEXT", - senderId: "123", - }, - name: "Shelia", - avatars: [avatar1], - lastSeen: new Date(), - }, - { - id: uuidv4(), - isGroup: true, - message: { - createdAt: new Date(), - body: "who knew that a group could be cool", - readByIds: ["123", "1234", "123456"], - type: "TEXT", - senderId: "123", - }, - name: "Some random ass Group Chat", - avatars: [avatar1, avatar2], - }, - { - id: uuidv4(), - isGroup: false, - message: { - createdAt: new Date(), - body: "Chatly is such an amazing tool", - readByIds: ["123", "1234", "123456"], - type: "TEXT", - senderId: "345", - }, - name: "Michael", - avatars: [avatar3], - lastSeen: new Date(), - }, -]; -export { data }; diff --git a/frontend/src/components/common/empty-state.tsx b/frontend/src/components/common/empty-state.tsx index 1d4b721..bd8fed8 100644 --- a/frontend/src/components/common/empty-state.tsx +++ b/frontend/src/components/common/empty-state.tsx @@ -1,5 +1,4 @@ import { MessagesSquareIcon } from 'lucide-react' -import React from 'react' import P from '../ui/typo/P' export function EmptyState() { diff --git a/frontend/src/components/drawers/profileDrawer/dm-contents.tsx b/frontend/src/components/drawers/profileDrawer/dm-contents.tsx index 17c5135..b0daeb4 100644 --- a/frontend/src/components/drawers/profileDrawer/dm-contents.tsx +++ b/frontend/src/components/drawers/profileDrawer/dm-contents.tsx @@ -1,17 +1,18 @@ +import { Avatar } from "@/components/common/avatar"; import { Button } from "@/components/ui/button"; import H3 from "@/components/ui/typo/H3"; import P from "@/components/ui/typo/P"; import { useActiveChat } from "@/hooks/useActiveChat"; import { useProfileStore } from "@/hooks/useProfile"; import { cn, formatLastSeen } from "@/lib/utils"; -import { PhoneIcon, SlashIcon, Trash2Icon, VideoIcon } from "lucide-react"; +import { SlashIcon, Trash2Icon, VideoIcon } from "lucide-react"; import { useNavigate } from "react-router-dom"; type Props = { id: string; username: string; bio: string; lastSeen: Date; - avatar: string; + avatar: string | null; email: string; closeDrawer: () => void; }; @@ -32,10 +33,11 @@ export default function DmContents({ <div> <header className="border-b mb-5 mt-6 pb-3"> <div className=" flex items-center gap-x-5 justify-start"> - <img + <Avatar + type="User" src={avatar} - alt="user's avatar" - className="h-24 w-24 rounded-full object-cover border-2 border-slate-500 dark:border-slate-700" + size={96} + alt={`${username ?? 'User'}'s avatar`} /> <div> <H3>{username}</H3> diff --git a/frontend/src/components/drawers/profileDrawer/profile-drawer.tsx b/frontend/src/components/drawers/profileDrawer/profile-drawer.tsx index 1ce2ac1..49400bc 100644 --- a/frontend/src/components/drawers/profileDrawer/profile-drawer.tsx +++ b/frontend/src/components/drawers/profileDrawer/profile-drawer.tsx @@ -30,7 +30,7 @@ function ProfileDrawer({ isOpen, openDrawer }: DrawerProps) { ) : activeChat?.dmInfo ? ( <DmContents username={activeChat.dmInfo.username} - avatar={activeChat.dmInfo.avatarUrl} + avatar={activeChat.dmInfo?.avatarUrl ?? null} lastSeen={activeChat.dmInfo?.lastSeen ?? new Date()} bio={activeChat.dmInfo?.bio ?? "No bio"} email={activeChat.dmInfo?.email ?? "No email"} diff --git a/frontend/src/components/modals/dm-modal.tsx b/frontend/src/components/modals/dm-modal.tsx index 19c815e..00ad452 100644 --- a/frontend/src/components/modals/dm-modal.tsx +++ b/frontend/src/components/modals/dm-modal.tsx @@ -85,7 +85,7 @@ export function DmModal({ open, setModal, toggleLoading }: Props) { users.map((user) => ( <UserGroupBox type="user" - avatar={user.avatar} + avatarUrl={user.avatarUrl} id={user.id} key={user.id} lastSeen={user.lastSeen} diff --git a/frontend/src/hooks/query/useInfiniteQuery.ts b/frontend/src/hooks/query/useInfiniteQuery.ts index f265ca2..df112c8 100644 --- a/frontend/src/hooks/query/useInfiniteQuery.ts +++ b/frontend/src/hooks/query/useInfiniteQuery.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { InfiniteData, useInfiniteQuery as useIQ } from "@tanstack/react-query"; +import { useInfiniteQuery as useIQ } from "@tanstack/react-query"; import { GetInfiniteQueryType } from "."; import { mainApi } from "@/lib/axios"; import { useGetToken } from "./useGetToken"; @@ -15,7 +15,6 @@ export default function useInfiniteQuery<K extends string, T>({ defaultMessage, displayToast, cursorKey = "cursor", - nextCursorKey = "nextCursor", }: GetInfiniteQueryType<T>) { const [localEnabled, setLocalEnabled] = useState(false); const { token, refetchToken } = useGetToken({shouldFetchToken: true}); diff --git a/frontend/src/pages/Wallpaper.tsx b/frontend/src/pages/Wallpaper.tsx index a63881e..658a5c3 100644 --- a/frontend/src/pages/Wallpaper.tsx +++ b/frontend/src/pages/Wallpaper.tsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo, useRef, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import { Button } from "@/components/ui/button"; import { diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index d871945..8977731 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -5,7 +5,7 @@ "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, - + "outDir": "../../backend/public/build", /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true,