@qratilabs/qrati-connect 2.4.0 → 2.4.1

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 (69) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/element/{AuthLayout-Cb29YL2A.js → AuthLayout-D6yq2Myx.js} +1 -1
  3. package/element/ContentsPage-DCloOu7i.js +1 -0
  4. package/element/{CuratePage-BUmxwjzW.js → CuratePage-C1XBJnxN.js} +1 -1
  5. package/element/Dialog-Bqed17jN.js +1 -0
  6. package/element/{DotLottiePlayer-BM_SpbNm.js → DotLottiePlayer-Ciqi1a0X.js} +1 -1
  7. package/element/EventHeaderAdminButtons-YVIZ2jNS.js +1 -0
  8. package/element/{FolderBreadcrumb-D_vuN164.js → FolderBreadcrumb-C8gAI_F2.js} +1 -1
  9. package/element/{ForgotPasswordPage-CLTfCRSc.js → ForgotPasswordPage-BLiFYU8r.js} +1 -1
  10. package/element/{InputField-Dpa6h5y6.js → InputField-VxKss-ap.js} +1 -1
  11. package/element/{LazyLoadImage-btDC6I6Y.js → LazyLoadImage-CJQhdLtk.js} +1 -1
  12. package/element/{LeaderboardPage-C35B-9Gu.js → LeaderboardPage-C_PNMUnE.js} +1 -1
  13. package/element/{LoginPage-r5G2G0oG.js → LoginPage-BlmrppsE.js} +1 -1
  14. package/element/{NCMVHL6D-2v69SxO0.js → NCMVHL6D-Di9F8hV1.js} +1 -1
  15. package/element/{PublicEvents-CKFcMhSD.js → PublicEvents-C0iy0Ff1.js} +1 -1
  16. package/element/{RegisterPage-DiL8319w.js → RegisterPage-BDawpnhD.js} +1 -1
  17. package/element/{SocialLoginButton-Cm1XFx8_.js → SocialLoginButton-DCZbdhrb.js} +1 -1
  18. package/element/{UploadPage-9jnk9Zmk.js → UploadPage-DKqtebrs.js} +1 -1
  19. package/element/{VideoPlayer-D9AI4cZc.js → VideoPlayer-D-zTM_L9.js} +1 -1
  20. package/element/element.es.js +1 -1
  21. package/element/{heic2any-DQvpqzo3.js → heic2any-CPi_UmKl.js} +1 -1
  22. package/element/index-BEtvIXWu.js +1 -0
  23. package/element/{index-BHVViZaJ.js → index-Cg2z7-F2.js} +1 -1
  24. package/element/index-ar7jHNfV.js +1 -0
  25. package/element/{index.esm-Hfm1g5lN.js → index.esm-DMnv_TeJ.js} +1 -1
  26. package/element/{photoswipe-C58kAXHU.js → photoswipe-BaMjvcSX.js} +1 -1
  27. package/element/styles.css +1 -1
  28. package/element/{tslib.es6-khl_spk_.js → tslib.es6-CMp2KRLs.js} +1 -1
  29. package/element/{useOrgAccess-D2Xgijq3.js → useOrgAccess-59e03fsS.js} +1 -1
  30. package/element/web.es.js +1 -1
  31. package/package.json +11 -11
  32. package/react/{DzJMp-c4.js → 0096QSNF.js} +1 -1
  33. package/react/{BDG18AiE.js → 0VQzlcgi.js} +1 -1
  34. package/react/{Bdifa0jH.js → BNMtxstZ.js} +1 -1
  35. package/react/{DGkkW9h-.js → BYvYuEdt.js} +1 -1
  36. package/react/{Z6p4C64a.js → Bags6A1F.js} +1 -1
  37. package/react/BozcWsGg.js +1 -0
  38. package/react/{DW2r0IAI.js → C4OAItgB.js} +1 -1
  39. package/react/{CyVAYliQ.js → C6KOByxs.js} +1 -1
  40. package/react/{Brhsb0-T.js → CKtJREoH.js} +1 -1
  41. package/react/{C5-YA8nT.js → C__pEwjz.js} +1 -1
  42. package/react/CaxUtbJe.js +1 -0
  43. package/react/ChmTNpp8.js +1 -0
  44. package/react/{B1r-QO-6.js → CyG7wrJo.js} +1 -1
  45. package/react/{CJ6agILN.js → Cyl2KafN.js} +1 -1
  46. package/react/{IujfE24r.js → D4GskBrt.js} +1 -1
  47. package/react/{D7D-fe1-.js → D9rOYW-1.js} +1 -1
  48. package/react/{C92qhyHF.js → DXMc4AHM.js} +1 -1
  49. package/react/{B0dDfEtH.js → DdTWd9NL.js} +1 -1
  50. package/react/De-cdzUn.js +1 -0
  51. package/react/{7c7bXPlP.js → DqWiakim.js} +1 -1
  52. package/react/{DYrfBufu.js → DwbNwe-K.js} +1 -1
  53. package/react/G275Ly1Q.js +1 -0
  54. package/react/{BUkcR85F.js → YYrpqjgS.js} +1 -1
  55. package/react/index.es.js +1 -1
  56. package/react/{DT_P8FaG.js → sVnMjM13.js} +1 -1
  57. package/react/styles.css +1 -1
  58. package/react/{BUZRB64M.js → zUd27y38.js} +1 -1
  59. package/umd/web.umd.js +103 -239
  60. package/element/ContentsPage-Dy9C3p31.js +0 -16
  61. package/element/Dialog-Dv2w7GiN.js +0 -1
  62. package/element/EventHeaderAdminButtons-BjztFxCi.js +0 -10
  63. package/element/index-BKOpkw1h.js +0 -107
  64. package/element/index-DzVrt1C0.js +0 -14
  65. package/react/BE5TseI4.js +0 -30
  66. package/react/Cg1c9zqH.js +0 -22
  67. package/react/Ck1QkDXW.js +0 -1
  68. package/react/Lyg2aTtz.js +0 -16
  69. package/react/gTevyE5I.js +0 -19
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [2.4.0](https://github.com/qrati-labs/qrati-connect-js/compare/v2.3.3...v2.4.0) (2025-11-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * update import paths and styles for QratiConnect component; upgrade dependencies and enhance CSS scoping ([27c850c](https://github.com/qrati-labs/qrati-connect-js/commit/27c850cd90f965d8efceef6708d7f1b42fb8ab65))
7
+
1
8
  ## [2.3.3](https://github.com/qrati-labs/qrati-connect-js/compare/v2.3.2...v2.3.3) (2025-11-04)
2
9
 
3
10
  ### Bug Fixes
@@ -1 +1 @@
1
- import{e as a,u as s,j as c,S as e,N as r,h as t,c as q,P as i,T as l,a8 as d,a9 as n}from"./index-BKOpkw1h.js";const o=()=>{const o=a(),{initializing:m,organization:x,user:h}=s();return m?c.jsxs("div",{className:"qc:mx-auto qc:max-w-lg qc:space-y-8 qc:py-8",children:[c.jsx(e,{className:"qc:h-8"}),c.jsx(e,{className:"qc:h-8"}),c.jsx(e,{className:"qc:h-8"}),c.jsx(e,{className:"qc:h-8"})]}):!x||x?.customAuth?null:h?c.jsx(r,{replace:!0,to:o?.state?.referrer||"/"}):c.jsxs("div",{className:"qc:bg-background qc:mx-auto qc:mt-24 qc:min-h-[80vh] qc:max-w-md",children:[c.jsxs("div",{className:"qc:my-8 qc:flex qc:w-full qc:justify-around",children:[c.jsx(t,{to:i.LOGIN,state:o?.state,className:q(o.pathname===i.LOGIN?"qc:border-primary":"qc:border-border","qc:flex-1 qc:border-2 qc:border-x-0 qc:border-t-0 qc:pb-2"),children:c.jsx(l,{variant:"h5",align:"center",children:"Login"})}),c.jsx(t,{to:i.REGISTER,state:o?.state,className:q(o.pathname===i.REGISTER?"qc:border-primary":"qc:border-border","qc:flex-1 qc:border-2 qc:border-x-0 qc:border-t-0 qc:pb-2"),children:c.jsx(l,{variant:"h5",align:"center",children:"Register"})})]}),c.jsx(d,{}),c.jsx("div",{className:"qc:mt-12",children:c.jsx(n,{})})]})};export{o as default};
1
+ import{e as a,u as s,j as c,S as e,N as r,h as t,c as q,P as i,T as l,a8 as d,a9 as n}from"./index-ar7jHNfV.js";const o=()=>{const o=a(),{initializing:m,organization:x,user:h}=s();return m?c.jsxs("div",{className:"qc:mx-auto qc:max-w-lg qc:space-y-8 qc:py-8",children:[c.jsx(e,{className:"qc:h-8"}),c.jsx(e,{className:"qc:h-8"}),c.jsx(e,{className:"qc:h-8"}),c.jsx(e,{className:"qc:h-8"})]}):!x||x?.customAuth?null:h?c.jsx(r,{replace:!0,to:o?.state?.referrer||"/"}):c.jsxs("div",{className:"qc:bg-background qc:mx-auto qc:mt-24 qc:min-h-[80vh] qc:max-w-md",children:[c.jsxs("div",{className:"qc:my-8 qc:flex qc:w-full qc:justify-around",children:[c.jsx(t,{to:i.LOGIN,state:o?.state,className:q(o.pathname===i.LOGIN?"qc:border-primary":"qc:border-border","qc:flex-1 qc:border-2 qc:border-x-0 qc:border-t-0 qc:pb-2"),children:c.jsx(l,{variant:"h5",align:"center",children:"Login"})}),c.jsx(t,{to:i.REGISTER,state:o?.state,className:q(o.pathname===i.REGISTER?"qc:border-primary":"qc:border-border","qc:flex-1 qc:border-2 qc:border-x-0 qc:border-t-0 qc:pb-2"),children:c.jsx(l,{variant:"h5",align:"center",children:"Register"})})]}),c.jsx(d,{}),c.jsx("div",{className:"qc:mt-12",children:c.jsx(n,{})})]})};export{o as default};
@@ -0,0 +1 @@
1
+ import{Q as e,m as t,n,o as i,p as r,a as s,u as o,k as a,l,q as c,s as d,t as u,v as h,D as p,w as m,x as f,C as g,y as w,j as v,c as b,z as y,B as x,G as q,H as T,J as S,f as E,K as k,L as _,I as j,d as C,M as O,T as P,E as A,h as N,P as I,O as L,R as M,U as z,V,W as F,X as R,e as D,Y as B,Z as H,S as U,i as W}from"./index-ar7jHNfV.js";import{F as $,g as Y}from"./FolderBreadcrumb-C8gAI_F2.js";import{I as G}from"./InputField-VxKss-ap.js";import{u as Z,o as K,s as X,f as Q,a as J,b as ee,h as te,l as ne,c as ie,E as re}from"./EventHeaderAdminButtons-YVIZ2jNS.js";import{j as se,L as oe,I as ae}from"./LazyLoadImage-CJQhdLtk.js";import{D as le,a as ce,b as de,c as ue,d as he,P as pe,u as me,e as fe,f as ge,g as we,h as ve,i as be,R as ye,j as xe,k as qe,F as Te,l as Se,m as Ee,n as ke}from"./Dialog-Bqed17jN.js";var _e=class extends e{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:t()})}getOptimisticResult(e){return e.behavior=t(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:r}=e,s=super.createResult(e,t),{isFetching:o,isRefetching:a,isError:l,isRefetchError:c}=s,d=r.fetchMeta?.fetchMore?.direction,u=l&&"forward"===d,h=o&&"forward"===d,p=l&&"backward"===d,m=o&&"backward"===d;return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,r.data),hasPreviousPage:n(t,r.data),isFetchNextPageError:u,isFetchingNextPage:h,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:c&&!u&&!p,isRefetching:a&&!h&&!m}}};const je=()=>{const e=s.useRef(),{props:{organizationId:t},sessionId:n,user:i}=o(),r=async(n,i)=>{if(n&&i&&(e.current||(e.current=await d()),e.current))try{await a.post(l.UPDATE_AD_ANALYTICS,{json:{adId:n,type:i,browserFingerprint:e.current},headers:{"x-org-id":t}})}catch(e){console.error(e)}},h=async e=>{if(n)try{await a.post(l.UPDATE_SESSION,{headers:{"x-org-id":t},json:{sessionId:n,pageViews:e}})}catch(e){console.error(e)}};return{incrementEventView:async n=>{if(n&&(e.current||(e.current=await d()),e.current))try{await a.post(l.INCREMENT_EVENT_VIEW,{json:{eventSlug:n,browserFingerprint:e.current},headers:{"x-org-id":t,Authorization:i?`Bearer ${i.token}`:void 0}})}catch(e){console.error(e)}},captureAdImpression:e=>r(e,u.AD_IMPRESSION),captureAdEngagement:e=>r(e,u.AD_ENGAGEMENT),captureAdClick:(e,t,n)=>{switch(r(e,u.AD_CLICK),t){case c.LINK:window.open(n,"_blank");break;case c.EMAIL:window.location.href=`mailto:${n}`;break;case c.PHONE:window.location.href=`tel:${n}`;break;case c.SMS:window.location.href=`sms:${n}`;break;case c.WHATSAPP:window.location.href=`https://wa.me/${n}`;break;case c.MESSENGER:window.location.href=`https://m.me/${n}`;break;default:window.open(n,"_blank")}},trackPageView:e=>{if(currentPageRef.current&&pageEntryTimeRef.current){const e={page:currentPageRef.current,entryTime:pageEntryTimeRef.current,exitTime:Date.now()};h([e])}currentPageRef.current=e,pageEntryTimeRef.current=Date.now()},exportPageViewsData:h}},Ce=({ref:e,onBottomReached:t,hasNextPage:n,fetchNextPage:i,isFetchingNextPage:r})=>{const o=s.useRef(1),a=s.useRef(null),l=s.useRef(null),c=s.useRef(null),[d,u]=s.useState(!1),[h,p]=s.useState(!1);s.useEffect(()=>(d&&(clearTimeout(l.current),l.current=setTimeout(()=>{a.current=requestAnimationFrame(m)},300)),()=>{cancelAnimationFrame(a.current)}),[d,n,r,i,t]);const m=()=>{e.current&&(e.current.scrollTop+=o.current,n&&!r&&i&&e.current.scrollTop+e.current.clientHeight>=.5*e.current.scrollHeight&&i(),e.current.scrollTop+e.current.clientHeight>=e.current.scrollHeight?(u(!1),cancelAnimationFrame(a.current),l.current=setTimeout(()=>{p(!0),t&&t(),l.current=setTimeout(()=>{e.current.scrollTop=0,p(!1),u(!0)},1e3)},1e3)):a.current=requestAnimationFrame(m))},f=e=>{"+"===e.key&&(o.current=Math.min(o.current+1,10)),"-"===e.key&&(o.current=Math.max(o.current-1,1))},g=()=>{document.fullscreenElement||(null!==c.current?c.current.release().then(()=>(c.current=null,!0)).catch(e=>console.error(`Failed to release wake lock: ${e.message}`)):console.error("No Wake Lock to release."),u(!1),p(!1),e.current.scrollTop=0,cancelAnimationFrame(a.current),clearTimeout(l.current),document.removeEventListener("keydown",f),document.removeEventListener("fullscreenchange",g))};return{start:()=>{e?.current?.requestFullscreen?e?.current?.requestFullscreen():e?.current?.webkitRequestFullscreen?e?.current?.webkitRequestFullscreen():e?.current?.mozRequestFullScreen?e?.current?.mozRequestFullScreen():e?.current?.msRequestFullscreen&&e?.current?.msRequestFullscreen(),(async()=>{try{"wakeLock"in navigator?(c.current=await navigator.wakeLock.request("screen"),document.addEventListener("visibilitychange",async()=>{null!==c.current&&"visible"===document.visibilityState&&(c.current=await navigator.wakeLock.request("screen"))})):console.error("Wake Lock API is not supported in this browser.")}catch(e){console.error(`Failed to acquire wake lock: ${e.message}`)}})(),u(!0),document.addEventListener("keydown",f),document.addEventListener("fullscreenchange",g)},initializing:h,running:d}},Oe=e=>e?.meta?.currentPage>1&&e.meta.currentPage-1,Pe=e=>e?.meta?.currentPage<e?.meta?.totalPages?e.meta.currentPage+1:void 0,Ae=({event:e,ads:t=[],sort:n=p,order:i=m,keywords:c,face:d,limit:u=20,includeSummary:v=!1})=>{const{props:{organizationId:b},loadingUser:y,user:x}=o(),{isLoading:q,data:T,hasNextPage:S,fetchNextPage:E,isFetchingNextPage:k}=function(e,t){return r(e,_e,t)}({queryKey:[h.CONTENTS_BY_EVENT(e?._id),n,i,c,d],queryFn:async({pageParam:t=1})=>{try{return await a.get(l.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:c,faceImageUrl:d,sort:`${f[i].sortOrder}${g[n].sortField}`,limit:u,includeSummary:v},headers:{"x-org-id":b,Authorization:x?`Bearer ${x.token}`:void 0}}).json()}catch(e){throw new Error(e?.message||"Failed to fetch public events")}},enabled:!y&&!!e,initialPageParam:1,getPreviousPageParam:Oe,getNextPageParam:Pe}),_=s.useMemo(()=>T?.pages?.flatMap(e=>e?.data),[T]),j=s.useMemo(()=>((e,t,n)=>{if(n<=0)return e;let i=0;const r=[];for(let s=0;s<e?.length;s++)r.push(e[s]),t.length>0&&n>0&&(s+1)%n===0&&(r.push({...t[i],type:w.AD,adType:t[i].type}),i=(i+1)%t.length);return r})(_,t,e?.adPosition),[_]);return{contents:_,contentsWithAds:j,loading:q,hasNextPage:S,fetchNextPage:E,isFetchingNextPage:k}},Ne=y("qc:border-primary qc:-ml-px qc:inline-flex qc:h-fit qc:flex-auto qc:items-center qc:justify-center qc:border qc:transition-colors qc:duration-500 qc:focus:outline-none",{variants:{size:{sm:"qc:gap-1.5 qc:p-1.5 qc:text-xs",md:"qc:gap-3 qc:px-3 qc:py-2 qc:text-sm",lg:"qc:gap-3 qc:px-4 qc:py-3 qc:text-base"}},defaultVariants:{size:"md"}}),Ie=({size:e,buttons:t=[],onChange:n,selected:i,className:r})=>{const{props:{textClassName:s}}=o();return v.jsx("div",{className:b("qc:shadow-outer qc:z-0 qc:flex qc:h-fit qc:rounded",r),children:t.map((r,o)=>{const a=0===o,l=o===t.length-1,c=r.value===i;return v.jsxs("button",{type:"button",onClick:()=>n&&n(r.value),className:b(Ne({size:e}),c?r.activeClassName?r.activeClassName:"qc:bg-primary qc:text-primary-foreground":"qc:bg-background qc:text-foreground",a&&"qc:rounded-l",l&&"qc:rounded-r",s),children:[!r.icon&&v.jsx("span",{className:"qc:font-medium",children:r.text}),r.icon&&v.jsx("div",{className:"qc:size-5",children:r.icon})]},r.value)})})},Le=({engagementStyle:e,sort:t=p,order:n=m,onSortChange:i,onSortOrderChange:r})=>{const o=s.useMemo(()=>{const t=Object.keys(g).map(e=>({text:g[e].label,value:e,activeClassName:"qc:bg-primary qc:text-primary-foreground"}));return e===x.CONTEST?t:t.filter(e=>e.value!==q.POPULAR)},[e]);return v.jsxs("div",{className:"qc:relative qc:flex qc:w-auto qc:items-center qc:gap-2",children:[v.jsx("button",{type:"button",className:"qc:bg-background qc:rounded qc:p-1",onClick:r,children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:b("qc:text-foreground qc:size-7 qc:-scale-x-100 qc:transition-transform",n===T.ASC&&"qc:-scale-y-100"),viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h4q.425 0 .713.288T9 17t-.288.713T8 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h10q.425 0 .713.288T15 12t-.288.713T14 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}),v.jsx(Ie,{className:"qc:flex-1 qc:lg:flex-none",selected:t,buttons:o,onChange:i})]})},Me={[S.GRID]:{icon:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 24 24",children:[v.jsx("rect",{width:"24",height:"24",fill:"none"}),v.jsx("path",{fill:"currentColor",d:"M5 11q-.825 0-1.412-.587T3 9V5q0-.825.588-1.412T5 3h4q.825 0 1.413.588T11 5v4q0 .825-.587 1.413T9 11zm0 10q-.825 0-1.412-.587T3 19v-4q0-.825.588-1.412T5 13h4q.825 0 1.413.588T11 15v4q0 .825-.587 1.413T9 21zm10-10q-.825 0-1.412-.587T13 9V5q0-.825.588-1.412T15 3h4q.825 0 1.413.588T21 5v4q0 .825-.587 1.413T19 11zm0 10q-.825 0-1.412-.587T13 19v-4q0-.825.588-1.412T15 13h4q.825 0 1.413.588T21 15v4q0 .825-.587 1.413T19 21z"})]})},[S.SINGLE]:{icon:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 20 20",children:[v.jsx("rect",{x:"0",y:"0",className:"size-5",fill:"none",stroke:"none"}),v.jsx("path",{fill:"currentColor",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v1A1.5 1.5 0 0 0 4.5 6h11A1.5 1.5 0 0 0 17 4.5v-1A1.5 1.5 0 0 0 15.5 2h-11Zm0 6A1.5 1.5 0 0 0 3 9.5v1A1.5 1.5 0 0 0 4.5 12h11a1.5 1.5 0 0 0 1.5-1.5v-1A1.5 1.5 0 0 0 15.5 8h-11Zm0 6A1.5 1.5 0 0 0 3 15.5v1A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5v-1a1.5 1.5 0 0 0-1.5-1.5h-11Z"})]})}},ze=Object.keys(Me).map(e=>({icon:Me[e].icon,value:e})),Ve=({engagementStyle:e,uploaders:t,facialSearchImage:n,onImageChange:i,disabled:r,userPlan:a,mode:l,onModeChange:c,sort:d,onSortChange:u,sortOrder:h,onSortOrderChange:p,handleChange:m,face:f,onFaceImageChange:g})=>{const{organization:w}=o(),[b,y]=s.useState("");return v.jsxs("div",{className:"qc:mb-3 qc:grid qc:grid-cols-3 qc:md:space-x-4 qc:md:space-y-0",children:[v.jsxs("div",{className:"qc:col-span-3 qc:flex qc:items-center qc:gap-4 qc:md:col-span-1",children:[w?.integrationSettings?.showGridViewToggle&&v.jsx(Ie,{buttons:ze,selected:l,onChange:c}),w?.integrationSettings?.showKeywordSearch&&v.jsx("div",{className:"qc:flex-auto",children:v.jsxs("div",{className:"qc:relative qc:lg:min-w-80",children:[v.jsx(G,{placeholder:"Search by keywords",value:b,className:"qc:py-2",onChange:e=>y(e.target.value),onKeyUp:e=>{"Enter"===e.key?m(b.length>0?b:""):"Escape"===e.key&&(y(""),m(""))}}),b?.length>0&&v.jsx("button",{className:"qc:absolute qc:inset-y-0 qc:right-10 qc:flex qc:items-center",onClick:()=>{y(""),m(""),g(null)},children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:size-5",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})}),v.jsx("button",{className:"qc:absolute qc:inset-y-0 qc:right-3 qc:flex qc:items-center",onClick:()=>m(b),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:size-5",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l5.6 5.6q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-5.6-5.6q-.75.6-1.725.95T9.5 16m0-2q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14"})})})]})})]}),v.jsx("div",{className:"qc:col-span-3 qc:md:col-span-1"}),v.jsx("div",{className:"qc:col-span-3 qc:mt-3 qc:md:col-span-1 qc:md:mt-0 qc:lg:justify-self-end",children:v.jsx(Le,{engagementStyle:e,sort:d,order:h,onSortChange:u,onSortOrderChange:p})})]})};var Fe,Re,De={},Be={exports:{}};function He(){return Fe||(Fe=1,e=Be.exports,t=function(){return t=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.apply(this,arguments)},n=function(){function e(e,n,i){var r=this;this.endVal=n,this.options=i,this.version="2.9.0",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(e){r.startTime||(r.startTime=e);var t=e-r.startTime;r.remaining=r.duration-t,r.useEasing?r.countDown?r.frameVal=r.startVal-r.easingFn(t,0,r.startVal-r.endVal,r.duration):r.frameVal=r.easingFn(t,r.startVal,r.endVal-r.startVal,r.duration):r.frameVal=r.startVal+(r.endVal-r.startVal)*(t/r.duration);var n=r.countDown?r.frameVal<r.endVal:r.frameVal>r.endVal;r.frameVal=n?r.endVal:r.frameVal,r.frameVal=Number(r.frameVal.toFixed(r.options.decimalPlaces)),r.printValue(r.frameVal),t<r.duration?r.rAF=requestAnimationFrame(r.count):null!==r.finalEndVal?r.update(r.finalEndVal):r.options.onCompleteCallback&&r.options.onCompleteCallback()},this.formatNumber=function(e){var t,n,i,s,o=e<0?"-":"";t=Math.abs(e).toFixed(r.options.decimalPlaces);var a=(t+="").split(".");if(n=a[0],i=a.length>1?r.options.decimal+a[1]:"",r.options.useGrouping){s="";for(var l=3,c=0,d=0,u=n.length;d<u;++d)r.options.useIndianSeparators&&4===d&&(l=2,c=1),0!==d&&c%l==0&&(s=r.options.separator+s),c++,s=n[u-d-1]+s;n=s}return r.options.numerals&&r.options.numerals.length&&(n=n.replace(/[0-9]/g,function(e){return r.options.numerals[+e]}),i=i.replace(/[0-9]/g,function(e){return r.options.numerals[+e]})),o+r.options.prefix+n+i+r.options.suffix},this.easeOutExpo=function(e,t,n,i){return n*(1-Math.pow(2,-10*e/i))*1024/1023+t},this.options=t(t({},this.defaults),i),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.el="string"==typeof e?document.getElementById(e):e,n=n??this.parse(this.el.innerHTML),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(n),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined",typeof window<"u"&&this.options.enableScrollSpy&&(this.error?console.error(this.error,e):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push(function(){return r.handleScroll(r)}),window.onscroll=function(){window.onScrollFns.forEach(function(e){return e()})},this.handleScroll(this)))}return e.prototype.handleScroll=function(e){if(e&&window&&!e.once){var t=window.innerHeight+window.scrollY,n=e.el.getBoundingClientRect(),i=n.top+window.pageYOffset,r=n.top+n.height+window.pageYOffset;r<t&&r>window.scrollY&&e.paused?(e.paused=!1,setTimeout(function(){return e.start()},e.options.scrollSpyDelay),e.options.scrollSpyOnce&&(e.once=!0)):(window.scrollY>r||i>t)&&!e.paused&&e.reset()}},e.prototype.determineDirectionAndSmartEasing=function(){var e=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>e;var t=e-this.startVal;if(Math.abs(t)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=e;var n=this.countDown?1:-1;this.endVal=e+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=e,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},e.prototype.start=function(e){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),e&&(this.options.onCompleteCallback=e),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},e.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},e.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},e.prototype.update=function(e){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(e),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},e.prototype.printValue=function(e){var t;if(this.el){var n=this.formattingFn(e);null!==(t=this.options.plugin)&&void 0!==t&&t.render?this.options.plugin.render(this.el,n):"INPUT"===this.el.tagName?this.el.value=n:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=n:this.el.innerHTML=n}},e.prototype.ensureNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.prototype.validateValue=function(e){var t=Number(e);return this.ensureNumber(t)?t:(this.error="[CountUp] invalid start or end value: ".concat(e),null)},e.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},e.prototype.parse=function(e){var t=function(e){return e.replace(/([.,'  ])/g,"\\$1")},n=t(this.options.separator),i=t(this.options.decimal),r=e.replace(new RegExp(n,"g"),"").replace(new RegExp(i,"g"),".");return parseFloat(r)},e}(),e.CountUp=n),Be.exports;var e,t,n}const Ue=_(function(){if(Re)return De;Re=1,Object.defineProperty(De,"__esModule",{value:!0});var e=k(),t=He();function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach(function(t){s(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function s(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,0!==t)for(;!(l=(i=s.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?e.useLayoutEffect:e.useEffect;function u(t){var n=e.useRef(t);return d(function(){n.current=t}),e.useCallback(function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.current.apply(void 0,t)},[])}var h=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],p={decimal:".",separator:",",delay:null,prefix:"",suffix:"",duration:2,start:0,decimals:0,startOnMount:!0,enableReinitialize:!0,useEasing:!0,useGrouping:!0,useIndianSeparators:!1},m=function(n){var r=Object.fromEntries(Object.entries(n).filter(function(e){return void 0!==l(e,2)[1]})),s=e.useMemo(function(){return i(i({},p),r)},[n]),o=s.ref,c=s.startOnMount,d=s.enableReinitialize,m=s.delay,f=s.onEnd,g=s.onStart,w=s.onPauseResume,v=s.onReset,b=s.onUpdate,y=a(s,h),x=e.useRef(),q=e.useRef(),T=e.useRef(!1),S=u(function(){return function(e,n){var i=n.decimal,r=n.decimals,s=n.duration,o=n.easingFn,a=n.end,l=n.formattingFn,c=n.numerals,d=n.prefix,u=n.separator,h=n.start,p=n.suffix,m=n.useEasing,f=n.useGrouping,g=n.useIndianSeparators,w=n.enableScrollSpy,v=n.scrollSpyDelay,b=n.scrollSpyOnce,y=n.plugin;return new t.CountUp(e,a,{startVal:h,duration:s,decimal:i,decimalPlaces:r,easingFn:o,formattingFn:l,numerals:c,separator:u,prefix:d,suffix:p,plugin:y,useEasing:m,useIndianSeparators:g,useGrouping:f,enableScrollSpy:w,scrollSpyDelay:v,scrollSpyOnce:b})}("string"==typeof o?o:o.current,y)}),E=u(function(e){var t=x.current;if(t&&!e)return t;var n=S();return x.current=n,n}),k=u(function(){var e=function(){return E(!0).start(function(){f?.({pauseResume:_,reset:j,start:O,update:C})})};m&&m>0?q.current=setTimeout(e,1e3*m):e(),g?.({pauseResume:_,reset:j,update:C})}),_=u(function(){E().pauseResume(),w?.({reset:j,start:O,update:C})}),j=u(function(){E().el&&(q.current&&clearTimeout(q.current),E().reset(),v?.({pauseResume:_,start:O,update:C}))}),C=u(function(e){E().update(e),b?.({pauseResume:_,reset:j,start:O})}),O=u(function(){j(),k()}),P=u(function(e){c&&(e&&j(),k())});return e.useEffect(function(){T.current?d&&P(!0):(T.current=!0,P())},[d,T,P,m,n.start,n.suffix,n.prefix,n.duration,n.separator,n.decimals,n.decimal,n.formattingFn]),e.useEffect(function(){return function(){j()}},[j]),{start:O,pauseResume:_,reset:j,update:C,getCountUp:E}},f=["className","redraw","containerProps","children","style"];return De.default=function(t){var n=t.className,r=t.redraw,s=t.containerProps,l=t.children,c=t.style,d=a(t,f),h=e.useRef(null),p=e.useRef(!1),g=m(i(i({},d),{},{ref:h,startOnMount:"function"!=typeof l||0===t.delay,enableReinitialize:!1})),w=g.start,v=g.reset,b=g.update,y=g.pauseResume,x=g.getCountUp,q=u(function(){w()}),T=u(function(e){t.preserveValue||v(),b(e)}),S=u(function(){"function"!=typeof t.children||h.current instanceof Element?x():console.error('Couldn\'t find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.')});e.useEffect(function(){S()},[S]),e.useEffect(function(){p.current&&T(t.end)},[t.end,T]);var E=r&&t;return e.useEffect(function(){r&&p.current&&q()},[q,r,E]),e.useEffect(function(){!r&&p.current&&q()},[q,r,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.className,t.formattingFn]),e.useEffect(function(){p.current=!0},[]),"function"==typeof l?l({countUpRef:h,start:w,reset:v,update:b,pauseResume:y,getCountUp:x}):e.createElement("span",o({className:n,ref:h,style:c},s),typeof t.start<"u"?x().formattingFn(t.start):"")},De.useCountUp=m,De}()),We=({engagementStyle:e,views:t,contentCount:n,curationCount:i})=>v.jsxs("div",{className:"qc:line-clamp-1 qc:flex qc:w-fit qc:items-center qc:justify-center qc:gap-8",children:[v.jsxs("div",{className:"qc:flex qc:items-center qc:gap-2",children:[v.jsx(j,{name:"material-symbols-light:visibility-outline-rounded"}),v.jsx(Ue,{start:0,end:t??0,duration:3,delay:0,children:({countUpRef:e})=>v.jsx("span",{ref:e})})]}),v.jsxs("div",{className:"qc:flex qc:items-center qc:gap-2",children:[v.jsx(j,{name:"material-symbols-light:gallery-thumbnail-outline-rounded"}),v.jsx(Ue,{start:0,end:n,duration:3,delay:0,children:({countUpRef:e})=>v.jsx("span",{ref:e})})]}),e===x.CONTEST&&v.jsxs("div",{className:"qc:flex qc:items-center qc:gap-1",children:[v.jsx(j,{name:"material-symbols-light:star-outline-rounded"}),v.jsx(Ue,{start:0,end:i,duration:3,delay:0,children:({countUpRef:e})=>v.jsx("span",{ref:e})})]})]}),$e=()=>{const{eventSlug:e}=C(),{event:t}=O({eventSlug:e}),{props:{curateLabel:n,leaderboardLabel:i},organization:r}=o(),{eventViews:s,contentCount:c,curationCount:d}=(({event:e})=>{const{props:{organizationId:t},organization:n}=o(),{isLoading:i,data:r}=E({queryKey:[`event-stats-${e?._id}`],queryFn:async()=>{try{return(await a.get(l.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":t}}).json()).data}catch(e){throw new Error(e?.message||"Failed to fetch public events")}},enabled:!!e&&n?.integrationSettings?.showEventStats});return{isLoading:i,eventViews:r?.eventViews||0,contentCount:r?.contentCount||0,curationCount:r?.curationCount||0}})({event:t});return v.jsxs("div",{className:"qc:w-full qc:space-y-4",children:[v.jsxs("div",{className:"qc:space-y-4 qc:md:-mt-8",children:[v.jsx(P,{variant:"h3",align:"center",immutable:!0,children:t?.name}),v.jsx(P,{variant:"h5",align:"center",color:"secondary",lines:2,immutable:!0,children:t?.description})]}),r?.integrationSettings?.showEventStats&&v.jsx("div",{className:"qc:flex qc:justify-center",children:v.jsx(We,{engagementStyle:t?.engagementStyle,views:s?.views,contentCount:c,curationCount:d})}),(t?.status===A.OPEN&&t?.uploadLimit>0||t?.status===A.OPEN&&t.engagementStyle!==x.REACTION||t?.engagementStyle===x.REACTION&&t?.showLeaderboard||t?.engagementStyle===x.CONTEST)&&v.jsxs("div",{className:"qc:flex qc:w-full qc:flex-wrap qc:justify-center qc:gap-3",children:[t?.status===A.OPEN&&t?.uploadLimit>0&&v.jsx(N,{to:I.UPLOAD(e),children:v.jsx(L,{iconSvg:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-6",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M6.616 19q-.691 0-1.153-.462T5 17.384v-1.923q0-.213.143-.356t.357-.144t.357.144t.143.356v1.923q0 .231.192.424t.423.192h10.77q.23 0 .423-.192t.192-.424v-1.923q0-.213.143-.356t.357-.144t.357.144t.143.356v1.923q0 .691-.462 1.153T17.384 19zM11.5 6.927L9.529 8.898q-.146.146-.347.153t-.366-.159q-.16-.165-.163-.353q-.003-.189.163-.354l2.618-2.62q.132-.13.268-.183q.137-.053.298-.053t.298.053t.268.184l2.618 2.619q.147.146.154.344q.006.198-.153.363q-.166.166-.357.169t-.357-.163L12.5 6.927v8.15q0 .214-.143.357t-.357.143t-.357-.143t-.143-.357z"})}),children:"Upload"})}),t?.status===A.OPEN&&t?.engagementStyle===x.CONTEST&&v.jsx(N,{to:I.CURATE(e),children:v.jsx(L,{iconSvg:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-6",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"m8.85 16.825l3.15-1.9l3.15 1.925l-.825-3.6l2.775-2.4l-3.65-.325l-1.45-3.4l-1.45 3.375l-3.65.325l2.775 2.425zm3.15-.723l-3.63 2.192q-.16.079-.297.064q-.136-.016-.265-.094q-.13-.08-.196-.226t-.012-.319l.966-4.11l-3.195-2.77q-.135-.11-.178-.263t.019-.293t.165-.23q.104-.087.28-.118l4.216-.368l1.644-3.892q.068-.165.196-.238T12 5.364t.288.073t.195.238l1.644 3.892l4.215.368q.177.03.281.119q.104.088.166.229q.061.14.018.293t-.178.263l-3.195 2.77l.966 4.11q.056.171-.011.318t-.197.226q-.128.08-.265.095q-.136.015-.296-.064zm0-3.852"})}),children:n||"Curate"})}),t?.showLeaderboard&&v.jsx(N,{to:I.LEADERBOARD(e),children:v.jsx(L,{iconSvg:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-6",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M4 19h4.673v-8H4zm5.673 0h4.654V5H9.673zm5.654 0H20v-6h-4.673zM3 18.384v-6.768q0-.667.475-1.141T4.615 10h4.058V5.616q0-.667.475-1.141T10.288 4h3.424q.666 0 1.14.475t.475 1.14V12h4.058q.666 0 1.14.475t.475 1.14v4.77q0 .666-.475 1.14t-1.14.475H4.615q-.666 0-1.14-.475T3 18.386"})}),children:i||"Leaders"})})]})]})};function Ye(e,[t,n]){const[i,r]=e;return void 0!==i&&void 0!==r&&void 0!==t&&void 0!==n&&t>i&&t-i<=20&&n<r?[i,n]:i!==t||r!==n?[t,n]:e}function Ge(e,t){let n=e?.clientWidth;if(void 0!==n&&t&&t.length>0){const e=[...t.filter(e=>e>0)].sort((e,t)=>t-e);e.push(Math.floor(e[e.length-1]/2)),n=e.find((t,i)=>t<=n||i===e.length-1)}return n}function Ze(e,t,n){const[[i],r]=s.useReducer(Ye,[n]),o=function(e){const[t,n]=s.useState(e);return e===t||e&&t&&e.length===t.length&&!e.some((e,n)=>e!==t[n])?t:(n(e),e)}(t),a=s.useRef(void 0);return{containerRef:s.useCallback(t=>{a.current?.disconnect(),a.current=void 0;const n=()=>r([Ge(t,o),window.innerWidth-document.documentElement.clientWidth]);n(),t&&typeof ResizeObserver<"u"&&(a.current=new ResizeObserver(n),a.current.observe(t)),"function"==typeof e?e(t):e&&(e.current=t)},[e,o]),containerWidth:i}}function Ke(e){return["react-photo-album",e].filter(Boolean).join("--")}function Xe(e){return`--${Ke(e)}`}function Qe({width:e,height:t}){return e/t}const Je=Object.freeze([1200,600,300,0]);function et(e,t){return"function"==typeof e?e(t):e}function tt(e,t){return void 0!==t?et(e,t):void 0}function nt(e,t,n,i=0){if(void 0===t)return;const r=tt(e,t);return Math.round(Math.max(void 0===r?function(e,t){const n=Je.findIndex(e=>e<=t);return et(e[Math.max(n,0)],t)}(n,t):r,i))}function it(e,{spacing:t,padding:n,componentsProps:i,render:r}){return{spacing:nt(t,e,[20,15,10,5]),padding:nt(n,e,[0,0,0,0]),componentsProps:et(i,e)||{},render:et(r,e)}}function rt(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}function st(e,t,n,i,r,s,o){let a,l;const c=e=>{const t=s*(r-1)+2*o*r;return`calc((${e.match(/^\s*calc\((.*)\)\s*$/)?.[1]??e} - ${t}px) / ${rt((i-t)/n,5)})`},d=e.srcSet;return d&&d.length>0&&(a=d.concat(d.some(({width:t})=>t===e.width)?[]:[{src:e.src,width:e.width,height:e.height}]).sort((e,t)=>e.width-t.width).map(e=>`${e.src} ${e.width}w`).join(", ")),l=t?.size?(t.sizes||[]).map(({viewport:e,size:t})=>`${e} ${c(t)}`).concat(c(t.size)).join(", "):`${Math.ceil(n/i*100)}vw`,{srcSet:a,sizes:l}}const ot=s.forwardRef(function({as:e,render:t,context:n,classes:i=[],variables:r={},style:s,className:o,children:a,...l},c){const d=function(...e){return[...e].filter(Boolean).join(" ")}(...(Array.isArray(i)?i:[i]).filter(e=>"string"==typeof e).map(Ke),o),u={style:{...Object.fromEntries(Object.entries(r).map(([e,t])=>[Xe(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),"number"==typeof t?rt(t,5):t])),...s},className:d,children:a,...l};if(t){const e=t({ref:c,...u},n);if(e)return e}const h=e||"div";return v.jsx(h,{ref:c,...u})});const at=s.forwardRef(function({photo:e,index:t,width:n,height:i,onClick:r,render:{wrapper:s,link:o,button:a,image:l,extras:c}={},componentsProps:{link:d,button:u,wrapper:h,image:p}={}},m){const{href:f}=e,g={photo:e,index:t,width:rt(n,3),height:rt(i,3)};let w;return w=f?{...d,as:"a",render:o,classes:["photo","link"],href:f,onClick:r}:r?{...u,as:"button",type:"button",render:a,classes:["photo","button"],onClick:r}:{...h,render:s,classes:"photo"},v.jsxs(ot,{ref:m,variables:{photoWidth:g.width,photoHeight:g.height},context:g,...w,children:[v.jsx(ot,{as:"img",classes:"image",render:l,context:g,...p}),c?.({},g)]})});const lt=s.forwardRef(function({layout:e,sizes:t,model:n,skeleton:i,onClick:r,render:{container:o,track:a,photo:l,...c}={},componentsProps:{container:d,track:u,link:h,button:p,wrapper:m,image:f}={}},g){const{spacing:w,padding:b,containerWidth:y,tracks:x,variables:q,horizontal:T}=n||{};return v.jsxs(ot,{role:"group","aria-label":"Photo album",...d,variables:{spacing:w,padding:b,containerWidth:y,...q},classes:["",e],render:o,ref:g,children:[void 0!==w&&void 0!==b&&void 0!==y&&x?.map(({photos:e,variables:n},i)=>{const o=e.length,d=T?o:x.length;return s.createElement(ot,{...u,key:i,render:a,classes:"track",variables:{trackSize:o,...n}},e.map(e=>{const{photo:n,index:i,width:s}=e,{key:o,src:a,alt:u,title:g,label:x}=n,q=r?e=>{r({event:e,photo:n,index:i})}:void 0;if(l){const t=l({onClick:q},e);if(t)return t}const T=e=>x?{"aria-label":x,...e}:e;return v.jsx(at,{onClick:q,render:c,componentsProps:{image:{loading:"lazy",decoding:"async",src:a,alt:u,title:g,...st(n,t,s,y,d,w,b),...et(f,e)},link:T(et(h,e)),button:T(et(p,e)),wrapper:et(m,e)},...e},o??a)}))}),void 0===y&&i]})});function ct(e){let t=0;const n=[],i=(t,i)=>e(n[t],n[i])<0,r=(e,t)=>{const i=n[e];n[e]=n[t],n[t]=i};return{push:e=>{t+=1,n[t]=e,(e=>{let t=e,n=Math.floor(t/2);for(;t>1&&i(n,t);)r(n,t),t=n,n=Math.floor(t/2)})(t)},pop:()=>{if(0===t)return;r(1,t),t-=1;const e=n.pop();return(e=>{let n=e,s=2*n;for(;s<=t&&(s<t&&i(s,s+1)&&(s+=1),i(n,s));)r(n,s),n=s,s=2*n})(1),e},size:()=>t}}function dt(e,t,n){return function(e,t){if(!e)return;const n=[];for(let i=t;void 0!==i;i=e.get(i))n.push(i);return n.reverse()}(function(e,t,n){const i=new Map,r=new Set,s=new Map;s.set(t,0);const o=ct(function(e){return(t,n)=>e(n)-e(t)}(e=>e[1]));for(o.push([t,0]);o.size()>0;){const[t,n]=o.pop();if(!r.has(t)){const a=e(t);r.add(t),a.forEach((e,r)=>{const a=n+e,l=i.get(r),c=s.get(r);(void 0===c||c>a&&(c/a>1.005||void 0!==l&&l<t))&&(s.set(r,a),o.push([r,a]),i.set(r,t))})}}return s.has(n)?i:void 0}(e,t,n),n)}function ut(e,t,n,i){return(t-(e.length-1)*n-2*i*e.length)/e.reduce((e,t)=>e+Qe(t),0)}function ht(e,t,n,i,r,s,o){const a=e.slice(t,n),l=ut(a,i,r,s);return l>0?(l-o)**2*a.length:void 0}function pt(e,t,n,i,r,s,o){const a=function(e,t,n,i){return rt(t/n/Math.min(...e.map(e=>Qe(e))))+(i||0)+2}(e,i,r,s),l=function(e,t,n,i,r,s,o,a){return l=>{const c=new Map;c.set(l,0);const d=o||1,u=Math.min(s,a||1/0);for(let s=l+d;s<e.length+1&&!(s-l>u);s+=1){const o=ht(e,l,s,i,t,n,r);if(void 0===o)break;c.set(s,o)}return c}}(e,t,n,i,r,a,s,o),c=dt(l,0,e.length);if(!c)return;const d=[];for(let r=1;r<c.length;r+=1){const s=e.map((e,t)=>({photo:e,index:t})).slice(c[r-1],c[r]),o=ut(s.map(({photo:e})=>e),i,t,n);d.push({photos:s.map(({photo:e,index:t})=>({photo:e,index:t,width:o*Qe(e),height:o}))})}return{spacing:t,padding:n,containerWidth:i,tracks:d,horizontal:!0}}const mt=s.forwardRef(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:o,containerWidth:a}=Ze(r,t,n),{spacing:l,padding:c,targetRowHeight:d,minPhotos:u,maxPhotos:h,...p}=function(e,{photos:t,targetRowHeight:n,rowConstraints:i,...r}){const{spacing:s,padding:o,componentsProps:a,render:l}=it(e,r),{singleRowMaxHeight:c,minPhotos:d,maxPhotos:u}=tt(i,e)||{};if(void 0!==c&&void 0!==s&&void 0!==o){const e=Math.floor(t.reduce((e,{width:t,height:n})=>e+t/n*c-2*o,o*t.length*2+s*(t.length-1)));e>0&&(a.container={...a.container},a.container.style={maxWidth:e,...a.container.style})}return{...r,targetRowHeight:nt(n,e,[e=>e/5,e=>e/4,e=>e/3,e=>e/2]),render:l,spacing:s,padding:o,minPhotos:d,maxPhotos:u,componentsProps:a}}(a,{photos:e,...i}),m=s.useMemo(()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?pt(e,l,c,a,d,u,h):void 0,[e,l,c,a,d,u,h]);return v.jsx(lt,{layout:"rows",ref:o,model:m,...p})});function ft(e,t,n,i){return function(e,t,n){const i=[n];for(let r=n,s=t;s>0;s-=1)[r]=e.get(r)[s],i.push(r);return i.reverse()}(function(e,t,n,i){const r=new Map,s=new Set;s.add(n);for(let n=0;n<t;n+=1){const o=[...s.keys()];s.clear(),o.forEach(o=>{const a=n>0?r.get(o)[n][1]:0;e(o).forEach(([e,l])=>{let c=r.get(e);c||(c=[],r.set(e,c));const d=a+l,u=c[n+1];(!u||u[1]>d&&(u[1]/d>1.0001||o<u[0]))&&(c[n+1]=[o,d]),n<t-1&&e!==i&&s.add(e)})})}return r}(e,t,n,i),t,i)}function gt(e,t,n,i,r,s,o){const a=[],l=o.reduce((e,t)=>e+t,0);for(let c=0;c<e.length-1;c+=1){const d=t.map((e,t)=>({photo:e,index:t})).slice(e[c],e[c+1]),u=o.reduce((e,t,n)=>e+(s[c]-s[n])*t,0),h=(r-(e.length-2)*n-2*(e.length-1)*i-u)*o[c]/l;a.push({photos:d.map(({photo:e,index:t})=>({photo:e,index:t,width:h,height:h/Qe(e)})),variables:{adjustedGaps:u,columnRatio:o[c]}})}return{tracks:a,variables:{totalRatio:l}}}function wt(e,t,n,i,r,s){const o=[],a=[];if(e.length<=s){const r=e.length>0?e.reduce((e,t)=>e+Qe(t),0)/e.length:1;for(let t=0;t<s;t+=1)o[t]=2*n,a[t]=t<e.length?Qe(e[t]):r;return gt(Array.from({length:s+1},(t,n)=>Math.min(n,e.length)),e,t,n,i,o,a)}const l=(e.reduce((e,t)=>e+r/Qe(t),0)+t*(e.length-s)+2*n*e.length)/s,c=function(e,t,n,i,r){return s=>{const o=[],a=1.5*r;let l=i/Qe(e[s])+2*n;for(let c=s+1;c<e.length+1&&(o.push([c,(r-l)**2]),!(l>a||c===e.length));c+=1)l+=i/Qe(e[c])+t+2*n;return o}}(e,t,n,r,l),d=ft(c,s,0,e.length);for(let i=0;i<d.length-1;i+=1){const r=e.slice(d[i],d[i+1]);o[i]=t*(r.length-1)+2*n*r.length,a[i]=1/r.reduce((e,t)=>e+1/Qe(t),0)}return gt(d,e,t,n,i,o,a)}function vt(e,t,n,i,r){const s=(i-t*(r-1)-2*n*r)/r,{tracks:o,variables:a}=wt(e,t,n,i,s,r);return o.some(e=>e.photos.some(({width:e,height:t})=>e<0||t<0))?r>1?vt(e,t,n,i,r-1):void 0:{tracks:o,spacing:t,padding:n,containerWidth:i,variables:{columns:r,...a}}}const bt=s.forwardRef(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:o,containerWidth:a}=Ze(r,t,n),{spacing:l,padding:c,columns:d,...u}=function(e,{columns:t,...n}){return{...n,...it(e,n),columns:nt(t,e,[5,4,3,2],1)}}(a,{photos:e,...i}),h=s.useMemo(()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?vt(e,l,c,a,d):void 0,[e,l,c,a,d]);return v.jsx(lt,{layout:"columns",ref:o,model:h,...u})});function yt(e,t,n,i,r){const s=(i-t*(r-1)-2*n*r)/r;if(s<=0)return r>1?yt(e,t,n,i,r-1):void 0;const o=[];for(let e=0;e<r;e+=1)o[e]=0;const a=e.reduce((e,i,r)=>{const a=o.reduce((e,t,n)=>t<o[e]-1?n:e,0);return o[a]=o[a]+s/Qe(i)+t+2*n,e[a].push({photo:i,index:r}),e},Array.from({length:r},()=>[]));return{spacing:t,padding:n,containerWidth:i,variables:{columns:r},tracks:a.map(e=>({photos:e.map(({photo:e,index:t})=>({photo:e,index:t,width:s,height:s/Qe(e)}))}))}}const xt=s.forwardRef(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:o,containerWidth:a}=Ze(r,t,n),{spacing:l,padding:c,columns:d,...u}=function(e,{columns:t,...n}){return{...n,...it(e,n),columns:nt(t,e,[5,4,3,2],1)}}(a,{photos:e,...i}),h=s.useMemo(()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?yt(e,l,c,a,d):void 0,[e,l,c,a,d]);return v.jsx(lt,{layout:"masonry",ref:o,model:h,...u})});function qt(e,t,n){const i=document.createElement(t);return e&&(i.className=e),n&&n.appendChild(i),i}function Tt(e,t){return e.x=t.x,e.y=t.y,void 0!==t.id&&(e.id=t.id),e}function St(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function Et(e,t){const n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.sqrt(n*n+i*i)}function kt(e,t){return e.x===t.x&&e.y===t.y}function _t(e,t,n){return Math.min(Math.max(e,t),n)}function jt(e,t,n){let i=`translate3d(${e}px,${t||0}px,0)`;return void 0!==n&&(i+=` scale3d(${n},${n},1)`),i}function Ct(e,t,n,i){e.style.transform=jt(t,n,i)}function Ot(e,t,n,i){e.style.transition=t?`${t} ${n}ms ${i||"cubic-bezier(.4,0,.22,1)"}`:"none"}function Pt(e,t,n){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof n?`${n}px`:n}function At(e){Ot(e)}function Nt(e){return"decode"in e?e.decode().catch(()=>{}):e.complete?Promise.resolve(e):new Promise((t,n)=>{e.onload=()=>t(e),e.onerror=n})}const It="idle",Lt="loading",Mt="loaded",zt="error";function Vt(e){return"button"in e&&1===e.button||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function Ft(e,t,n=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{const r="string"==typeof e?e:t;r&&(i=Array.from(n.querySelectorAll(r)))}return i}function Rt(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Dt{constructor(e,t){if(this.element=qt("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Pt(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=jt(0,0,e/250)):Pt(this.element,e,t))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}}let Bt=class{constructor(e,t,n){this.instance=t,this.data=e,this.index=n,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=It,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Dt(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=qt("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=qt("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const t=this.element;this.updateSrcsetSizes(),this.data.srcset&&(t.srcset=this.data.srcset),t.src=this.data.src??"",t.alt=this.data.alt??"",this.state=Lt,t.complete?this.onLoaded():(t.onload=()=>{this.onLoaded()},t.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=Mt,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===Mt||this.state===zt)&&this.removePlaceholder())}onError(){this.state=zt,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Lt,this)}isError(){return this.state===zt}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Pt(this.element,e,t),this.isImageContent()&&!this.isError()))){const n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==zt,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let e=qt("pswp__error-msg","div");e.innerText=this.instance.options?.errorMsg??"",e=this.instance.applyFilters("contentErrorElement",e,this),this.element=qt("pswp__content pswp__error-msg-container","div"),this.element.appendChild(e),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===zt)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||Rt())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Rt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===Mt||this.state===zt)&&this.removePlaceholder()))}};function Ht(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Ut(e,t,n,i,r){let s=0;if(t.paddingFn)s=t.paddingFn(n,i,r)[e];else if(t.padding)s=t.padding[e];else{const n="padding"+e[0].toUpperCase()+e.slice(1);t[n]&&(s=t[n])}return Number(s)||0}function Wt(e,t,n,i){return{x:t.x-Ut("left",e,t,n,i)-Ut("right",e,t,n,i),y:t.y-Ut("top",e,t,n,i)-Ut("bottom",e,t,n,i)}}class $t{constructor(e,t,n,i){this.pswp=i,this.options=e,this.itemData=t,this.index=n,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,n){const i={x:e,y:t};this.elementSize=i,this.panAreaSize=n;const r=n.x/i.x,s=n.y/i.y;this.fit=Math.min(1,r<s?r:s),this.fill=Math.min(1,r>s?r:s),this.vFill=Math.min(1,s),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",n=this.options[t];if(n)return"function"==typeof n?n(this):"fill"===n?this.fill:"fit"===n?this.fit:Number(n)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function Yt(e,t,n){const i=t.createContentFromData(e,n);let r;const{options:s}=t;if(s){let o;r=new $t(s,e,-1),o=t.pswp?t.pswp.viewportSize:Ht(s,t);const a=Wt(s,o,e,n);r.update(i.width,i.height,a)}return i.lazyLoad(),r&&i.setDisplayedSize(Math.ceil(i.width*r.initial),Math.ceil(i.height*r.initial)),i}function Gt(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return Yt(n,t,e)}class Zt{constructor(e){this.pswp=e,this.limit=Math.max(e.options.preload[0]+e.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(e){const{pswp:t}=this;if(t.dispatch("lazyLoad").defaultPrevented)return;const{preload:n}=t.options,i=void 0===e||e>=0;let r;for(r=0;r<=n[1];r++)this.loadSlideByIndex(t.currIndex+(i?r:-r));for(r=1;r<=n[0];r++)this.loadSlideByIndex(t.currIndex+(i?-r:r))}loadSlideByIndex(e){const t=this.pswp.getLoopedIndex(e);let n=this.getContentByIndex(t);n||(n=Gt(t,this.pswp),n&&this.addToCache(n))}getContentBySlide(e){let t=this.getContentByIndex(e.index);return t||(t=this.pswp.createContentFromData(e.data,e.index),this.addToCache(t)),t.setSlide(e),t}addToCache(e){if(this.removeByIndex(e.index),this._cachedItems.push(e),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(e=>!e.isAttached&&!e.hasSlide);-1!==e&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(e){const t=this._cachedItems.findIndex(t=>t.index===e);-1!==t&&this._cachedItems.splice(t,1)}getContentByIndex(e){return this._cachedItems.find(t=>t.index===e)}destroy(){this._cachedItems.forEach(e=>e.destroy()),this._cachedItems=[]}}class Kt{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class Xt{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,n=100){this._filters[e]||(this._filters[e]=[]),this._filters[e]?.push({fn:t,priority:n}),this._filters[e]?.sort((e,t)=>e.priority-t.priority),this.pswp?.addFilter(e,t,n)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){return this._filters[e]?.forEach(e=>{t[0]=e.fn.apply(this,t)}),t[0]}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e]?.push(t),this.pswp?.on(e,t)}off(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),this.pswp?.off(e,t)}dispatch(e,t){if(this.pswp)return this.pswp.dispatch(e,t);const n=new Kt(e,t);return this._listeners[e]?.forEach(e=>{e.call(this,n)}),n}}class Qt extends Xt{getNumItems(){let e=0;const t=this.options?.dataSource;t&&"length"in t?e=t.length:t&&"gallery"in t&&(t.items||(t.items=this._getGalleryDOMElements(t.gallery)),t.items&&(e=t.items.length));const n=this.dispatch("numItems",{dataSource:t,numItems:e});return this.applyFilters("numItems",n.numItems,t)}createContentFromData(e,t){return new Bt(e,this,t)}getItemData(e){const t=this.options?.dataSource;let n={};Array.isArray(t)?n=t[e]:t&&"gallery"in t&&(t.items||(t.items=this._getGalleryDOMElements(t.gallery)),n=t.items[e]);let i=n;i instanceof Element&&(i=this._domElementToItemData(i));const r=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",r.itemData,e)}_getGalleryDOMElements(e){return this.options?.children||this.options?.childSelector?Ft(this.options.children,this.options.childSelector,e)||[]:[e]}_toLowerCaseFirstLetter(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}_domElementToItemData(e){const t={element:e},n="A"===e.tagName?e:e.querySelector("a");if(n){t.src=n.dataset.pswpSrc||n.href,n.dataset.pswpSrcset&&(t.srcset=n.dataset.pswpSrcset),t.width=n.dataset.pswpWidth?parseInt(n.dataset.pswpWidth,10):0,t.height=n.dataset.pswpHeight?parseInt(n.dataset.pswpHeight,10):0,n.dataset.pswpType&&(t.type=n.dataset.pswpType.toLowerCase());const i=e.querySelector("img");i&&(t.msrc=i.currentSrc||i.src,t.alt=i.getAttribute("alt")??""),(n.dataset.pswpCropped||n.dataset.cropped)&&(t.thumbCropped=!0);const r=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(n.dataset).filter(e=>e.startsWith("pswp")&&!r.includes(this._toLowerCaseFirstLetter(e.slice(4)))).forEach(e=>{t[this._toLowerCaseFirstLetter(e.slice(4))]=n.dataset[e]})}return this.applyFilters("domItemData",t,e,n)}lazyLoadData(e,t){return Yt(e,this,t)}}class Jt extends Qt{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ft(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if(Vt(e)||window.pswp)return;let t={x:e.clientX,y:e.clientY};!t.x&&!t.y&&(t=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);const i={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,i,t))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,n=Ft(this.options.children,this.options.childSelector,e.currentTarget).findIndex(e=>e===t||e.contains(t));return-1!==n?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,n){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Ft(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=n,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:n}=this;t&&(n.dataSource=t);const i=[],r=typeof n.pswpModule;if("function"==typeof(s=n.pswpModule)&&s.prototype&&s.prototype.goTo)i.push(Promise.resolve(n.pswpModule));else{if("string"===r)throw new Error("pswpModule as string is no longer supported");if("function"!==r)throw new Error("pswpModule is not valid");i.push(n.pswpModule())}var s;"function"==typeof n.openPromise&&i.push(n.openPromise()),!1!==n.preloadFirstSlide&&e>=0&&(this._preloadedContent=Gt(e,this));const o=++this._uid;Promise.all(i).then(e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,o)}})}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const n="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=n,window.pswp=n,Object.keys(this._listeners).forEach(e=>{this._listeners[e]?.forEach(t=>{n.on(e,t)})}),Object.keys(this._filters).forEach(e=>{this._filters[e]?.forEach(t=>{n.addFilter(e,t.fn,t.priority)})}),this._preloadedContent&&(n.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),n.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),n.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},Ft(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}class en{constructor(e,t={}){this.lightbox=e,this.aiSummaryVisible=!1,this.currentSummary=null,this.options={aiSummaryButtonOrder:7,width:"400px",height:"300px",transition:"0.3s ease",...t},document.head.insertAdjacentHTML("beforeend",`<style>\n .pswp__ai-summary-panel {\n background: rgba(30, 30, 30, 0.9);\n color: white;\n position: absolute;\n overflow-y: auto;\n z-index: 1;\n transition: transform ${this.options.transition};\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);\n padding: 20px;\n }\n\n /* Desktop styles */\n @media (min-width: 768px) {\n .pswp__ai-summary-panel {\n top: 0;\n right: 0;\n height: 100%;\n width: ${this.options.width};\n transform: translateX(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateX(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateX(-${this.options.width});\n transition: transform ${this.options.transition};\n }\n }\n\n /* Mobile styles */\n @media (max-width: 767px) {\n .pswp__ai-summary-panel {\n bottom: 0;\n left: 0;\n width: 100%;\n height: ${this.options.height};\n transform: translateY(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateY(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateY(-${this.options.height});\n transition: transform ${this.options.transition};\n }\n }\n\n .pswp__ai-summary-close {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 32px;\n height: 32px;\n opacity: 0.6;\n cursor: pointer;\n z-index: 2;\n background: rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.3s;\n }\n\n .pswp__ai-summary-close:hover {\n opacity: 1;\n }\n\n .pswp__ai-summary-close:before,\n .pswp__ai-summary-close:after {\n position: absolute;\n content: '';\n width: 16px;\n height: 2px;\n background-color: white;\n }\n\n .pswp__ai-summary-close:before {\n transform: rotate(45deg);\n }\n\n .pswp__ai-summary-close:after {\n transform: rotate(-45deg);\n }\n\n .pswp__ai-summary-content {\n margin-top: 20px;\n }\n\n .pswp__ai-summary-title {\n margin-bottom: 16px;\n font-size: 18px;\n font-weight: bold;\n padding-right: 30px; /* Add space for the close button */\n }\n\n .pswp__ai-summary-section {\n margin-bottom: 16px;\n }\n\n .pswp__ai-summary-section-title {\n font-weight: bold;\n margin-bottom: 8px;\n }\n\n .pswp__ai-summary-label {\n display: inline-flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 4px 12px;\n margin-right: 8px;\n margin-bottom: 8px;\n font-size: 14px;\n }\n\n .pswp__ai-summary-description {\n font-size: 14px;\n line-height: 1.5;\n }\n\n .pswp__ai-summary-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n color: rgba(255, 255, 255, 0.6);\n font-style: italic;\n }\n\n .pswp__ai-summary-bing-search {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n z-index: 2;\n }\n\n .pswp__ai-summary-bing-button {\n height: 32px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: background-color 0.3s;\n }\n\n .pswp__ai-summary-bing-button:hover {\n background: rgba(255, 255, 255, 0.4);\n }\n\n .pswp__ai-summary-bing-icon {\n width: 20px;\n height: 20px;\n }\n\n .pswp__ai-summary-disclaimer {\n font-size: 12px;\n color: rgba(255, 255, 255, 0.7);\n text-align: center;\n margin-top: 32px;\n padding: 0 10px;\n line-height: 1.4;\n font-style: italic;\n }\n </style>`),e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"ai-summary-toggle-button",title:"Toggle AI summary view",order:this.options.aiSummaryButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24">\n <use class="pswp__icn-shadow" xlink:href="#pswp__icn-ai-summary"/>\n <path d="M12 17q.425 0 .713-.288T13 16v-4q0-.425-.288-.712T12 11t-.712.288T11 12v4q0 .425.288.713T12 17m0-8q.425 0 .713-.288T13 8t-.288-.712T12 7t-.712.288T11 8t.288.713T12 9m0 13q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8"/>\n </svg>',onClick:()=>{this.toggleAISummary(e)}}),e.ui.registerElement({name:"ai-summary-panel",isButton:!1,appendTo:"root",html:'<div class="pswp__ai-summary-panel"><div class="pswp__ai-summary-close"></div></div>'})}),e.on("change",()=>{this.aiSummaryVisible&&this.updateAISummary(e)}),e.on("close",()=>{this.hideAISummary(e)}),e.on("firstUpdate",()=>{const t=e.element.querySelector(".pswp__ai-summary-close");t&&t.addEventListener("click",()=>{this.hideAISummary(e)})})}toggleAISummary(e){this.aiSummaryVisible?this.hideAISummary(e):this.showAISummary(e)}showAISummary(e){const t=e.container,n=e.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!0,n.classList.add("visible"),t.classList.add("shifted-for-ai-summary"),this.updateAISummary(e))}hideAISummary(e){const t=e.container,n=e.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!1,n.classList.remove("visible"),t.classList.remove("shifted-for-ai-summary"))}updateAISummary(e){if(!e.currSlide)return;const t=e.element.querySelector(".pswp__ai-summary-panel");if(!t)return;const n=e.currSlide.data,i=n.src||n.url||"";let r=null;try{n.contentSummary&&(r=JSON.parse(n.contentSummary),this.currentSummary=r)}catch(e){console.error("Error parsing AI summary data:",e)}const s=i?`<a class="pswp__ai-summary-bing-search" href="https://www.bing.com/images/search?view=detailv2&iss=SBI&form=SBIIRP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(i)}&idpbck=1&selectedindex=0&id=${encodeURIComponent(i)}&mediaurl=${encodeURIComponent(i)}" target="_blank" rel="noopener noreferrer" class="pswp__ai-summary-bing-button">\n <svg xmlns="http://www.w3.org/2000/svg" style="height:24px;width:24px" width="256" height="388" viewBox="0 0 256 388"><defs><radialGradient id="logosBing0" cx="93.717%" cy="77.818%" r="143.121%" fx="93.717%" fy="77.818%" gradientTransform="scale(-1 -.71954)rotate(49.091 2.036 -2.204)"><stop offset="0%" stop-color="#00cacc"/><stop offset="100%" stop-color="#048fce"/></radialGradient><radialGradient id="logosBing1" cx="13.893%" cy="71.448%" r="150.086%" fx="13.893%" fy="71.448%" gradientTransform="matrix(.55155 -.39387 .23634 .91917 -.107 .112)"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></radialGradient><linearGradient id="logosBing2" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></linearGradient></defs><path fill="url(#logosBing0)" d="M129.424 122.047c-7.133.829-12.573 6.622-13.079 13.928c-.218 3.147-.15 3.36 6.986 21.722c16.233 41.774 20.166 51.828 20.827 53.243c1.603 3.427 3.856 6.65 6.672 9.544c2.16 2.22 3.585 3.414 5.994 5.024c4.236 2.829 6.337 3.61 22.818 8.49c16.053 4.754 24.824 7.913 32.381 11.664c9.791 4.86 16.623 10.387 20.944 16.946c3.1 4.706 5.846 13.145 7.04 21.64c.468 3.321.47 10.661.006 13.663c-1.008 6.516-3.021 11.976-6.101 16.545c-1.638 2.43-1.068 2.023 1.313-.939c6.74-8.379 13.605-22.7 17.108-35.687c4.24-15.718 4.817-32.596 1.66-48.57c-6.147-31.108-25.786-57.955-53.444-73.06c-1.738-.95-8.357-4.42-17.331-9.085a1633 1633 0 0 1-4.127-2.154c-.907-.477-2.764-1.447-4.126-2.154c-1.362-.708-5.282-2.75-8.711-4.539l-8.528-4.446a6021 6021 0 0 1-8.344-4.357c-8.893-4.655-12.657-6.537-13.73-6.863c-1.125-.343-3.984-.782-4.701-.723c-.152.012-.838.088-1.527.168"/><path fill="url(#logosBing1)" d="M148.81 277.994c-.493.292-1.184.714-1.537.938c-.354.225-1.137.712-1.743 1.083a8315 8315 0 0 0-13.204 8.137a2848 2848 0 0 0-8.07 4.997a388 388 0 0 1-3.576 2.198c-.454.271-2.393 1.465-4.31 2.654a2652 2652 0 0 1-7.427 4.586a3958 3958 0 0 0-8.62 5.316a3011 3011 0 0 1-7.518 4.637c-1.564.959-3.008 1.885-3.21 2.058c-.3.257-14.205 8.87-21.182 13.121c-5.3 3.228-11.43 5.387-17.705 6.235c-2.921.395-8.45.396-11.363.003c-7.9-1.067-15.176-4.013-21.409-8.666c-2.444-1.826-7.047-6.425-8.806-8.8c-4.147-5.598-6.829-11.602-8.218-18.396c-.32-1.564-.622-2.884-.672-2.935c-.13-.13.105 2.231.528 5.319c.44 3.211 1.377 7.856 2.387 11.829c7.814 30.743 30.05 55.749 60.15 67.646c8.668 3.424 17.415 5.582 26.932 6.64c3.576.4 13.699.56 17.43.276c17.117-1.296 32.02-6.334 47.308-15.996c1.362-.86 3.92-2.474 5.685-3.585a877 877 0 0 0 4.952-3.14c.958-.615 2.114-1.341 2.567-1.614a91 91 0 0 0 2.018-1.268c.656-.424 3.461-2.2 6.235-3.944l11.092-7.006l3.809-2.406l.137-.086l.42-.265l.199-.126l2.804-1.771l9.69-6.121c12.348-7.759 16.03-10.483 21.766-16.102c2.392-2.342 5.997-6.34 6.176-6.848c.037-.104.678-1.092 1.424-2.197c3.036-4.492 5.06-9.995 6.064-16.484c.465-3.002.462-10.342-.005-13.663c-.903-6.42-2.955-13.702-5.167-18.339c-3.627-7.603-11.353-14.512-22.453-20.076c-3.065-1.537-6.23-2.943-6.583-2.924c-.168.009-10.497 6.322-22.954 14.03c-12.457 7.71-23.268 14.4-24.025 14.87s-2.056 1.263-2.888 1.764z"/><path fill="url(#logosBing2)" d="m.053 241.013l.054 53.689l.695 3.118c2.172 9.747 5.937 16.775 12.482 23.302c3.078 3.07 5.432 4.922 8.768 6.896c7.06 4.177 14.657 6.238 22.978 6.235c8.716-.005 16.256-2.179 24.025-6.928c1.311-.801 6.449-3.964 11.416-7.029l9.032-5.572v-127.4l-.002-58.273c-.002-37.177-.07-59.256-.188-60.988c-.74-10.885-5.293-20.892-12.948-28.461c-2.349-2.323-4.356-3.875-10.336-7.99a25160 25160 0 0 1-12.104-8.336L28.617 5.835C22.838 1.85 22.386 1.574 20.639.949C18.367.136 15.959-.163 13.67.084C6.998.804 1.657 5.622.269 12.171C.053 13.191.013 26.751.01 100.35l-.003 86.975H0z"/></svg>\n <span>Search on Bing</span>\n </a>\n <div class="pswp__ai-summary-disclaimer">\n These are AI generated summaries based on the content. Please verify the information before using it.\n </div>`:"";if(r){t.innerHTML='<div class="pswp__ai-summary-close"></div>'+this.renderAISummary(r)+s;const n=t.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(e)})}else{t.innerHTML='<div class="pswp__ai-summary-close"></div><div class="pswp__ai-summary-empty">No AI summary available for this content</div>'+s;const n=t.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(e)})}}renderAISummary(e){let t='<div class="pswp__ai-summary-content">';return e.subject&&(t+=`<div class="pswp__ai-summary-title">${e.subject}</div>`),e.labels&&Object.entries(e.labels).filter(([e,t])=>Array.isArray(t)&&t.length>0).forEach(([e,n])=>{t+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-section-title">${e.replace("_"," ").replace(/\b\w/g,e=>e.toUpperCase())}</div>\n <div class="pswp__ai-summary-labels space-y-2">\n ${n.map(e=>`<span class="pswp__ai-summary-label">${e}</span>`).join("")}\n </div>\n </div>\n `}),e.description&&(t+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-description">${e.description}</div>\n </div>\n `),t+="</div>",t}}const tn='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")';class nn{constructor(e){this.backdropOn=!1,this.lightbox=e,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("afterInit",()=>{setTimeout(()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"},[500])}),e.on("uiRegister",()=>{e.ui.registerElement({name:"toggle-backdrop-button",title:"Toggle blur backdrop",order:this.options.toggleBackdropButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-backdrop"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-backdrop"/><path id="pswp__icn-show-backdrop" style="display:none" d="M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m0-4q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m0-4q-.425 0-.712-.288T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m0-4q-.425 0-.712-.288T5 6t.288-.712T6 5t.713.288T7 6t-.288.713T6 7m4 8.5q-.625 0-1.062-.437T8.5 14t.438-1.062T10 12.5t1.063.438T11.5 14t-.437 1.063T10 15.5m0-4q-.625 0-1.062-.437T8.5 10t.438-1.062T10 8.5t1.063.438T11.5 10t-.437 1.063T10 11.5m0 7.5q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m0-12q-.425 0-.712-.288T9 6t.288-.712T10 5t.713.288T11 6t-.288.713T10 7m0 14.5q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 12q-.625 0-1.062-.437T12.5 14t.438-1.062T14 12.5t1.063.438T15.5 14t-.437 1.063T14 15.5m0-4q-.625 0-1.062-.437T12.5 10t.438-1.062T14 8.5t1.063.438T15.5 10t-.437 1.063T14 11.5m0 7.5q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m0-12q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m0 14.5q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M18 19q-.425 0-.712-.288T17 18t.288-.712T18 17t.713.288T19 18t-.288.713T18 19m0-4q-.425 0-.712-.288T17 14t.288-.712T18 13t.713.288T19 14t-.288.713T18 15m0-4q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m0-4q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m3 7.5q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15"/><path id="pswp__icn-hide-backdrop" d="m19.1 21.9l-17-17q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-9.1-.4q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m4 0q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m4 0q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m-4-3.5q-.65 0-1.075-.425T8.5 14t.425-1.075T10 12.5t1.075.425T11.5 14t-.425 1.075T10 15.5M6 15q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m11.8-.025l-.775-.775q-.1-.5.213-.85T18 13q.425 0 .713.288T19 14q0 .45-.35.763t-.85.212M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m-6.7-3.05L12.55 9.7q.125-.525.5-.862T14 8.5q.65 0 1.075.425T15.5 10q0 .575-.35.963t-.85.487M6 11q-.425 0-.712-.287T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m12 0q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m-15-.5q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M14 7q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m-4.175-.025l-.8-.8q-.075-.5.225-.837T10 5q.425 0 .712.287T11 6q0 .45-.337.75t-.838.225M18 7q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m-8-3.5q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15" /></svg>',onClick:()=>{this.toggleBackdrop(e)}}),this.createBlurBackground(e)}),e.on("change",()=>{this.backdropOn&&this.updateBlurBackground(e)}),e.on("close",()=>{this.removeBlurBackground(),this.backdropOn=!1})}createBlurBackground(e){const t=e.element;if(!this.backgroundElement){const e=document.createElement("div");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.backgroundSize="cover",e.style.backgroundPosition="center",e.style.filter="blur(44px)",e.style.zIndex=-1,e.style.transition="background-image 0.5s ease, opacity 0.5s ease",e.style.display="none",e.style.backgroundImage=tn,t.append(e),this.backgroundElement=e}if(!this.backgroundVideoElement){const e=document.createElement("video");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.objectFit="cover",e.style.filter="blur(44px)",e.style.zIndex=-1,e.style.display="none",e.style.transition="opacity 0.5s ease",e.muted=!0,e.loop=!0,e.autoplay=!1,e.muted=!0,e.volume=0,t.append(e),this.backgroundVideoElement=e}}toggleBackdrop(e){this.backdropOn?(this.backgroundElement.style.backgroundImage=tn,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(e),this.backdropOn=!0),document.querySelector("#pswp__icn-hide-backdrop").style.display=this.backdropOn?"none":"inline",document.querySelector("#pswp__icn-show-backdrop").style.display=this.backdropOn?"inline":"none"}updateBlurBackground(e){const t=e.currSlide;if(t?.data)if("video"===t.data.type){const e=this.backgroundVideoElement,n=t.content.element;"video"===n?.tagName?.toLowerCase()&&(this.referenceVideoElement=n,this.registerVideoEvents(n,e)),e.style.opacity=0,setTimeout(()=>{e.src=t.data.src,e.load(),this.initBackgroundVideo(),e.style.opacity=1},500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else{if(this.backgroundElement){const e=t.data.blurhash||"LEHV6nWB2yk8pyo0adR*.7kCMdnj";{const t=this.createBlurhashCanvas(e,200,200);t.startsWith("data:")?this.backgroundElement.style.backgroundImage=`url('${t}')`:(this.backgroundElement.style.backgroundImage="none",this.backgroundElement.style.backgroundColor=t)}this.backgroundElement.style.opacity=1}this.backgroundVideoElement&&(this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.src="")}}initBackgroundVideo(){this.referenceVideoElement&&(this.backgroundVideoElement.currentTime=this.referenceVideoElement.currentTime,this.referenceVideoElement.currentTime>0&&!this.referenceVideoElement.paused&&!this.referenceVideoElement.ended&&this.referenceVideoElement.readyState>2&&this.backgroundVideoElement.play())}removeBlurBackground(){this.backgroundElement&&(this.backgroundElement.remove(),this.backgroundVideoElement.remove(),this.backgroundElement=null,this.backgroundVideoElement=null)}createBlurhashCanvas(e,t=100,n=100){const i=document.createElement("canvas");i.width=t,i.height=n;try{const r=i.getContext("2d"),s=se(e,t,n);if(s&&s.length>0){const e=r.createImageData(t,n);return e.data.set(s),r.putImageData(e,0,0),i.toDataURL()}throw new Error("Empty pixels array")}catch(t){return console.warn("Failed to decode blurhash for backdrop:",t),this.blurhashToColor(e)}}blurhashToColor(e){const t=["#8B9DC3","#DFB2A3","#C4B5A0","#A8B8C8","#B8A898"];return t[e.charCodeAt(0)%t.length]}registerVideoEvents(e,t){this.foregroundVideoElement=e,e.addEventListener("play",()=>{t.currentTime=e.currentTime,t.play()}),e.addEventListener("pause",()=>{t.pause()}),e.addEventListener("ended",()=>{t.pause(),t.currentTime=0})}}const rn={[c.LINK]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h14v-6q0-.425.288-.712T20 12t.713.288T21 13v6q0 .825-.587 1.413T19 21zM19 6.4L10.4 15q-.275.275-.7.275T9 15t-.275-.7t.275-.7L17.6 5H15q-.425 0-.712-.288T14 4t.288-.712T15 3h5q.425 0 .713.288T21 4v5q0 .425-.288.713T20 10t-.712-.288T19 9z"/></svg>',[c.EMAIL]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm0-7q1.25 0 2.125-.875T15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15"/></svg>',[c.PHONE]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"/></svg>',[c.SMS]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4-5q.425 0 .713-.288T9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11m4 0q.425 0 .713-.288T13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11m4 0q.425 0 .713-.288T17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11"/></svg>',[c.WHATSAPP]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 258"><defs><linearGradient id="logosWhatsappIcon0" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1faf38"/><stop offset="100%" stop-color="#60d669"/></linearGradient><linearGradient id="logosWhatsappIcon1" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#f9f9f9"/><stop offset="100%" stop-color="#fff"/></linearGradient></defs><path fill="url(#logosWhatsappIcon0)" d="M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"/><path fill="url(#logosWhatsappIcon1)" d="M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"/><path fill="#fff" d="M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"/></svg>',[c.MESSENGER]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><radialGradient id="logosMessenger0" cx="19.247%" cy="99.465%" r="108.96%" fx="19.247%" fy="99.465%"><stop offset="0%" stop-color="#09f"/><stop offset="60.975%" stop-color="#a033ff"/><stop offset="93.482%" stop-color="#ff5280"/><stop offset="100%" stop-color="#ff7061"/></radialGradient></defs><path fill="url(#logosMessenger0)" d="M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"/><path fill="#fff" d="m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"/></svg>'};class sn{constructor(e,t,n){this.lightbox=e,this.captureAdImpression=t,this.captureAdClick=n,this.captionOn=!0,this.options={captionButtonOrder:8},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn qc:p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-caption"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-caption"/><path id="pswp__icn-show-caption" d="M5 20q-.825 0-1.412-.587T3 18V6q0-.825.588-1.412T5 4h14q.825 0 1.413.588T21 6v12q0 .825-.587 1.413T19 20zm0-2h14V6H5zm2-3h3q.425 0 .713-.288T11 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T11 10.5V10q0-.425-.288-.712T10 9H7q-.425 0-.712.288T6 10v4q0 .425.288.713T7 15m10-6h-3q-.425 0-.712.288T13 10v4q0 .425.288.713T14 15h3q.425 0 .713-.288T18 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T18 10.5V10q0-.425-.288-.712T17 9M5 18V6z"/><path id="pswp__icn-hide-caption" style="display:none" d="m9.025 9l1.5 1.5H7.5v3h2q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375v.5q0 .425-.288.713T10 15H7q-.425 0-.712-.288T6 14v-4q0-.425.288-.712T7 9zM21 6v10q0 .5-.325.763t-.7.262t-.675-.262T19 16V6H8.975q-.5 0-.75-.312T7.975 5t.25-.687t.75-.313H19q.825 0 1.413.588T21 6m-3 8q0 .225-.088.438t-.262.337L16.375 13.5h.125q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375zm-1-5q.425 0 .713.288T18 10v.5q0 .225-.15.375t-.375.15h-.45q-.225 0-.375-.15t-.15-.375h-2v1.125l-1.5-1.5V10q0-.425.288-.712T14 9zM5 20q-.825 0-1.412-.587T3 18V6q0-.625.338-1.112t.862-.713L6.025 6H5v12h10.175L1.375 4.225q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.375 18.375q.3.3.3.713t-.3.712t-.712.3t-.713-.3L17.175 20z"/></svg>',onClick:()=>{this.toggleCaption(e)}}),e.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class="qc:absolute qc:bottom-0 qc:w-full"></div>'})}),e.on("change",()=>{this.captionOn&&this.updateCaption(e)}),e.on("close",()=>{this.clearCaption()})}toggleCaption(e){this.captionOn?this.clearCaption():this.updateCaption(e),this.captionOn=!this.captionOn,document.querySelector("#pswp__icn-show-caption").style.display=this.captionOn?"inline":"none",document.querySelector("#pswp__icn-hide-caption").style.display=this.captionOn?"none":"inline"}createCaptionHTML(e){const{id:t,type:n,caption:i,title:r,description:s,targetType:o,targetText:a,targetUrl:l}=e||{};switch("ad"===n&&this.captureAdImpression&&this.captureAdImpression(t),n){case"image":case"video":return i?.length>0?`\n <div class="qc:w-full qc:bg-black qc:bg-opacity-50 qc:p-4 qc:text-gray-300">\n <h3 class="qc:text-center qc:sm:text-lg">${i}</h3>\n </div>\n `:"";case"ad":return`\n <div class="qc:w-full qc:bg-black/85 qc:p-4 qc:text-white">\n <div class="qc:mx-auto qc:w-full qc:max-w-2xl qc:space-y-2 qc:text-center">\n <h3 class="qc:text-center qc:sm:text-lg">${r||""}</h3>\n <h4 class="qc:pb-2 qc:text-center qc:text-sm qc:sm:text-base">${s||""}</h4>\n <button\n class="qc:flex qc:w-full qc:items-center qc:justify-center qc:gap-3 qc:rounded-md qc:bg-white qc:py-1 qc:text-lg qc:text-black qc:caption-action-button"\n data-id="${t}"\n data-target-type="${o||c.LINK}"\n data-target-url="${l||""}">\n ${rn[o||c.LINK]}\n ${a||""}\n </button>\n </div>\n </div>\n `;default:return""}}updateCaption(e){try{const t=document.getElementById("pswp-caption-container");if(!t)return;const n=e.currSlide?.data,i=this.createCaptionHTML(n);t.innerHTML=i;const r=t.querySelector(".qc:caption-action-button");r&&r.addEventListener("click",e=>{const t=e.currentTarget.dataset.id,n=e.currentTarget.dataset.targetType,i=e.currentTarget.dataset.targetUrl;this.captureAdClick&&t&&this.captureAdClick(t,n,i)})}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const e=document.getElementById("pswp-caption-container");e&&(e.innerHTML="")}}class on{constructor(e){this.lightbox=e,this.fullscreen=!1,this.options={fullScreenButtonOrder:7},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{!document.fullscreenEnabled&&!document.webkitFullscreenEnabled&&!document.mozFullScreenEnabled&&!document.msFullscreenEnabled||e.ui.registerElement({name:"fullscreen-button",title:"Toggle fullscreen view",order:this.options.fullScreenButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-1" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-fullscreen"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-exit-fullscreen"/><path id="pswp__icn-fullscreen" d="M5 19h2q.425 0 .713.288T8 20t-.288.713T7 21H4q-.425 0-.712-.288T3 20v-3q0-.425.288-.712T4 16t.713.288T5 17zm14 0v-2q0-.425.288-.712T20 16t.713.288T21 17v3q0 .425-.288.713T20 21h-3q-.425 0-.712-.288T16 20t.288-.712T17 19zM5 5v2q0 .425-.288.713T4 8t-.712-.288T3 7V4q0-.425.288-.712T4 3h3q.425 0 .713.288T8 4t-.288.713T7 5zm14 0h-2q-.425 0-.712-.288T16 4t.288-.712T17 3h3q.425 0 .713.288T21 4v3q0 .425-.288.713T20 8t-.712-.288T19 7z"/><path id="pswp__icn-exit-fullscreen" style="display:none" d="M6 18H4q-.425 0-.712-.288T3 17t.288-.712T4 16h3q.425 0 .713.288T8 17v3q0 .425-.288.713T7 21t-.712-.288T6 20zm12 0v2q0 .425-.288.713T17 21t-.712-.288T16 20v-3q0-.425.288-.712T17 16h3q.425 0 .713.288T21 17t-.288.713T20 18zM6 6V4q0-.425.288-.712T7 3t.713.288T8 4v3q0 .425-.288.713T7 8H4q-.425 0-.712-.288T3 7t.288-.712T4 6zm12 0h2q.425 0 .713.288T21 7t-.288.713T20 8h-3q-.425 0-.712-.288T16 7V4q0-.425.288-.712T17 3t.713.288T18 4z"/></svg>',onClick:()=>{this.toggleFullscreen(e)}})})}toggleFullscreen(e){const t=e.element;this.fullscreen?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),e.options.showHideAnimationType="zoom",this.fullscreen=!1):(t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),e.options.showHideAnimationType="fade",this.fullscreen=!0),document.querySelector("#pswp__icn-exit-fullscreen").style.display=this.fullscreen?"inline":"none",document.querySelector("#pswp__icn-fullscreen").style.display=this.fullscreen?"none":"inline"}}class an{constructor(e,t={}){this.lightbox=e,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},t),this.setSlideshowLength(Number(localStorage.getItem("pswp_delay"))||this.options.defaultDelayMs),document.head.insertAdjacentHTML("beforeend",`<style>.pswp__progress-bar{position:fixed;${this.options.progressBarPosition}:0;width:0;height:0}.pswp__progress-bar.running{width:100%;height:2px;transition-property:width;background:#ff4800}</style>`),this.slideshowIsRunning=!1,this.slideshowTimerID=null,this.wakeLockIsRunning=!1,this.wakeLockSentinel=null,this.lightbox.on("init",()=>{this.init(this.lightbox.pswp)})}init(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"playpause-button",title:"Toggle slideshow (Space)\nChange delay with +/- while running",order:this.options.playPauseButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-play"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-stop"/><path id="pswp__icn-play" d="M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"/><path id="pswp__icn-stop" style="display:none" d="M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"/></svg>',onClick:()=>{this.setSlideshowState()}}),e.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),e.events.add(document,"keydown",e=>{switch(e.code){case"Space":this.setSlideshowState(),e.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),e.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),e.preventDefault()}})}),this.lightbox.on("change",()=>{this.slideshowIsRunning&&this.options.restartOnSlideChange&&this.goToNextSlideAfterTimeout()}),this.lightbox.on("close",()=>{this.slideshowIsRunning&&this.setSlideshowState()})}showUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.add("pswp--ui-visible"),this.uiVisible=!0}stopAutoHideTimer(){this.autoHideTimer&&(clearTimeout(this.autoHideTimer),this.autoHideTimer=null)}hideUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.remove("pswp--ui-visible"),this.uiVisible=!1}resetAutoHideTimer(){this.autoHideTimer&&clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(()=>{this.slideshowIsRunning&&this.hideUI(),this.autoHideTimer=null},[3e3])}setSlideshowState(){this.slideshowIsRunning=!this.slideshowIsRunning,this.slideshowIsRunning?(this.goToNextSlideAfterTimeout(),this.showUI(),this.resetAutoHideTimer(),document.addEventListener("touchstart",()=>{this.stopAutoHideTimer(),this.showUI()}),document.addEventListener("touchend",()=>{this.resetAutoHideTimer()}),document.addEventListener("mousemove",()=>{this.uiVisible||this.showUI(),this.resetAutoHideTimer()})):(this.showUI(),this.resetSlideshow(),this.stopAutoHideTimer()),document.querySelector("#pswp__icn-stop").style.display=this.slideshowIsRunning?"inline":"none",document.querySelector("#pswp__icn-play").style.display=this.slideshowIsRunning?"none":"inline",document.querySelector(".pswp__progress-bar").style.opacity=this.options.autoHideProgressBar?null:1,this.toggleWakeLock()}setSlideshowLength(e){this.options.defaultDelayMs=Math.min(Math.max(e,1e3),2147483647),this.options.defaultDelayMs!=e&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(e){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+e),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const t=document.querySelector(".pswp__counter");t&&(t.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(e){return"video"===e?.data?.type}getSlideTimeout(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;if(t.paused)return this.options.defaultDelayMs;const n=t.duration,i=t.currentTime;return isNaN(n)||isNaN(i)?this.options.defaultDelayMs:1e3*(n-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;return t.ended||t.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(t.networkState)}return!e.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const e=this.getSlideTimeout();this.slideshowTimerID=setTimeout(()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()},e),setTimeout(()=>{this.slideshowIsRunning&&this.toggleProgressBar(e)},100)}else this.slideshowTimerID=setTimeout(()=>{this.goToNextSlideAfterTimeout()},200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(e){const t=document.querySelector(".pswp__progress-bar");e?(t.style.transitionTimingFunction=this.getSlideTransition(),t.style.transitionDuration=`${e}ms`,t.classList.add("running")):t.classList.remove("running")}toggleWakeLock(){this.wakeLockIsRunning!=this.slideshowIsRunning&&("keepAwake"in screen?screen.keepAwake=this.slideshowIsRunning:"wakeLock"in navigator&&(this.wakeLockSentinel?this.wakeLockSentinel.release().then(()=>(this.wakeLockSentinel=null,!0)).catch(e=>console.error(e)):navigator.wakeLock.request("screen").then(e=>(this.wakeLockSentinel=e,this.wakeLockSentinel.addEventListener("release",()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1}),!0)).catch(e=>{})),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}}const ln={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function cn(e){return e&&e.data&&"video"===e.data.type}class dn{constructor(e,t){this.options=t,this.initLightboxEvents(e),e.on("init",()=>{this.initPswpEvents(e.pswp)})}initLightboxEvents(e){e.on("contentLoad",this.onContentLoad.bind(this)),e.on("contentDestroy",this.onContentDestroy.bind(this)),e.on("contentActivate",this.onContentActivate.bind(this)),e.on("contentDeactivate",this.onContentDeactivate.bind(this)),e.on("contentAppend",this.onContentAppend.bind(this)),e.on("contentResize",this.onContentResize.bind(this)),e.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),e.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),e.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),e.addFilter("domItemData",(e,t,n)=>("video"===e.type&&n&&(n.dataset.pswpVideoSources?e.videoSources=JSON.parse(n.dataset.pswpVideoSources):n.dataset.pswpVideoSrc?e.videoSrc=n.dataset.pswpVideoSrc:e.videoSrc=n.href),e))}initPswpEvents(e){e.on("pointerDown",t=>{const n=e.currSlide;if(cn(n)&&this.options.preventDragOffset){const i=t.originalEvent;if("pointerdown"===i.type){const r=Math.ceil(n.height*n.currZoomLevel)+n.bounds.center.y,s=i.pageY-e.offset.y;s>r-this.options.preventDragOffset&&s<r&&t.preventDefault()}}}),e.on("appendHeavy",e=>{cn(e.slide)&&!e.slide.isActive&&e.preventDefault()}),e.on("close",()=>{cn(e.currSlide.content)&&this.pauseVideo(e.currSlide.content)})}onContentDestroy({content:e}){cn(e)&&e._videoPosterImg&&(e._videoPosterImg.onload=e._videoPosterImg.onerror=null,e._videoPosterImg=null)}onContentResize(e){if(cn(e.content)){e.preventDefault();const t=e.width,n=e.height,i=e.content;if(i.element&&(i.element.style.width=t+"px",i.element.style.height=n+"px"),i.slide&&i.slide.placeholder){const e=i.slide.placeholder.element.style;e.transform="none",e.width=t+"px",e.height=n+"px"}}}isKeepingPlaceholder(e,t){return!cn(t)&&e}isContentZoomable(e,t){return!cn(t)&&e}onContentActivate({content:e}){cn(e)&&this.options.autoplay&&this.playVideo(e)}onContentDeactivate({content:e}){cn(e)&&this.pauseVideo(e)}onContentAppend(e){cn(e.content)&&(e.preventDefault(),e.content.isAttached=!0,e.content.appendImage())}onContentLoad(e){const t=e.content;if(cn(e.content)&&(e.preventDefault(),!t.element)){if(t.state="loading",t.type="video",t.element=document.createElement("video"),this.options.videoAttributes)for(let e in this.options.videoAttributes)t.element.setAttribute(e,this.options.videoAttributes[e]||"");t.element.setAttribute("poster",t.data.msrc),this.preloadVideoPoster(t,t.data.msrc),t.element.style.position="relative",t.element.style.left=0,t.element.style.top=0,t.data.videoSources?t.data.videoSources.forEach(e=>{let n=document.createElement("source");n.src=e.src,n.type=e.type,t.element.appendChild(n)}):t.data.videoSrc&&(t.element.src=t.data.videoSrc)}}preloadVideoPoster(e,t){!e._videoPosterImg&&t&&(e._videoPosterImg=new Image,e._videoPosterImg.src=t,e._videoPosterImg.complete?e.onLoaded():e._videoPosterImg.onload=e._videoPosterImg.onerror=()=>{e.onLoaded()})}playVideo(e){e.element&&e.element.play()}pauseVideo(e){e.element&&e.element.pause()}useContentPlaceholder(e,t){return!!cn(t)||e}}class un{constructor(e,t={}){new dn(e,{...ln,...t})}}const hn=({ad:e,onClose:t,captureAdClick:n})=>v.jsx(le,{open:!!e,onOpenChange:e=>!e&&t(),children:v.jsxs(ce,{children:[v.jsxs(de,{className:"qc:hidden",children:[v.jsx(ue,{children:e?.title}),v.jsx(he,{children:e?.description})]}),v.jsxs("div",{className:"qc:flex qc:max-w-lg qc:flex-col qc:overflow-hidden",children:[v.jsx("img",{className:"qc:h-auto qc:max-h-96 qc:w-full qc:object-contain",src:e?.imageUrl,alt:"Image not found"}),v.jsxs("div",{className:"qc:flex qc:flex-col qc:gap-2 qc:p-3",children:[v.jsx(P,{variant:"h4",align:"center",lines:2,children:e?.title}),v.jsx(P,{variant:"body3",color:"secondary",align:"center",lines:6,children:e?.description})]}),v.jsx(L,{fullWidth:!0,className:"qc:rounded-t-none",onClick:()=>n(e._id,e.targetType,e.targetUrl),icon:M[e?.targetType??c.LINK],children:e?.targetText})]})]})}),pn=({url:e,alt:t="",thumbnailUrl:n,blurhash:i,pswpData:r={},curateLink:o,onClick:a})=>{const l=v.jsxs(s.Fragment,{children:[v.jsx(oe,{threshold:.1,src:n||e,blurhash:i,alt:t}),r.type===w.VIDEO&&v.jsx("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:items-center qc:justify-center qc:opacity-75",children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-16 qc:text-white qc:lg:size-24",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});return a?v.jsx("button",{className:"qc:size-full",onClick:a,children:l}):o?v.jsx(N,{className:"qc:size-full",to:o,children:l}):v.jsx("a",{href:e,className:"qc:pswp-item qc:size-full",...Object.keys(r).reduce((e,t)=>(e[`data-pswp-${(e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())(t)}`]=r[t],e),{}),target:"_blank",rel:"noreferrer",children:l})},mn=({style:e,content:t,curateLink:n,onAdClick:i})=>{const{captureAdImpression:r,captureAdEngagement:s,captureAdClick:o}=je();return v.jsxs("div",{style:e,className:"qc:group qc:relative qc:mb-1 qc:overflow-hidden qc:rounded",children:[v.jsx(ae,{as:"div",className:"qc:size-full",threshold:.8,triggerOnce:!0,onChange:e=>{e&&r(t._id)},onClick:()=>s(t._id),children:v.jsx(pn,{url:t.src,thumbnailUrl:t.src,blurhash:t.blurhash,alt:t.caption,onClick:n?i:null,pswpData:{id:t._id,type:w.AD,hash:t._id,width:t.width,height:t.height,title:t.title,description:t.description,targetType:t.targetType,targetText:t.targetText,targetUrl:t.targetUrl,thumbnailUrl:t.imageUrl,blurhash:t.blurhash}})}),v.jsx("div",{className:"qc:transition-opacity qc:duration-500 group-qc:hover:opacity-100 qc:sm:opacity-0",children:v.jsxs("div",{className:"qc:text-foreground qc:bg-background qc:absolute qc:bottom-0 qc:w-full qc:flex-col qc:items-center qc:justify-between qc:bg-opacity-75 qc:sm:flex qc:sm:flex-row",children:[v.jsx("h3",{className:"qc:text-foreground qc:line-clamp-2 qc:p-2 qc:text-sm qc:font-medium qc:sm:ml-3 qc:sm:line-clamp-1 qc:sm:p-0",children:t.title}),t?.targetType!==c.NONE&&v.jsx(L,{immutable:!0,className:"qc:w-full qc:text-nowrap qc:rounded-t-none qc:py-1 qc:sm:w-auto qc:sm:rounded-t-none qc:sm:rounded-bl-none qc:sm:py-2",onClick:()=>o(t._id,t.targetType,t.targetUrl),icon:M[t?.targetType??c.LINK],children:t?.targetText})]})})]})};var fn=s.forwardRef((e,t)=>{const{children:n,width:i=10,height:r=5,...s}=e;return v.jsx(pe.svg,{...s,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});fn.displayName="Arrow";var gn=fn;var wn="Popper",[vn,bn]=fe(wn),[yn,xn]=vn(wn),qn=e=>{const{__scopePopper:t,children:n}=e,[i,r]=s.useState(null);return v.jsx(yn,{scope:t,anchor:i,onAnchorChange:r,children:n})};qn.displayName=wn;var Tn="PopperAnchor",Sn=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,o=xn(Tn,n),a=s.useRef(null),l=z(t,a),c=s.useRef(null);return s.useEffect(()=>{const e=c.current;c.current=i?.current||a.current,e!==c.current&&o.onAnchorChange(c.current)}),i?null:v.jsx(pe.div,{...r,ref:l})});Sn.displayName=Tn;var En="PopperContent",[kn,_n]=vn(En),jn=s.forwardRef((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:f,...g}=e,w=xn(En,n),[b,y]=s.useState(null),x=z(t,e=>y(e)),[q,T]=s.useState(null),S=function(e){const[t,n]=s.useState(void 0);return me(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;const i=t[0];let r,s;if("borderBoxSize"in i){const e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,s=t.blockSize}else r=e.offsetWidth,s=e.offsetHeight;n({width:r,height:s})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(q),E=S?.width??0,k=S?.height??0,_=i+("center"!==o?"-"+o:""),j="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},C=Array.isArray(d)?d:[d],O=C.length>0,P={padding:j,boundary:C.filter(An),altBoundary:O},{refs:A,floatingStyles:N,placement:I,isPositioned:L,middlewareData:M}=Z({strategy:"fixed",placement:_,whileElementsMounted:(...e)=>ie(...e,{animationFrame:"always"===m}),elements:{reference:w.anchor},middleware:[K({mainAxis:r+k,alignmentAxis:a}),c&&X({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?ne():void 0,...P}),c&&Q({...P}),J({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:i})=>{const{width:r,height:s}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${n}px`),o.setProperty("--radix-popper-available-height",`${i}px`),o.setProperty("--radix-popper-anchor-width",`${r}px`),o.setProperty("--radix-popper-anchor-height",`${s}px`)}}),q&&ee({element:q,padding:l}),Nn({arrowWidth:E,arrowHeight:k}),p&&te({strategy:"referenceHidden",...P})]}),[V,F]=In(I),R=ge(f);me(()=>{L&&R?.()},[L,R]);const D=M.arrow?.x,B=M.arrow?.y,H=0!==M.arrow?.centerOffset,[U,W]=s.useState();return me(()=>{b&&W(window.getComputedStyle(b).zIndex)},[b]),v.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:L?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(kn,{scope:n,placedSide:V,onArrowChange:T,arrowX:D,arrowY:B,shouldHideArrow:H,children:v.jsx(pe.div,{"data-side":V,"data-align":F,...g,ref:x,style:{...g.style,animation:L?void 0:"none"}})})})});jn.displayName=En;var Cn="PopperArrow",On={top:"bottom",right:"left",bottom:"top",left:"right"},Pn=s.forwardRef(function(e,t){const{__scopePopper:n,...i}=e,r=_n(Cn,n),s=On[r.placedSide];return v.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:v.jsx(gn,{...i,ref:t,style:{...i.style,display:"block"}})})});function An(e){return null!==e}Pn.displayName=Cn;var Nn=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,s=0!==r.arrow?.centerOffset,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,c]=In(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(r.arrow?.x??0)+o/2,h=(r.arrow?.y??0)+a/2;let p="",m="";return"bottom"===l?(p=s?d:`${u}px`,m=-a+"px"):"top"===l?(p=s?d:`${u}px`,m=`${i.floating.height+a}px`):"right"===l?(p=-a+"px",m=s?d:`${h}px`):"left"===l&&(p=`${i.floating.width+a}px`,m=s?d:`${h}px`),{data:{x:p,y:m}}}});function In(e){const[t,n="center"]=e.split("-");return[t,n]}var Ln=qn,Mn=Sn,zn=jn,Vn=Pn;function Fn(e){const t=Rn(e),n=s.forwardRef((e,n)=>{const{children:i,...r}=e,o=s.Children.toArray(i),a=o.find(Bn);if(a){const e=a.props.children,i=o.map(t=>t===a?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return v.jsx(t,{...r,ref:n,children:s.isValidElement(e)?s.cloneElement(e,void 0,i):null})}return v.jsx(t,{...r,ref:n,children:i})});return n.displayName=`${e}.Slot`,n}function Rn(e){const t=s.forwardRef((e,t)=>{const{children:n,...i}=e;if(s.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(n),r=function(e,t){const n={...t};for(const i in t){const r=e[i],s=t[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...e)=>{const t=s(...e);return r(...e),t}:r&&(n[i]=r):"style"===i?n[i]={...r,...s}:"className"===i&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props);return n.type!==s.Fragment&&(r.ref=t?V(t,e):e),s.cloneElement(n,r)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dn=Symbol("radix.slottable");function Bn(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Dn}var Hn="Popover",[Un]=fe(Hn,[bn]),Wn=bn(),[$n,Yn]=Un(Hn),Gn=e=>{const{__scopePopover:t,children:n,open:i,defaultOpen:r,onOpenChange:o,modal:a=!1}=e,l=Wn(t),c=s.useRef(null),[d,u]=s.useState(!1),[h,p]=Ee({prop:i,defaultProp:r??!1,onChange:o,caller:Hn});return v.jsx(Ln,{...l,children:v.jsx($n,{scope:t,contentId:ke(),triggerRef:c,open:h,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>u(!0),[]),onCustomAnchorRemove:s.useCallback(()=>u(!1),[]),modal:a,children:n})})};Gn.displayName=Hn;var Zn="PopoverAnchor";s.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=Yn(Zn,n),o=Wn(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=r;return s.useEffect(()=>(a(),()=>l()),[a,l]),v.jsx(Mn,{...o,...i,ref:t})}).displayName=Zn;var Kn="PopoverTrigger",Xn=s.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=Yn(Kn,n),s=Wn(n),o=z(t,r.triggerRef),a=v.jsx(pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ci(r.open),...i,ref:o,onClick:xe(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:v.jsx(Mn,{asChild:!0,...s,children:a})});Xn.displayName=Kn;var Qn="PopoverPortal",[Jn,ei]=Un(Qn,{forceMount:void 0}),ti=e=>{const{__scopePopover:t,forceMount:n,children:i,container:r}=e,s=Yn(Qn,t);return v.jsx(Jn,{scope:t,forceMount:n,children:v.jsx(we,{present:n||s.open,children:v.jsx(ve,{asChild:!0,container:r,children:i})})})};ti.displayName=Qn;var ni="PopoverContent",ii=s.forwardRef((e,t)=>{const n=ei(ni,e.__scopePopover),{forceMount:i=n.forceMount,...r}=e,s=Yn(ni,e.__scopePopover);return v.jsx(we,{present:i||s.open,children:s.modal?v.jsx(si,{...r,ref:t}):v.jsx(oi,{...r,ref:t})})});ii.displayName=ni;var ri=Fn("PopoverContent.RemoveScroll"),si=s.forwardRef((e,t)=>{const n=Yn(ni,e.__scopePopover),i=s.useRef(null),r=z(t,i),o=s.useRef(!1);return s.useEffect(()=>{const e=i.current;if(e)return be(e)},[]),v.jsx(ye,{as:ri,allowPinchZoom:!0,children:v.jsx(ai,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,i=2===t.button||n;o.current=i},{checkForDefaultPrevented:!1}),onFocusOutside:xe(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),oi=s.forwardRef((e,t)=>{const n=Yn(ni,e.__scopePopover),i=s.useRef(!1),r=s.useRef(!1);return v.jsx(ai,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||n.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(r.current=!0));const s=t.target;n.triggerRef.current?.contains(s)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&r.current&&t.preventDefault()}})}),ai=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...u}=e,h=Yn(ni,n),p=Wn(n);return qe(),v.jsx(Te,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:v.jsx(Se,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:v.jsx(zn,{"data-state":ci(h.open),role:"dialog",id:h.contentId,...p,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),li="PopoverClose";s.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=Yn(li,n);return v.jsx(pe.button,{type:"button",...i,ref:t,onClick:xe(e.onClick,()=>r.onOpenChange(!1))})}).displayName=li;function ci(e){return e?"open":"closed"}s.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=Wn(n);return v.jsx(Vn,{...r,...i,ref:t})}).displayName="PopoverArrow";var di=ti,ui=ii;const hi=Gn,pi=Xn,mi=s.forwardRef(({className:e,align:t="center",sideOffset:n=4,...i},r)=>{const{props:{fontClassName:s,textClassName:a},organization:l}=o();return v.jsx(di,{children:v.jsx(ui,{ref:r,align:t,sideOffset:n,className:b("qc:bg-background qc:text-foreground qc:border-border qc:shadow-outer qc:data-[state=open]:animate-in qc:data-[state=closed]:animate-out qc:data-[state=closed]:fade-out-0 qc:data-[state=open]:fade-in-0 qc:data-[state=closed]:zoom-out-95 qc:data-[state=open]:zoom-in-95 qc:data-[side=bottom]:slide-in-from-top-2 qc:data-[side=left]:slide-in-from-right-2 qc:data-[side=right]:slide-in-from-left-2 qc:data-[side=top]:slide-in-from-bottom-2 qc:z-2010 qc:rounded qc:outline-none",s,a,e),style:F(l),...i})})}),fi=({eventId:e,contentId:t,emojis:n=[],counts:i={},userReaction:r})=>{const c=D(),{user:d}=o(),{props:{loginUrl:u},organization:h}=o(),{handleReactionClick:p}=(()=>{const e=R(),{props:{organizationId:t},user:n}=o();return{handleReactionClick:async(i,r,s)=>{try{await a.post(l.UPDATE_REACTION,{json:{eventId:i,contentId:r,reaction:s},headers:{"x-org-id":t,Authorization:n?`Bearer ${n.token}`:void 0}}),e.setQueriesData([`content-list-by-event-${i}`],e=>{if(e?.pages&&Array.isArray(e.pages))return{...e,pages:e.pages.map(e=>e.data?{...e,data:e.data.map(e=>{if(e._id===r){const t=e.reactionCounts||{};return e.userReaction&&(t[e.userReaction]=(t[e.userReaction]||1)-1),t[s]=(t[s]||0)+1,{...e,reactionCounts:t,userReaction:s}}return e})}:e)}})}catch(e){console.error("Error handling reaction click:",e)}}}})(),[m,f]=s.useState(!1),g=Object.values(i).reduce((e,t)=>e+t,0);return v.jsxs(hi,{open:m,onOpenChange:f,children:[v.jsx(pi,{children:v.jsxs("div",{className:"qc:bg-background qc:active:scale-90 qc:flex qc:items-center qc:gap-1 qc:rounded qc:bg-opacity-50 qc:px-2 qc:py-1 qc:transition-transform qc:sm:gap-2 qc:sm:py-0",children:[(n||[]).toSorted((e,t)=>(i[t]||0)-(i[e]||0)).slice(0,1).map(e=>v.jsx("span",{className:"qc:text-sm qc:sm:text-lg",children:e},`${t}-${e}-1`)),g>0&&v.jsx("span",{className:"qc:text-xs qc:font-bold qc:sm:text-sm",children:g||0})]})}),v.jsxs(mi,{side:"top",align:"end",children:[d?null:h?.customAuth?v.jsxs("div",{className:"qc:p-2 qc:font-semibold",children:["Please"," ",v.jsx("a",{className:"qc:text-info qc:underline",href:u,children:"Login"})," ","to react"]}):v.jsxs("div",{className:"qc:p-2 qc:font-semibold",children:["Please"," ",v.jsx(N,{className:"qc:text-info qc:underline",to:I.LOGIN,state:{referrer:c.pathname},children:"Login"})," ","to react"]}),d&&v.jsx("div",{className:"qc:flex qc:gap-1 qc:p-2",children:n.map(n=>v.jsxs("div",{className:"qc:flex qc:flex-col qc:items-center",children:[v.jsx("span",{className:"qc:text-xs qc:font-medium",children:i[n]||0}),v.jsx("span",{className:b("qc:cursor-pointer qc:text-3xl qc:transition-transform",r===n?"qc:scale-125":"qc:hover:scale-125"),onClick:()=>{p&&p(e,t,n),f(!1)},children:n})]},`${t}-${n}-2`))})]})]})},gi=({event:e,content:t,curateLink:n})=>v.jsxs(v.Fragment,{children:[e.engagementStyle===x.CONTEST&&v.jsxs("button",{onClick:()=>{},href:n,className:"qc:bg-background qc:flex qc:items-center qc:gap-1 qc:rounded qc:bg-opacity-50 qc:px-2 qc:py-1",children:[v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-5",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M12 7.125v7.8l3.15 1.925l-.825-3.6l2.775-2.4l-3.65-.325zm0 10.15l-4.15 2.5q-.275.175-.575.15t-.525-.2t-.35-.437t-.05-.588l1.1-4.725L3.775 10.8q-.25-.225-.312-.513t.037-.562t.3-.45t.55-.225l4.85-.425l1.875-4.45q.125-.3.388-.45t.537-.15t.537.15t.388.45l1.875 4.45l4.85.425q.35.05.55.225t.3.45t.038.563t-.313.512l-3.675 3.175l1.1 4.725q.075.325-.05.588t-.35.437t-.525.2t-.575-.15z"})}),v.jsx("span",{className:"qc:text-xs qc:font-semibold qc:sm:text-base",children:parseFloat(t.score).toFixed(1)})]}),e.engagementStyle===x.REACTION&&e.reactionEmojis?.length>0&&v.jsx(fi,{eventId:e?._id,contentId:t._id,emojis:e?.reactionEmojis,engagementStyle:e?.engagementStyle,counts:t.reactionCounts||{},userReaction:t.userReaction})]}),wi=({content:e})=>v.jsxs("div",{className:"qc:w-full qc:space-y-4 qc:px-4 qc:pb-2 qc:sm:pb-4",children:[e?.caption&&v.jsx("span",{className:"qc:hidden qc:w-full qc:py-1 qc:text-xs qc:drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)] qc:sm:block","data-tooltip-target":"tooltip-default",children:v.jsx("div",{href:"#",className:"qc:hover:text-foreground qc:lg:text-md qc:line-clamp-2 qc:text-xs qc:text-white qc:lg:font-medium","data-te-toggle":"tooltip",title:e?.caption,children:e?.caption})}),v.jsx("div",{className:"qc:flex qc:items-center qc:justify-between",children:v.jsx("div",{className:"qc:flex qc:items-center qc:gap-2",children:v.jsx("span",{className:"qc:lg:text-md qc:line-clamp-1 qc:text-sm qc:font-medium qc:text-white qc:drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]",children:e?.user?.name})})})]}),vi=({event:e,content:t,style:n,timestampField:i,curateLink:r,onChangeFaceUrl:a,hideControls:l})=>{const{organization:c}=o();return v.jsxs("div",{id:`content-${t._id}`,style:n,className:"qc:group qc:relative qc:mb-1 qc:overflow-hidden qc:rounded",children:[v.jsx(pn,{url:t.src,alt:t.caption,blurhash:t.blurhash,thumbnailUrl:t.thumbnailUrl,curateLink:r,pswpData:{id:t._id,type:w.IMAGE,hash:t._id,width:t.width,height:t.height,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,caption:t.caption,contentSummary:JSON.stringify(t.contentSummary)}}),!l&&v.jsxs(s.Fragment,{children:[c?.integrationSettings?.showQuickSearch&&t.faces?.length>0&&v.jsx("button",{className:"qc:bg-primary qc:absolute qc:right-2 qc:top-2 qc:rounded-full qc:p-1 qc:text-gray-200 qc:opacity-50 qc:transition-all qc:sm:p-1.5 qc:sm:hover:scale-110 qc:sm:hover:opacity-100",onClick:()=>{a(t?.url);const e=document.getElementById("media-gallery-container");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},children:v.jsx(j,{color:"a11y",name:"material-symbols:familiar-face-and-zone-outline-rounded"})}),v.jsxs("div",{className:"qc:opacity-100 qc:transition-opacity qc:duration-500 group-qc:hover:opacity-100 qc:sm:opacity-0",children:[v.jsx("div",{className:"qc:absolute qc:bottom-0 qc:w-full qc:rounded-b",children:v.jsx(wi,{content:t})}),v.jsx("div",{className:"qc:absolute qc:bottom-2 qc:right-2",children:v.jsx(gi,{event:e,content:t,curateLink:r})})]})]})]})},bi=({content:e,style:t,event:n,timestampField:i,curateLink:r,hideControls:s})=>v.jsxs("div",{id:`content-${e._id}`,className:"qc:group qc:relative qc:mb-1 qc:overflow-hidden qc:rounded",style:t,children:[v.jsx(pn,{url:e.src,thumbnailUrl:e.thumbnailUrl,blurhash:e.blurhash,alt:e.caption,curateLink:r,pswpData:{id:e._id,type:w.VIDEO,hash:e._id,width:e.width,height:e.height,thumbnailUrl:e.thumbnailUrl,blurhash:e.blurhash,caption:e.caption}}),!s&&v.jsxs("div",{className:"qc:opacity-100 qc:transition-opacity qc:duration-500 group-qc:hover:opacity-100 qc:sm:opacity-0",children:[v.jsx("div",{className:"qc:absolute qc:bottom-0 qc:w-full qc:rounded-b",children:v.jsx(wi,{content:e})}),v.jsx("div",{className:"qc:absolute qc:bottom-2 qc:right-2",children:v.jsx(gi,{event:n,content:e,curateLink:r})})]})]}),yi=({event:e,contents:t=[],singleColumnMode:n,kioskMode:i,timestampField:r,curateLink:a,onChangeFaceUrl:l})=>{const c=s.useRef(null),d=s.useMemo(()=>`gallery-${e._id}`,[e]),{captureAdImpression:u,captureAdClick:h}=je(),{organization:p}=o(),[m,f]=s.useState(null);s.useEffect(()=>{if(!a){const e=new Jt({gallery:`#${d}`,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:()=>import("./photoswipe-BaMjvcSX.js")});c.current=e,new un(e),new nn(e),new sn(e,u,h),new on(e),new an(e),p?.navigationSettings?.showAIDescription&&new en(e,{width:"400px",height:"40%"}),e.init()}return()=>{c.current?.destroy(),c.current=null}},[e?.galleryLayout,a]);const g=s.useMemo(()=>{switch(e.galleryLayout){case B.ROW:return mt;case B.COLUMN:return bt;case B.MASONRY:return xt;default:return mt}},[n,e.galleryLayout]);return v.jsxs(s.Fragment,{children:[v.jsx(g,{spacing:4,targetRowHeight:n?500:360,columns:e=>n?1:e<400?2:e<800?3:4,photos:t.map(e=>({src:e.type===w.IMAGE||e.type===w.VIDEO?e.url:e.imageUrl,width:e.dimension?.width,height:e.dimension?.height,...e})),render:{container:({ref:e,className:t,children:i})=>v.jsx("div",{ref:e,id:d,className:b(t,n?"qc:w-full qc:lg:w-1/3":"qc:w-full"),children:i}),photo:(t,{photo:n,width:s,height:o,index:c})=>{let d;switch(n.type){case w.IMAGE:d=vi;break;case w.VIDEO:d=bi;break;case w.AD:d=mn}return d&&v.jsx(d,{style:{width:s,height:o},event:e,content:n,timestampField:r,onAdClick:()=>{f(n)},hideControls:i,curateLink:a?`${a}/${n._id}`:null,onChangeFaceUrl:l},`${n._id}-${c}`)}}}),v.jsx(hn,{ad:m,onClose:()=>f(null),captureAdClick:h})]})};function xi(e){return"string"==typeof e&&"%"===e[e.length-1]&&function(e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)}(e.substring(0,e.length-1))}function qi(e,t,n){0===t&&!n&&e?.style&&e?.children.length>0&&(e.style.display="none")}const Ti={animating:"rah-animating",animatingUp:"rah-animating--up",animatingDown:"rah-animating--down",animatingToHeightZero:"rah-animating--to-height-zero",animatingToHeightAuto:"rah-animating--to-height-auto",animatingToHeightSpecific:"rah-animating--to-height-specific",static:"rah-static",staticHeightZero:"rah-static--height-zero",staticHeightAuto:"rah-static--height-auto",staticHeightSpecific:"rah-static--height-specific"};function Si(e,t){return[e.static,0===t&&e.staticHeightZero,"number"==typeof t&&t>0?e.staticHeightSpecific:null,"auto"===t&&e.staticHeightAuto].filter(e=>e).join(" ")}const Ei=["animateOpacity","animationStateClasses","applyInlineTransitions","children","className","contentClassName","contentRef","delay","duration","easing","height","onHeightAnimationEnd","onHeightAnimationStart","style","disableDisplayNone"],ki=H.forwardRef((e,t)=>{const{animateOpacity:n=!1,animationStateClasses:i={},applyInlineTransitions:r=!0,children:o,className:a="",contentClassName:l,delay:c=0,disableDisplayNone:d=!1,duration:u=500,easing:h="ease",height:p,onHeightAnimationEnd:m,onHeightAnimationStart:f,style:g,contentRef:w}=e,v=Object.assign({},e);Ei.forEach(e=>{delete v[e]});const b=s.useRef(p),y=s.useRef(null),x=s.useRef(),q=s.useRef(),T=s.useRef(Object.assign(Object.assign({},Ti),i)),S=typeof window<"u",E=s.useRef(!(!S||!window.matchMedia)&&window.matchMedia("(prefers-reduced-motion)").matches),k=E.current?0:c,_=E.current?0:u;let j=p,C="visible";"number"==typeof p?(j=p<0?0:p,C="hidden"):xi(j)&&(j="0%"===p?0:p,C="hidden");const[O,P]=s.useState(j),[A,N]=s.useState(C),[I,L]=s.useState(!1),[M,z]=s.useState(Si(T.current,p));s.useEffect(()=>{qi(y.current,O,d)},[]),s.useEffect(()=>{if(p!==b.current&&y.current){(function(e,t){0===t&&e?.style&&(e.style.display="")})(y.current,b.current),y.current.style.overflow="hidden";const e=y.current.offsetHeight;y.current.style.overflow="";const t=_+k;let n,i,r,s="hidden";const o="auto"===b.current;"number"==typeof p?(n=p<0?0:p,i=n):xi(p)?(n="0%"===p?0:p,i=n):(n=e,i="auto",s=void 0),o&&(i=n,n=e);const a=[T.current.animating,("auto"===b.current||p<b.current)&&T.current.animatingUp,("auto"===p||p>b.current)&&T.current.animatingDown,0===i&&T.current.animatingToHeightZero,"auto"===i&&T.current.animatingToHeightAuto,"number"==typeof i&&i>0?T.current.animatingToHeightSpecific:null].filter(e=>e).join(" "),l=Si(T.current,i);P(n),N("hidden"),L(!o),z(a),clearTimeout(q.current),clearTimeout(x.current),o?(r=!0,q.current=setTimeout(()=>{P(i),N(s),L(r),f?.(i)},50),x.current=setTimeout(()=>{L(!1),z(l),qi(y.current,i,d),m?.(i)},t)):(f?.(n),q.current=setTimeout(()=>{P(i),N(s),L(!1),z(l),"auto"!==p&&qi(y.current,n,d),m?.(n)},t))}return b.current=p,()=>{clearTimeout(q.current),clearTimeout(x.current)}},[p]);const V=Object.assign(Object.assign({},g),{height:O,overflow:A||g?.overflow});I&&r&&(V.transition=`height ${_}ms ${h} ${k}ms`,g?.transition&&(V.transition=`${g.transition}, ${V.transition}`),V.WebkitTransition=V.transition);const F={};n&&(F.transition=`opacity ${_}ms ${h} ${k}ms`,F.WebkitTransition=F.transition,0===O&&(F.opacity=0));const R=typeof v["aria-hidden"]<"u"?v["aria-hidden"]:0===p;return H.createElement("div",Object.assign({},v,{"aria-hidden":R,className:`${M} ${a}`,style:V,ref:t}),H.createElement("div",{className:l,style:F,ref:e=>{y.current=e,w&&(w.current=e)}},o))});var _i,ji,Ci={},Oi={exports:{}},Pi=Oi.exports;function Ai(){return _i||(_i=1,e=Oi,t=Oi.exports,function(n,i){var r="function",s="undefined",o="object",a="string",l="major",c="model",d="name",u="type",h="vendor",p="version",m="architecture",f="console",g="mobile",w="tablet",v="smarttv",b="wearable",y="embedded",x="Amazon",q="Apple",T="ASUS",S="BlackBerry",E="Browser",k="Chrome",_="Firefox",j="Google",C="Honor",O="Huawei",P="LG",A="Microsoft",N="Motorola",I="Nvidia",L="OnePlus",M="Opera",z="OPPO",V="Samsung",F="Sharp",R="Sony",D="Xiaomi",B="Zebra",H="Facebook",U="Chromium OS",W="Mac OS",$=" Browser",Y=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},G=function(e,t){return typeof e===a&&-1!==Z(t).indexOf(Z(e))},Z=function(e){return e.toLowerCase()},K=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},X=function(e,t){for(var n,s,a,l,c,d,u=0;u<t.length&&!c;){var h=t[u],p=t[u+1];for(n=s=0;n<h.length&&!c&&h[n];)if(c=h[n++].exec(e))for(a=0;a<p.length;a++)d=c[++s],typeof(l=p[a])===o&&l.length>0?2===l.length?typeof l[1]==r?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==r||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):i:this[l[0]]=d?l[1].call(this,d,l[2]):i:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):i):this[l]=d||i;u+=2}},Q=function(e,t){for(var n in t)if(typeof t[n]===o&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(G(t[n][r],e))return"?"===n?i:n}else if(G(t[n],e))return"?"===n?i:n;return t.hasOwnProperty("*")?t["*"]:e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,p],[/opios[\/ ]+([\w\.]+)/i],[p,[d,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[p,[d,M+" GX"]],[/\bopr\/([\w\.]+)/i],[p,[d,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[p,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[p,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,p],[/quark(?:pc)?\/([-\w\.]+)/i],[p,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[p,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[d,"UC"+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[p,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[p,[d,"Smart Lenovo "+E]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+E],p],[/\bfocus\/([\w\.]+)/i],[p,[d,_+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[d,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[d,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[d,"MIUI"+$]],[/fxios\/([\w\.-]+)/i],[p,[d,_]],[/\bqihoobrowser\/?([\w\.]*)/i],[p,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],p],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+$],p],[/samsungbrowser\/([\w\.]+)/i],[p,[d,V+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[p,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,p],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[p,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,H],p],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[d,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,k+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[d,"Android "+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[p,Q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],p],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[d,_+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[p,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[p,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[m,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[m,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[m,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[m,/ower/,"",Z]],[/ sun4\w[;\)]/i],[[m,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[m,Z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[h,V],[u,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,V],[u,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,q],[u,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,q],[u,w]],[/(macintosh);/i],[c,[h,q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,F],[u,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[c,[h,C],[u,w]],[/honor([-\w ]+)[;\)]/i],[c,[h,C],[u,g]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[c,[h,O],[u,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,O],[u,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[c,/_/g," "],[h,D],[u,w]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[c,/_/g," "],[h,D],[u,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,z],[u,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[c,[h,Q,{OnePlus:["304","403","203"],"*":z}],[u,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[u,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[u,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,N],[u,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,N],[u,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,P],[u,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,P],[u,g]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[c,[h,"Lenovo"],[u,w]],[/(nokia) (t[12][01])/i],[h,c,[u,w]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[c,/_/g," "],[u,g],[h,"Nokia"]],[/(pixel (c|tablet))\b/i],[c,[h,j],[u,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,j],[u,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,R],[u,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,R],[u,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,L],[u,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,x],[u,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,x],[u,g]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[u,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,S],[u,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,T],[u,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,T],[u,g]],[/(nexus 9)/i],[c,[h,"HTC"],[u,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[u,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[h,"TCL"],[u,w]],[/(itel) ((\w+))/i],[[h,Z],c,[u,Q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[u,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[u,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[h,"Ulefone"],[u,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[h,"Energizer"],[u,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[h,"Cat"],[u,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[h,"Smartfren"],[u,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[h,"Nothing"],[u,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[c,[h,"Archos"],[u,w]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[c,[h,"Archos"],[u,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[h,c,[u,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[u,g]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,c,[u,w]],[/(surface duo)/i],[c,[h,A],[u,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[u,g]],[/(u304aa)/i],[c,[h,"AT&T"],[u,g]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[u,g]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[u,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[u,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[u,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[u,w]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[u,w]],[/\b(k88) b/i],[c,[h,"ZTE"],[u,w]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[u,g]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[u,g]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[u,w]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[u,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[u,w]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[u,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[u,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[u,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[u,g]],[/\b(ph-1) /i],[c,[h,"Essential"],[u,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[u,w]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[u,w]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[u,w]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[c,[h,I],[u,w]],[/(sprint) (\w+)/i],[h,c,[u,g]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,A],[u,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,B],[u,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,B],[u,g]],[/smart-tv.+(samsung)/i],[h,[u,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,V],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,P],[u,v]],[/(apple) ?tv/i],[h,[c,q+" TV"],[u,v]],[/crkey/i],[[c,k+"cast"],[h,j],[u,v]],[/droid.+aft(\w+)( bui|\))/i],[c,[h,x],[u,v]],[/(shield \w+ tv)/i],[c,[h,I],[u,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,F],[u,v]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,R],[u,v]],[/(mi(tv|box)-?\w+) bui/i],[c,[h,D],[u,v]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,K],[c,K],[u,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[c,[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[u,f]],[/droid.+; (shield)( bui|\))/i],[c,[h,I],[u,f]],[/(playstation \w+)/i],[c,[h,R],[u,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,A],[u,f]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[c,[h,V],[u,b]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[h,c,[u,b]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[c,[h,z],[u,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,q],[u,b]],[/(opwwe\d{3})/i],[c,[h,L],[u,b]],[/(moto 360)/i],[c,[h,N],[u,b]],[/(smartwatch 3)/i],[c,[h,R],[u,b]],[/(g watch r)/i],[c,[h,P],[u,b]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,B],[u,b]],[/droid.+; (glass) \d/i],[c,[h,j],[u,b]],[/(pico) (4|neo3(?: link|pro)?)/i],[h,c,[u,b]],[/; (quest( \d| pro)?)/i],[c,[h,H],[u,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[u,y]],[/(aeobc)\b/i],[c,[h,x],[u,y]],[/(homepod).+mac os/i],[c,[h,q],[u,y]],[/windows iot/i],[[u,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[u,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[u,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,p],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,p],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,p],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[d,[p,Q,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,Q,J],[d,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,W],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],p],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[d,p],[/\(bb(10);/i],[p,[d,S]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[p,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[d,_+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[d,k+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,U],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,p],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,p]]},te=function(e,t){if(typeof e===o&&(t=e,e=i),!(this instanceof te))return new te(e,t).getResult();var f=typeof n!==s&&n.navigator?n.navigator:i,v=e||(f&&f.userAgent?f.userAgent:""),b=f&&f.userAgentData?f.userAgentData:i,y=t?function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n}(ee,t):ee,x=f&&f.userAgent==v;return this.getBrowser=function(){var e={};return e[d]=i,e[p]=i,X.call(e,v,y.browser),e[l]=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:i}(e[p]),x&&f&&f.brave&&typeof f.brave.isBrave==r&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[m]=i,X.call(e,v,y.cpu),e},this.getDevice=function(){var e={};return e[h]=i,e[c]=i,e[u]=i,X.call(e,v,y.device),x&&!e[u]&&b&&b.mobile&&(e[u]=g),x&&"Macintosh"==e[c]&&f&&typeof f.standalone!==s&&f.maxTouchPoints&&f.maxTouchPoints>2&&(e[c]="iPad",e[u]=w),e},this.getEngine=function(){var e={};return e[d]=i,e[p]=i,X.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[d]=i,e[p]=i,X.call(e,v,y.os),x&&!e[d]&&b&&b.platform&&"Unknown"!=b.platform&&(e[d]=b.platform.replace(/chrome os/i,U).replace(/macos/i,W)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===a&&e.length>500?K(e,500):e,this},this.setUA(v),this};te.VERSION="1.0.41",te.BROWSER=Y([d,p,l]),te.CPU=Y([m]),te.DEVICE=Y([c,h,u,f,g,v,w,b,y]),te.ENGINE=te.OS=Y([d,p]),e.exports&&(t=e.exports=te),t.UAParser=te;var ne=typeof n!==s&&(n.jQuery||n.Zepto);if(ne&&!ne.ua){var ie=new te;ne.ua=ie.getResult(),ne.ua.get=function(){return ie.getUA()},ne.ua.set=function(e){ie.setUA(e);var t=ie.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:Pi)),Oi.exports;var e,t}var Ni=function(){if(ji)return Ci;ji=1,Object.defineProperty(Ci,"__esModule",{value:!0});var e,t=k(),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=Ai(),r=new i,s=r.getBrowser(),o=r.getCPU(),a=r.getDevice(),l=r.getEngine(),c=r.getOS(),d=r.getUA(),u=function(e){return r.setUA(e)},h=function(e){if(e){var t=new i(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}console.error("No userAgent string was provided")},p=Object.freeze({ClientUAInstance:r,browser:s,cpu:o,device:a,engine:l,os:c,ua:d,setUa:u,parseUserAgent:h});function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t),e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v.apply(this,arguments)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,s=[],o=!0,a=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(s.push(i.value),!t||s.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{!o&&null!=n.return&&n.return()}finally{if(a)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var E="mobile",_="tablet",j="smarttv",C="console",O="wearable",P="embedded",A=void 0,N={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},I={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},L={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},M=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},z=function(){return!!(typeof window<"u"&&(window.navigator||navigator))&&(window.navigator||navigator)},V=function(e){var t=z();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},F=function(e,t,n,i){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:M(t.vendor),model:M(t.model),os:M(n.name),osVersion:M(n.version),ua:M(i)})},R=function(e){return e.type===E},D=function(e){return e.type===_},B=function(e){var t=e.type;return t===E||t===_},H=function(e){return e.type===j},U=function(e){return e.type===A},W=function(e){return e.type===O},$=function(e){return e.type===C},Y=function(e){return e.type===P},G=function(e){var t=e.vendor;return M(t)},Z=function(e){var t=e.model;return M(t)},K=function(e){var t=e.type;return M(t,"browser")},X=function(e){return e.name===I.Android},Q=function(e){return e.name===I.Windows},J=function(e){return e.name===I.MAC_OS},ee=function(e){return e.name===I.WindowsPhone},te=function(e){return e.name===I.IOS},ne=function(e){var t=e.version;return M(t)},ie=function(e){var t=e.name;return M(t)},re=function(e){return e.name===N.Chrome},se=function(e){return e.name===N.Firefox},oe=function(e){return e.name===N.Chromium},ae=function(e){return e.name===N.Edge},le=function(e){return e.name===N.Yandex},ce=function(e){var t=e.name;return t===N.Safari||t===N.MobileSafari},de=function(e){return e.name===N.MobileSafari},ue=function(e){return e.name===N.Opera},he=function(e){var t=e.name;return t===N.InternetExplorer||t===N.Ie},pe=function(e){return e.name===N.MIUI},me=function(e){return e.name===N.SamsungBrowser},fe=function(e){var t=e.version;return M(t)},ge=function(e){var t=e.major;return M(t)},we=function(e){var t=e.name;return M(t)},ve=function(e){var t=e.name;return M(t)},be=function(e){var t=e.version;return M(t)},ye=function(){var e=z(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},xe=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},qe=function(){var e=z();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},Te=function(){return V("iPad")},Se=function(){return V("iPhone")},Ee=function(){return V("iPod")},ke=function(e){return M(e)};function _e(e){var t=e||p,n=t.device,i=t.browser,r=t.os,s=t.engine,o=t.ua;return{isSmartTV:H(n),isConsole:$(n),isWearable:W(n),isEmbedded:Y(n),isMobileSafari:de(i)||Te(),isChromium:oe(i),isMobile:B(n)||Te(),isMobileOnly:R(n),isTablet:D(n)||Te(),isBrowser:U(n),isDesktop:U(n),isAndroid:X(r),isWinPhone:ee(r),isIOS:te(r)||Te(),isChrome:re(i),isFirefox:se(i),isSafari:ce(i),isOpera:ue(i),isIE:he(i),osVersion:ne(r),osName:ie(r),fullBrowserVersion:fe(i),browserVersion:ge(i),browserName:we(i),mobileVendor:G(n),mobileModel:Z(n),engineName:ve(s),engineVersion:be(s),getUA:ke(o),isEdge:ae(i)||xe(o),isYandex:le(i),deviceType:K(n),isIOS13:qe(),isIPad13:Te(),isIPhone13:Se(),isIPod13:Ee(),isElectron:ye(),isEdgeChromium:xe(o),isLegacyEdge:ae(i)&&!xe(o),isWindows:Q(r),isMacOs:J(r),isMIUI:pe(i),isSamsungBrowser:me(i)}}var je=H(a),Ce=$(a),Oe=W(a),Pe=Y(a),Ae=de(s)||Te(),Ne=oe(s),Ie=B(a)||Te(),Le=R(a),Me=D(a)||Te(),ze=U(a),Ve=U(a),Fe=X(c),Re=ee(c),De=te(c)||Te(),Be=re(s),He=se(s),Ue=ce(s),We=ue(s),$e=he(s),Ye=ne(c),Ge=ie(c),Ze=fe(s),Ke=ge(s),Xe=we(s),Qe=G(a),Je=Z(a),et=ve(l),tt=be(l),nt=ke(d),it=ae(s)||xe(d),rt=le(s),st=K(a),ot=qe(),at=Te(),lt=Se(),ct=Ee(),dt=ye(),ut=xe(d),ht=ae(s)&&!xe(d),pt=Q(c),mt=J(c),ft=pe(s),gt=me(s);function wt(e){var t=e||window.navigator.userAgent;return h(t)}return Ci.AndroidView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Fe?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.BrowserTypes=N,Ci.BrowserView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return ze?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.ConsoleView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Ce?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.CustomView=function(e){var i=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var s=e.condition,o=x(e,["renderWithFragment","children","viewClassName","style","condition"]);return s?i?n.createElement(t.Fragment,null,r):n.createElement("div",o,r):null},Ci.IEView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return $e?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.IOSView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return De?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.MobileOnlyView=function(e){var i=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var s=x(e,["renderWithFragment","children","viewClassName","style"]);return Le?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.MobileView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Ie?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.OsTypes=I,Ci.SmartTVView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return je?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.TabletView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Me?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.WearableView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Oe?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.WinPhoneView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Re?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},Ci.browserName=Xe,Ci.browserVersion=Ke,Ci.deviceDetect=function(e){var t=e?h(e):p,n=t.device,i=t.browser,r=t.engine,s=t.os,o=t.ua,a=function(e){switch(e){case E:return{isMobile:!0};case _:return{isTablet:!0};case j:return{isSmartTV:!0};case C:return{isConsole:!0};case O:return{isWearable:!0};case A:return{isBrowser:!0};case P:return{isEmbedded:!0};default:return L}}(n.type),l=a.isBrowser,c=a.isMobile,d=a.isTablet,u=a.isSmartTV,m=a.isConsole,f=a.isWearable,g=a.isEmbedded;return l?function(e,t,n,i,r){return{isBrowser:e,browserMajorVersion:M(t.major),browserFullVersion:M(t.version),browserName:M(t.name),engineName:M(n.name),engineVersion:M(n.version),osName:M(i.name),osVersion:M(i.version),userAgent:M(r)}}(l,i,r,s,o):u?function(e,t,n,i){return{isSmartTV:e,engineName:M(t.name),engineVersion:M(t.version),osName:M(n.name),osVersion:M(n.version),userAgent:M(i)}}(u,r,s,o):m?function(e,t,n,i){return{isConsole:e,engineName:M(t.name),engineVersion:M(t.version),osName:M(n.name),osVersion:M(n.version),userAgent:M(i)}}(m,r,s,o):c||d?F(a,n,s,o):f?function(e,t,n,i){return{isWearable:e,engineName:M(t.name),engineVersion:M(t.version),osName:M(n.name),osVersion:M(n.version),userAgent:M(i)}}(f,r,s,o):g?function(e,t,n,i,r){return{isEmbedded:e,vendor:M(t.vendor),model:M(t.model),engineName:M(n.name),engineVersion:M(n.version),osName:M(i.name),osVersion:M(i.version),userAgent:M(r)}}(g,n,r,s,o):void 0},Ci.deviceType=st,Ci.engineName=et,Ci.engineVersion=tt,Ci.fullBrowserVersion=Ze,Ci.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=h(e);return _e({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}console.error("No valid user agent string was provided")},Ci.getUA=nt,Ci.isAndroid=Fe,Ci.isBrowser=ze,Ci.isChrome=Be,Ci.isChromium=Ne,Ci.isConsole=Ce,Ci.isDesktop=Ve,Ci.isEdge=it,Ci.isEdgeChromium=ut,Ci.isElectron=dt,Ci.isEmbedded=Pe,Ci.isFirefox=He,Ci.isIE=$e,Ci.isIOS=De,Ci.isIOS13=ot,Ci.isIPad13=at,Ci.isIPhone13=lt,Ci.isIPod13=ct,Ci.isLegacyEdge=ht,Ci.isMIUI=ft,Ci.isMacOs=mt,Ci.isMobile=Ie,Ci.isMobileOnly=Le,Ci.isMobileSafari=Ae,Ci.isOpera=We,Ci.isSafari=Ue,Ci.isSamsungBrowser=gt,Ci.isSmartTV=je,Ci.isTablet=Me,Ci.isWearable=Oe,Ci.isWinPhone=Re,Ci.isWindows=pt,Ci.isYandex=rt,Ci.mobileModel=Je,Ci.mobileVendor=Qe,Ci.osName=Ge,Ci.osVersion=Ye,Ci.parseUserAgent=h,Ci.setUserAgent=function(e){return u(e)},Ci.useDeviceData=wt,Ci.useDeviceSelectors=function(e){var t=wt(e||window.navigator.userAgent);return[_e(t),t]},Ci.useMobileOrientation=function(){var e=T(t.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),2),n=e[0],i=e[1],r=t.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};n.orientation!==t.orientation&&i(t)},[n.orientation]);return t.useEffect(function(){return void 0!==(typeof window>"u"?"undefined":f(window))&&Ie&&(r(),window.addEventListener("load",r,!1),window.addEventListener("resize",r,!1)),function(){window.removeEventListener("resize",r,!1),window.removeEventListener("load",r,!1)}},[r]),n},Ci.withOrientationChange=function(e){return function(t){function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return q(e)}(this,b(i).call(this,e)),t.isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(q(t)),t.onOrientationChange=t.onOrientationChange.bind(q(t)),t.onPageLoad=t.onPageLoad.bind(q(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)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}}),t&&y(e,t)}(i,t),g(i,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==(typeof window>"u"?"undefined":f(window))&&Ie&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(e,v({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),i}(n.Component)},Ci}(),Ii=function(e,t){return(Ii=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var Li=function(){return Li=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Li.apply(this,arguments)};var Mi="Pixel",zi="Percent",Vi={unit:zi,value:.8};function Fi(e){return"number"==typeof e?{unit:zi,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:Mi,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:zi,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),Vi):(console.warn("scrollThreshold should be string or number"),Vi)}var Ri=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),!(n.currentY<n.startY)&&(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),!(n.currentY-n.startY>1.5*n.maxPullDownDistance)&&n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,i){var r,s=!1,o=0;function a(){r&&clearTimeout(r)}function l(){var l=this,c=Date.now()-o,d=arguments;function u(){o=Date.now(),n.apply(l,d)}s||(i&&!r&&u(),a(),void 0===i&&c>e?u():!0!==t&&(r=setTimeout(i?function(){r=void 0}:u,void 0===i?e-c:e)))}return"boolean"!=typeof t&&(i=n,n=t,t=void 0),l.cancel=function(){a(),s=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}Ii(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?Li(Li({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,i=Fi(t);return i.unit===Mi?e.scrollTop<=i.value+n-e.scrollHeight+1:e.scrollTop<=i.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,i=Fi(t);return i.unit===Mi?e.scrollTop+n>=e.scrollHeight-i.value:e.scrollTop+n>=i.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=Li({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),i=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return H.createElement("div",{style:i,className:"infinite-scroll-component__outerdiv"},H.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&H.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},H.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(s.Component);const Di=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const{eventSlug:e}=C(),{loadingUser:t,organization:n,folders:i}=o(),r=R(),[a,l]=s.useState(""),[c,d]=s.useState(null),[u,f]=s.useState(p),[g,w]=s.useState(m),[y,q]=s.useState(Ni.isMobile?S.SINGLE:S.GRID),T=s.useRef(null),{event:E,ads:k}=O({eventSlug:e}),{loading:_,contentsWithAds:j,hasNextPage:N,fetchNextPage:M,isFetchingNextPage:z}=Ae({event:E,ads:k,sort:u,order:g,keywords:a,face:c,includeSummary:n?.navigationSettings?.showAIDescription}),{incrementEventView:V}=je(),{start:F,initializing:D,running:B}=Ce({ref:T,hasNextPage:N,fetchNextPage:M,isFetchingNextPage:z,onBottomReached:()=>r.refetchQueries([h.CONTENTS_BY_EVENT(E?._id)])});s.useEffect(()=>{E&&V(E?.slug)},[E]);const H=s.useMemo(()=>y===S.SINGLE,[y]),G=s.useMemo(()=>v.jsx(re,{event:E,onAutoscrollClick:F}),[E?.galleryLayout,F]);return v.jsxs("div",{className:"qc:mx-auto qc:min-h-[80vh] qc:space-y-2 qc:bg-background",children:[v.jsx("div",{className:"qc:flex qc:flex-row qc:justify-end",children:G}),E.folderId&&n.integrationSettings?.showFullPath&&v.jsx("div",{className:"qc:py-2",children:v.jsx($,{homeLink:I.PUBLIC_EVENTS,data:Y(i,E.folderId)})}),v.jsx("div",{className:"qc:pb-2",children:v.jsx($e,{})}),v.jsx(Ve,{engagementStyle:E?.engagementStyle,disabled:t||_,mode:y,onModeChange:q,sort:u,sortOrder:g,onSortChange:f,onSortOrderChange:()=>w("asc"===g?"desc":"asc"),handleChange:l,face:c,onFaceImageChange:d}),v.jsx(ki,{duration:300,height:c?"auto":0,animateOpacity:!0,children:v.jsxs("div",{className:"qc:flex qc:gap-4",children:[v.jsxs("div",{className:"qc:space-y-2",children:[v.jsx(P,{variant:"h4",children:"Searching using"}),v.jsx("img",{src:c,alt:"face",className:"qc:h-32 qc:rounded"})]}),v.jsx("div",{className:"qc:flex qc:flex-col qc:justify-end qc:gap-2",children:v.jsx(L,{color:"error",icon:"material-symbols:close-rounded",onClick:()=>d(null),children:"Clear search"})})]})}),t||_?v.jsx("div",{className:"qc:grid qc:grid-cols-1 qc:gap-4 qc:sm:grid-cols-3",children:Array.from({length:8}).map((e,t)=>v.jsx(U,{className:"qc:h-72"},t))}):j?.length<=0?v.jsx("div",{children:v.jsx(W,{title:"No contents",description:"Be the first to upload in the event",iconSvg:v.jsxs("svg",{"data-name":"Layer 1",className:"qc:size-full",viewBox:"0 0 858.76 581.93",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.6 738.67a198.59 198.59 0 0 1 16.436-62.675q3.7094-8.2865 8.1655-16.208a1.2103 1.2103 0 0 0-2.0886-1.2208 201.33 201.33 0 0 0-22.403 61.805q-1.682 9.0855-2.5283 18.299c-0.14337 1.5493 2.2763 1.5396 2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"842.44",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m984.17 739.08a128.83 128.83 0 0 1 10.662-40.66q2.4064-5.3758 5.2973-10.515a0.78518 0.78518 0 0 0-1.355-0.792 130.61 130.61 0 0 0-14.534 40.096q-1.0912 5.8942-1.6402 11.872c-0.093 1.0051 1.4768 0.99878 1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"833.31",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.19 738.14a128.83 128.83 0 0 1-16.601-38.618q-1.409-5.7188-2.2905-11.549a0.78518 0.78518 0 0 0-1.5555 0.2089 130.61 130.61 0 0 0 13.202 40.554q2.7649 5.3186 6.0085 10.369c0.54487 0.84972 1.7787-0.12078 1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"791.11",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.05 738.67a198.59 198.59 0 0 0-16.436-62.675q-3.7094-8.2865-8.1655-16.208a1.2103 1.2103 0 0 1 2.0886-1.2208 201.33 201.33 0 0 1 22.403 61.805q1.682 9.0855 2.5283 18.299c0.14338 1.5493-2.2763 1.5396-2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"139.97",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m339.48 739.08a128.83 128.83 0 0 0-10.662-40.66q-2.4064-5.3758-5.2973-10.515a0.78518 0.78518 0 0 1 1.355-0.792 130.61 130.61 0 0 1 14.534 40.096q1.0912 5.8942 1.6402 11.872c0.093 1.0051-1.4768 0.99878-1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"149.1",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.46 738.14a128.83 128.83 0 0 0 16.601-38.618q1.409-5.7188 2.2905-11.549a0.78518 0.78518 0 0 1 1.5555 0.2089 130.61 130.61 0 0 1-13.202 40.554q-2.7649 5.3186-6.0084 10.369c-0.54487 0.84972-1.7787-0.12078-1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"191.3",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m925.02 538.41 0.2391 180.11a12.626 12.626 0 0 1-12.593 12.63l-74.817 0.10967c21.062-39.4 32.987-101.41 32.917-149.22a281.27 281.27 0 0 0-5.721-56.161l47.345-0.0694a12.626 12.626 0 0 1 12.63 12.593z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m1028.2 740.97h-738.29a1.1907 1.1907 0 0 1 0-2.3814h738.29a1.1907 1.1907 0 0 1 0 2.3814z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m815.39 513.79-133.34-0.52295 12.966-43.137a16.599 16.599 0 0 1 15.804-11.75h0.06274l76.106 0.29883a16.597 16.597 0 0 1 15.774 11.875z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m889.83 499.03a14 14 0 0 0-14 14h28a14 14 0 0 0-14-14z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m932.83 740.03h-368a17.019 17.019 0 0 1-17-17v-194a17.019 17.019 0 0 1 17-17h368a17.019 17.019 0 0 1 17 17v194a17.019 17.019 0 0 1-17 17zm-368-226a15.017 15.017 0 0 0-15 15v194a15.017 15.017 0 0 0 15 15h368a15.017 15.017 0 0 0 15-15v-194a15.017 15.017 0 0 0-15-15z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m764.83 497.53h-32a8.5 8.5 0 0 1 0-17h32a8.5 8.5 0 0 1 0 17z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 702.03a76 76 0 1 1 76-76 76.086 76.086 0 0 1-76 76zm0-150a74 74 0 1 0 74 74 74.084 74.084 0 0 0-74-74z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 676.03a50 50 0 1 1 50-50 50.056 50.056 0 0 1-50 50zm0-98a48 48 0 1 0 48 48 48.054 48.054 0 0 0-48-48z",fill:"#3f3d56"}),v.jsx("circle",{cx:"578.2",cy:"467",r:"38",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m725.83 626.03a25.001 25.001 0 0 1 21.5-24.751 25 25 0 1 0 0 49.502 25.001 25.001 0 0 1-21.5-24.751z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m914.83 514.03h-50v-1a25 25 0 0 1 50 0zm-47.979-2h45.957a23 23 0 0 0-45.957 0z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m572.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("circle",{cx:"402.2",cy:"373",r:"5",fill:"currentColor"}),v.jsx("circle",{cx:"428.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("circle",{cx:"454.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m598.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m624.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"648.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"651.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m443.45 401.51c-8.1095-3.7255-13.44-14.377-13.137-24.881s5.8315-20.329 13.456-25.338a26.649 26.649 0 0 1 25.219-1.9056c8.1825 3.483 19.169 4.4318 24.087 13.089 3.7796 6.6528 2.4181 21.495-0.25792 28.892-2.3129 6.394-7.9684 9.9966-13.483 12.013a45.34 45.34 0 0 1-37.511-3.0216",fill:"#2f2e41"}),v.jsx("polygon",{points:"223.38 568.71 211.72 564.91 220.8 518.14 238.01 523.74",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(72.575 -240.02) rotate(18.021)",d:"m372.58 718.9h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("polygon",{points:"327.75 568.96 315.49 568.96 309.66 521.67 327.75 521.67",fill:"#ffb8b8"}),v.jsx("path",{d:"m306.73 565.46h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m497.75 708.65c-0.07373 0-0.14746-2e-3 -0.22168-0.00585l-13.586-0.64747a4.5061 4.5061 0 0 1-4.2854-4.4326l-1.8411-134.39a1.5 1.5 0 0 0-2.8267-0.67871l-71.958 136.44a4.4762 4.4762 0 0 1-4.822 2.3213l-13.521-2.5752a4.4992 4.4992 0 0 1-3.4014-5.918l52.43-148.55 4.0344-43.943a4.4698 4.4698 0 0 1 3.936-4.0498c15.277-1.877 36.624-14.395 45.092-19.689a4.446 4.446 0 0 1 3.5305-0.53125 4.5558 4.5558 0 0 1 2.8308 2.2451 202.75 202.75 0 0 1 22.277 123.98l-13.217 96.54a4.4752 4.4752 0 0 1-4.4507 3.8907z",fill:"#2f2e41"}),v.jsx("circle",{cx:"290.56",cy:"228.24",r:"24.561",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m436.71 516.82-7.3955-52.845a31.045 31.045 0 0 1 60.574-13.635c2.106 9.7686 6.385 21.66 4.8218 34.479-10.953 30.399-30.835 39.772-58 32z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m469.21 434.82h-18a4.5051 4.5051 0 0 1-4.5-4.5v-6a4.5051 4.5051 0 0 1 4.5-4.5h18a4.5051 4.5051 0 0 1 4.5 4.5v6a4.5051 4.5051 0 0 1-4.5 4.5z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m560.44 534.7a10.743 10.743 0 0 0-8.7149-13.979l-56.029-80.214-16.614 16.425 60.299 73.683a10.801 10.801 0 0 0 21.059 4.0847z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m513.22 465.05-20.234 13.507a4.8169 4.8169 0 0 1-7.0291-1.9475l-10.365-21.928a13.377 13.377 0 0 1 22.295-14.789l16.229 17.919a4.8169 4.8169 0 0 1-0.8968 7.2386z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m362.5 426.92a10.526 10.526 0 0 1 0.2393 1.6401l42.957 24.782 10.441-6.0109 11.131 14.572-17.45 12.438a8 8 0 0 1-9.5982-0.23384l-44.297-34.946a10.497 10.497 0 1 1 6.5757-12.241z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m418.18 471.35-10.794-21.802a4.8169 4.8169 0 0 1 2.835-6.7204l23.078-7.4597a13.377 13.377 0 0 1 11.8 24.012l-19.857 13.79a4.8169 4.8169 0 0 1-7.0632-1.82z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m477.67 356.34a4.0633 4.0633 0 0 0 4.3168-2.4094 5.8506 5.8506 0 0 0-0.41558-5.1377 10.736 10.736 0 0 0-3.7759-3.7034 12.406 12.406 0 0 0-5.9816-2.0579 7.4612 7.4612 0 0 0-5.7939 2.1993 5.3768 5.3768 0 0 0-0.97171 5.9276c0.89811 1.7319 2.7825 2.7031 4.6186 3.3625a27.094 27.094 0 0 0 11.378 1.4944",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m485.52 398.45c-4.2928 0.20179-3.5536-8.9072-4.8971-12.989s-3.1955-8.9513-7.4212-9.734c-3.463-0.6414-6.5925 1.8908-9.609 3.7086-5.3764 3.24-12.336 4.4352-17.981 1.6906s-9.0786-10.078-6.3329-15.723a12.876 12.876 0 0 1 8.049-6.3415 25.906 25.906 0 0 1 10.462-0.50253 53.527 53.527 0 0 1 21.886 7.7574c4.5819 2.8736 8.9417 6.7864 10.306 12.02s1.9198 19.465-3.413 20.366z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m474.29 343.67c-3.2427-4.1108-2.0213-10.588 1.7582-14.211s9.3995-4.7529 14.615-4.292a29.621 29.621 0 0 1 24.025 17.275c3.2959 7.5393 3.2687 16.163 6.2494 23.832a32.137 32.137 0 0 0 43.41 17.543c5.1881-2.3921 10.128-7.0763 9.8321-12.782 3.2802 12.646-2.6276 27.112-13.823 33.847-6.5573 3.9448-14.323 5.284-21.92 6.2056-4.9507 0.60059-10.039 1.0474-14.87-0.18987-6.7592-1.731-12.418-6.7198-15.845-12.798s-4.7748-13.161-4.827-20.138c-0.04071-5.4353 0.67085-10.873 0.29483-16.296s-2.0061-11.031-5.9367-14.785-10.564-4.9899-14.878-1.6831c-1.7337 1.329-3.0043 3.2697-4.9563 4.2502s-5.036 0.21793-5.1666-1.9626z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m380.18 427.1h-202.58a6.9935 6.9935 0 0 1-6.9854-6.9854v-114.1a6.9936 6.9936 0 0 1 6.9854-6.9854h202.58a6.9933 6.9933 0 0 1 6.9854 6.9854v114.1a6.9933 6.9933 0 0 1-6.9854 6.9854zm-202.58-126.51a5.4392 5.4392 0 0 0-5.4331 5.4331v114.1a5.4392 5.4392 0 0 0 5.4331 5.4331h202.58a5.4395 5.4395 0 0 0 5.4331-5.4331v-114.1a5.4394 5.4394 0 0 0-5.4331-5.4331z",fill:"#3f3d56"}),v.jsx("circle",{cx:"73.768",cy:"191.12",r:"28.967",fill:"#e6e6e6"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m356.01 401.31-34.003-58.895a2.4215 2.4215 0 0 0-4.1941 0l-20.751 35.942-30.936-53.582a3.1047 3.1047 0 0 0-5.3774 0l-43.596 75.511a3.1046 3.1046 0 0 0 2.6887 4.657h134.07a2.4215 2.4215 0 0 0 2.0971-3.6322z",fill:"currentColor"}),v.jsx("rect",{x:"14.747",y:"153.97",width:"12.419",height:"12.419",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m459.04 259.1h-158.29a5.4645 5.4645 0 0 1-5.4581-5.4582v-89.15a5.4645 5.4645 0 0 1 5.4581-5.4582h158.29a5.4643 5.4643 0 0 1 5.4582 5.4582v89.15a5.4643 5.4643 0 0 1-5.4582 5.4582zm-158.29-98.853a4.25 4.25 0 0 0-4.2452 4.2452v89.15a4.25 4.25 0 0 0 4.2452 4.2452h158.29a4.2502 4.2502 0 0 0 4.2452-4.2452v-89.15a4.2502 4.2502 0 0 0-4.2452-4.2452z",fill:"#ccc"}),v.jsx("circle",{cx:"182.31",cy:"39.947",r:"22.634",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m440.15 238.95-26.569-46.018a1.892 1.892 0 0 0-3.2771 0l-16.214 28.084-24.172-41.867a2.4259 2.4259 0 0 0-4.2017 0l-34.064 59.001a2.4258 2.4258 0 0 0 2.1008 3.6388h104.76a1.8921 1.8921 0 0 0 1.6386-2.8381z",fill:"#e6e6e6"}),v.jsx("rect",{x:"136.2",y:"10.916",width:"9.7034",height:"9.7034",fill:"#ccc"})]}),className:"qc:mt-8 qc:lg:mt-24"})}):v.jsx(Ri,{dataLength:j?.length||0,next:M,hasMore:N||!1,loader:v.jsx("div",{className:"qc:mx-auto qc:my-3 qc:w-fit",children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-12",viewBox:"0 0 24 24",children:[v.jsx("circle",{cx:18,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.67,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:12,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.33,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:6,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:0,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})})]})}),children:v.jsx("div",{ref:T,className:b(H?"qc:flex qc:w-full qc:justify-center":"",D?"qc:opacity-0":"qc:opacity-100",B?"qc:pointer-events-none qc:transition-opacity qc:duration-300":"qc:pointer-events-auto qc:transition-none","qc:scrollbar-hide qc:relative qc:size-full qc:overflow-auto"),children:v.jsx(yi,{event:E,contents:j,singleColumnMode:H,kioskMode:B,curateLink:E?.engagementStyle===x.CONTEST&&E.status===A.OPEN?I.CURATE(E?.slug):null,onChangeFaceUrl:d})})})]})}},Symbol.toStringTag,{value:"Module"}));export{Zt as C,Qt as P,$t as Z,Ct as a,qt as b,_t as c,Nt as d,Tt as e,Ut as f,Et as g,Wt as h,Ot as i,At as j,Ht as k,Di as l,kt as p,St as r,Vt as s,jt as t};