@qratilabs/qrati-connect 2.32.1 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/element/B60TJHpn.js +1 -0
  2. package/element/{Dip0ObTA2.js → BX09gwBu.js} +1 -1
  3. package/element/BgmJHB_q.js +18 -0
  4. package/element/{Bu-K2ipV.js → BhPQW37y.js} +1 -1
  5. package/element/BhUO8wHu.js +16 -0
  6. package/element/BhYfK52W.js +207 -0
  7. package/element/BjDK8Ljd.js +85 -0
  8. package/element/Bjbk1Zhj.js +1 -0
  9. package/element/BlsbPO0-.js +1 -0
  10. package/element/{ZJzxZBJ5.js → Bpjf4eY9.js} +1 -1
  11. package/element/{DdtKpY372.js → BtLTtkX8.js} +1 -1
  12. package/element/{BtutZVbU.js → BuT9kfma.js} +1 -1
  13. package/element/Bx-BFs7B.js +4 -0
  14. package/element/{BfwZT31v.js → BzXQkPAW.js} +1 -1
  15. package/element/CGJtMtq6.js +36 -0
  16. package/element/CVlMw3Vf.js +3 -0
  17. package/element/CYHy0vN3.js +1 -0
  18. package/element/CZJLtvF9.js +4 -0
  19. package/element/CfNXbM5H.js +2 -0
  20. package/element/ChW2P7vL.js +2 -0
  21. package/element/CrZvMeF8.js +8 -0
  22. package/element/{B4vKIcyS.js → Crg6P9Om.js} +1 -1
  23. package/element/{CgFrSWMh.js → D9jzGMeN.js} +3 -3
  24. package/element/DExU6-v2.js +5 -0
  25. package/element/{CKRLHPry.js → DMAkdDxr.js} +32 -32
  26. package/element/DMPvw0Jw.js +3 -0
  27. package/element/DjFlbVE4.js +8 -0
  28. package/element/{BhoJSelw.js → DjKx2bl9.js} +3 -2
  29. package/element/{BE8OExtb.js → DkrE1H9J.js} +1 -1
  30. package/element/DnrkqfsH.js +14 -0
  31. package/element/ILtcTVir.js +93 -0
  32. package/element/{D7LeFN00.js → PxjP9VKW.js} +1 -1
  33. package/element/{B5343djA.js → RLxieWpc.js} +1 -1
  34. package/element/SAPFe3AV.js +1 -0
  35. package/element/ThvpIBOm.js +4 -0
  36. package/element/X8kQCV14.js +5 -0
  37. package/element/{BSdyruRZ.js → ZWATOkpE.js} +1 -1
  38. package/element/{BPGLsT1I.js → k9JmIPl-.js} +7 -7
  39. package/element/{C41v7XyB.js → pRu0r7dI.js} +1 -1
  40. package/element/plowVrDm.js +4 -0
  41. package/element/{CV_RNBLv2.js → qTO-oPOF.js} +1 -1
  42. package/element/web.es.js +1 -1
  43. package/element/x3_URwMQ.js +3 -0
  44. package/element/{D0IYqyql.js → xPFFaUda.js} +1 -1
  45. package/embed/embed.js +1 -1
  46. package/package.json +1 -1
  47. package/element/704flhtG2.js +0 -3
  48. package/element/B2ryYFFr.js +0 -4
  49. package/element/BDe40W9d.js +0 -16
  50. package/element/BEljxaTQ2.js +0 -1
  51. package/element/BGkRue2Y2.js +0 -14
  52. package/element/BNljt5mO.js +0 -4
  53. package/element/BOJyFCIG.js +0 -5
  54. package/element/BTWlllUg.js +0 -2
  55. package/element/BTduHo9u.js +0 -199
  56. package/element/Bl8aWOla.js +0 -93
  57. package/element/ByZt8Ha92.js +0 -4
  58. package/element/C7zv6hcG.js +0 -1
  59. package/element/CMowDGuy2.js +0 -8
  60. package/element/CkdxwEVw2.js +0 -17
  61. package/element/D-2JtKSL2.js +0 -3
  62. package/element/DChfs6i_.js +0 -2
  63. package/element/DE9tQHM5.js +0 -36
  64. package/element/DSORGFbF2.js +0 -85
  65. package/element/D_F9CJK92.js +0 -4
  66. package/element/Da21-kaH2.js +0 -5
  67. package/element/DdACKOZr.js +0 -1
  68. package/element/DgX9Hgrs.js +0 -1
  69. package/element/DqB6Xl6G.js +0 -1
  70. package/element/DsU4DxSM.js +0 -3
  71. package/element/OnH8Izqn.js +0 -1
  72. package/element/RnyYX1t12.js +0 -8
  73. /package/element/{BUDCYszs2.js → BUDCYszs.js} +0 -0
  74. /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
  75. /package/element/{DnIueBGr2.js → DnIueBGr.js} +0 -0
