@qratilabs/qrati-connect 2.7.2 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/element/{B8jogRzT.js → 5CiAlCjU.js} +4 -4
  3. package/element/BDQCQkX_.js +1 -0
  4. package/element/BPMOttLj.js +1 -0
  5. package/element/BVN_VOhG.js +1 -0
  6. package/element/Bajer8z8.js +17 -0
  7. package/element/Bf4EqlE2.js +1 -0
  8. package/element/C8NFfssj.js +8 -0
  9. package/element/DQu7AGsF.js +1 -0
  10. package/element/Dqtdp5CD.js +2 -0
  11. package/element/EgsEX4Mk.js +5 -0
  12. package/element/ZsvY3_BP.js +32 -0
  13. package/element/hkAPI6mV.js +1 -0
  14. package/element/nSrWCryV.js +5 -0
  15. package/element/web.es.js +419 -419
  16. package/package.json +1 -1
  17. package/{element/BjbDXTeP.js → react/-Gc1XJZE.js} +4 -4
  18. package/react/2j0Uva3f.js +2 -0
  19. package/react/5Kn_YMsi.js +5 -0
  20. package/react/BHul_-9n.js +1 -0
  21. package/react/BMpF19BV.js +1 -0
  22. package/react/BOcElY6J.js +1 -0
  23. package/react/BW8JB9yA.js +1 -0
  24. package/react/B_X6sOg3.js +1 -0
  25. package/react/BfMBYO4b.js +1 -0
  26. package/react/C72dPYhQ.js +5 -0
  27. package/react/C83WiqkM.js +1 -0
  28. package/react/CIEA9OWd.js +1 -0
  29. package/react/COOPnhZa.js +1 -0
  30. package/react/CX7kEcm7.js +1 -0
  31. package/react/CYLiwpjD.js +32 -0
  32. package/react/{DSAOtDOg.js → CYZuQpl9.js} +4 -4
  33. package/react/Ca2GW-tU.js +1 -0
  34. package/react/CbCxF_PL.js +1 -0
  35. package/react/CjSSZsql.js +1 -0
  36. package/react/{CDAGXOJa.js → CrKuU6G6.js} +1 -1
  37. package/react/CzkP4JdG.js +1 -0
  38. package/react/D3gIYCSb.js +1 -0
  39. package/react/DEk8rfah.js +1 -0
  40. package/react/DFgDBn6O.js +17 -0
  41. package/react/{B57jvRJw.js → T39bw9GN.js} +1 -1
  42. package/react/index.cjs +1 -1
  43. package/react/index.mjs +381 -381
  44. package/react/u07nHbMK.js +1 -0
  45. package/umd/web.umd.js +1 -1
  46. package/element/BiQECCnr.js +0 -1
  47. package/element/BvkZOchm.js +0 -17
  48. package/element/COUnPxHl.js +0 -6
  49. package/element/CkfXzc1_.js +0 -1
  50. package/element/DGeYAYfl.js +0 -3
  51. package/element/DXPR6JWg.js +0 -1
  52. package/element/DqOnDVHH.js +0 -1
  53. package/element/ThtSVXLE.js +0 -32
  54. package/element/gajcOMzQ.js +0 -1
  55. package/element/ojjN3KY4.js +0 -1
  56. package/react/B-ttdr0n.js +0 -1
  57. package/react/B0pbGxj0.js +0 -1
  58. package/react/BBaYBpSS.js +0 -1
  59. package/react/BUm8-ZtV.js +0 -1
  60. package/react/Bran9aUe.js +0 -32
  61. package/react/CMUYyO6F.js +0 -1
  62. package/react/COVWNZNw.js +0 -17
  63. package/react/CPs8NoX7.js +0 -1
  64. package/react/CdZcv5CJ.js +0 -1
  65. package/react/Ce4GGag_.js +0 -1
  66. package/react/CzNVO0Zz.js +0 -1
  67. package/react/D6h9tRAZ.js +0 -1
  68. package/react/DCjmEjZr.js +0 -1
  69. package/react/DJ-3Sziz.js +0 -1
  70. package/react/DKvJBrWM.js +0 -8
  71. package/react/DaQR1Bft.js +0 -1
  72. package/react/Dbq_PyC6.js +0 -3
  73. package/react/DdmNkEML.js +0 -1
  74. package/react/buiUjKpV.js +0 -6
  75. package/react/dLaHt9rf.js +0 -1
  76. package/react/zrUJi_8F.js +0 -1
  77. /package/element/{C2ydm0ZD.js → Ccwm5LwS.js} +0 -0
  78. /package/element/{DUlbZyIi.js → DD-DUfz5.js} +0 -0
  79. /package/element/{BppxGns9.js → DMDEuqn7.js} +0 -0
  80. /package/element/{CjmNvKgB.js → DSjmSa7l.js} +0 -0
  81. /package/element/{CziefUVo.js → ZShDCNL_.js} +0 -0
  82. /package/react/{DtvJNH06.js → BqRDSbh4.js} +0 -0
  83. /package/react/{CO70kETi.js → Bqe_56Ho.js} +0 -0
  84. /package/react/{CvLw8owR.js → BxS4S1Bm.js} +0 -0
  85. /package/react/{BT55gXKs.js → CCCbXwws.js} +0 -0
  86. /package/react/{Bxitmzur.js → CEEUMvOM.js} +0 -0
  87. /package/react/{CR2MwRBM.js → CssqM9iA.js} +0 -0
  88. /package/react/{CtCRzhKd.js → DV8H8PH6.js} +0 -0
  89. /package/react/{zyOknCLQ.js → DYyT8DeU.js} +0 -0
  90. /package/react/{LDusNFdQ.js → DvZVbBR7.js} +0 -0
  91. /package/react/{D5puLxf7.js → bYucjLbl.js} +0 -0
