@qratilabs/qrati-connect 2.23.0-beta.2 → 2.23.0-beta.21

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 (173) hide show
  1. package/README.md +34 -131
  2. package/element/1dmOpMwn2.js +1 -0
  3. package/{umd/CU_-C7Pt2.js → element/B04BM8Ax2.js} +9 -9
  4. package/element/B45gcsxb.js +8 -0
  5. package/element/{B5BVTFlf.js → BCQyxXhG.js} +2 -2
  6. package/element/BItKl1T42.js +9 -0
  7. package/element/BNaRcekR2.js +1 -0
  8. package/element/BUDCYszs.js +1 -0
  9. package/element/BWP-4cpS.js +9 -0
  10. package/element/Bb7aA27_2.js +16 -0
  11. package/element/Be1kxf1X.js +1 -0
  12. package/element/BgQoyn-N2.js +24 -0
  13. package/{umd/CYQ06kUR.js → element/Bgs5C4HD.js} +1 -1
  14. package/element/BhkJLPA42.js +39 -0
  15. package/element/BhxijXQM.js +3 -0
  16. package/element/{fwDYCLiL.js → BlknxKzR.js} +1 -1
  17. package/element/Bo39kG4k2.js +1 -0
  18. package/{umd/WX3mhhd9.js → element/BsYbcfkG.js} +1 -1
  19. package/element/{CMQUiMWC2.js → BurXvsRl2.js} +2 -2
  20. package/element/BwwxqSTC2.js +1 -0
  21. package/element/C5zfotWt2.js +93 -0
  22. package/{umd/CgUphJWo.js → element/C7zv6hcG.js} +1 -1
  23. package/{umd/C9HFLidt.js → element/CAETItHr.js} +1 -1
  24. package/element/CAGI3w1m2.js +1 -0
  25. package/element/CBLQRRGX2.js +3 -0
  26. package/element/{CKk0UYyd.js → CFnGGYmq.js} +1 -1
  27. package/element/{BekfKWcG.js → CILYMBwp.js} +1 -1
  28. package/element/CKhD3GGu2.js +5 -0
  29. package/element/CL_evx_l.js +1 -0
  30. package/element/{wuONdFBI2.js → CObeYQ-T.js} +4 -4
  31. package/element/{DPmrTFJt.js → CPK30X_R.js} +2 -2
  32. package/{umd/CJpmOICA.js → element/CZ9iaxjO2.js} +1 -1
  33. package/element/ChKwv0LI.js +3 -0
  34. package/element/CiRDwfEo.js +14 -0
  35. package/element/CnXoEQ4O.js +41 -0
  36. package/element/CpYO5bBq.js +3 -0
  37. package/element/Cqm7RQaC2.js +1 -0
  38. package/element/CtxIOzTC2.js +1 -0
  39. package/element/{DXrH_HhZ.js → D35mTuTT.js} +1 -1
  40. package/element/DBYSpPDT.js +4 -0
  41. package/element/DC180L58.js +1 -0
  42. package/element/DDsXvZQf2.js +1 -0
  43. package/element/DDy6e4u1.js +1 -0
  44. package/element/DG0xITSs2.js +36 -0
  45. package/element/DG2ImKMr2.js +3 -0
  46. package/element/{DWbLshVZ.js → DGGc10Cy.js} +1 -1
  47. package/element/DH3iGq80.js +11 -0
  48. package/element/DM971zPD.js +3 -0
  49. package/element/DPg_DKOi.js +5 -0
  50. package/element/DSeZQTI82.js +3 -0
  51. package/{umd/9VAO1NmP.js → element/DTNXbVBR.js} +1 -1
  52. package/{umd/Wun_Og5n2.js → element/DTl-ou-l2.js} +5 -9
  53. package/element/DdACKOZr.js +1 -0
  54. package/element/DjMXpQHg.js +8 -0
  55. package/element/{u7SUQ9Kb2.js → DlRUi0u42.js} +2 -2
  56. package/element/DmpmrPE5.js +1 -0
  57. package/element/DnIueBGr.js +1 -0
  58. package/element/Dpi8tX5M.js +1 -0
  59. package/element/DrrpB4Om.js +1 -0
  60. package/element/L4hWU3Nc.js +1 -0
  61. package/{umd/BCu0TrNB2.js → element/N4HKgEC52.js} +1 -1
  62. package/element/{BCTYvPrD.js → OnH8Izqn.js} +1 -1
  63. package/element/Ot24jlyb2.js +1 -0
  64. package/element/RVKBpT2F.js +87 -0
  65. package/element/Rcen6i0h.js +80 -0
  66. package/element/SOYsF7q9.js +1 -0
  67. package/element/{lVJD5cJY.js → TlERMTWp.js} +5 -5
  68. package/element/X0P7ujR0.js +4 -0
  69. package/element/{2SYk3iBo.js → oS3-bnne2.js} +1 -1
  70. package/element/qIS4OV76.js +1 -0
  71. package/element/tdnQ0RcT.js +5 -0
  72. package/element/web.es.js +40 -125
  73. package/element/zcb-9fSo.js +4 -0
  74. package/package.json +1 -10
  75. package/react/index.cjs +1 -1
  76. package/react/index.d.mts +65 -0
  77. package/react/index.d.ts +65 -0
  78. package/react/index.mjs +1 -1
  79. package/element/8nf23RYF2.js +0 -93
  80. package/element/9VAO1NmP.js +0 -1
  81. package/element/B2KTsK_w.js +0 -3
  82. package/element/BCu0TrNB2.js +0 -2
  83. package/element/Be-K0dao.js +0 -9
  84. package/element/BiO2AH5s2.js +0 -8
  85. package/element/BmCwXyo_2.js +0 -3
  86. package/element/BnWKlftk2.js +0 -16
  87. package/element/BqPEscWs2.js +0 -5
  88. package/element/BsT0vqml.js +0 -1
  89. package/element/BxeYKf-v2.js +0 -86
  90. package/element/C0MGOytI.js +0 -1
  91. package/element/C0vZ8zxT.js +0 -1
  92. package/element/C6SiAA6Z2.js +0 -2
  93. package/element/C9HFLidt.js +0 -2
  94. package/element/C9U01_vP2.js +0 -39
  95. package/element/CAGYFwGT2.js +0 -4
  96. package/element/CJpmOICA.js +0 -2
  97. package/element/CU_-C7Pt2.js +0 -13
  98. package/element/CYQ06kUR.js +0 -1
  99. package/element/CbpHG7X52.js +0 -9
  100. package/element/CgE_bYp32.js +0 -37
  101. package/element/CgUphJWo.js +0 -1
  102. package/element/Cko4QHwX.js +0 -1
  103. package/element/D8Se70tP2.js +0 -3
  104. package/element/DIYTs0k3.js +0 -10
  105. package/element/DVO71jbn2.js +0 -3
  106. package/element/DYUfJm8F.js +0 -9
  107. package/element/DibuO0dP.js +0 -1
  108. package/element/LJWh_4Di.js +0 -2
  109. package/element/O530RtWA.js +0 -1
  110. package/element/WX3mhhd9.js +0 -2
  111. package/element/WtQ5axEj.js +0 -41
  112. package/element/Wun_Og5n2.js +0 -9
  113. package/element/hJxQiXVJ2.js +0 -4
  114. package/element/htkJ94ea2.js +0 -14
  115. package/element/j7EIoFjZ.js +0 -1
  116. package/element/qJYsRQFB.js +0 -1
  117. package/element/qbHuxVSe.js +0 -1
  118. package/element/styles.css +0 -288
  119. package/element/we0Hcb5C.js +0 -3
  120. package/element/x2Vs8ihf.js +0 -8
  121. package/umd/2SYk3iBo.js +0 -7
  122. package/umd/8nf23RYF2.js +0 -93
  123. package/umd/B2KTsK_w.js +0 -3
  124. package/umd/B5BVTFlf.js +0 -3
  125. package/umd/BCTYvPrD.js +0 -1
  126. package/umd/Be-K0dao.js +0 -9
  127. package/umd/BekfKWcG.js +0 -1
  128. package/umd/BiO2AH5s2.js +0 -8
  129. package/umd/BkIDQGIs.js +0 -1
  130. package/umd/Bki5T_lb.js +0 -1
  131. package/umd/BmCwXyo_2.js +0 -3
  132. package/umd/BnWKlftk2.js +0 -16
  133. package/umd/BqPEscWs2.js +0 -5
  134. package/umd/BsT0vqml.js +0 -1
  135. package/umd/BxeYKf-v2.js +0 -86
  136. package/umd/C0MGOytI.js +0 -1
  137. package/umd/C0vZ8zxT.js +0 -1
  138. package/umd/C6SiAA6Z2.js +0 -2
  139. package/umd/C9U01_vP2.js +0 -39
  140. package/umd/CAGYFwGT2.js +0 -4
  141. package/umd/CKk0UYyd.js +0 -1
  142. package/umd/CMQUiMWC2.js +0 -2
  143. package/umd/CbpHG7X52.js +0 -9
  144. package/umd/CfMNBPpx2.js +0 -1
  145. package/umd/CgE_bYp32.js +0 -37
  146. package/umd/Cko4QHwX.js +0 -1
  147. package/umd/D8Se70tP2.js +0 -3
  148. package/umd/DIYTs0k3.js +0 -10
  149. package/umd/DPmrTFJt.js +0 -2
  150. package/umd/DVO71jbn2.js +0 -3
  151. package/umd/DWbLshVZ.js +0 -2
  152. package/umd/DXrH_HhZ.js +0 -2
  153. package/umd/DYUfJm8F.js +0 -9
  154. package/umd/DibuO0dP.js +0 -1
  155. package/umd/LJWh_4Di.js +0 -2
  156. package/umd/O530RtWA.js +0 -1
  157. package/umd/WtQ5axEj.js +0 -41
  158. package/umd/fwDYCLiL.js +0 -1
  159. package/umd/hJxQiXVJ2.js +0 -4
  160. package/umd/htkJ94ea2.js +0 -14
  161. package/umd/index.d.ts +0 -14
  162. package/umd/j7EIoFjZ.js +0 -1
  163. package/umd/lVJD5cJY.js +0 -5
  164. package/umd/qJYsRQFB.js +0 -1
  165. package/umd/qbHuxVSe.js +0 -1
  166. package/umd/rtH8O6Hc.js +0 -1
  167. package/umd/u7SUQ9Kb2.js +0 -7
  168. package/umd/we0Hcb5C.js +0 -3
  169. package/umd/web.es.js +0 -125
  170. package/umd/web.umd.js +0 -1
  171. package/umd/wuONdFBI2.js +0 -8
  172. package/umd/x2Vs8ihf.js +0 -8
  173. /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