@@ -1,16 +0,0 @@
1
- import{Kt as e,nn as a,nt as r,vt as s,xn as t,xt as i,yn as l}from"./BTduHo9u.js";import{n}from"./ZJzxZBJ5.js";import{t as o}from"./BPGLsT1I.js";import{i as d,s as c,t as u}from"./CgFrSWMh.js";var h=({count:e=1,currentStep:r=0,disabled:s,onStepClick:t})=>{const i=s||!t;/* @__PURE__ */
2
- return a("ol",{className:"flex items-center space-x-6 pl-1.5",children:Array.from({length:e}).map((e,s)=>/* @__PURE__ */a("li",{children:/* @__PURE__ */a("button",s<r?{type:"button","aria-label":`Go to step ${s+1}`,className:"bg-primary block h-3 w-3 rounded-full",disabled:i,onClick:()=>t?.(s)}:s===r?{type:"button","aria-label":`Current step ${s+1}`,className:"relative flex items-center justify-center","aria-current":"step",disabled:i,onClick:()=>t?.(s),children:[/* @__PURE__ */a("span",{className:"absolute flex size-6 p-px","aria-hidden":"true",children:/* @__PURE__ */a("span",{className:"bg-primary/40 size-full rounded-full"})}),/* @__PURE__ */a("span",{className:"bg-primary relative block size-3 rounded-full","aria-hidden":"true"})]}:{type:"button","aria-label":`Go to step ${s+1}`,className:"bg-muted block size-3 rounded-full",disabled:i,onClick:()=>t?.(s)})},`progress-dot-${s}`))})},m=({onCodeSent:e})=>{const{t:s}=n(),{sendPasswordResetCode:l}=i(),[c,h]=t(""),[m,p]=t(!1),[f,y]=t(null),[v,w]=t(null);/* @__PURE__ */
3
- return a("div",{className:"space-y-4",children:[
4
- /* @__PURE__ */a(r,{variant:"h4",children:s("auth.forgotPassword","Forgot Password")}),
5
- /* @__PURE__ */a(u,{type:"email",name:"email",value:c,onChange:e=>{h(e.target.value),f&&y(null),v&&w(null)},placeholder:s("auth.emailPlaceholder","Enter your email address"),error:f??void 0,disabled:m}),v&&/* @__PURE__ */a(r,{variant:"body2",color:"error",children:v}),
6
- /* @__PURE__ */a("div",{children:/* @__PURE__ */a(o,{onClick:async()=>{y(null),w(null);const a=c.trim().toLowerCase(),r=d(a);if(r)y(r);else{p(!0);try{const r=await l(a);r?.error?w(r.error):e(a)}catch(s){w(s instanceof Error?s.message:String(s))}finally{p(!1)}}},fullWidth:!0,loading:m,disabled:m,children:s("auth.sendVerificationCode","Send verification code")})})]})},p=({email:e,onCodeVerified:s})=>{const{t:l}=n(),{verifyPasswordResetCode:d}=i(),[c,h]=t(""),[m,p]=t(!1),[f,y]=t(null);/* @__PURE__ */
7
- return a("div",{className:"space-y-4 sm:space-y-6",children:[
8
- /* @__PURE__ */a("div",{className:"space-y-2",children:[/* @__PURE__ */a(r,{variant:"h4",children:l("auth.verifyCode","Verify Code")}),/* @__PURE__ */a(r,{variant:"body1",children:[l("auth.enterCodeSentTo","Enter the 6-digit code sent to")," ",e]})]}),
9
- /* @__PURE__ */a(u,{value:c,name:"code",onChange:e=>h(e.target.value),placeholder:l("auth.codePlaceholder","Enter verification code"),disabled:m}),f&&/* @__PURE__ */a(r,{variant:"body2",color:"error",children:f}),
10
- /* @__PURE__ */a("div",{className:"flex gap-2",children:/* @__PURE__ */a(o,{onClick:async()=>{if(y(null),e)if(c.trim()){p(!0);try{const a=c.trim(),r=await d(e,a);r?.error?y(r.error):r?.data?s(r.data):y(l("auth.codeVerifyFailed","Failed to verify code"))}catch(a){y(a instanceof Error?a.message:String(a))}finally{p(!1)}}else y(l("auth.codeRequired","Please enter the verification code"));else y(l("auth.emailMissing","Email address is missing"))},fullWidth:!0,loading:m,disabled:m,children:l("auth.verify","Verify")})})]})},f=({email:e,passwordResetCodeId:s,onPasswordReset:d})=>{const{t:h}=n(),{resetPassword:m}=i(),[p,f]=t(""),[y,v]=t(""),[w,g]=t(null),[b,C]=t(!1),N=l(()=>c(p),[p]),P=p&&p===y&&!N;/* @__PURE__ */
11
- return a("div",{className:"space-y-4",children:[
12
- /* @__PURE__ */a(r,{variant:"h4",children:h("auth.resetPassword","Reset Password")}),
13
- /* @__PURE__ */a(u,{type:"password",name:"password",autoComplete:"new-password",value:p,onChange:e=>{f(e.target.value),w&&g(null)},placeholder:h("auth.newPassword","New password"),disabled:b,error:N}),
14
- /* @__PURE__ */a(u,{type:"password",name:"confirmPassword",autoComplete:"new-password",value:y,onChange:e=>{v(e.target.value),w&&g(null)},placeholder:h("auth.confirmNewPassword","Confirm new password"),disabled:b}),w&&/* @__PURE__ */a(r,{variant:"body2",color:"error",children:w}),
15
- /* @__PURE__ */a("div",{children:/* @__PURE__ */a(o,{onClick:async()=>{if(g(null),e)if(s)if(P){C(!0);try{const e=await m(s,p);e?.error?g(e.error):d()}catch(a){g(a instanceof Error?a.message:String(a))}finally{C(!1)}}else g(h("auth.passwordsDoNotMatch","Passwords do not match"));else g(h("auth.codeIdMissing","Verification code ID is missing"));else g(h("auth.emailMissing","Email address is missing"))},disabled:!P||b,fullWidth:!0,loading:b,children:h("auth.resetPasswordButton","Reset Password")})})]})},y=()=>{const r=s(),[i,l]=t(null),[n,o]=t(null),[d,c]=t(0);/* @__PURE__ */
16
- return a("div",{className:"bg-background min-h-[60vh]",children:[(({index:s})=>{switch(s){case 0:/* @__PURE__ */return a(m,{onCodeSent:e=>{l(e),c(1)}});case 1:/* @__PURE__ */return a(p,{email:i,onCodeVerified:e=>{o(e),c(2)}});case 2:/* @__PURE__ */return a(f,{email:i,passwordResetCodeId:n,onPasswordReset:()=>{r(e.LOGIN)}})}})({index:d}),/* @__PURE__ */a("div",{className:"mt-8 flex justify-center",children:/* @__PURE__ */a(h,{count:3,currentStep:d})})]})};export{y as default};
@@ -1 +0,0 @@
1
- import{$t as e,Cn as n,Zt as t,kt as o,wn as r,xn as a,xt as i,yn as l}from"./BTduHo9u.js";var d=(e,n)=>e.filter(e=>(e.parentFolderId??null)===n).map(n=>{return{folder:n,children:d(e,n._id),eventCount:n.boundary?.length??0,centroid:(t=n.boundary,t?.length?[t.reduce((e,n)=>e+n.x,0)/t.length,t.reduce((e,n)=>e+n.y,0)/t.length]:null),color:n.color||"#fb8500"};var t}).filter(e=>e.eventCount>0||e.children.length>0),s=e=>e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),c=()=>{const{folders:c,organization:u}=i(),[g,m]=a(null),y=Boolean(u?.integrationSettings?.enableFolderView),h=l(()=>y?d(c??[],null):[],[c,y]),v=e({queryKey:["map-all-events",u?._id],queryFn:async()=>{const e=await t.get(o.PUBLIC_EVENTS,{headers:{"x-org-id":u?._id??""},searchParams:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json();return s(e.data??[])},enabled:Boolean(u?._id)&&(!y||0===h.length),staleTime:3e5,gcTime:6e5,retry:!1}),f=e({queryKey:["map-folder-events",u?._id,g],queryFn:async()=>{const e=await t.get(o.PUBLIC_EVENTS,{headers:{"x-org-id":u?._id??""},searchParams:{folderId:g,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json();return s(e.data??[])},enabled:Boolean(u?._id)&&y&&Boolean(g),staleTime:3e5,gcTime:6e5,retry:!1}),p=l(()=>(c??[]).find(e=>e._id===g)??null,[c,g]);n(()=>{y||m(null)},[y]);const F=r(e=>{m(e)},[]),_=y&&h.length>0;return{folderTree:h,activeFolderId:g,activeFolder:p,visibleEvents:_?f.data??[]:v.data??[],setActiveFolderId:F,isLoadingEvents:_?Boolean(g)&&(f.isLoading||f.isFetching):v.isLoading||v.isFetching}};export{c as t};
@@ -1,14 +0,0 @@
1
- import{$t as e,Ct as a,Kt as r,Lt as t,Zt as l,et as i,kt as n,nn as o,nt as s,pt as d,st as c,tt as m,wn as g,xt as h,yt as b}from"./BTduHo9u.js";import{n as f}from"./ZJzxZBJ5.js";import{t as x}from"./BfwZT31v.js";import{t as p}from"./B5343djA.js";function u({className:e}){/* @__PURE__ */
2
- return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m12 152a8 8 0 0 1-16 0V95l-11.56 7.71a8 8 0 1 1-8.88-13.32l24-16A8 8 0 0 1 140 80Z"})})}function v({className:e}){/* @__PURE__ */
3
- return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m-4 164a35.7 35.7 0 0 1-25.71-10.81A8 8 0 1 1 109.71 166A20 20 0 1 0 124 132a8 8 0 0 1-6.55-12.59L136.63 92H104a8 8 0 0 1 0-16h48a8 8 0 0 1 6.55 12.59l-21 30A36 36 0 0 1 124 188"})})}function N({className:e}){/* @__PURE__ */
4
- return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m24 144a8 8 0 0 1 0 16h-48a8 8 0 0 1-6.4-12.8l43.17-57.56a16 16 0 1 0-27.86-15a8 8 0 0 1-15.09-5.34a32 32 0 1 1 55.74 29.93L120 168Z"})})}var w=e=>{if(!e)return"";const a=e.trim().split(/\s+/);return 1===a.length?a[0]:`${a[0]} ${a[1]?.[0]?`${a[1][0]}.`:""}`},y={first:{size:"size-28",imageSize:"size-24",borderColor:"border-amber-400",gradient:"from-amber-400/20 via-yellow-300/10 to-transparent"},second:{size:"size-20",imageSize:"size-16",borderColor:"border-slate-400",gradient:"from-slate-400/20 via-slate-300/10 to-transparent"},third:{size:"size-20",imageSize:"size-16",borderColor:"border-amber-600",gradient:"from-amber-600/20 via-amber-500/10 to-transparent"}},z=(e,a)=>{const r=void 0===e.totalPoint?e.maxScore:e.totalPoint;return void 0===r?"—":r.toFixed(a?2:0)},P=({entry:e,position:r,showFloatingPoint:t,hidePictures:l})=>{const i=1===r?y.first:2===r?y.second:y.third,n={1:u,2:N,3:v}[r],d={1:{bg:"bg-amber-400",border:"border-amber-600",text:"text-amber-900"},2:{bg:"bg-slate-300",border:"border-slate-500",text:"text-slate-700"},3:{bg:"bg-amber-600",border:"border-amber-800",text:"text-amber-100"}},c=g(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
5
- return o("div",{className:a("flex w-full flex-col items-center justify-center rounded-xl p-4 text-center sm:min-w-36","bg-linear-to-b",i.gradient),children:[l?/* @__PURE__ */o(n,{className:a(i.size,{1:"text-amber-400",2:"text-slate-400",3:"text-amber-600"}[r])}):/* @__PURE__ */o("div",{className:"relative",children:[/* @__PURE__ */o("img",{className:a(i.imageSize,"shadow-card scale-100 rounded-full border-4 object-cover",i.borderColor),src:e.image,alt:e.name??"",loading:"lazy",onError:c}),/* @__PURE__ */o("span",{className:a("shadow-card absolute -bottom-2 left-1/2 z-10 flex size-7 -translate-x-1/2 items-center justify-center rounded-full border-2 text-sm font-bold",d[r].bg,d[r].border,d[r].text),children:r})]}),/* @__PURE__ */o("div",{className:"mt-3 space-y-3 text-center",children:[/* @__PURE__ */o(s,{variant:"h6",lines:2,className:"max-w-24",align:"center",children:w(e.name)}),/* @__PURE__ */o("div",{className:"text-primary text-lg font-bold",children:z(e,t)})]})]})},j=({title:e,entries:r=[],showFloatingPoint:t=!1,hidePictures:l=!0})=>{const{t:i}=f(),n=e.replace(/\s+/g,"-").toLowerCase(),d=g(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
6
- return o("div",{className:"border-border mx-auto flex max-w-2xl flex-col rounded border p-4 sm:p-5 lg:p-6",children:[/* @__PURE__ */o("div",{className:"mb-4 flex items-center justify-center gap-2",children:[/* @__PURE__ */o(x,{className:"text-primary size-6"}),/* @__PURE__ */o(s,{variant:"h4",align:"center",color:"primary",children:e})]}),0===r.length?/* @__PURE__ */o("div",{className:"py-16 text-center",children:[/* @__PURE__ */o(s,{variant:"h5",align:"center",color:"error",children:i("leaderboard.not_available","No data available")}),/* @__PURE__ */o(s,{variant:"body2",align:"center",color:"muted",className:"mt-2",children:i("leaderboard.come_back_later","Check back later for updates.")})]}):/* @__PURE__ */o("div",{children:[/* @__PURE__ */o("div",{className:"flex items-end justify-center gap-2 lg:gap-8",children:[r.length>1&&/* @__PURE__ */o(P,{entry:r[1],position:2,showFloatingPoint:t,hidePictures:l}),r.length>0&&/* @__PURE__ */o(P,{entry:r[0],position:1,showFloatingPoint:t,hidePictures:l}),r.length>2&&/* @__PURE__ */o(P,{entry:r[2],position:3,showFloatingPoint:t,hidePictures:l})]}),/* @__PURE__ */o("div",{className:"mt-6 overflow-hidden rounded ring-1 ring-black/5",children:/* @__PURE__ */o("div",{className:"divide-border divide-y",children:r.slice(3).map((e,r)=>/* @__PURE__ */o("div",{className:a("hover:bg-primary/5 flex items-center gap-4 px-4 py-3",r%2==0?"bg-primary/5":"bg-background"),children:[
7
- /* @__PURE__ */o("span",{className:"text-muted-foreground w-8 text-center text-sm font-medium",children:r+4}),!l&&/* @__PURE__ */o("img",{className:"ring-border size-10 rounded-full object-cover ring-2",src:e.image,alt:e.name??"",loading:"lazy",onError:d}),
8
- /* @__PURE__ */o("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */o("div",{className:"truncate font-medium",children:w(e.name)})}),
9
- /* @__PURE__ */o("div",{className:"text-primary text-right font-semibold",children:z(e,t)})]},`${n}-${e.name??""}-${e.totalPoint??e.maxScore??""}-${e.image??r}`))})})]})]})},S=()=>{const{eventSlug:g}=b(),{props:x}=h(),{t:u}=f(),v=x?.organizationId,{event:N,loading:w}=c({eventSlug:g}),{isLoading:y,isError:z,error:P,data:S}=e({queryKey:[`leaderboard-${v}-${N?._id}`],queryFn:async()=>(await l.get(n.GET_LEADERBOARD,{headers:{"x-org-id":v??""},searchParams:{eventId:N?._id??"",projection:"connect"}}).json()).data,enabled:Boolean(N),staleTime:3e4,gcTime:3e5});return w||y?/* @__PURE__ */o("div",{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */o("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */o(i,{className:"h-5 w-28 rounded-full"}),/* @__PURE__ */o(i,{className:"h-10 w-64 rounded"})]}),/* @__PURE__ */o("div",{className:a("flex w-full gap-8 lg:gap-0",N?.engagementStyle===t.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */o("div",{className:"flex-1",children:[/* @__PURE__ */o(i,{className:"h-72 w-full rounded"}),/* @__PURE__ */o(i,{className:"mt-4 h-72 w-full rounded"})]}),/* @__PURE__ */o("div",{className:"flex-1",children:/* @__PURE__ */o(i,{className:"h-72 w-full rounded"})})]})]}):z?/* @__PURE__ */o("div",{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col items-center justify-center gap-4 px-2 py-4 text-center sm:px-0 lg:py-8",children:[
10
- /* @__PURE__ */o(p,{className:"size-9 text-destructive"}),
11
- /* @__PURE__ */o(s,{variant:"h4",color:"error",align:"center",children:u("common.error","Something went wrong")}),
12
- /* @__PURE__ */o(s,{variant:"body2",color:"muted",align:"center",children:P instanceof Error?P.message:u("common.try_again","Please try again later.")})]}):!1===N?.showLeaderboard?/* @__PURE__ */o(m,{title:u("leaderboard.not_available","Leaderboard not available"),description:u("leaderboard.disabled","Leaderboard is not available for this event.")}):/* @__PURE__ */o("div",{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */o("div",{className:"flex flex-col items-center gap-2 text-center",children:[
13
- /* @__PURE__ */o("div",{className:"text-primary flex items-center gap-2",children:/* @__PURE__ */o(s,{variant:"h5",color:"primary",children:u("leaderboard.leaderboard","Leaderboard")})}),
14
- /* @__PURE__ */o(s,{variant:"h4",align:"center",color:"foreground",children:N?.name}),N?.slug&&/* @__PURE__ */o(d,{to:r.GALLERY(N.slug),state:{internalNavigation:!0},className:"text-primary text-sm font-medium underline-offset-4 hover:underline",children:u("leaderboard.back_to_gallery","Back to Gallery")})]}),/* @__PURE__ */o("div",{className:a("flex w-full gap-8 lg:gap-0",N?.engagementStyle===t.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */o("div",{className:"flex-1",children:/* @__PURE__ */o(j,{title:u("leaderboard.point_leaders","Top Points Leaders"),entries:S?.leaderboardByPoint?.topRankers||[],pointName:N?.pointName})}),/* @__PURE__ */o("div",{className:"flex-1",children:/* @__PURE__ */o(j,{title:N?.engagementStyle===t.REACTION?u("leaderboard.reaction_counts","Top Reactions"):u("leaderboard.top_rated_photos","Top Rated Photos"),showFloatingPoint:N?.engagementStyle===t.CONTEST,entries:S?.leaderboardByScore?.topRankers||[],pointName:N?.pointName})})]})]})};export{S as default};
@@ -1,4 +0,0 @@
1
- import{Cn as e,Ct as r,Kt as t,Q as a,_t as s,a as i,ht as o,nn as d,pt as n,sn as l,vt as m,xt as c}from"./BTduHo9u.js";import{t as b}from"./BTWlllUg.js";var h=()=>{const h=s(),p=m(),{initializing:f,organization:x,user:v}=c(),u=h.pathname.endsWith("/login")||h.pathname.endsWith("/register");return e(()=>{if(v){const e=h.state?.referrer;p(e||"/",{replace:!0})}},[v]),f?/* @__PURE__ */d(i,{}):!x||x?.customAuth?null:/* @__PURE__ */d("div",{className:"bg-background relative mx-auto min-h-[80vh] max-w-md py-24",children:[u&&/* @__PURE__ */d(b,{}),/* @__PURE__ */d("div",{children:[
2
- /* @__PURE__ */d("div",{className:"my-8 flex w-full justify-around",children:[/* @__PURE__ */d(n,{to:t.LOGIN,state:h.state||void 0,className:({isActive:e})=>r(e?"border-primary text-primary font-semibold":"border-border","flex-1 border-2 border-x-0 border-t-0 pb-2 text-center"),children:"Login"}),/* @__PURE__ */d(n,{to:t.REGISTER,state:h.state||void 0,className:({isActive:e})=>r(e?"border-primary text-primary font-semibold":"border-border","flex-1 border-2 border-x-0 border-t-0 pb-2 text-center"),children:"Register"})]}),
3
- /* @__PURE__ */d(l,{fallback:/* @__PURE__ */d(i,{}),children:/* @__PURE__ */d(o,{})}),
4
- /* @__PURE__ */d("div",{className:"mt-12",children:/* @__PURE__ */d(a,{})})]})]})};export{h as default};
@@ -1,5 +0,0 @@
1
- import{Cn as e,Kt as t,Z as s,ct as a,ht as i,nn as n,o as r,pt as o,s as l,sn as c,st as d,tt as m,xt as g,yt as f}from"./BTduHo9u.js";import{t as h}from"./BTWlllUg.js";import{t as v}from"./ZJzxZBJ5.js";import{t as u}from"./BPGLsT1I.js";import{t as p}from"./B4vKIcyS.js";import{t as N}from"./C41v7XyB.js";var S=()=>{const S=f(),{props:w,folders:E}=g(),x=w?.organizationId,{loading:I,event:j,isError:k,error:C,refetch:T}=d({eventSlug:S.eventSlug});if(e(()=>{const e=setTimeout(a,2e3);return()=>clearTimeout(e)},[]),I)/* @__PURE__ */return n(r,{});if(k&&!j&&/timed out|status code (5\d\d|408|429)|network|failed to fetch/i.test(String(C?.message)))/* @__PURE__ */return n("div",{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */n(m,{className:"mt-16",title:"Couldn't load this event",description:"Something went wrong while loading. Please try again.",iconSvg:/* @__PURE__ */n(N,{})}),/* @__PURE__ */n("div",{className:"flex gap-3",children:[/* @__PURE__ */n(u,{icon:/* @__PURE__ */n(p,{className:"size-5"}),onClick:()=>{T?.()},children:"Retry"}),/* @__PURE__ */n(o,{to:t.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */n(u,{children:"All events"})})]})]});const z=j?.organizationId?.toString?.()||j?.organizationId,P=x?.toString?.()||x,_=j?.folderId?.toString?.()||j?.folderId,B=E?.some(e=>e._id===_)?_:void 0;/* @__PURE__ */
2
- return n("div",j&&z===P?{className:"bg-background relative min-h-screen",children:/* @__PURE__ */n(v,{locale:j?.language??"en",translations:j?.translations,children:[
3
- /* @__PURE__ */n(h,{to:B?t.FOLDER_EVENTS(B):t.PUBLIC_EVENTS}),
4
- /* @__PURE__ */n(c,{fallback:/* @__PURE__ */n(l,{}),children:/* @__PURE__ */n(i,{})}),
5
- /* @__PURE__ */n(s,{})]})}:{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */n(m,{className:"mt-16",title:"Event not found",description:"Please check the provided link",iconSvg:/* @__PURE__ */n("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 997.86122 450.8081",role:"img"})}),/* @__PURE__ */n(o,{to:t.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */n(u,{children:"All events"})})]})};export{S as default};
@@ -1,2 +0,0 @@
1
- import{Kt as t,P as a,gt as e,nn as s,vt as n}from"./BTduHo9u.js";var o=({to:o})=>{const r=n(),i=e();/* @__PURE__ */
2
- return s("button",{type:"button","aria-label":"Go back",onClick:()=>{o?r(o,{state:{internalNavigation:!0}}):i?r(-1):r(t.PUBLIC_EVENTS,{state:{internalNavigation:!0}})},className:"text-foreground absolute top-0 left-0",children:/* @__PURE__ */s(a,{className:"size-6"})})};export{o as t};