@@ -0,0 +1 @@
1
+ import{B as e,j as n,r as t,v as r,z as o}from"./EgsEX4Mk.js";import"./Dqtdp5CD.js";import{t as a}from"./nSrWCryV.js";var i=(n,o,i)=>{e(/* @__PURE__ */r(t,{children:/* @__PURE__ */r(a,{event:n,onExplore:i})}),o)},s=({events:e,apiKey:t,onExplore:a,logoUrl:s})=>{const l=n(null),c=n(null);return o(()=>{if(l.current&&!c.current)return(async()=>{const{setOptions:n,importLibrary:r}=await import("./DSjmSa7l.js");n({key:t,v:"weekly"}),await Promise.all([r("maps"),r("marker")]);const o=window.google.maps;if(!l.current)return;const d=new o.Map(l.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:{lat:20,lng:0},zoom:2,mapTypeControl:!1,streetViewControl:!1});o.event.addListenerOnce(d,"idle",()=>{d.getRenderingType?.()!==o.RenderingType?.VECTOR&&console.warn("Google Maps fell back to raster rendering; globe view is unavailable in raster mode.")}),c.current=d;const p=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===p.length)return;const m=new o.LatLngBounds,u=new o.InfoWindow({maxWidth:200});for(const e of p){const n=e.location.x,t={lat:e.location.y,lng:n};m.extend(t);const r=document.createElement("div");if(r.style.cssText="\n width: 36px; height: 36px; cursor: pointer;\n background: var(--primary, #ff4800);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex; align-items: center; justify-content: center; overflow: hidden;\n ",s){const e=document.createElement("img");e.src=s,e.style.cssText="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);",r.appendChild(e)}const l=new o.marker.AdvancedMarkerElement({map:d,position:t,content:r,gmpClickable:!0});l.addListener("click",()=>{const n=document.createElement("div");i(e,n,a),u.close(),u.setContent(n),u.open(d,l)})}d.fitBounds(m)})(),()=>{c.current=null}},[t]),/* @__PURE__ */r("div",{ref:l,class:"size-full"})};export{s as default};
@@ -0,0 +1 @@
1
+ import{M as t,O as e,S as s,T as i,_ as a,a as r,b as n,c as o,d as u,f as h,g as c,h as l,j as d,m as f,o as y,p,r as m,s as g,x as b,y as v}from"./Bf4EqlE2.js";function q(t){return{onFetch:(e,s)=>{const i=e.options,a=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],n=e.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const l=async()=>{let s=!1;const l=f(e.options,e.fetchOptions),d=async(t,i,a)=>{if(s)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const r=await l((()=>{const t={client:e.client,queryKey:e.queryKey,pageParam:i,direction:a?"backward":"forward",meta:e.options.meta};return u(t,()=>e.signal,()=>s=!0),t})()),{maxPages:n}=e.options,o=a?p:h;return{pages:o(t.pages,r,n),pageParams:o(t.pageParams,i,n)}};if(a&&r.length){const t="backward"===a,e=t?P:C,s={pages:r,pageParams:n};o=await d(s,e(i,s),t)}else{const e=t??r.length;do{const t=0===c?n[0]??i.initialPageParam:C(i,o);if(c>0&&null==t)break;o=await d(o,t),c++}while(c<e)}return o};e.options.persister?e.fetchFn=()=>e.options.persister?.(l,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=l}}}function C(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function P(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function O(t,e){return!!e&&null!=C(t,e)}function w(t,e){return!(!e||!t.getPreviousPageParam)&&null!=P(t,e)}var Q=class extends r{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=y({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i="pending"===this.state.status,a=!this.#i.canStart();try{if(i)e();else{this.#a({type:"pending",variables:t,isPaused:a}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const e=await(this.options.onMutate?.(t,s));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:a})}const r=await this.#i.start();return await(this.#s.config.onSuccess?.(r,t,this.state.context,this,s)),await(this.options.onSuccess?.(r,t,this.state.context,s)),await(this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s)),await(this.options.onSettled?.(r,null,t,this.state.context,s)),this.#a({type:"success",data:r}),r}catch(r){try{await(this.#s.config.onError?.(r,t,this.state.context,this,s))}catch(n){Promise.reject(n)}try{await(this.options.onError?.(r,t,this.state.context,s))}catch(n){Promise.reject(n)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s))}catch(n){Promise.reject(n)}try{await(this.options.onSettled?.(void 0,r,t,this.state.context,s))}catch(n){Promise.reject(n)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),o.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}},D=class extends t{constructor(t={}){super(),this.config=t,this.#r=/* @__PURE__ */new Set,this.#n=/* @__PURE__ */new Map,this.#o=0}#r;#n;#o;build(t,e,s){const i=new Q({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#r.add(t);const e=x(t);if("string"==typeof e){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#r.delete(t)){const e=x(t);if("string"==typeof e){const s=this.#n.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=x(t);if("string"==typeof e){const s=this.#n.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=x(t);return"string"==typeof e?(this.#n.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){o.batch(()=>{this.#r.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#r.clear(),this.#n.clear()})}getAll(){return Array.from(this.#r)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>v(e,t))}findAll(t={}){return this.getAll().filter(e=>v(t,e))}notify(t){o.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(t=>t.state.isPaused);return o.batch(()=>Promise.all(t.map(t=>t.continue().catch(b))))}};function x(t){return t.options.scope?.id}var M=class extends t{constructor(t={}){super(),this.config=t,this.#u=/* @__PURE__ */new Map}#u;build(t,e,s){const i=e.queryKey,r=e.queryHash??a(i,e);let n=this.get(r);return n||(n=new m({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(n)),n}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){o.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>n(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>n(t,e)):e}notify(t){o.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){o.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){o.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},A=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new M,this.#s=t.mutationCache||new D,this.#c=t.defaultOptions||{},this.#l=/* @__PURE__ */new Map,this.#d=/* @__PURE__ */new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=d.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=g.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#y?.(),this.#y=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#h.build(this,e),a=s.state.data;return void 0===a?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(i(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(a))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),a=this.#h.get(i.queryHash)?.state.data,r=l(e,a);if(void 0!==r)return this.#h.build(this,i).setData(r,{...s,manual:!0})}setQueriesData(t,e,s){return o.batch(()=>this.#h.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(t){const e=this.#h;o.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){const s=this.#h;return o.batch(()=>(s.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},i=o.batch(()=>this.#h.findAll(t).map(t=>t.cancel(s)));return Promise.all(i).then(b).catch(b)}invalidateQueries(t,e={}){return o.batch(()=>(this.#h.findAll(t).forEach(t=>{t.invalidate()}),"none"===t?.refetchType?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},i=o.batch(()=>this.#h.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,s);return s.throwOnError||(e=e.catch(b)),"paused"===t.state.fetchStatus?Promise.resolve():e}));return Promise.all(i).then(b)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#h.build(this,e);return s.isStaleByTime(i(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(b).catch(b)}fetchInfiniteQuery(t){return t.behavior=q(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(b).catch(b)}ensureInfiniteQueryData(t){return t.behavior=q(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return g.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(t,e){this.#l.set(c(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#l.values()],i={};return e.forEach(e=>{s(t,e.queryKey)&&Object.assign(i,e.defaultOptions)}),i}setMutationDefaults(t,e){this.#d.set(c(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#d.values()],i={};return e.forEach(e=>{s(t,e.mutationKey)&&Object.assign(i,e.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;const s={...this.#c.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return s.queryHash||(s.queryHash=a(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===e&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};export{q as i,O as n,w as r,A as t};
@@ -0,0 +1 @@
1
+ import{r as t}from"./2R3GoXB1.js";import{B as r,j as o,r as e,v as n,z as i}from"./EgsEX4Mk.js";import{t as a}from"./Bf4EqlE2.js";import{t as s}from"./BPMOttLj.js";import"./Dqtdp5CD.js";import{t as c}from"./nSrWCryV.js";var l=new s,p=(t,o,i)=>{r(/* @__PURE__ */n(a,{client:l,children:/* @__PURE__ */n(e,{children:/* @__PURE__ */n(c,{event:t,onExplore:i})})}),o)},d=({events:r,onExplore:e,logoUrl:a})=>{const s=o(null),c=o(null);return i(()=>{if(!s.current||c.current)return;let o;return(async()=>{const n=await import("./ZShDCNL_.js").then(r=>/* @__PURE__ */t(r.default,1));if(await Promise.resolve({ }),!s.current)return;const i=n.map(s.current,{center:[20,0],zoom:2,zoomControl:!0,worldCopyJump:!0});n.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19}).addTo(i),c.current=i;const l=r.filter(t=>"number"==typeof t.location?.x&&"number"==typeof t.location?.y);if(l.length>0){const t=n.latLngBounds([]);for(const r of l){const o=r.location.x,s=r.location.y;t.extend([s,o]);const c=n.divIcon({className:"qrati-leaflet-marker-wrapper",html:`\n <div style="\n width: 36px;\n height: 36px;\n cursor: pointer;\n background: var(--primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n ">${a?`<img src="${a}" style="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);" />`:""}</div>\n `,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),l=n.marker([s,o],{icon:c}).addTo(i),d=document.createElement("div");d.style.width="fit-content",p(r,d,e),l.bindPopup(d,{closeButton:!0,maxWidth:256})}t.isValid()&&i.fitBounds(t,{padding:[60,60],maxZoom:14})}o=()=>{i.remove(),c.current=null}})(),()=>{o?.()}},[r]),/* @__PURE__ */n("div",{ref:s,class:"size-full"})};export{d as default};
@@ -0,0 +1,17 @@
1
+ import{F as t,G as e,H as n,I as i,L as s,M as o,N as r,P as a,R as l,U as c,V as d,f as h,j as p,n as u,p as m,v as g,x as f,y as w,z as y}from"./EgsEX4Mk.js";import{n as v}from"./Bf4EqlE2.js";import{E as T,T as b,c as x,j as k,l as _,m as q,n as S,s as E,w as C,y as I}from"./ZsvY3_BP.js";import{a as L,c as A,d as N,i as M,l as B,m as V,n as z,o as R,p as O,r as P,t as D,u as $}from"./5CiAlCjU.js";import{n as H,r as F,t as U}from"./Dqtdp5CD.js";function j(t,e){const[n,i]=t;if(n===e)return t;if(void 0!==i&&void 0!==e&&void 0!==n&&e===i&&Math.abs(e-n)<=20){const s=Math.min(n,e),o=Math.max(n,e);return s===n&&o===i?t:[s,o]}return[e,n]}function W(t,e,n){const[[o],r]=i(j,[n]),l=function(t){const[e,n]=a(t);return t===e||t&&e&&t.length===e.length&&!t.some((t,n)=>t!==e[n])?e:(n(t),t)}(e),c=p(void 0);return{containerRef:s(e=>{c.current?.disconnect(),c.current=void 0;const n=()=>r(function(t,e){let n=t?.clientWidth;if(void 0!==n&&e&&e.length>0){const t=[...e.filter(t=>t>0)].sort((t,e)=>e-t);t.push(Math.floor(t[t.length-1]/2)),n=t.find((e,i)=>e<=n||i===t.length-1)}return n}(e,l));n(),e&&"undefined"!=typeof ResizeObserver&&(c.current=new ResizeObserver(n),c.current.observe(e)),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]),containerWidth:o}}function G(t){return["react-photo-album",t].filter(Boolean).join("--")}function K({width:t,height:e}){const n=t/e;return Number.isFinite(n)?n:1}var Y=Object.freeze([1200,600,300,0]);function Z(t,e){return"function"==typeof t?t(e):t}function Q(t,e){return void 0!==e?Z(t,e):void 0}function J(t,e,n,i=0){if(void 0===e)return;const s=Q(t,e);return Math.round(Math.max(void 0===s?function(t,e){const n=Y.findIndex(t=>t<=e);return Z(t[Math.max(n,0)],e)}(n,e):s,i))}function X(t,{spacing:e,padding:n,componentsProps:i,render:s}){return{spacing:J(e,t,[20,15,10,5]),padding:J(n,t,[0,0,0,0]),componentsProps:Z(i,t)||{},render:Z(s,t)}}function tt(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function et(t,e,n,i,s,o,r){let a,l;const c=t=>{const e=o*(s-1)+2*r*s;return`calc((${t.match(/^\s*calc\((.*)\)\s*$/)?.[1]??t} - ${e}px) / ${tt((i-e)/n,5)})`},d=t.srcSet;return d&&d.length>0&&(a=d.concat(d.some(({width:e})=>e===t.width)?[]:[{src:t.src,width:t.width,height:t.height}]).sort((t,e)=>t.width-e.width).map(t=>`${t.src} ${t.width}w`).join(", ")),l=e?.size?(e.sizes||[]).map(({viewport:t,size:e})=>`${t} ${c(e)}`).concat(c(e.size)).join(", "):`${Math.ceil(n/i*100)}vw`,{srcSet:a,sizes:l}}var nt=f(function({as:t,render:e,context:n,classes:i=[],variables:s={},style:o,className:r,children:a,...l},c){const d=function(...t){return t.filter(Boolean).join(" ")}(...(Array.isArray(i)?i:[i]).filter(t=>"string"==typeof t).map(G),r),h={style:{...Object.fromEntries(Object.entries(s).map(([t,e])=>{return[(n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),`--${G(n)}`),"number"==typeof e?tt(e,5):e];var n})),...o},className:d,children:a,...l};if(e){const t=e({ref:c,...h},n);if(t)return t}return g(t||"div",{ref:c,...h})}),it=f(function({photo:t,index:e,width:n,height:i,onClick:s,render:{wrapper:o,link:r,button:a,image:l,extras:c}={},componentsProps:{link:d,button:h,wrapper:p,image:u}={}},m){const{href:f}=t,w={photo:t,index:e,width:tt(n,3),height:tt(i,3)};let y;return y=f?{...d,as:"a",render:r,classes:["photo","link"],href:f,onClick:s}:s?{...h,as:"button",type:"button",render:a,classes:["photo","button"],onClick:s}:{...p,render:o,classes:"photo"},g(nt,{ref:m,variables:{photoWidth:w.width,photoHeight:w.height},context:w,...y,children:[g(nt,{as:"img",classes:"image",render:l,context:w,...u}),c?.({},w)]})}),st=f(function({layout:t,sizes:e,model:n,skeleton:i,onClick:s,render:{container:o,track:r,photo:a,...l}={},componentsProps:{container:d,track:h,link:p,button:u,wrapper:m,image:f}={}},w){const{spacing:y,padding:v,containerWidth:T,tracks:b,variables:x,horizontal:k}=n||{};return g(nt,{role:"group","aria-label":"Photo album",...d,variables:{spacing:y,padding:v,containerWidth:T,...x},classes:["",t],render:o,ref:w,children:[void 0!==y&&void 0!==v&&void 0!==T&&b?.map(({photos:t,variables:n},i)=>{const o=t.length,d=k?o:b.length;return c(nt,{...h,key:i,render:r,classes:"track",variables:{trackSize:o,...n}},t.map(t=>{const{photo:n,index:i,width:o}=t,{key:r,src:c,alt:h="",title:w,label:b}=n,x=s?t=>{s({event:t,photo:n,index:i})}:void 0;if(a){const e=a({onClick:x},t);if(e)return e}const k=t=>b?{"aria-label":b,...t}:t;return g(it,{onClick:x,render:l,componentsProps:{image:{loading:"lazy",decoding:"async",src:c,alt:h,title:w,...et(n,e,o,T,d,y,v),...Z(f,t)},link:k(Z(p,t)),button:k(Z(u,t)),wrapper:Z(m,t)},...t},r??i)}))}),void 0===T&&i]})});function ot(t,e,n){return function(t,e){if(!t)return;const n=[];for(let i=e;void 0!==i;i=t.get(i))n.push(i);return n.reverse()}(function(t,e,n){const i=/* @__PURE__ */new Map,s=/* @__PURE__ */new Set,o=/* @__PURE__ */new Map;o.set(e,0);const r=function(t){let e=0;const n=[],i=(e,i)=>t(n[e],n[i])<0,s=(t,e)=>{const i=n[t];n[t]=n[e],n[e]=i};return{push:t=>{e+=1,n[e]=t,(t=>{let e=t,n=Math.floor(e/2);for(;e>1&&i(n,e);)s(n,e),e=n,n=Math.floor(e/2)})(e)},pop:()=>{if(0===e)return;s(1,e),e-=1;const t=n.pop();return(()=>{let t=1,n=2*t;for(;n<=e&&(n<e&&i(n,n+1)&&(n+=1),i(t,n));)s(t,n),t=n,n=2*t})(),t},size:()=>e}}((a=t=>t[1],(t,e)=>a(e)-a(t)));var a;for(r.push([e,0]);r.size()>0;){const[e,n]=r.pop();if(!s.has(e)){const a=t(e);s.add(e),a.forEach((t,s)=>{const a=n+t,l=i.get(s),c=o.get(s);(void 0===c||c>a&&(c/a>1.005||void 0!==l&&l<e))&&(o.set(s,a),r.push([s,a]),i.set(s,e))})}}return o.has(n)?i:void 0}(t,e,n),n)}function rt(t,e,n,i){return(e-(t.length-1)*n-2*i*t.length)/t.reduce((t,e)=>t+K(e),0)}function at(t,e,n,i,s,o,r){const a=t.slice(e,n),l=rt(a,i,s,o);return l>0?(l-r)**2*a.length:void 0}var lt=f(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:r,containerWidth:a}=W(s,e,n),{spacing:l,padding:c,targetRowHeight:d,minPhotos:h,maxPhotos:p,...u}=function(t,{photos:e,targetRowHeight:n,rowConstraints:i,...s}){const{spacing:o,padding:r,componentsProps:a,render:l}=X(t,s),{singleRowMaxHeight:c,minPhotos:d,maxPhotos:h}=Q(i,t)||{};if(void 0!==c&&void 0!==o&&void 0!==r){const t=Math.floor(e.reduce((t,{width:e,height:n})=>t+e/n*c+2*r,o*(e.length-1)));t>0&&(a.container={...a.container},a.container.style={maxWidth:t,...a.container.style})}return{...s,targetRowHeight:J(n,t,[t=>t/5,t=>t/4,t=>t/3,t=>t/2]),render:l,spacing:o,padding:r,minPhotos:d,maxPhotos:h,componentsProps:a}}(a,{photos:t,...i});return g(st,{layout:"rows",ref:r,model:o(()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?function(t,e,n,i,s,o,r){const a=ot(function(t,e,n,i,s,o,r,a){return l=>{const c=/* @__PURE__ */new Map;c.set(l,0);const d=r||1,h=Math.min(o,a||1/0);for(let o=l+d;o<t.length+1&&!(o-l>h);o+=1){const r=at(t,l,o,i,e,n,s);if(void 0===r)break;c.set(o,r)}return c}}(t,e,n,i,s,function(t,e,n,i){return tt(e/n/Math.min(...t.map(t=>K(t))))+(i||0)+2}(t,i,s,o),o,r),0,t.length);if(!a)return;const l=[];for(let c=1;c<a.length;c+=1){const s=t.slice(a[c-1],a[c]).map((t,e)=>({photo:t,index:a[c-1]+e})),o=rt(s.map(({photo:t})=>t),i,e,n);l.push({photos:s.map(({photo:t,index:e})=>({photo:t,index:e,width:o*K(t),height:o}))})}return{spacing:e,padding:n,containerWidth:i,tracks:l,horizontal:!0}}(t,l,c,a,d,h,p):void 0,[t,l,c,a,d,h,p]),...u})});function ct(t,e,n,i,s,o,r){const a=[],l=r.reduce((t,e)=>t+e,0);for(let c=0;c<t.length-1;c+=1){const d=e.slice(t[c],t[c+1]).map((e,n)=>({photo:e,index:t[c]+n})),h=r.reduce((t,e,n)=>t+(o[c]-o[n])*e,0),p=(s-(t.length-2)*n-2*(t.length-1)*i-h)*r[c]/l;a.push({photos:d.map(({photo:t,index:e})=>({photo:t,index:e,width:p,height:p/K(t)})),variables:{adjustedGaps:h,columnRatio:r[c]}})}return{tracks:a,variables:{totalRatio:l}}}function dt(t,e,n,i,s,o){const r=[],a=[];if(t.length<=o){const s=t.length>0?t.reduce((t,e)=>t+K(e),0)/t.length:1;for(let e=0;e<o;e+=1)r[e]=2*n,a[e]=e<t.length?K(t[e]):s;return ct(Array.from({length:o+1},(e,n)=>Math.min(n,t.length)),t,e,n,i,r,a)}const l=(c=function(t,e,n,i,s){return o=>{const r=[],a=1.5*s;let l=i/K(t[o])+2*n;for(let c=o+1;c<t.length+1&&(r.push([c,(s-l)**2]),!(l>a||c===t.length));c+=1)l+=i/K(t[c])+e+2*n;return r}}(t,e,n,s,(t.reduce((t,e)=>t+s/K(e),0)+e*(t.length-o)+2*n*t.length)/o),d=o,h=0,p=t.length,function(t,e,n){const i=[n];for(let s=n,o=e;o>0;o-=1)[s]=t.get(s)[o],i.push(s);return i.reverse()}(function(t,e,n,i){const s=/* @__PURE__ */new Map,o=/* @__PURE__ */new Set;o.add(n);for(let r=0;r<e;r+=1){const n=[...o.keys()];o.clear(),n.forEach(n=>{const a=r>0?s.get(n)[r][1]:0;t(n).forEach(([t,l])=>{let c=s.get(t);c||(c=[],s.set(t,c));const d=a+l,h=c[r+1];(!h||h[1]>d&&(h[1]/d>1.0001||n<h[0]))&&(c[r+1]=[n,d]),r<e-1&&t!==i&&o.add(t)})})}return s}(c,d,h,p),d,p));var c,d,h,p;for(let u=0;u<l.length-1;u+=1){const i=t.slice(l[u],l[u+1]);r[u]=e*(i.length-1)+2*n*i.length,a[u]=1/i.reduce((t,e)=>t+1/K(e),0)}return ct(l,t,e,n,i,r,a)}function ht(t,e,n,i,s){const{tracks:o,variables:r}=dt(t,e,n,i,(i-e*(s-1)-2*n*s)/s,s);return o.some(t=>t.photos.some(({width:t,height:e})=>t<=0||e<=0))?s>1?ht(t,e,n,i,s-1):void 0:{tracks:o,spacing:e,padding:n,containerWidth:i,variables:{columns:s,...r}}}var pt=f(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:r,containerWidth:a}=W(s,e,n),{spacing:l,padding:c,columns:d,...h}=function(t,{columns:e,...n}){return{...n,...X(t,n),columns:J(e,t,[5,4,3,2],1)}}(a,{photos:t,...i});return g(st,{layout:"columns",ref:r,model:o(()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?ht(t,l,c,a,d):void 0,[t,l,c,a,d]),...h})});function ut(t,e,n,i,s){const o=(i-e*(s-1)-2*n*s)/s;if(o<=0)return s>1?ut(t,e,n,i,s-1):void 0;const r=[];for(let l=0;l<s;l+=1)r[l]=0;const a=t.reduce((t,i,s)=>{const a=r.reduce((t,e,n)=>e<r[t]-1?n:t,0);return r[a]=r[a]+o/K(i)+e+2*n,t[a].push({photo:i,index:s}),t},Array.from({length:s},()=>[]));return{spacing:e,padding:n,containerWidth:i,variables:{columns:s},tracks:a.map(t=>({photos:t.map(({photo:t,index:e})=>({photo:t,index:e,width:o,height:o/K(t)}))}))}}var mt=f(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:r,containerWidth:a}=W(s,e,n),{spacing:l,padding:c,columns:d,...h}=function(t,{columns:e,...n}){return{...n,...X(t,n),columns:J(e,t,[5,4,3,2],1)}}(a,{photos:t,...i});return g(st,{layout:"masonry",ref:r,model:o(()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?ut(t,l,c,a,d):void 0,[t,l,c,a,d]),...h})});function gt(t){return t?String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}var ft=class{constructor(t,e={}){this.lightbox=t,this.aiSummaryVisible=!1,this.currentSummary=null,this.options={aiSummaryButtonOrder:7,width:"400px",height:"300px",transition:"0.3s ease",...e},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>`),t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("uiRegister",()=>{t.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(t)}}),t.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>'})}),t.on("change",()=>{this.aiSummaryVisible&&this.updateAISummary(t)}),t.on("close",()=>{this.hideAISummary(t)}),t.on("firstUpdate",()=>{const e=t.element.querySelector(".pswp__ai-summary-close");e&&e.addEventListener("click",()=>{this.hideAISummary(t)})})}toggleAISummary(t){this.aiSummaryVisible?this.hideAISummary(t):this.showAISummary(t)}showAISummary(t){const e=t.container,n=t.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!0,n.classList.add("visible"),e.classList.add("shifted-for-ai-summary"),this.updateAISummary(t))}hideAISummary(t){const e=t.container,n=t.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!1,n.classList.remove("visible"),e.classList.remove("shifted-for-ai-summary"))}updateAISummary(t){if(!t.currSlide)return;const e=t.element.querySelector(".pswp__ai-summary-panel");if(!e)return;const n=t.currSlide.data,i=n.src||n.url||"";let s=null;try{n.contentSummary&&(s=JSON.parse(n.contentSummary),this.currentSummary=s)}catch(r){console.error("Error parsing AI summary data:",r)}const o=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(s){e.innerHTML=`<div class="pswp__ai-summary-close"></div>${this.renderAISummary(s)}${o}`;const n=e.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(t)})}else{e.innerHTML=`<div class="pswp__ai-summary-close"></div><div class="pswp__ai-summary-empty">No AI summary available for this content</div>${o}`;const n=e.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(t)})}}renderAISummary(t){let e='<div class="pswp__ai-summary-content">';return t.subject&&(e+=`<div class="pswp__ai-summary-title">${gt(t.subject)}</div>`),t.labels&&Object.entries(t.labels).filter(([t,e])=>Array.isArray(e)&&e.length>0).forEach(([t,n])=>{e+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-section-title">${gt(t.replace("_"," ").replace(/\b\w/g,t=>t.toUpperCase()))}</div>\n <div class="pswp__ai-summary-labels space-y-2">\n ${n.map(t=>`<span class="pswp__ai-summary-label">${gt(t)}</span>`).join("")}\n </div>\n </div>\n `}),t.description&&(e+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-description">${gt(t.description)}</div>\n </div>\n `),e+="</div>",e}},wt='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")',yt=class{constructor(t){this.backdropOn=!1,this.lightbox=t,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("afterInit",()=>{setTimeout(()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"},[500])}),t.on("uiRegister",()=>{t.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(t)}}),this.createBlurBackground(t)}),t.on("change",()=>{this.backdropOn&&this.updateBlurBackground(t)}),t.on("close",()=>{this.removeBlurBackground(),this.backdropOn=!1})}createBlurBackground(t){const e=t.element;if(!this.backgroundElement){const t=document.createElement("div");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.backgroundSize="cover",t.style.backgroundPosition="center",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.transition="background-image 0.5s ease, opacity 0.5s ease",t.style.display="none",t.style.backgroundImage=wt,e.append(t),this.backgroundElement=t}if(!this.backgroundVideoElement){const t=document.createElement("video");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.objectFit="cover",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.display="none",t.style.transition="opacity 0.5s ease",t.muted=!0,t.loop=!0,t.autoplay=!1,t.muted=!0,t.volume=0,e.append(t),this.backgroundVideoElement=t}}toggleBackdrop(t){this.backdropOn?(this.backgroundElement.style.backgroundImage=wt,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(t),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(t){const e=t.currSlide;if(e?.data)if("video"===e.data.type){const t=this.backgroundVideoElement,n=e.content.element;"video"===n?.tagName?.toLowerCase()&&(this.referenceVideoElement=n,this.registerVideoEvents(n,t)),t.style.opacity=0,setTimeout(()=>{t.src=e.data.src,t.load(),this.initBackgroundVideo(),t.style.opacity=1},500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else{if(this.backgroundElement){const t=e.data.blurhash||"LEHV6nWB2yk8pyo0adR*.7kCMdnj";if(t){const e=this.createBlurhashCanvas(t,200,200);e.startsWith("data:")?this.backgroundElement.style.backgroundImage=`url('${e}')`:(this.backgroundElement.style.backgroundImage="none",this.backgroundElement.style.backgroundColor=e)}else this.backgroundElement.style.backgroundImage=`url('${e.data.thumbnailUrl}')`;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(t,e=100,n=100){const i=document.createElement("canvas");i.width=e,i.height=n;try{const s=i.getContext("2d"),o=H(t,e,n);if(o&&o.length>0){const t=s.createImageData(e,n);return t.data.set(o),s.putImageData(t,0,0),i.toDataURL()}throw new Error("Empty pixels array")}catch(s){return console.warn("Failed to decode blurhash for backdrop:",s),this.blurhashToColor(t)}}blurhashToColor(t){const e=["#8B9DC3","#DFB2A3","#C4B5A0","#A8B8C8","#B8A898"];return e[t.charCodeAt(0)%e.length]}registerVideoEvents(t,e){this.foregroundVideoElement=t,t.addEventListener("play",()=>{e.currentTime=t.currentTime,e.play()}),t.addEventListener("pause",()=>{e.pause()}),t.addEventListener("ended",()=>{e.pause(),e.currentTime=0})}};function vt(t){return t?String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}var Tt={[E.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>',[E.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>',[E.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>',[E.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>',[E.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>',[E.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>'},bt=class{constructor(t,e,n){this.lightbox=t,this.captureAdImpression=e,this.captureAdClick=n,this.captionOn=!0,this.options={captionButtonOrder:8},t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,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-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(t)}}),t.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full"></div>'})}),t.on("change",()=>{this.captionOn&&this.updateCaption(t)}),t.on("close",()=>{this.clearCaption()})}toggleCaption(t){this.captionOn?this.clearCaption():this.updateCaption(t),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(t){const{id:e,type:n,caption:i,title:s,description:o,targetType:r,targetText:a,targetUrl:l}=t||{};switch("ad"===n&&this.captureAdImpression&&this.captureAdImpression(e),n){case"image":case"video":return i?.length>0?`\n <div class=" w-full bg-black bg-opacity-50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${vt(i)}</h3>\n </div>\n `:"";case"ad":return`\n <div class=" w-full bg-black/85 p-4 text-white">\n <div class=" mx-auto w-full max-w-2xl space-y-2 text-center">\n <h3 class=" text-center sm:text-lg">${vt(s)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${vt(o)}</h4>\n <button\n class=" flex w-full items-center justify-center gap-3 rounded-md bg-white py-1 text-lg text-black caption-action-button"\n data-id="${vt(e)}"\n data-target-type="${vt(r||E.LINK)}"\n data-target-url="${vt(l)}">\n ${Tt[r||E.LINK]}\n ${vt(a)}\n </button>\n </div>\n </div>\n `;default:return""}}updateCaption(t){try{const e=document.getElementById("pswp-caption-container");if(!e)return;const n=t.currSlide?.data;e.innerHTML=this.createCaptionHTML(n);const i=e.querySelector(".caption-action-button");i&&i.addEventListener("click",t=>{const e=t.currentTarget.dataset.id,n=t.currentTarget.dataset.targetType,i=t.currentTarget.dataset.targetUrl;this.captureAdClick&&e&&this.captureAdClick(e,n,i)})}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const t=document.getElementById("pswp-caption-container");t&&(t.innerHTML="")}},xt=class{constructor(t){this.lightbox=t,this.fullscreen=!1,this.options={fullScreenButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("uiRegister",()=>{(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&t.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(t)}})})}toggleFullscreen(t){const e=t.element;this.fullscreen?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),t.options.showHideAnimationType="zoom",this.fullscreen=!1):(e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen(),t.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"}},kt=class{constructor(t,e={}){this.lightbox=t,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},e),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(t){t.on("uiRegister",()=>{t.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()}}),t.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),t.events.add(document,"keydown",t=>{switch(t.code){case"Space":this.setSlideshowState(),t.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),t.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),t.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(t){this.options.defaultDelayMs=Math.min(Math.max(t,1e3),2147483647),this.options.defaultDelayMs!=t&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(t){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+t),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const e=document.querySelector(".pswp__counter");e&&(e.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(t){return"video"===t?.data?.type}getSlideTimeout(){const t=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(t)){const e=t.element;if(e.paused)return this.options.defaultDelayMs;const n=e.duration,i=e.currentTime;return isNaN(n)||isNaN(i)?this.options.defaultDelayMs:1e3*(n-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const t=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(t)){const e=t.element;return e.ended||e.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(e.networkState)}return!t.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const t=this.getSlideTimeout();this.slideshowTimerID=setTimeout(()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()},t),setTimeout(()=>{this.slideshowIsRunning&&this.toggleProgressBar(t)},100)}else this.slideshowTimerID=setTimeout(()=>{this.goToNextSlideAfterTimeout()},200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(t){const e=document.querySelector(".pswp__progress-bar");t?(e.style.transitionTimingFunction=this.getSlideTransition(),e.style.transitionDuration=`${t}ms`,e.classList.add("running")):e.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(t=>console.error(t)):navigator.wakeLock.request("screen").then(t=>(this.wakeLockSentinel=t,this.wakeLockSentinel.addEventListener("release",()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1}),!0)).catch(t=>{})),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}},_t={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function qt(t){return t&&t.data&&"video"===t.data.type}var St=class{constructor(t,e){this.options=e,this.initLightboxEvents(t),t.on("init",()=>{this.initPswpEvents(t.pswp)})}initLightboxEvents(t){t.on("contentLoad",this.onContentLoad.bind(this)),t.on("contentDestroy",this.onContentDestroy.bind(this)),t.on("contentActivate",this.onContentActivate.bind(this)),t.on("contentDeactivate",this.onContentDeactivate.bind(this)),t.on("contentAppend",this.onContentAppend.bind(this)),t.on("contentResize",this.onContentResize.bind(this)),t.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),t.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),t.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),t.addFilter("domItemData",(t,e,n)=>("video"===t.type&&n&&(n.dataset.pswpVideoSources?t.videoSources=JSON.parse(n.dataset.pswpVideoSources):n.dataset.pswpVideoSrc?t.videoSrc=n.dataset.pswpVideoSrc:t.videoSrc=n.href),t))}initPswpEvents(t){t.on("pointerDown",e=>{const n=t.currSlide;if(qt(n)&&this.options.preventDragOffset){const i=e.originalEvent;if("pointerdown"===i.type){const s=Math.ceil(n.height*n.currZoomLevel)+n.bounds.center.y,o=i.pageY-t.offset.y;o>s-this.options.preventDragOffset&&o<s&&e.preventDefault()}}}),t.on("appendHeavy",t=>{qt(t.slide)&&!t.slide.isActive&&t.preventDefault()}),t.on("close",()=>{qt(t.currSlide.content)&&this.pauseVideo(t.currSlide.content)})}onContentDestroy({content:t}){qt(t)&&t._videoPosterImg&&(t._videoPosterImg.onload=t._videoPosterImg.onerror=null,t._videoPosterImg=null)}onContentResize(t){if(qt(t.content)){t.preventDefault();const e=t.width,n=t.height,i=t.content;if(i.element&&(i.element.style.width=`${e}px`,i.element.style.height=`${n}px`),i.slide&&i.slide.placeholder){const t=i.slide.placeholder.element.style;t.transform="none",t.width=`${e}px`,t.height=`${n}px`}}}isKeepingPlaceholder(t,e){return!qt(e)&&t}isContentZoomable(t,e){return!qt(e)&&t}onContentActivate({content:t}){qt(t)&&this.options.autoplay&&this.playVideo(t)}onContentDeactivate({content:t}){qt(t)&&this.pauseVideo(t)}onContentAppend(t){qt(t.content)&&(t.preventDefault(),t.content.isAttached=!0,t.content.appendImage())}onContentLoad(t){const e=t.content;if(qt(t.content)&&(t.preventDefault(),!e.element)){if(e.state="loading",e.type="video",e.element=document.createElement("video"),this.options.videoAttributes)for(let t in this.options.videoAttributes)e.element.setAttribute(t,this.options.videoAttributes[t]||"");e.element.setAttribute("poster",e.data.msrc),this.preloadVideoPoster(e,e.data.msrc),e.element.style.position="relative",e.element.style.left=0,e.element.style.top=0,e.data.videoSources?e.data.videoSources.forEach(t=>{let n=document.createElement("source");n.src=t.src,n.type=t.type,e.element.appendChild(n)}):e.data.videoSrc&&(e.element.src=e.data.videoSrc)}}preloadVideoPoster(t,e){!t._videoPosterImg&&e&&(t._videoPosterImg=new Image,t._videoPosterImg.src=e,t._videoPosterImg.complete?t.onLoaded():t._videoPosterImg.onload=t._videoPosterImg.onerror=()=>{t.onLoaded()})}playVideo(t){t.element&&t.element.play()}pauseVideo(t){t.element&&t.element.pause()}useContentPlaceholder(t,e){return!!qt(e)||t}},Et=class{constructor(t,e={}){new St(t,{..._t,...e})}},Ct=({open:t,ad:e,onClose:n,captureAdClick:i})=>/* @__PURE__ */g(M,{open:Boolean(t&&e),onOpenChange:t=>!t&&n?.(),children:/* @__PURE__ */g(L,{children:[/* @__PURE__ */g(A,{className:"hidden",children:[/* @__PURE__ */g(B,{children:e?.title}),/* @__PURE__ */g(R,{children:e?.description})]}),/* @__PURE__ */g("div",{className:"flex max-w-lg flex-col overflow-hidden",children:[
2
+ /* @__PURE__ */g("img",{className:"h-auto max-h-96 w-full object-contain",src:e?.imageUrl,alt:"Image not found"}),
3
+ /* @__PURE__ */g("div",{className:"flex flex-col gap-2 p-3",children:[/* @__PURE__ */g(N,{variant:"h4",align:"center",lines:2,children:e?.title}),/* @__PURE__ */g(N,{variant:"body3",color:"secondary",align:"center",lines:6,children:e?.description})]}),
4
+ /* @__PURE__ */g(O,{fullWidth:!0,className:"rounded-t-none",onClick:()=>i?.(e?._id,e?.targetType??E.LINK,e?.targetUrl),icon:x[e?.targetType]??x[E.LINK],children:e?.targetText})]})]})}),It=({url:t,alt:n="",thumbnailUrl:i,blurhash:s,pswpData:o={},curateLink:r,onClick:a})=>{const l=/* @__PURE__ */g(e,{children:[/* @__PURE__ */g(U,{threshold:.1,src:i||t,blurhash:s,alt:n}),o.type===q.VIDEO&&/* @__PURE__ */g("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */g("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */g("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?/* @__PURE__ */g("button",{className:"h-full w-full",onClick:a,children:l}):r?/* @__PURE__ */g(u,{to:r,className:"h-full w-full",children:l}):/* @__PURE__ */g("a",{href:t,className:"pswp-item block h-full w-full",...Object.keys(o).reduce((t,e)=>{var n;return t[`data-pswp-${n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=String(o[e]),t},{}),target:"_blank",rel:"noreferrer",children:l})},Lt=({style:t,content:e,curateLink:n,onAdClick:i})=>{const{captureAdImpression:s,captureAdEngagement:o,captureAdClick:r}=$();/* @__PURE__ */
5
+ return g("div",{style:t,className:"group relative mb-1 overflow-hidden rounded",children:[/* @__PURE__ */g(F,{className:"size-full",threshold:.8,triggerOnce:!0,onChange:t=>{t&&s(e._id)},onClick:()=>o(e._id),children:/* @__PURE__ */g(It,{url:e.src,thumbnailUrl:e.src,blurhash:e.blurhash,alt:e.caption,onClick:n?i:void 0,pswpData:{id:e._id,type:q.AD,hash:e._id,width:e.width,height:e.height,title:e.title,description:e.description,targetType:e.targetType,targetText:e.targetText,targetUrl:e.targetUrl,thumbnailUrl:e.imageUrl,blurhash:e.blurhash}})}),/* @__PURE__ */g("div",{className:"transition-opacity duration-500 group-hover:opacity-100 sm:opacity-0",children:/* @__PURE__ */g("div",{className:"text-foreground bg-background bg-opacity-75 absolute bottom-0 w-full flex-col items-center justify-between sm:flex sm:flex-row",children:[/* @__PURE__ */g("h3",{className:"text-foreground line-clamp-2 p-2 text-sm font-medium sm:ml-3 sm:line-clamp-1 sm:p-0",children:e.title}),e?.targetType!==E.NONE&&/* @__PURE__ */g(O,{immutable:!0,className:"w-full rounded-t-none py-1 text-nowrap sm:w-auto sm:rounded-t-none sm:rounded-bl-none sm:py-2",onClick:()=>r(e._id,e.targetType,e.targetUrl),iconName:x[e?.targetType??E.LINK],children:e?.targetText})]})})]})},At=n(null),Nt=()=>{const t=l(At);if(!t)throw new Error("Popover components must be used within a Popover");return t},Mt=({children:e,className:n,open:i,onOpenChange:s})=>{const[o,r]=a(!1),l="boolean"==typeof i,c=l?i:o,d=t(),u=`popover-trigger-${d}`,m=`popover-content-${d}`,f=p(null);/* @__PURE__ */
6
+ return g(At.Provider,{value:{isOpen:c,setIsOpen:t=>{l||r(t),s?.(t)},triggerId:u,contentId:m,triggerRef:f},children:/* @__PURE__ */g("div",{"data-slot":"popover",className:h("relative inline-block",n),children:e})})},Bt=({children:t,asChild:e,className:n,onClick:i,...s})=>{const{isOpen:o,setIsOpen:r,triggerId:a,contentId:l,triggerRef:c}=Nt();if(y(()=>{if(!e)return;const t=document.getElementById(a);return c.current=t,()=>{c.current===t&&(c.current=null)}},[e,a,c]),e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type){const t=e.props?.className;return d(e,{id:a,className:n?t?`${t} ${n}`:n:t,"aria-haspopup":"dialog","aria-expanded":o,"aria-controls":o?l:void 0,onClick:t=>{r(!o),e.props?.onClick?.(t)},"data-state":o?"open":"closed"})}}/* @__PURE__ */
7
+ return g("button",{ref:c,id:a,type:"button","aria-haspopup":"dialog","aria-expanded":o,"aria-controls":o?l:void 0,"data-slot":"popover-trigger","data-state":o?"open":"closed",className:n,onClick:t=>{r(!o),i?.(t)},...s,children:t})},Vt=({children:t,className:e,align:n="center",side:i="top",sideOffset:s=4,...o})=>{const{isOpen:l,setIsOpen:c,contentId:d,triggerRef:u}=Nt(),{organization:f}=S(),v=p(null),[T,b]=a(null);if(r(()=>{if(!l)return;const t=()=>{if(!u.current||!v.current)return;const t=u.current.getBoundingClientRect(),e=v.current.getBoundingClientRect();let o=t.left,r=t.bottom+s;"center"===n&&(o=t.left+t.width/2-e.width/2),"end"===n&&(o=t.right-e.width),"top"===i&&(r=t.top-e.height-s),"left"===i&&(o=t.left-e.width-s,r=t.top+t.height/2-e.height/2),"right"===i&&(o=t.right+s,r=t.top+t.height/2-e.height/2),"bottom"===i&&(r=t.bottom+s),b({top:r,left:o})},e=requestAnimationFrame(t);return window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{cancelAnimationFrame(e),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[n,l,i,s,u]),y(()=>{if(!l)return;const t=t=>{const e=t.target;v.current&&!v.current.contains(e)&&u.current&&!u.current.contains(e)&&c(!1)},e=t=>{"Escape"===t.key&&(c(!1),u.current?.focus())},n=window.setTimeout(()=>{document.addEventListener("mousedown",t)},0);return document.addEventListener("keydown",e),()=>{window.clearTimeout(n),document.removeEventListener("mousedown",t),document.removeEventListener("keydown",e)}},[l,c,u]),!l)return null;const x=/* @__PURE__ */g("div",{ref:v,id:d,role:"dialog","aria-modal":"false","data-state":l?"open":"closed",className:h("bg-background text-foreground border-border shadow-outer rounded outline-none",e),style:{position:"fixed",top:T?.top??0,left:T?.left??0,zIndex:2010,...m(f)},...o,children:t});return"undefined"!=typeof document?w(x,document.body):x},zt=({eventId:t,contentId:e,emojis:n=[],counts:i={},userReaction:s})=>{const{user:o,props:r,organization:l}=S(),c=r?.loginUrl,{handleReactionClick:d}=(()=>{const t=v(),{props:e,user:n}=S(),i=e?.organizationId;return{handleReactionClick:async(e,s,o)=>{if(!e||!s||!o)return!1;if(!n)return P.error("Please login to react"),!1;const r=[T.CONTENTS_BY_EVENT(e)],a=t.getQueriesData({queryKey:r});t.setQueriesData({queryKey:r},t=>t?.pages&&Array.isArray(t.pages)?{...t,pages:t.pages.map(t=>t.data?{...t,data:t.data.map(t=>{if(t._id===s){const e={...t.reactionCounts};return t.userReaction&&t.userReaction!==o&&(e[t.userReaction]=Math.max(0,(e[t.userReaction]??1)-1)),t.userReaction===o?(e[o]=Math.max(0,(e[o]??1)-1),{...t,reactionCounts:e,userReaction:void 0}):(e[o]=(e[o]??0)+1,{...t,reactionCounts:e,userReaction:o})}return t})}:t)}:t);try{return await k.post(_.UPDATE_REACTION,{json:{eventId:e,contentId:s,reaction:o},headers:{"x-org-id":i,Authorization:`Bearer ${n.token}`}}),!0}catch(l){return a.forEach(([e,n])=>{t.setQueryData(e,n)}),P.error("Failed to add reaction"),console.error("Error handling reaction click:",l),!1}}}})(),[p,m]=a(!1),[f,w]=a(!1),y=Object.values(i).reduce((t,e)=>t+e,0);/* @__PURE__ */
8
+ return g(Mt,{open:p,onOpenChange:m,children:[/* @__PURE__ */g(Bt,{children:/* @__PURE__ */g("div",{className:h("bg-background/50 flex items-center gap-1 rounded px-2 py-1 backdrop-blur-sm transition-transform active:scale-90 sm:gap-2 sm:py-0",s&&"ring-primary ring-1"),children:[(n||[]).slice().sort((t,e)=>(i[e]||0)-(i[t]||0)).slice(0,1).map(t=>/* @__PURE__ */g("span",{className:"text-sm sm:text-lg",children:s||t},`${e}-${t}-1`)),y>0&&/* @__PURE__ */g("span",{className:"text-xs font-bold sm:text-sm",children:y||0})]})}),/* @__PURE__ */g(Vt,{side:"top",align:"end",children:[o?null:/* @__PURE__ */g("div",l?.customAuth?{className:"p-2 font-semibold",children:["Please"," ",
9
+ /* @__PURE__ */g("a",{className:"text-info underline",href:c,children:"Login"})," ","to react"]}:{className:"p-2 font-semibold",children:["Please"," ",
10
+ /* @__PURE__ */g(u,{className:"text-info underline",to:b.LOGIN,children:"Login"})," ","to react"]}),o&&/* @__PURE__ */g("div",{className:"flex gap-1 p-2",children:n.map(n=>{const o=s===n;/* @__PURE__ */
11
+ return g("div",{className:"flex flex-col items-center",children:[/* @__PURE__ */g("span",{className:"text-xs font-medium",children:i[n]||0}),/* @__PURE__ */g("button",{type:"button",disabled:f,className:h("text-3xl transition-transform disabled:opacity-50",o?"scale-125":"hover:scale-110",f&&"cursor-not-allowed"),onClick:()=>(async n=>{!f&&d&&(w(!0),await d(t,e,n)&&m(!1),w(!1))})(n),children:n})]},`${e}-${n}-2`)})})]})]})},Rt=({event:t={},content:e,curateLink:n})=>t.engagementStyle===I.CONTEST?/* @__PURE__ */g("button",{className:"bg-background/75 flex items-center gap-1 rounded px-2 py-1",children:[/* @__PURE__ */g(V,{name:"material-symbols:star-half-rounded",className:"size-4"}),/* @__PURE__ */g("span",{className:"text-xs font-semibold",children:parseFloat(String(e.score||0)).toFixed(1)})]}):t.engagementStyle===I.REACTION&&t.reactionEmojis?.length?/* @__PURE__ */g(zt,{eventId:t?._id,contentId:e._id,emojis:t?.reactionEmojis,engagementStyle:t?.engagementStyle,counts:e.reactionCounts||{},userReaction:e.userReaction}):null,Ot=({content:t})=>/* @__PURE__ */g("div",{className:"w-full space-y-3 px-3 pb-3",children:[t?.caption&&/* @__PURE__ */g("span",{className:"hidden w-full py-1 text-xs drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)] sm:block","data-tooltip-target":"tooltip-default",children:/* @__PURE__ */g("div",{className:"hover:text-foreground lg:text-md line-clamp-2 text-xs text-white lg:font-medium",title:t?.caption,role:"note",children:t?.caption})}),/* @__PURE__ */g("div",{className:"flex items-center justify-between",children:/* @__PURE__ */g("span",{className:"lg:text-md line-clamp-1 text-sm font-medium text-white drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]",children:t?.user?.name})})]}),Pt=({event:t,content:n,style:i,timestampField:s,curateLink:o,onChangeFaceUrl:r,hideControls:a})=>{const{organization:l}=S(),c=`content-${n._id}`,d=((t,e)=>{if(!t||!e)return null;const n=e?.[t];if(!n)return null;try{const t=new Date(String(n)),e=/* @__PURE__ */new Date,i=t.getFullYear()===e.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),t.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(s,n);/* @__PURE__ */
12
+ return g("div",{id:c,style:i,className:"group relative mb-1 overflow-hidden rounded",children:[/* @__PURE__ */g(It,{url:n.src,alt:n.caption,blurhash:n.blurhash,thumbnailUrl:n.thumbnailUrl,curateLink:o,pswpData:{id:n._id,type:q.IMAGE,hash:n._id,width:n.width,height:n.height,thumbnailUrl:n.thumbnailUrl,blurhash:n.blurhash,caption:n.caption,contentSummary:JSON.stringify(n.contentSummary)}}),!a&&/* @__PURE__ */g(e,{children:[d&&/* @__PURE__ */g("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:d}),l?.integrationSettings?.showQuickSearch&&(n.faces?.length??0)>0&&/* @__PURE__ */g("button",{className:"bg-primary absolute top-2 right-2 rounded-full p-1 text-gray-200 opacity-50 transition-all sm:p-1.5 sm:hover:scale-110 sm:hover:opacity-100",onClick:()=>{r?.(n?.url);const t=document.getElementById("media-gallery-container");t&&t.scrollIntoView({behavior:"smooth",block:"start"})},children:/* @__PURE__ */g(V,{color:"a11y",name:"material-symbols:familiar-face-and-zone-outline-rounded"})}),
13
+ /* @__PURE__ */g("div",{className:"",children:[/* @__PURE__ */g("div",{className:"absolute bottom-0 w-full rounded-b",children:/* @__PURE__ */g(Ot,{content:n})}),/* @__PURE__ */g("div",{className:"absolute right-2 bottom-2",children:/* @__PURE__ */g(Rt,{event:t,content:n,curateLink:o})})]})]})]})},Dt=({content:t,style:e,event:n,timestampField:i,curateLink:s,hideControls:o})=>{const r=((t,e)=>{if(!t||!e)return null;const n=e?.[t];if(!n)return null;try{const t=new Date(String(n)),e=/* @__PURE__ */new Date,i=t.getFullYear()===e.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),t.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(i,t);/* @__PURE__ */
14
+ return g("div",{id:`content-${t._id}`,className:"group relative mb-1 overflow-hidden rounded",style:e,children:[/* @__PURE__ */g(It,{url:t.src??t.url,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,alt:t.caption,curateLink:s,pswpData:{id:t._id,type:q.VIDEO,hash:t._id,width:t.width,height:t.height,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,caption:t.caption}}),!o&&/* @__PURE__ */g("div",{className:"transition-opacity duration-500",children:[r&&/* @__PURE__ */g("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:r}),
15
+ /* @__PURE__ */g("div",{className:"absolute bottom-0 w-full rounded-b",children:/* @__PURE__ */g(Ot,{content:t})}),
16
+ /* @__PURE__ */g("div",{className:"absolute right-2 bottom-2",children:/* @__PURE__ */g(Rt,{event:n,content:t,curateLink:s})})]})]})},$t=({event:t,contents:n=[],singleColumnMode:i,kioskMode:s,timestampField:r,curateLink:l,onChangeFaceUrl:c})=>{const d=p(null),u=p(null),m=o(()=>`gallery-${t?._id??""}`,[t]),{captureAdImpression:f,captureAdClick:w}=$(),{organization:v}=S(),[T,b]=a(null);y(()=>{const t=u.current;if(!l&&t){const e=new z({gallery:t,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:D});d.current=e,new Et(e),new yt(e),new bt(e,f,w),new xt(e),new kt(e),v?.navigationSettings?.showAIDescription&&new ft(e,{width:"400px",height:"40%"}),e.init()}return()=>{d.current?.destroy?.(),d.current=null}},[t?.galleryLayout,l,w,f,m,v]);const x=o(()=>{switch(t?.galleryLayout){case C.ROW:return lt;case C.COLUMN:return pt;case C.MASONRY:return mt;default:return lt}},[i,t?.galleryLayout]);/* @__PURE__ */
17
+ return g(e,{children:[/* @__PURE__ */g("div",{id:m,ref:u,className:h(i?"w-full lg:w-1/3":"w-full"),children:/* @__PURE__ */g(x,{spacing:4,targetRowHeight:i?500:360,columns:t=>i?1:t<400?2:t<800?3:4,photos:n.map(t=>({src:t.type===q.IMAGE||t.type===q.VIDEO?t.url:t.imageUrl,width:t.dimension?.width,height:t.dimension?.height,...t})),render:{container:({ref:t,className:e,children:n})=>/* @__PURE__ */g("div",{ref:t,className:e??"",children:n}),photo:(e,{photo:n,width:i,height:o,index:a})=>{const d=n;let h=null;switch(d.type){case q.IMAGE:h=Pt;break;case q.VIDEO:h=Dt;break;case q.AD:h=Lt;break;default:h=null}return h&&/* @__PURE__ */g(h,{style:{width:i,height:o},event:t,content:d,timestampField:r,onAdClick:()=>{b(d)},hideControls:s,curateLink:l?`${l}/${d._id}`:null,onChangeFaceUrl:c},`${d._id??a}-${a}`)}}})}),/* @__PURE__ */g(Ct,{ad:T,onClose:()=>b(null),captureAdClick:w})]})};export{$t as default};
@@ -0,0 +1 @@
1
+ import{H as t,R as e,v as s,z as i}from"./EgsEX4Mk.js";var n=class{constructor(){this.listeners=/* @__PURE__ */new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},r=new class extends n{#t;#e;#s;constructor(){super(),this.#s=t=>{if("undefined"!=typeof window&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#t?this.#t:"hidden"!==globalThis.document?.visibilityState}},a={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},o=new class{#i=a;#n=!1;setTimeoutProvider(t){this.#i=t}setTimeout(t,e){return this.#i.setTimeout(t,e)}clearTimeout(t){this.#i.clearTimeout(t)}setInterval(t,e){return this.#i.setInterval(t,e)}clearInterval(t){this.#i.clearInterval(t)}},c="undefined"==typeof window||"Deno"in globalThis;function u(){}function h(t,e){return"function"==typeof t?t(e):t}function l(t){return"number"==typeof t&&t>=0&&t!==1/0}function d(t,e){return Math.max(t+(e||0)-Date.now(),0)}function f(t,e){return"function"==typeof t?t(e):t}function p(t,e){return"function"==typeof t?t(e):t}function y(t,e){const{type:s="all",exact:i,fetchStatus:n,predicate:r,queryKey:a,stale:o}=t;if(a)if(i){if(e.queryHash!==b(a,e.options))return!1}else if(!g(e.queryKey,a))return!1;if("all"!==s){const t=e.isActive();if("active"===s&&!t)return!1;if("inactive"===s&&t)return!1}return!("boolean"==typeof o&&e.isStale()!==o||n&&n!==e.state.fetchStatus||r&&!r(e))}function v(t,e){const{exact:s,status:i,predicate:n,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(s){if(m(e.options.mutationKey)!==m(r))return!1}else if(!g(e.options.mutationKey,r))return!1}return!(i&&e.state.status!==i||n&&!n(e))}function b(t,e){return(e?.queryKeyHashFn||m)(t)}function m(t){return JSON.stringify(t,(t,e)=>C(e)?Object.keys(e).sort().reduce((t,s)=>(t[s]=e[s],t),{}):e)}function g(t,e){return t===e||typeof t==typeof e&&!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&Object.keys(e).every(s=>g(t[s],e[s]))}var S=Object.prototype.hasOwnProperty;function w(t,e,s=0){if(t===e)return t;if(s>500)return e;const i=F(t)&&F(e);if(!(i||C(t)&&C(e)))return e;const n=(i?t:Object.keys(t)).length,r=i?e:Object.keys(e),a=r.length,o=i?new Array(a):{};let c=0;for(let u=0;u<a;u++){const a=i?u:r[u],h=t[a],l=e[a];if(h===l){o[a]=h,(i?u<n:S.call(t,a))&&c++;continue}if(null===h||null===l||"object"!=typeof h||"object"!=typeof l){o[a]=l;continue}const d=w(h,l,s+1);o[a]=d,d===h&&c++}return n===a&&c===n?t:o}function O(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function F(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function C(t){if(!T(t))return!1;const e=t.constructor;if(void 0===e)return!0;const s=e.prototype;return!!T(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function T(t){return"[object Object]"===Object.prototype.toString.call(t)}function j(t,e,s){return"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?w(t,e):e}function q(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function P(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var E=/* @__PURE__ */Symbol();function U(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==E?t.queryFn:()=>Promise.reject(/* @__PURE__ */new Error(`Missing queryFn: '${t.queryHash}'`))}function A(t,e){return"function"==typeof t?t(...e):!!t}function R(t,e,s){let i,n=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),n||(n=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t}var D=/* @__PURE__ */(()=>{let t=()=>c;return{isServer:()=>t(),setIsServer(e){t=e}}})();function I(){let t,e;const s=new Promise((s,i)=>{t=s,e=i});function i(t){Object.assign(s,t),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},s.reject=t=>{i({status:"rejected",reason:t}),e(t)},s}var L=function(t){setTimeout(t,0)},k=function(){let t=[],e=0,s=t=>{t()},i=t=>{t()},n=L;const r=i=>{e?t.push(i):n(()=>{s(i)})};return{batch:r=>{let a;e++;try{a=r()}finally{e--,e||(()=>{const e=t;t=[],e.length&&n(()=>{i(()=>{e.forEach(t=>{s(t)})})})})()}return a},batchCalls:t=>(...e)=>{r(()=>{t(...e)})},schedule:r,setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{i=t},setScheduler:t=>{n=t}}}(),K=new class extends n{#r=!0;#e;#s;constructor(){super(),this.#s=t=>{if("undefined"!=typeof window&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#r!==t&&(this.#r=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#r}};function M(t){return Math.min(1e3*2**t,3e4)}function x(t){return"online"!==(t??"online")||K.isOnline()}var G=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function H(t){let e,s=!1,i=0;const n=I(),a=()=>"pending"!==n.status,c=()=>r.isFocused()&&("always"===t.networkMode||K.isOnline())&&t.canRun(),u=()=>x(t.networkMode)&&t.canRun(),h=t=>{a()||(e?.(),n.resolve(t))},l=t=>{a()||(e?.(),n.reject(t))},d=()=>new Promise(s=>{e=t=>{(a()||c())&&s(t)},t.onPause?.()}).then(()=>{e=void 0,a()||t.onContinue?.()}),f=()=>{if(a())return;let e;const n=0===i?t.initialPromise:void 0;try{e=n??t.fn()}catch(r){e=Promise.reject(r)}Promise.resolve(e).then(h).catch(e=>{if(a())return;const n=t.retry??(D.isServer()?0:3),r=t.retryDelay??M,u="function"==typeof r?r(i,e):r,h=!0===n||"number"==typeof n&&i<n||"function"==typeof n&&n(i,e);var p;!s&&h?(i++,t.onFail?.(i,e),(p=u,new Promise(t=>{o.setTimeout(t,p)})).then(()=>c()?void 0:d()).then(()=>{s?l(e):f()})):l(e)})};return{promise:n,status:()=>n.status,cancel:e=>{if(!a()){const s=new G(e);l(s),t.onCancel?.(s)}},continue:()=>(e?.(),n),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:u,start:()=>(u()?f():d().then(f),n)}}var N=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),l(this.gcTime)&&(this.#a=o.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(D.isServer()?1/0:3e5))}clearGcTimeout(){this.#a&&(o.clearTimeout(this.#a),this.#a=void 0)}},Q=class extends N{#o;#c;#u;#h;#l;#d;#f;constructor(t){super(),this.#f=!1,this.#d=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#h=t.client,this.#u=this.#h.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#o=$(this.options),this.state=t.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(t){if(this.options={...this.#d,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const t=$(this.options);void 0!==t.data&&(this.setState(B(t.data,t.dataUpdatedAt)),this.#o=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(t,e){const s=j(this.state.data,t,this.options);return this.#p({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#p({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#l?.promise;return this.#l?.cancel(t),e?e.then(u).catch(u):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#o}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>!1!==p(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===E||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===f(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!d(this.state.dataUpdatedAt,t))}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#l&&(this.#f||this.#y()?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#y(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(t,e){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#l?.status())if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise;if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}const s=new AbortController,i=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#f=!0,s.signal)})},n=()=>{const t=U(this.options,e),s=(()=>{const t={client:this.#h,queryKey:this.queryKey,meta:this.meta};return i(t),t})();return this.#f=!1,this.options.persister?this.options.persister(t,s,this):t(s)},r=(()=>{const t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#h,state:this.state,fetchFn:n};return i(t),t})();this.options.behavior?.onFetch(r,this),this.#c=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===r.fetchOptions?.meta||this.#p({type:"fetch",meta:r.fetchOptions?.meta}),this.#l=H({initialPromise:e?.initialPromise,fn:r.fetchFn,onCancel:t=>{t instanceof G&&t.revert&&this.setState({...this.#c,fetchStatus:"idle"}),s.abort()},onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:r.options.retry,retryDelay:r.options.retryDelay,networkMode:r.options.networkMode,canRun:()=>!0});try{const t=await this.#l.start();if(void 0===t)throw new Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#u.config.onSuccess?.(t,this),this.#u.config.onSettled?.(t,this.state.error,this),t}catch(a){if(a instanceof G){if(a.silent)return this.#l.promise;if(a.revert){if(void 0===this.state.data)throw a;return this.state.data}}throw this.#p({type:"error",error:a}),this.#u.config.onError?.(a,this),this.#u.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#p(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...z(e.data,this.options),fetchMeta:t.meta??null};case"success":const s={...e,...B(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#c=t.manual?s:void 0,s;case"error":const i=t.error;return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),k.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:t})})}};function z(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:x(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function B(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var J=t(void 0),W=t=>{const s=e(J);if(t)return t;if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},_=({client:t,children:e})=>(i(()=>(t.mount(),()=>{t.unmount()}),[t]),/* @__PURE__ */s(J.Provider,{value:t,children:e}));export{o as A,j as C,A as D,O as E,n as M,E as O,g as S,f as T,b as _,N as a,y as b,k as c,R as d,q as f,m as g,h,z as i,r as j,d as k,I as l,U as m,W as n,H as o,P as p,Q as r,K as s,_ as t,D as u,l as v,p as w,u as x,v as y};
@@ -0,0 +1,8 @@
1
+ import{A as e,u as t,v as r,w as o}from"./EgsEX4Mk.js";import{T as s,n as l}from"./ZsvY3_BP.js";var i=e(()=>import("./BVN_VOhG.js")),n=e(()=>import("./hkAPI6mV.js")),a=e(()=>import("./BDQCQkX_.js")),c=e(()=>import("./DQu7AGsF.js")),p=({events:e,isLoading:p=!1})=>{const{organization:d}=l(),m=t(),g=d?.integrationSettings??{},x=g.mapProvider??"openstreetmap",u=g.mapTilerApiKey??"",f=g.googleMapsApiKey??"",h=g.mapboxApiKey??"",v=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),y="openstreetmap"===x&&!u||"google"===x&&!f||"mapbox"===x&&!h,w=e=>{m(s.GALLERY(e))};/* @__PURE__ */
2
+ return r("div",{class:"w relative mt-3 h-screen sm:mt-6",children:p?/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"border-primary bt-transparent size-8 animate-spin rounded-full"})}):y?/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"text-center",children:[
3
+ /* @__PURE__ */r("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */r("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */r("circle",{cx:"12",cy:"9",r:"2.5"})]}),
4
+ /* @__PURE__ */r("p",{class:"text-foreground",children:"Map API Key Required"}),
5
+ /* @__PURE__ */r("p",{class:"text-muted-foreground mt-1 text-xs",children:"Configure your map provider API key in the integration settings."})]})}):0===v.length?/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"text-center",children:[
6
+ /* @__PURE__ */r("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */r("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */r("circle",{cx:"12",cy:"9",r:"2.5"})]}),
7
+ /* @__PURE__ */r("p",{class:"text-foreground tex",children:"No events with location data"}),
8
+ /* @__PURE__ */r("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need a location to appear on the map."})]})}):/* @__PURE__ */r(o,{fallback:/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"border-primary rounde size-8 animate-spin border-t-transparent"})}),children:["openstreetmap_free"===x&&/* @__PURE__ */r(i,{events:v,onExplore:w,logoUrl:d?.logoUrl}),"openstreetmap"===x&&/* @__PURE__ */r(n,{is3D:!0,events:v,apiKey:u,onExplore:w,logoUrl:d?.logoUrl}),"mapbox"===x&&/* @__PURE__ */r(c,{events:v,onExplore:w,apiKey:h,is3D:!1,logoUrl:d?.logoUrl}),"google"===x&&/* @__PURE__ */r(a,{events:v,apiKey:f,onExplore:w,logoUrl:d?.logoUrl})]})})};export{p as default};
@@ -0,0 +1 @@
1
+ import{r as e}from"./2R3GoXB1.js";import{B as t,j as r,r as n,v as o,z as i}from"./EgsEX4Mk.js";import{t as s}from"./Bf4EqlE2.js";import{t as a}from"./BPMOttLj.js";import"./Dqtdp5CD.js";import{t as l}from"./nSrWCryV.js";var c=new a,u=(e,r,i)=>{t(/* @__PURE__ */o(s,{client:c,children:/* @__PURE__ */o(n,{children:/* @__PURE__ */o(l,{event:e,onExplore:i})})}),r)},d=({events:t,onExplore:n,apiKey:s,is3D:a,logoUrl:l})=>{const c=r(null),d=r(null),m=r(a);return i(()=>{if(!c.current||d.current)return;let r;return(async()=>{const o=(await import("./Ccwm5LwS.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!c.current)return;o.accessToken=s;const i=new o.Map({container:c.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:4,minZoom:2,pitch:m.current?60:0,bearing:m.current?-20:0,antialias:!0});d.current=i,i.on("style.load",()=>{i.getLayer("3d-buildings")||i.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),i.on("load",()=>{const e=t.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const r=new o.LngLatBounds;for(const t of e){const e=t.location.x,s=t.location.y;r.extend([e,s]);const a=document.createElement("div");if(a.style.cssText="\n width: 36px; height: 36px; cursor: pointer;\n background: var(--primary, #ff4800);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex; align-items: center; justify-content: center; overflow: hidden;\n ",l){const e=document.createElement("img");e.src=l,e.style.cssText="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);",a.appendChild(e)}const c=document.createElement("div");u(t,c,n);const d=new o.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(c);new o.Marker({element:a}).setLngLat([e,s]).setPopup(d).addTo(i)}r.isEmpty()||i.fitBounds(r,{padding:60,maxZoom:14,duration:1200})}),r=()=>{i.remove(),d.current=null}})(),()=>{r?.()}},[s]),i(()=>{d.current&&(m.current=a,d.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */o("div",{ref:c,class:"size-full"})};export{d as default};
@@ -0,0 +1,2 @@
1
+ import{C as t,P as e,U as r,f as o,j as n,v as s,z as a}from"./EgsEX4Mk.js";var i=({as:t="div",className:e,threshold:r=.5,rootMargin:o="0px",triggerOnce:i,onChange:l,onClick:h,children:c})=>{const u=n(null),d=n(!1);return a(()=>{const t=u.current;if(!t)return;const e=new IntersectionObserver(t=>{t.forEach(t=>{i&&d.current||(t.isIntersecting&&(d.current=!0),l?.(t.isIntersecting))})},{threshold:r,rootMargin:o});return e.observe(t),()=>e.disconnect()},[r,o,l,i]),/* @__PURE__ */s(t,{ref:u,className:e,onClick:h,children:c})},l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],h=t=>{let e=0;for(let r=0;r<t.length;r++){let o=t[r];e=83*e+l.indexOf(o)}return e},c=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},u=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},d=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),p=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},f=t=>{let e=t>>8&255,r=255&t;return[c(t>>16),c(e),c(r)]},g=(t,e)=>{let r=Math.floor(t/361),o=Math.floor(t/19)%19,n=t%19;return[d((r-9)/9,2)*e,d((o-9)/9,2)*e,d((n-9)/9,2)*e]},b=(t,e,r,o)=>{(t=>{if(!t||t.length<6)throw new p("The blurhash string must be at least 6 characters");let e=h(t[0]),r=Math.floor(e/9)+1,o=e%9+1;if(t.length!==4+2*o*r)throw new p(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*o*r}`)})(t),o|=1;let n=h(t[0]),s=Math.floor(n/9)+1,a=n%9+1,i=(h(t[1])+1)/166,l=new Array(a*s);for(let u=0;u<l.length;u++)l[u]=0===u?f(h(t.substring(2,6))):g(h(t.substring(4+2*u,6+2*u)),i*o);let c=4*e,d=new Uint8ClampedArray(c*r);for(let h=0;h<r;h++)for(let t=0;t<e;t++){let o=0,n=0,i=0;for(let c=0;c<s;c++)for(let s=0;s<a;s++){let u=Math.cos(Math.PI*t*s/e)*Math.cos(Math.PI*h*c/r),d=l[s+c*a];o+=d[0]*u,n+=d[1]*u,i+=d[2]*u}let p=u(o),f=u(n),g=u(i);d[4*t+0+h*c]=p,d[4*t+1+h*c]=f,d[4*t+2+h*c]=g,d[4*t+3+h*c]=255}return d},m=Object.defineProperty,w=Object.defineProperties,v=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,O=(t,e,r)=>e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))y.call(e,r)&&O(t,r,e[r]);if(M)for(var r of M(e))j.call(e,r)&&O(t,r,e[r]);return t},C=(t,e)=>w(t,v(e)),P=(t,e)=>{var r={};for(var o in t)y.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(null!=t&&M)for(var o of M(t))e.indexOf(o)<0&&j.call(t,o)&&(r[o]=t[o]);return r},I=class extends t{constructor(){super(...arguments),this.canvas=null,this.handleRef=t=>{this.canvas=t,this.draw()},this.draw=()=>{let{hash:t,height:e,punch:r,width:o}=this.props;if(this.canvas){let n=b(t,o,e,r),s=this.canvas.getContext("2d"),a=s.createImageData(o,e);a.data.set(n),s.putImageData(a,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:e,height:o,width:n}=t,s=P(t,["hash","height","width"]);return r("canvas",C(x({},s),{height:o,width:n,ref:this.handleRef}))}};I.defaultProps={height:128,width:128};var N={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends t{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:e,height:o,width:n,punch:s,resolutionX:a,resolutionY:i,style:l}=t,h=P(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return r("div",C(x({},h),{style:C(x({display:"inline-block",height:o,width:n},l),{position:"relative"})}),r(I,{hash:e,height:i,width:a,punch:s,style:N}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var k=I,z=({src:t,alt:r,threshold:l=.1,rootMargin:h="200px 0px",blurhash:c,containerClassName:u="size-full",wrapperClassName:d,imgClassName:p="",sizeMode:f="cover",position:g="center",delayMs:b=100,delayTime:m,onClick:w})=>{const v=c&&c.length>=6?c:"LEHV6nWB2yk8pyo0adR*.7kCMdnj",[M,y]=e(!1),[j,O]=e(!1),[x,C]=e(!1),P=n(null),I="number"==typeof m?m:b,N=d??u;a(()=>{if(!M)return x?P.current=window.setTimeout(()=>{O(!0)},I):P.current&&(clearTimeout(P.current),P.current=null),()=>{P.current&&clearTimeout(P.current)}},[x,M,I]);const z=j&&x||M;/* @__PURE__ */
2
+ return s(i,{as:"div",className:o(N,"relative overflow-hidden"),threshold:l,rootMargin:h,onChange:t=>C(t),children:[!M&&/* @__PURE__ */s(k,{className:"size-full blur-2xl",hash:v}),z&&t&&/* @__PURE__ */s("img",{alt:r,src:t,onLoad:()=>y(!0),className:o("absolute top-0 left-0 size-full object-center transition-all duration-300",M?"scale-100 opacity-100":"scale-95 opacity-0","contain"===f?"object-contain":"object-cover","top"===g?"object-top":"bottom"===g?"object-bottom":"object-center",p),onClick:t=>w?.(t)})]})};export{b as n,i as r,z as t};