@@ -1 +0,0 @@
1
- import{B as e,F as t,R as r,V as s}from"./WtQ5axEj.js";var i=class extends r{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(t,r){const{state:i}=t,a=super.createResult(t,r),{isFetching:c,isRefetching:h,isError:o,isRefetchError:n}=a,P=i.fetchMeta?.fetchMore?.direction,g=o&&"forward"===P,u=c&&"forward"===P,f=o&&"backward"===P,d=c&&"backward"===P;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:e(r,i.data),hasPreviousPage:s(r,i.data),isFetchNextPageError:g,isFetchingNextPage:u,isFetchPreviousPageError:f,isFetchingPreviousPage:d,isRefetchError:n&&!g&&!f,isRefetching:h&&!u&&!d}}};function a(e,r){return t(e,i,r)}var c=e=>e?.meta?.currentPage>1?e.meta.currentPage-1:void 0,h=e=>e?.meta?.currentPage<e?.meta?.totalPages?e.meta.currentPage+1:void 0;export{c as n,a as r,h as t};
@@ -1,3 +0,0 @@
1
- import{t}from"./qbHuxVSe.js";import{i as a,n as e}from"./WtQ5axEj.js";import{t as i}from"./BekfKWcG.js";var r=({title:r,description:s,iconSvg:o,className:l})=>{const{props:n,organization:c}=e(),m=n?.emptyStateImage;/* @__PURE__ */
2
- return t("div",{className:a("mx-auto flex w-full max-w-md flex-col items-center justify-center gap-8",l),children:[c?.integrationSettings?.showLogo?/* @__PURE__ */t("img",{className:"h-44 w-auto",src:c?.logoUrl||"/images/qrati-logo.svg",alt:r}):m?/* @__PURE__ */t("img",{className:"h-44 w-auto",src:m,alt:r}):o?/* @__PURE__ */t("div",{className:"text-primary h-44 w-auto",children:o}):null,/* @__PURE__ */t("div",{className:"space-y-2",children:[
3
- /* @__PURE__ */t(i,{variant:"h4",align:"center",children:r}),"string"==typeof s&&/* @__PURE__ */t(i,{variant:"body2",color:"muted",align:"center",children:s}),"string"!=typeof s&&s]})]})};export{r as t};
@@ -1,2 +0,0 @@
1
- import{t}from"./qbHuxVSe.js";function e({className:e}){/* @__PURE__ */
2
- return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */t("path",{fill:"currentColor",d:"M12.713 16.713Q13 16.425 13 16t-.288-.712T12 15t-.712.288T11 16t.288.713T12 17t.713-.288m0-4Q13 12.425 13 12V8q0-.425-.288-.712T12 7t-.712.288T11 8v4q0 .425.288.713T12 13t.713-.288M12 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 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22"})})}export{e as t};
@@ -1,9 +0,0 @@
1
- import{t as a}from"./qbHuxVSe.js";import{D as t,n as s}from"./WtQ5axEj.js";import{i as e,n as r,u as o}from"./lVJD5cJY.js";import{t as i}from"./fwDYCLiL.js";import{t as n}from"./B2KTsK_w.js";import{t as l}from"./DWbLshVZ.js";import{n as m,t as c}from"./DYUfJm8F.js";import{t as g}from"./2SYk3iBo.js";import{t as d}from"./C0vZ8zxT.js";import{t as p}from"./B5BVTFlf.js";var v=()=>{const v=o(),{organization:f,props:h}=s(),u=h?.organizationId,{loading:N,event:j}=d({eventSlug:v.eventSlug});if(N)/* @__PURE__ */return a("div",{children:[
2
- /* @__PURE__ */a(i,{className:"mx-auto mt-4 h-8 w-64"}),
3
- /* @__PURE__ */a(i,{className:"mx-auto mt-6 h-6 w-72"}),
4
- /* @__PURE__ */a(i,{className:"mx-auto mt-6 h-8 w-72"}),
5
- /* @__PURE__ */a("div",{className:"mt-8 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:8}).map((t,s)=>/* @__PURE__ */a(i,{className:"h-72"},s))})]});const w=j?.organizationId?.toString?.()||j?.organizationId,x=u?.toString?.()||u;/* @__PURE__ */
6
- return a("div",j&&w===x?{className:"bg-background relative min-h-screen",children:/* @__PURE__ */a(l,{locale:j?.language??"en",translations:j?.translations,children:[f?.navigationSettings?.enableNavbar&&/* @__PURE__ */a(m,{}),
7
- /* @__PURE__ */a(p,{}),
8
- /* @__PURE__ */a(e,{}),
9
- /* @__PURE__ */a(c,{})]})}:{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */a(n,{className:"mt-16",title:"Event not found",description:"Please check the provided link",iconSvg:/* @__PURE__ */a("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 997.86122 450.8081",role:"img"})}),/* @__PURE__ */a(r,{to:t.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */a(g,{children:"All events"})})]})};export{v as default};
@@ -1,8 +0,0 @@
1
- import{h as a,t as e}from"./qbHuxVSe.js";import{D as s,n as o}from"./WtQ5axEj.js";import{c as r,t as l}from"./lVJD5cJY.js";import{t}from"./BekfKWcG.js";import{n as i}from"./DWbLshVZ.js";import{t as n}from"./2SYk3iBo.js";import{a as m,i as d,o as c,r as p,s as g,t as w}from"./C6SiAA6Z2.js";import{n as h,r as u,t as f}from"./u7SUQ9Kb2.js";var v=()=>{const{t:v}=i(),[b,C]=a(""),[P,y]=a(""),[N,j]=a(""),[x,k]=a(""),[z,F]=a(""),[A,D]=a(null),[E,O]=a({}),[R,S]=a(!1),[W,G]=a({google:!1,apple:!1}),[L,U]=a({showPassword:!1,showConfirmPassword:!1}),B=r(),{registerUsingEmail:J,loginWithGoogle:T,loginWithApple:V}=o(),$=a=>{O(e=>e[a]?{...e,[a]:void 0}:e)},_=async(a,e)=>{G(e=>({...e,[a]:!0})),D(null);try{await(e?.())}catch(s){s instanceof Error?D(s.message):D(`Failed to sign up with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{G(e=>({...e,[a]:!1}))}};/* @__PURE__ */
2
- return e("div",{className:"bg-background w-full space-y-8",children:[/* @__PURE__ */e("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const e=m(b),s=c(P),o=d(N),r=g(x),l=p(z,x);if(e||s||o||r||l)return void O({fname:e,lname:s,email:o,password:r,confirmPassword:l});O({}),S(!0),D(null);const t=await(J?.(N.toLowerCase(),x,b,P));t?.error&&D(t.error),S(!1)},className:"space-y-4",children:[
3
- /* @__PURE__ */e("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */e(w,{label:v("auth.firstName","First name"),name:"fname",disabled:R,type:"text",value:b,onChange:a=>{C(a.target.value),$("fname")},error:E.fname}),/* @__PURE__ */e(w,{label:v("auth.lastName","Last name"),name:"lname",disabled:R,type:"text",value:P,onChange:a=>{y(a.target.value),$("lname")},error:E.lname})]}),
4
- /* @__PURE__ */e(w,{label:v("auth.email","Email address"),name:"email",disabled:R,type:"email",value:N,onChange:a=>{j(a.target.value),$("email")},autoComplete:"email",error:E.email}),
5
- /* @__PURE__ */e("div",{className:"relative",children:[/* @__PURE__ */e(w,{label:v("auth.password","Password"),name:"password",disabled:R,type:L.showPassword?"text":"password",value:x,onChange:a=>{k(a.target.value),$("password")},autoComplete:"new-password",error:E.password}),/* @__PURE__ */e(n,{type:"button",variant:"ghost",color:"primary",className:"absolute top-8 right-0",icon:L.showPassword?/* @__PURE__ */e(f,{className:"size-5"}):/* @__PURE__ */e(h,{className:"size-5"}),onClick:()=>U(a=>({...a,showPassword:!a.showPassword}))})]}),
6
- /* @__PURE__ */e("div",{className:"relative",children:[/* @__PURE__ */e(w,{label:v("auth.confirmPassword","Confirm password"),name:"confirmPassword",disabled:R,type:L.showConfirmPassword?"text":"password",value:z,onChange:a=>{F(a.target.value),$("confirmPassword")},autoComplete:"new-password",error:E.confirmPassword}),/* @__PURE__ */e(n,{type:"button",variant:"ghost",color:"primary",className:"absolute top-8 right-0",icon:L.showConfirmPassword?/* @__PURE__ */e(f,{className:"size-5"}):/* @__PURE__ */e(h,{className:"size-5"}),onClick:()=>U(a=>({...a,showConfirmPassword:!a.showConfirmPassword}))})]}),A&&/* @__PURE__ */e(t,{align:"center",color:"error",className:"font-medium",children:A}),
7
- /* @__PURE__ */e("div",{className:"flex justify-end",children:/* @__PURE__ */e(l,{to:s.FORGOT_PASSWORD,state:{from:B.pathname},children:/* @__PURE__ */e(t,{variant:"h6",className:"w-fit",children:v("button.forgotPassword","Forgot Password?")})})}),
8
- /* @__PURE__ */e(n,{type:"submit",color:"primary",className:"w-full",disabled:R,loading:R,children:v("button.register","Register")})]}),/* @__PURE__ */e("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */e(u,{disabled:R||W.google||W.apple,loading:W.google,onClick:()=>_("google",T),provider:"google"}),/* @__PURE__ */e(u,{disabled:R||W.google||W.apple,loading:W.apple,onClick:()=>_("apple",V),provider:"apple"})]})]})};export{v as default};
@@ -1,3 +0,0 @@
1
- import{b as t,f as e,h as r,p as n,t as s,w as o}from"./qbHuxVSe.js";import{I as i,a,n as c,w as l}from"./WtQ5axEj.js";import{t as u}from"./O530RtWA.js";import{a as h,i as d,n as p,o as f,r as m,t as g}from"./CbpHG7X52.js";var{getOwnPropertyNames:y,getOwnPropertySymbols:b}=Object,{hasOwnProperty:w}=Object.prototype;function x(t,e){return function(r,n,s){return t(r,n,s)&&e(r,n,s)}}function k(t){return function(e,r,n){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,n);const{cache:s}=n,o=s.get(e),i=s.get(r);if(o&&i)return o===r&&i===e;s.set(e,r),s.set(r,e);const a=t(e,r,n);return s.delete(e),s.delete(r),a}}function E(t){return y(t).concat(b(t))}var v=Object.hasOwn||((t,e)=>w.call(t,e));function M(t,e){return t===e||!t&&!e&&t!=t&&e!=e}var{getOwnPropertyDescriptor:A,keys:C}=Object;function _(t,e){return t.byteLength===e.byteLength&&F(new Uint8Array(t),new Uint8Array(e))}function L(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function j(t,e){return t.byteLength===e.byteLength&&F(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function I(t,e){return M(t.getTime(),e.getTime())}function O(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function q(t,e){return t===e}function T(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const s=new Array(n),o=t.entries();let i,a,c=0;for(;(i=o.next())&&!i.done;){const n=e.entries();let o=!1,l=0;for(;(a=n.next())&&!a.done;){if(s[l]){l++;continue}const n=i.value,u=a.value;if(r.equals(n[0],u[0],c,l,t,e,r)&&r.equals(n[1],u[1],n[0],u[0],t,e,r)){o=s[l]=!0;break}l++}if(!o)return!1;c++}return!0}var P=M;function S(t,e,r){const n=C(t);let s=n.length;if(C(e).length!==s)return!1;for(;s-- >0;)if(!D(t,e,r,n[s]))return!1;return!0}function z(t,e,r){const n=E(t);let s,o,i,a=n.length;if(E(e).length!==a)return!1;for(;a-- >0;){if(s=n[a],!D(t,e,r,s))return!1;if(o=A(t,s),i=A(e,s),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable))return!1}return!0}function U(t,e){return M(t.valueOf(),e.valueOf())}function Z(t,e){return t.source===e.source&&t.flags===e.flags}function N(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const s=new Array(n),o=t.values();let i,a;for(;(i=o.next())&&!i.done;){const n=e.values();let o=!1,c=0;for(;(a=n.next())&&!a.done;){if(!s[c]&&r.equals(i.value,a.value,i.value,a.value,t,e,r)){o=s[c]=!0;break}c++}if(!o)return!1}return!0}function F(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function B(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function D(t,e,r,n){return!("_owner"!==n&&"__o"!==n&&"__v"!==n||!t.$$typeof&&!e.$$typeof)||v(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var $={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},R=Object.prototype.toString;var G=V();function V(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:s=!1}=t,o=function({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:a,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:h,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;const b=typeof m;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?a(m,g,y):"function"===b&&o(m,g,y);const w=m.constructor;if(w!==g.constructor)return!1;if(w===Object)return c(m,g,y);if(Array.isArray(m))return e(m,g,y);if(w===Date)return n(m,g,y);if(w===RegExp)return u(m,g,y);if(w===Map)return i(m,g,y);if(w===Set)return h(m,g,y);const x=R.call(m);if("[object Date]"===x)return n(m,g,y);if("[object RegExp]"===x)return u(m,g,y);if("[object Map]"===x)return i(m,g,y);if("[object Set]"===x)return h(m,g,y);if("[object Object]"===x)return"function"!=typeof m.then&&"function"!=typeof g.then&&c(m,g,y);if("[object URL]"===x)return p(m,g,y);if("[object Error]"===x)return s(m,g,y);if("[object Arguments]"===x)return c(m,g,y);if($[x])return d(m,g,y);if("[object ArrayBuffer]"===x)return t(m,g,y);if("[object DataView]"===x)return r(m,g,y);if("[object Boolean]"===x||"[object Number]"===x||"[object String]"===x)return l(m,g,y);if(f){let t=f[x];if(!t){const e=null!=(k=m)?k[Symbol.toStringTag]:void 0;e&&(t=f[e])}if(t)return t(m,g,y)}var k;return!1}}(function({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:_,areArraysEqual:r?z:L,areDataViewsEqual:j,areDatesEqual:I,areErrorsEqual:O,areFunctionsEqual:q,areMapsEqual:r?x(T,z):T,areNumbersEqual:P,areObjectsEqual:r?z:S,arePrimitiveWrappersEqual:U,areRegExpsEqual:Z,areSetsEqual:r?x(N,z):N,areTypedArraysEqual:r?x(F,z):F,areUrlsEqual:B,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const t=k(n.areArraysEqual),e=k(n.areMapsEqual),r=k(n.areObjectsEqual),s=k(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:t,areMapsEqual:e,areObjectsEqual:r,areSetsEqual:s})}return n}(t));return function({circular:t,comparator:e,createState:r,equals:n,strict:s}){if(r)return function(o,i){const{cache:a=(t?/* @__PURE__ */new WeakMap:void 0),meta:c}=r();return e(o,i,{cache:a,equals:n,meta:c,strict:s})};if(t)return function(t,r){return e(t,r,{cache:/* @__PURE__ */new WeakMap,equals:n,meta:void 0,strict:s})};const o={cache:void 0,equals:n,meta:void 0,strict:s};return function(t,r){return e(t,r,o)}}({circular:e,comparator:o,createState:n,equals:r?r(o):(i=o,function(t,e,r,n,s,o,a){return i(t,e,a)}),strict:s});var i}V({strict:!0}),V({circular:!0}),V({circular:!0,strict:!0}),V({createInternalComparator:()=>M}),V({strict:!0,createInternalComparator:()=>M}),V({circular:!0,createInternalComparator:()=>M}),V({circular:!0,createInternalComparator:()=>M,strict:!0});var K=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],W=new Uint32Array(96),X=class t{static from(e){if(!e||void 0===e.byteLength||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[r,n]=new Uint8Array(e,0,2);if(219!==r)throw new Error("Data does not appear to be in a KDBush format.");const s=n>>4;if(1!==s)throw new Error(`Got v${s} data when expected v1.`);const o=K[15&n];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new t(a,i,o,void 0,e)}constructor(t,e=64,r=Float64Array,n=ArrayBuffer,s){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=K.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);if(s)this.data=s,this.ids=new this.IndexArrayType(s,8,t),this.coords=new r(s,8+a+c,2*t),this._pos=2*t,this._finished=!0;else{const s=this.data=new n(8+i+a+c);this.ids=new this.IndexArrayType(s,8,t),this.coords=new r(s,8+a+c,2*t),this._pos=0,this._finished=!1,new Uint8Array(s,0,2).set([219,16+o]),new Uint16Array(s,2,1)[0]=e,new Uint32Array(s,4,1)[0]=t}}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return J(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:i}=this;W[0]=0,W[1]=s.length-1,W[2]=0;let a=3;const c=[];for(;a>0;){const l=W[--a],u=W[--a],h=W[--a];if(u-h<=i){for(let i=h;i<=u;i++){const a=o[2*i],l=o[2*i+1];a>=t&&a<=r&&l>=e&&l<=n&&c.push(s[i])}continue}const d=h+u>>1,p=o[2*d],f=o[2*d+1];p>=t&&p<=r&&f>=e&&f<=n&&c.push(s[d]),(0===l?t<=p:e<=f)&&(W[a++]=h,W[a++]=d-1,W[a++]=1-l),(0===l?r>=p:n>=f)&&(W[a++]=d+1,W[a++]=u,W[a++]=1-l)}return c}within(t,e,r){const n=[];return this.withinInto(t,e,r,n),n}withinInto(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:i}=this;W[0]=0,W[1]=s.length-1,W[2]=0;let a=3,c=0;const l=r*r;for(;a>0;){const u=W[--a],h=W[--a],d=W[--a];if(h-d<=i){for(let r=d;r<=h;r++)tt(o[2*r],o[2*r+1],t,e)<=l&&(n[c++]=s[r]);continue}const p=d+h>>1,f=o[2*p],m=o[2*p+1];tt(f,m,t,e)<=l&&(n[c++]=s[p]),(0===u?t-r<=f:e-r<=m)&&(W[a++]=d,W[a++]=p-1,W[a++]=1-u),(0===u?t+r>=f:e+r>=m)&&(W[a++]=p+1,W[a++]=h,W[a++]=1-u)}return c}};function J(t,e,r,n,s,o){if(s-n<=r)return;const i=n+s>>1;Y(t,e,i,n,s,o),J(t,e,r,n,i-1,1-o),J(t,e,r,i+1,s,1-o)}function Y(t,e,r,n,s,o){for(;s>n;){if(s-n>600){const i=s-n+1,a=r-n+1,c=Math.log(i),l=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*l*(i-l)/i)*(a-i/2<0?-1:1);Y(t,e,r,Math.max(n,Math.floor(r-a*l/i+u)),Math.min(s,Math.floor(r+(i-a)*l/i+u)),o)}const i=e[2*r+o];let a=n,c=s;for(H(t,e,n,r),e[2*s+o]>i&&H(t,e,n,s);a<c;){for(H(t,e,a,c),a++,c--;e[2*a+o]<i;)a++;for(;e[2*c+o]>i;)c--}e[2*n+o]===i?H(t,e,n,c):(c++,H(t,e,c,s)),c<=r&&(n=c+1),r<=c&&(s=c-1)}}function H(t,e,r,n){Q(t,r,n),Q(e,2*r,2*n),Q(e,2*r+1,2*n+1)}function Q(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function tt(t,e,r,n){const s=t-r,o=e-n;return s*s+o*o}var et,rt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},nt=Math.fround||(et=new Float32Array(1),t=>(et[0]=+t,et[0])),st=class{constructor(t){this.options=Object.assign(Object.create(rt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const s=`prepare ${t.length} points`;e&&console.time(s),this.points=t;const o=[];for(let a=0;a<t.length;a++){const e=t[a];if(!e.geometry)continue;const[r,n]=e.geometry.coordinates,s=nt(at(r)),i=nt(ct(n));o.push(s,i,1/0,a,-1,1),this.options.reduce&&o.push(0)}let i=this.trees[n+1]=this._createTree(o);e&&console.timeEnd(s);for(let a=n;a>=r;a--){const t=+Date.now();i=this.trees[a]=this._createTree(this._cluster(i,a)),e&&console.log("z%d: %d clusters in %dms",a,i.numItems,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let s=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const t=this.getClusters([r,n,180,o],e),i=this.getClusters([-180,n,s,o],e);return t.concat(i)}const i=this.trees[this._limitZoom(e)],a=i.range(at(r),ct(o),at(s),ct(n)),c=i.data,l=[];for(const u of a){const t=this.stride*u;l.push(c[t+5]>1?ot(c,t,this.clusterProps):this.points[c[t+3]])}return l}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(n);const o=s.data;if(e*this.stride>=o.length)throw new Error(n);const i=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=o[e*this.stride],c=o[e*this.stride+1],l=s.within(a,c,i),u=[];for(const h of l){const e=h*this.stride;o[e+4]===t&&u.push(o[e+5]>1?ot(o,e,this.clusterProps):this.points[o[e+3]])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:o,radius:i}=this.options,a=i/o,c=(r-a)/s,l=(r+1+a)/s,u={features:[]};return this._addTileFeatures(n.range((e-a)/s,c,(e+1+a)/s,l),n.data,e,r,s,u),0===e&&this._addTileFeatures(n.range(1-a/s,c,1,l),n.data,s,r,s,u),e===s-1&&this._addTileFeatures(n.range(0,c,a/s,l),n.data,-1,r,s,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,s){const o=this.getChildren(e);for(const i of o){const e=i.properties;if(e&&e.cluster?s+e.point_count<=n?s+=e.point_count:s=this._appendLeaves(t,e.cluster_id,r,n,s):s<n?s++:t.push(i),t.length===r)break}return s}_createTree(t){const e=new X(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,s,o){for(const i of t){const t=i*this.stride,a=e[t+5]>1;let c,l,u;if(a)c=it(e,t,this.clusterProps),l=e[t],u=e[t+1];else{const r=this.points[e[t+3]];c=r.properties;const[n,s]=r.geometry.coordinates;l=at(n),u=ct(s)}const h={type:1,geometry:[[Math.round(this.options.extent*(l*s-r)),Math.round(this.options.extent*(u*s-n))]],tags:c};let d;d=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==d&&(h.id=d),o.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:s,minPoints:o}=this.options,i=r/(n*Math.pow(2,e)),a=t.data,c=[],l=this.stride;for(let u=0;u<a.length;u+=l){if(a[u+2]<=e)continue;a[u+2]=e;const r=a[u],n=a[u+1],h=t.within(a[u],a[u+1],i),d=a[u+5];let p=d;for(const t of h){const r=t*l;a[r+2]>e&&(p+=a[r+5])}if(p>d&&p>=o){let t,o=r*d,i=n*d,f=-1;const m=(u/l<<5)+(e+1)+this.points.length;for(const r of h){const n=r*l;if(a[n+2]<=e)continue;a[n+2]=e;const c=a[n+5];o+=a[n]*c,i+=a[n+1]*c,a[n+4]=m,s&&(t||(t=this._map(a,u,!0),f=this.clusterProps.length,this.clusterProps.push(t)),s(t,this._map(a,n)))}a[u+4]=m,c.push(o/p,i/p,1/0,m,-1,p),s&&c.push(f)}else{for(let t=0;t<l;t++)c.push(a[u+t]);if(p>1)for(const t of h){const r=t*l;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<l;t++)c.push(a[r+t])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+5]>1){const n=this.clusterProps[t[e+6]];return r?Object.assign({},n):n}const n=this.points[t[e+3]].properties,s=this.options.map(n);return r&&s===n?Object.assign({},s):s}};function ot(t,e,r){return{type:"Feature",id:t[e+3],properties:it(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),lt(t[e+1])]}};var n}function it(t,e,r){const n=t[e+5],s=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=t[e+6],i=-1===o?{}:Object.assign({},r[o]);return Object.assign(i,{cluster:!0,cluster_id:t[e+3],point_count:n,point_count_abbreviated:s})}function at(t){return t/360+.5}function ct(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function lt(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var ut=class{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(Number.isFinite(t.position.lat)&&Number.isFinite(t.position.lng))return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}},ht=class{constructor({markers:t,position:e}){this.markers=[],t&&(this.markers=t),e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(ut.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>ut.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(ut.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}};function dt(t,e="assertion failed"){if(null==t)throw Error(e)}var pt,ft=class{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return mt(t)}},mt=t=>t.map(t=>new ht({position:ut.getPosition(t),markers:[t]})),gt=class extends ft{constructor(t){var{maxZoom:e,radius:r=60}=t,n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]])}return r}(t,["maxZoom","radius"]);super({maxZoom:e}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new st(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(t){let e=!1,r=t.map.getZoom();dt(r),r=Math.round(r);const n={zoom:r};if(!G(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map(t=>{const e=ut.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(e=!G(this.state,n)),this.state=n,0===t.markers.length?(this.clusters=[],{clusters:this.clusters,changed:e}):(e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e})}cluster({map:t}){const e=t.getZoom();return dt(e),this.superCluster.getClusters([-180,-90,180,90],Math.round(e)).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new ht({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}});const n=r.marker;return new ht({markers:[n],position:ut.getPosition(n)})}},yt=class{constructor(t,e){this.markers={sum:t.length};const r=e.map(t=>t.count),n=r.reduce((t,e)=>t+e,0);this.clusters={count:e.length,markers:{mean:n/e.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}},bt=class{render({count:t,position:e},r,n){const s=`<svg fill="${t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>\n</svg>`,o=`Cluster of ${t} markers`,i=Number(google.maps.Marker.MAX_ZINDEX)+t;if(ut.isAdvancedMarkerAvailable(n)){const t=(new DOMParser).parseFromString(s,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const r={map:n,position:e,zIndex:i,title:o,content:t};return new google.maps.marker.AdvancedMarkerElement(r)}const a={position:e,zIndex:i,title:o,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}},wt=class t{constructor(){!function(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}(t,google.maps.OverlayView)}};!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"}(pt||(pt={}));var xt=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)},kt=class extends wt{constructor({map:t,markers:e=[],algorithmOptions:r={},algorithm:n=new gt(r),renderer:s=new bt,onClusterClick:o=xt}){super(),this.map=null,this.idleListener=null,this.markers=[...e],this.clusters=[],this.algorithm=n,this.renderer=s,this.onClusterClick=o,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach(t=>{this.addMarker(t,!0)}),e||this.render()}removeMarker(t,e){const r=this.markers.indexOf(t);return-1!==r&&(ut.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach(t=>{r=this.removeMarker(t,!0)||r}),r&&!e&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,pt.CLUSTERING_BEGIN,this);const{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||null==r){const t=/* @__PURE__ */new Set;for(const n of e)1==n.markers.length&&t.add(n.markers[0]);const r=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||ut.setMap(e.marker,null):r.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame(()=>r.forEach(t=>ut.setMap(t,null)))}google.maps.event.trigger(this,pt.CLUSTERING_END,this)}}onAdd(){const t=this.getMap();dt(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>ut.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new yt(this.markers,this.clusters),e=this.getMap();this.clusters.forEach(r=>{if(1===r.markers.length)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,e),r.markers.forEach(t=>ut.setMap(t,null)),this.onClusterClick){const t=ut.isAdvancedMarker(r.marker)?pt.GMP_CLICK:pt.CLUSTER_CLICK;r.marker.addListener(t,t=>{google.maps.event.trigger(this,pt.CLUSTER_CLICK,r),this.onClusterClick(t,r,e)})}ut.setMap(r.marker,e)})}},Et={top:60,bottom:60,left:276,right:60},vt="#fb8500",Mt=new u,At=(t,e,r)=>{o(/* @__PURE__ */s(i,{client:Mt,children:/* @__PURE__ */s(h,{event:t,onExplore:r})}),e)},Ct=t=>{const e=document.createElement("div");e.style.cssText=`\n background:${m(t.color,"#fb8500")};color:#fff;border-radius:20px;padding:5px 10px;\n font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;\n box-shadow:0 2px 8px rgba(0,0,0,0.25);border:2px solid rgba(255,255,255,0.4);\n display:inline-flex;align-items:center;gap:6px;\n `;const r=document.createElement("span");r.textContent=t.folder.name;const n=document.createElement("span");return n.style.cssText="background:rgba(0,0,0,0.18);border-radius:10px;padding:1px 5px;font-size:10px;",n.textContent=String(t.eventCount),e.appendChild(r),e.appendChild(n),e},_t=(t,e)=>{const r=document.createElement("div");if(r.style.cssText=`\n width:36px;height:36px;cursor:pointer;\n background:${t};border-radius:50% 50% 50% 0;transform:rotate(-45deg);\n border:2px solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3);\n display:flex;align-items:center;justify-content:center;overflow:hidden;\n `,e){const t=document.createElement("img");t.src=d(e)??"",t.style.cssText="width:24px;height:24px;border-radius:50%;object-fit:cover;transform:rotate(45deg);",r.appendChild(t)}return r},Lt=({apiKey:o,onExplore:i,logoUrl:u})=>{const h=e(null),d=e(null),m=e(null),y=e(null),b=e([]),w=e([]),x=e(null),k=e(null),E=e(!1),v=e(!1),M=n(()=>(()=>{try{const t=sessionStorage.getItem(l);if(!t)return null;const e=JSON.parse(t);if(Array.isArray(e?.center)&&"number"==typeof e.zoom)return e}catch{}return null})(),[]),[A,C]=r(!1),[_,L]=r(!0),{folderTree:j,activeFolderId:I,activeFolder:O,visibleEvents:q,setActiveFolderId:T,isLoadingEvents:P}=f(),{organization:S}=c(),z=()=>{b.current.forEach(t=>{t.map=null}),b.current=[]},U=()=>{x.current&&(x.current.clearMarkers(),x.current=null),w.current.forEach(t=>{t.map=null}),w.current=[]};return t(()=>{if(!h.current||d.current)return;let t=!1;return(async()=>{try{const{setOptions:e,importLibrary:r}=await import("./BsT0vqml.js");if(t)return;if(e({key:o,v:"weekly"}),await Promise.all([r("maps"),r("marker"),r("visualization")]),t||!h.current)return;const n=window.google.maps;m.current=n;const s=M?.center?{lng:M.center[0],lat:M.center[1]}:{lat:20,lng:0},i=M?.zoom??3,a=new n.Map(h.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:s,zoom:i,mapTypeControl:!1,streetViewControl:!1});d.current=a,y.current=new n.InfoWindow({maxWidth:280}),k.current=new n.visualization.HeatmapLayer({data:[],map:null,radius:30,opacity:.8});const c=()=>{try{const t=a.getCenter();if(!t)return;sessionStorage.setItem(l,JSON.stringify({center:[t.lng(),t.lat()],zoom:a.getZoom()}))}catch{}};a.addListener("idle",c),L(!1),C(!0)}finally{t||L(!1)}})(),()=>{t=!0,z(),U(),k.current&&(k.current.setMap(null),k.current=null),y.current?.close(),d.current=null,m.current=null}},[o]),t(()=>{if(!A)return;const t=d.current,e=m.current;if(t&&e)if(z(),U(),y.current?.close(),null===I&&j.length>0){k.current?.setMap(null);const r=n=>{for(const s of n)if(s.centroid){const r=Ct(s),n=new e.marker.AdvancedMarkerElement({map:t,position:{lng:s.centroid[0],lat:s.centroid[1]},content:r,gmpClickable:!0});n.addListener("click",()=>T(s.folder._id)),b.current.push(n)}else s.children.length>0&&r(s.children)};r(j)}else{const r=0===j.length&&null===I;if(0===q.length)return;if(r){const r=[],n=q.map(n=>{const s=n.location.y,o=n.location.x;r.push({location:new e.LatLng(s,o),weight:(n.views||0)+1});const a=_t(vt,u),c=new e.marker.AdvancedMarkerElement({map:t,position:{lat:s,lng:o},content:a,gmpClickable:!0});return c.addListener("click",()=>{const e=document.createElement("div");At(n,e,i),y.current.close(),y.current.setContent(e),y.current.open({anchor:c,map:t})}),c});if(w.current=n,x.current=new kt({markers:n,map:t,renderer:{render:({count:t,position:r})=>{const n=document.createElement("div"),s=t<10?28:t<30?34:40;return n.style.cssText=`\n width:${s}px;height:${s}px;border-radius:50%;cursor:pointer;\n background:${vt};color:#fff;\n display:flex;align-items:center;justify-content:center;\n font-size:13px;font-weight:700;\n box-shadow:0 2px 8px rgba(0,0,0,0.3);\n border:2px solid rgba(255,255,255,0.6);\n `,n.textContent=String(t),new e.marker.AdvancedMarkerElement({position:r,content:n,gmpClickable:!0,zIndex:Number(e.Marker?.MAX_ZINDEX??0)+t})}}}),k.current&&(k.current.setData(r),k.current.setMap(t)),!v.current&&(v.current=!0,!M)){const r=new e.LatLngBounds;q.forEach(t=>r.extend({lat:t.location.y,lng:t.location.x})),r.isEmpty()||t.fitBounds(r,Et)}}else{k.current?.setMap(null);const r=O?.color||vt,n=new e.LatLngBounds;q.forEach(s=>{const o=s.location.y,a=s.location.x;n.extend({lat:o,lng:a});const c=_t(r,u),l=new e.marker.AdvancedMarkerElement({map:t,position:{lat:o,lng:a},content:c,gmpClickable:!0});l.addListener("click",()=>{const e=document.createElement("div");At(s,e,i),y.current.close(),y.current.setContent(e),y.current.open({anchor:l,map:t})}),w.current.push(l)})}}},[I,j,q,A,i,u,T,O,M]),t(()=>{if(!A)return;const t=d.current,e=m.current;if(t&&e)if(E.current||!M){if(E.current=!0,I){const r=p(j,I);if(!r?.folder.boundary?.length)return;const n=new e.LatLngBounds;for(const t of r.folder.boundary)n.extend({lat:t.y,lng:t.x});n.isEmpty()||t.fitBounds(n,{...Et,maxZoom:14})}else if(j.length>0){const r=new e.LatLngBounds,n=t=>{for(const e of t)e.centroid?r.extend({lng:e.centroid[0],lat:e.centroid[1]}):n(e.children)};n(j),r.isEmpty()||t.fitBounds(r,{...Et,maxZoom:8})}}else E.current=!0},[I,j,A,M]),/* @__PURE__ */s("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",style:a(S),children:[
2
- /* @__PURE__ */s(g,{positionClass:"absolute top-3 left-16 z-[1000]",folderTree:j,activeFolderId:I,setActiveFolderId:T}),P&&/* @__PURE__ */s("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/60",children:/* @__PURE__ */s("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"})}),_&&/* @__PURE__ */s("div",{class:"absolute inset-0 z-20 flex items-center justify-center bg-white/85",children:/* @__PURE__ */s("div",{class:"flex flex-col items-center gap-3",children:[/* @__PURE__ */s("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"}),/* @__PURE__ */s("p",{class:"text-sm font-medium text-slate-700",children:"Loading map…"})]})}),
3
- /* @__PURE__ */s("div",{ref:h,class:"size-full"})]})};export{Lt as default};
@@ -1,16 +0,0 @@
1
- import{h as e,p as a,t as r}from"./qbHuxVSe.js";import{D as s,n as i}from"./WtQ5axEj.js";import{l}from"./lVJD5cJY.js";import{t}from"./BekfKWcG.js";import{n as o}from"./DWbLshVZ.js";import{t as n}from"./2SYk3iBo.js";import{i as d,s as c,t as u}from"./C6SiAA6Z2.js";var h=({count:e=1,currentStep:a=0,disabled:s,onStepClick:i})=>{const l=s||!i;/* @__PURE__ */
2
- return r("ol",{className:"flex items-center space-x-6 pl-1.5",children:Array.from({length:e}).map((e,s)=>/* @__PURE__ */r("li",{children:/* @__PURE__ */r("button",s<a?{type:"button",className:"bg-primary block h-3 w-3 rounded-full",disabled:l,onClick:()=>i?.(s)}:s===a?{type:"button",className:"relative flex items-center justify-center","aria-current":"step",disabled:l,onClick:()=>i?.(s),children:[/* @__PURE__ */r("span",{className:"absolute flex size-6 p-px","aria-hidden":"true",children:/* @__PURE__ */r("span",{className:"bg-primary/40 size-full rounded-full"})}),/* @__PURE__ */r("span",{className:"bg-primary relative block size-3 rounded-full","aria-hidden":"true"})]}:{type:"button",className:"bg-muted block size-3 rounded-full",disabled:l,onClick:()=>i?.(s)})},`progress-dot-${s}`))})},m=({onCodeSent:a})=>{const{t:s}=o(),{sendPasswordResetCode:l}=i(),[c,h]=e(""),[m,f]=e(!1),[p,y]=e(null),[v,g]=e(null);/* @__PURE__ */
3
- return r("div",{className:"space-y-4",children:[
4
- /* @__PURE__ */r(t,{variant:"h4",children:s("auth.forgotPassword","Forgot Password")}),
5
- /* @__PURE__ */r(u,{type:"email",name:"email",value:c,onChange:e=>{h(e.target.value),p&&y(null),v&&g(null)},placeholder:s("auth.emailPlaceholder","Enter your email address"),error:p??void 0,disabled:m}),v&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:v}),
6
- /* @__PURE__ */r("div",{children:/* @__PURE__ */r(n,{onClick:async()=>{y(null),g(null);const e=c.trim().toLowerCase(),r=d(e);if(r)y(r);else{f(!0);try{const r=await l(e);r?.error?g(r.error):a(e)}catch(s){g(s instanceof Error?s.message:String(s))}finally{f(!1)}}},fullWidth:!0,loading:m,disabled:m,children:s("auth.sendVerificationCode","Send verification code")})})]})},f=({email:a,onCodeVerified:s})=>{const{t:l}=o(),{verifyPasswordResetCode:d}=i(),[c,h]=e(""),[m,f]=e(!1),[p,y]=e(null);/* @__PURE__ */
7
- return r("div",{className:"space-y-4 sm:space-y-6",children:[
8
- /* @__PURE__ */r("div",{className:"space-y-2",children:[/* @__PURE__ */r(t,{variant:"h4",children:l("auth.verifyCode","Verify Code")}),/* @__PURE__ */r(t,{variant:"body1",children:[l("auth.enterCodeSentTo","Enter the 6-digit code sent to")," ",a]})]}),
9
- /* @__PURE__ */r(u,{value:c,name:"code",onChange:e=>h(e.target.value),placeholder:l("auth.codePlaceholder","Enter verification code"),disabled:m}),p&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:p}),
10
- /* @__PURE__ */r("div",{className:"flex gap-2",children:/* @__PURE__ */r(n,{onClick:async()=>{if(y(null),a)if(c.trim()){f(!0);try{const e=await d(a,c.trim());e?.error?y(e.error):e?.data?s(e.data):y(l("auth.codeVerifyFailed","Failed to verify code"))}catch(e){y(e instanceof Error?e.message:String(e))}finally{f(!1)}}else y(l("auth.codeRequired","Please enter the verification code"));else y(l("auth.emailMissing","Email address is missing"))},fullWidth:!0,loading:m,disabled:m,children:l("auth.verify","Verify")})})]})},p=({email:s,passwordResetCodeId:l,onPasswordReset:d})=>{const{t:h}=o(),{resetPassword:m}=i(),[f,p]=e(""),[y,v]=e(""),[g,w]=e(null),[b,C]=e(!1),N=a(()=>c(f),[f]),P=f&&f===y&&!N;/* @__PURE__ */
11
- return r("div",{className:"space-y-4",children:[
12
- /* @__PURE__ */r(t,{variant:"h4",children:h("auth.resetPassword","Reset Password")}),
13
- /* @__PURE__ */r(u,{type:"password",name:"password",value:f,onChange:e=>{p(e.target.value),g&&w(null)},placeholder:h("auth.newPassword","New password"),disabled:b,error:N}),
14
- /* @__PURE__ */r(u,{type:"password",name:"confirmPassword",value:y,onChange:e=>{v(e.target.value),g&&w(null)},placeholder:h("auth.confirmNewPassword","Confirm new password"),disabled:b}),g&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:g}),
15
- /* @__PURE__ */r("div",{children:/* @__PURE__ */r(n,{onClick:async()=>{if(w(null),s)if(l)if(P){C(!0);try{const e=await m(l,f);e?.error?w(e.error):d()}catch(e){w(e instanceof Error?e.message:String(e))}finally{C(!1)}}else w(h("auth.passwordsDoNotMatch","Passwords do not match"));else w(h("auth.codeIdMissing","Verification code ID is missing"));else w(h("auth.emailMissing","Email address is missing"))},disabled:!P||b,fullWidth:!0,loading:b,children:h("auth.resetPasswordButton","Reset Password")})})]})},y=()=>{const a=l(),[i,t]=e(null),[o,n]=e(null),[d,c]=e(0);/* @__PURE__ */
16
- return r("div",{className:"bg-background min-h-[60vh]",children:[(({index:e})=>{switch(e){case 0:/* @__PURE__ */return r(m,{onCodeSent:e=>{t(e),c(1)}});case 1:/* @__PURE__ */return r(f,{email:i,onCodeVerified:e=>{n(e),c(2)}});case 2:/* @__PURE__ */return r(p,{email:i,passwordResetCodeId:o,onPasswordReset:()=>{a(s.LOGIN)}})}})({index:d}),/* @__PURE__ */r("div",{className:"mt-8 flex justify-center",children:/* @__PURE__ */r(h,{count:3,currentStep:d})})]})};export{y as default};
@@ -1,5 +0,0 @@
1
- import{h as a,t as e}from"./qbHuxVSe.js";import{D as o,n as s}from"./WtQ5axEj.js";import{c as l,t as r}from"./lVJD5cJY.js";import{t as i}from"./BekfKWcG.js";import{n as t}from"./DWbLshVZ.js";import{t as n}from"./2SYk3iBo.js";import{i as d,s as m,t as p}from"./C6SiAA6Z2.js";import{n as c,r as g,t as u}from"./u7SUQ9Kb2.js";var h=()=>{const{t:h}=t(),f=l(),[v,w]=a(""),[b,y]=a(""),[N,j]=a(!1),[C,k]=a(null),[P,x]=a(!1),[A,D]=a({}),{loginUsingEmail:E,loginWithGoogle:F,loginWithApple:O}=s(),[S,W]=a({google:!1,apple:!1}),G=a=>{D(e=>e[a]?{...e,[a]:void 0}:e)},L=async(a,e)=>{W(e=>({...e,[a]:!0})),k(null);try{await(e?.())}catch(o){o instanceof Error?k(o.message):k(`Failed to login with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{W(e=>({...e,[a]:!1}))}};/* @__PURE__ */
2
- return e("div",{className:"bg-background w-full space-y-6",children:[/* @__PURE__ */e("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const e=d(v),o=m(b);if(e||o)return void D({email:e,password:o});D({}),j(!0),k(null);const s=await(E?.(v.toLowerCase(),b));s?.error&&k(s.error),j(!1)},className:"space-y-6",children:[
3
- /* @__PURE__ */e("div",{className:"space-y-9",children:[/* @__PURE__ */e(p,{label:h("auth.email","Email address"),name:"email",disabled:N,type:"email",value:v,onChange:a=>{w(a.target.value),G("email")},autoComplete:"email",error:A.email}),/* @__PURE__ */e("div",{className:"relative",children:[/* @__PURE__ */e(p,{label:h("auth.password","Password"),name:"password",disabled:N,type:P?"text":"password",value:b,onChange:a=>{y(a.target.value),G("password")},autoComplete:"current-password",error:A.password}),/* @__PURE__ */e(n,{variant:"ghost",color:"primary",className:"absolute top-8 right-0",icon:/* @__PURE__ */e(P?u:c,{className:"size-5"}),onClick:()=>x(!P)})]})]}),C&&/* @__PURE__ */e(i,{align:"center",color:"error",className:"font-medium",children:C}),
4
- /* @__PURE__ */e("div",{className:"flex justify-end",children:/* @__PURE__ */e(r,{to:o.FORGOT_PASSWORD,state:{from:f.pathname},children:/* @__PURE__ */e(i,{variant:"h6",className:"w-fit",children:h("button.forgotPassword","Forgot Password?")})})}),
5
- /* @__PURE__ */e(n,{type:"submit",color:"primary",className:"w-full",loading:N,disabled:N,children:h("button.login","Login")})]}),/* @__PURE__ */e("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */e(g,{disabled:N||S.google||S.apple,loading:S.google,onClick:()=>L("google",F),provider:"google"}),/* @__PURE__ */e(g,{disabled:N||S.google||S.apple,loading:S.apple,onClick:()=>L("apple",O),provider:"apple"})]})]})};export{h as default};
@@ -1 +0,0 @@
1
- var o=!1;function r(r){o?(o=>{JSON.stringify(o)})(r):(function(o){const r=Boolean(window.google?.maps?.importLibrary);var a,e,n,i,t,s,c,p,l,m,g,w,d,y;r&&(o=>{JSON.stringify(o)})(o),r||(a=o,t="The Google Maps JavaScript API",s="google",c="importLibrary",p="__ib__",l=document,m=window,g=m[s]||(m[s]={}),w=g.maps||(g.maps={}),d=/* @__PURE__ */new Set,y=new URLSearchParams,w[c]?console.warn(t+" only loads once. Ignoring:",a):w[c]=(o,...r)=>d.add(o)&&(e||(e=new Promise(async(o,r)=>{for(i in await(n=l.createElement("script")),y.set("libraries",[...d]+""),a)y.set(i.replace(/[A-Z]/g,o=>"_"+o[0].toLowerCase()),a[i]);y.set("callback",s+".maps."+p),function(o,r){o.src=r}(n,"https://maps.googleapis.com/maps/api/js?"+y),w[p]=o,n.onerror=()=>e=r(Error(t+" could not load.")),n.nonce=l.querySelector("script[nonce]")?.nonce||"",l.head.append(n)}))).then(()=>w[c](o,...r)))}(r),o=!0)}async function a(o){if(!window?.google?.maps?.importLibrary)throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(o)}export{a as importLibrary,r as setOptions};