@qratilabs/qrati-connect 2.32.2 → 2.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/element/{DiQrTagI2.js → 73mz8Fz4.js} +1 -1
- package/element/B60TJHpn.js +1 -0
- package/element/BC9KIhak.js +2 -0
- package/element/BCE50OwS.js +93 -0
- package/element/{CmcA5dp5.js → BFC2aU2J.js} +32 -32
- package/element/{BOsbbHJ0.js → BSGK1Ri1.js} +3 -3
- package/element/{DO2-BnvU.js → Bb_tv1V-.js} +3 -2
- package/element/BiNwD6VL.js +4 -0
- package/element/{DUS9pix12.js → BiZqzQNR.js} +1 -1
- package/element/BlsbPO0-.js +1 -0
- package/element/{CaTxtEbg.js → BlwHCgeI.js} +1 -1
- package/element/{BeaTNG7m.js → BxxWXMGe.js} +1 -1
- package/element/CTTFfh11.js +4 -0
- package/element/{DtBnBN-i.js → CW7Iwd96.js} +1 -1
- package/element/{XVFdeOm22.js → CX1SNDQH.js} +1 -1
- package/element/CYHy0vN3.js +1 -0
- package/element/CZJLtvF9.js +4 -0
- package/element/CeJICm77.js +5 -0
- package/element/CmtEFeGF.js +5 -0
- package/element/{BZSy_Rh42.js → CnxxYHOX.js} +18 -18
- package/element/Cs6qJQxX.js +8 -0
- package/element/{CE0UwtGX.js → Cx6rq6N5.js} +7 -7
- package/element/{DFRMtMLz.js → Czk6IR70.js} +1 -1
- package/element/{DRD9__VZ.js → D1TFBkCS.js} +1 -1
- package/element/{BOweSM9Y.js → DA0XxXKx.js} +1 -1
- package/element/{CDBzc1CZ.js → DB6HdxlA.js} +1 -1
- package/element/{GwDdmgYd.js → DHBHbWIA.js} +1 -1
- package/element/DKRKwBRc.js +8 -0
- package/element/DMPvw0Jw.js +3 -0
- package/element/DV8JHO97.js +16 -0
- package/element/DVDZfY1d.js +4 -0
- package/element/{DdQWa3ny.js → DdLLa5wm.js} +1 -1
- package/element/DjHszKev.js +14 -0
- package/element/{DjOFnmwA.js → DmaTYIJu.js} +1 -1
- package/element/{D-U23_J5.js → Dr2e01jA.js} +36 -36
- package/element/DuVfaq4G.js +3 -0
- package/element/Dubduzq7.js +2 -0
- package/element/DwhpFWNq.js +3 -0
- package/element/FE0pIRqe.js +207 -0
- package/element/{iDDlbtVI.js → HkakucIO.js} +1 -1
- package/element/{CoARa5_i.js → V6RGWsa9.js} +1 -1
- package/element/XIzy_5YD.js +1 -0
- package/element/hjsqLu1P.js +85 -0
- package/element/web.es.js +1 -1
- package/embed/embed.js +1 -1
- package/package.json +1 -1
- package/element/3CNVs83G2.js +0 -4
- package/element/B2ryYFFr.js +0 -4
- package/element/BNHdfdME.js +0 -1
- package/element/BP08t9Jp2.js +0 -8
- package/element/BRwZXuo82.js +0 -3
- package/element/BiCaKAmb.js +0 -4
- package/element/Bv4TkNQ42.js +0 -85
- package/element/BypLxR3J.js +0 -16
- package/element/C7zv6hcG.js +0 -1
- package/element/CD73UkPZ.js +0 -2
- package/element/CGlyix6P.js +0 -93
- package/element/Cr5o77zq.js +0 -199
- package/element/D3OYeY482.js +0 -8
- package/element/DVo8WBwP2.js +0 -4
- package/element/DXFmV-Ty2.js +0 -14
- package/element/Da6CorI52.js +0 -5
- package/element/DdACKOZr.js +0 -1
- package/element/DnnkdZ6w2.js +0 -3
- package/element/DsU4DxSM.js +0 -3
- package/element/OnH8Izqn.js +0 -1
- package/element/_d0Pbeg3.js +0 -5
- package/element/cjsXyqlO2.js +0 -1
- package/element/tvCSWnLG.js +0 -2
- /package/element/{BUDCYszs2.js → BUDCYszs.js} +0 -0
- /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
- /package/element/{DnIueBGr2.js → DnIueBGr.js} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Kt as a,_t as e,ft as o,nt as s,un as l,xn as r,xt as i}from"./FE0pIRqe.js";import{n as t}from"./Czk6IR70.js";import{t as n}from"./Cx6rq6N5.js";import{i as d,s as c,t as p}from"./BSGK1Ri1.js";import{n as m,r as g,t as u}from"./CX1SNDQH.js";var h=()=>{const{t:h}=t(),f=e(),[w,v]=r(""),[b,y]=r(""),[C,N]=r(!1),[j,x]=r(null),[k,A]=r(!1),[P,S]=r({}),{loginUsingEmail:E,loginWithGoogle:F,loginWithApple:L}=i(),[O,W]=r({google:!1,apple:!1}),D=a=>{S(e=>e[a]?{...e,[a]:void 0}:e)},G=async(a,e)=>{W(e=>({...e,[a]:!0})),x(null);try{await(e?.())}catch(o){o instanceof Error?x(o.message):x(`Failed to login with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{W(e=>({...e,[a]:!1}))}};/* @__PURE__ */
|
|
2
|
+
return l("div",{className:"bg-background w-full space-y-6",children:[/* @__PURE__ */l("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const e=d(w),o=c(b);if(e||o)return void S({email:e,password:o});S({}),N(!0),x(null);const s=await(E?.(w.toLowerCase(),b));s?.error&&x(s.error),N(!1)},className:"space-y-6",children:[
|
|
3
|
+
/* @__PURE__ */l("div",{className:"space-y-9",children:[/* @__PURE__ */l(p,{label:h("auth.email","Email address"),name:"email",disabled:C,type:"email",value:w,onChange:a=>{v(a.target.value),D("email")},autoComplete:"email",error:P.email}),/* @__PURE__ */l(p,{label:h("auth.password","Password"),name:"password",disabled:C,type:k?"text":"password",value:b,onChange:a=>{y(a.target.value),D("password")},autoComplete:"current-password",error:P.password,actionLabel:k?"Hide password":"Show password",actionIcon:/* @__PURE__ */l(k?u:m,{className:"size-5"}),onActionClick:()=>A(!k)})]}),j&&/* @__PURE__ */l(s,{align:"center",color:"error",className:"font-medium",children:j}),
|
|
4
|
+
/* @__PURE__ */l("div",{className:"flex justify-end",children:/* @__PURE__ */l(o,{to:a.FORGOT_PASSWORD,state:{from:f.pathname},children:/* @__PURE__ */l(s,{variant:"h6",className:"w-fit",children:h("button.forgotPassword","Forgot Password?")})})}),
|
|
5
|
+
/* @__PURE__ */l(n,{type:"submit",color:"primary",className:"w-full",loading:C,disabled:C,children:h("button.login","Login")})]}),/* @__PURE__ */l("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */l(g,{disabled:C||O.google||O.apple,loading:O.google,onClick:()=>G("google",F),provider:"google"}),/* @__PURE__ */l(g,{disabled:C||O.google||O.apple,loading:O.apple,onClick:()=>G("apple",L),provider:"apple"})]})]})};export{h as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Cn as e,Kt as t,Z as a,ct as s,hn as i,ht as n,o as r,pt as o,s as l,st as c,tt as d,un as m,xt as g,yt as f}from"./FE0pIRqe.js";import{t as h}from"./Dubduzq7.js";import{t as v}from"./Czk6IR70.js";import{t as u}from"./Cx6rq6N5.js";import{t as p}from"./DdLLa5wm.js";import{t as N}from"./HkakucIO.js";var S=()=>{const S=f(),{props:w,folders:E}=g(),x=w?.organizationId,{loading:I,event:j,isError:k,error:C,refetch:T}=c({eventSlug:S.eventSlug});if(e(()=>{const e=setTimeout(s,2e3);return()=>clearTimeout(e)},[]),I)/* @__PURE__ */return m(r,{});if(k&&!j&&/timed out|status code (5\d\d|408|429)|network|failed to fetch/i.test(String(C?.message)))/* @__PURE__ */return m("div",{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */m(d,{className:"mt-16",title:"Couldn't load this event",description:"Something went wrong while loading. Please try again.",iconSvg:/* @__PURE__ */m(N,{})}),/* @__PURE__ */m("div",{className:"flex gap-3",children:[/* @__PURE__ */m(u,{icon:/* @__PURE__ */m(p,{className:"size-5"}),onClick:()=>{T?.()},children:"Retry"}),/* @__PURE__ */m(o,{to:t.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */m(u,{children:"All events"})})]})]});const z=j?.organizationId?.toString?.()||j?.organizationId,P=x?.toString?.()||x,_=j?.folderId?.toString?.()||j?.folderId,B=E?.some(e=>e._id===_)?_:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",j&&z===P?{className:"bg-background relative min-h-screen",children:/* @__PURE__ */m(v,{locale:j?.language??"en",translations:j?.translations,children:[
|
|
3
|
+
/* @__PURE__ */m(h,{to:B?t.FOLDER_EVENTS(B):t.PUBLIC_EVENTS}),
|
|
4
|
+
/* @__PURE__ */m(i,{fallback:/* @__PURE__ */m(l,{}),children:/* @__PURE__ */m(n,{})}),
|
|
5
|
+
/* @__PURE__ */m(a,{})]})}:{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */m(d,{className:"mt-16",title:"Event not found",description:"Please check the provided link",iconSvg:/* @__PURE__ */m("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 997.86122 450.8081",role:"img"})}),/* @__PURE__ */m(o,{to:t.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */m(u,{children:"All events"})})]})};export{S as default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{A as e,Cn as t,Ct as n,Mt as a,On as r,Qt as o,Zt as i,_t as s,bt as l,c,dt as u,it as d,j as p,k as m,kt as h,
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
return
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
1
|
+
import{A as e,Cn as t,Ct as n,Mt as a,On as r,Qt as o,Zt as i,_t as s,bt as l,c,dt as u,it as d,j as p,k as m,kt as h,ln as g,mn as v,nt as f,qt as y,tt as w,un as x,ut as b,vn as N,vt as P,wn as T,xn as C,xt as D,yn as I}from"./FE0pIRqe.js";import{t as E}from"./XIzy_5YD.js";import{t as j}from"./Dubduzq7.js";import{t as A}from"./Cx6rq6N5.js";import{a as z,i as S,n as _,o as M,r as k,t as U}from"./Bb_tv1V-.js";import{t as q}from"./DmaTYIJu.js";import{a as O,i as $,n as F,r as L,t as B}from"./BiZqzQNR.js";var K=e=>e.meta.hasMore?e.meta.nextCursor??b(e):void 0,Q=({content:e,onDeleted:t,onClose:n})=>{const a=function(){const e=g(),{user:t,props:n}=D(),a=n?.organizationId,r=t?.token,o=t?._id??t?.uid??null,s=[y.USER_UPLOADS,a??"",o];return E({mutationKey:["delete-upload",a??"",o],mutationFn:async({contentId:e})=>{const t=await i.post(h.DELETE_CONTENT,{json:{contentId:e},throwHttpErrors:!1,headers:{"x-org-id":a,...r?{Authorization:`Bearer ${r}`}:{}}}).json();if(t?.error)throw new Error(t.error);return{contentId:e}},onMutate:async({contentId:t})=>{await e.cancelQueries({queryKey:s,exact:!1});const n=e.getQueriesData({queryKey:s,exact:!1});return e.setQueriesData({queryKey:s,exact:!1},e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,data:e.data.filter(e=>e._id!==t),meta:{...e.meta,totalCount:Math.max(0,(e.meta.totalCount??0)-1)}}))}:e),{previousData:n}},onError:(t,n,a)=>{a?.previousData?.forEach(([t,n])=>{e.setQueryData(t,n)})}})}(),r=e?.rateCount??0,o=r<=0,s=o?null:`This upload has ${r} rating${r>1?"s":""}. Uploads with at least 1 rating cannot be deleted.`,l=a.error instanceof Error?a.error.message:null;/* @__PURE__ */
|
|
2
|
+
return x($,{open:Boolean(e),onOpenChange:e=>{e||a.isPending||n()},title:"Delete content?",description:l??s??"Are you sure you want to delete this content? This operation is permanent and cannot be undone.",cancelText:"Cancel",confirmText:o?"Delete":"Got it",confirmColor:o?"error":"primary",loading:a.isPending,onCancel:n,onConfirm:o?async()=>{if(e&&o)try{await a.mutateAsync({contentId:e._id,eventId:e.eventId}),t()}catch{}}:n})};function R({className:e}){/* @__PURE__ */
|
|
3
|
+
return x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */x("path",{fill:"currentColor",d:"M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zM17 6H7v13h10zm-7 11q.425 0 .713-.288T11 16V9q0-.425-.288-.712T10 8t-.712.288T9 9v7q0 .425.288.713T10 17m4 0q.425 0 .713-.288T15 16V9q0-.425-.288-.712T14 8t-.712.288T13 9v7q0 .425.288.713T14 17M7 6v13z"})})}var V={[a.APPROVED]:{color:"text-success",bgColor:"bg-success/20",icon:/* @__PURE__ */x(F,{className:"size-full"}),title:"Approved",description:"Your upload has been approved and is now visible to everyone viewing this event."},[a.IN_REVIEW]:{color:"text-warning",bgColor:"bg-warning/20",icon:/* @__PURE__ */x(O,{className:"size-full"}),title:"In Review",description:"Your upload is currently being reviewed. It will be visible once approved by the event admin."},[a.REJECTED]:{color:"text-destructive",bgColor:"bg-destructive/20",icon:/* @__PURE__ */x(q,{className:"size-full"}),title:"Rejected",description:"Your upload was not approved as it may not meet the content guidelines. Please upload appropriate content."}},Y=e=>{const t=new Date(e).getTime();if(Number.isNaN(t))return"";const n=Math.max(0,Math.floor((Date.now()-t)/1e3)),a=[[60,"second"],[60,"minute"],[24,"hour"],[30,"day"],[12,"month"],[Number.POSITIVE_INFINITY,"year"]];let r=n,o="second";for(const[i,s]of a){if(r<i){o=s;break}r=Math.floor(r/i),o=s}return"second"===o&&r<30?"just now":`${r} ${o}${1===r?"":"s"} ago`},Z=v(({content:e,onDelete:t,onEditCaption:a,onStatusClick:r})=>{const o=e.status,i=V[o];/* @__PURE__ */
|
|
4
|
+
return x("div",{className:"group relative size-full overflow-hidden sm:rounded",children:/* @__PURE__ */x("div",{className:"relative size-full",children:[
|
|
5
|
+
/* @__PURE__ */x(p,{url:e.url||"",alt:e.caption||"",thumbnailUrl:e.thumbnailUrl||void 0,blurhash:e.blurhash||void 0,pswpData:{id:e._id,type:e.type,hash:e._id,width:e.dimension?.width,height:e.dimension?.height,thumbnailUrl:e.thumbnailUrl||void 0,caption:e.caption||""}}),
|
|
6
|
+
/* @__PURE__ */x("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 flex items-center justify-between bg-gradient-to-t from-black/50 to-transparent pl-3",children:[/* @__PURE__ */x(f,{variant:"caption",className:"text-xs text-white opacity-90 sm:text-sm",children:Y(e.createdAt)}),/* @__PURE__ */x("div",{className:"pointer-events-auto flex items-center",children:[/* @__PURE__ */x("button",{type:"button",className:"cursor-pointer p-2 text-white hover:opacity-80","aria-label":"Edit caption",onClick:t=>{t.stopPropagation(),t.preventDefault(),a(e._id)},children:/* @__PURE__ */x("svg",{viewBox:"0 0 24 24",className:"size-5","aria-hidden":"true",children:/* @__PURE__ */x("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25ZM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83Z"})})}),/* @__PURE__ */x(L,{icon:/* @__PURE__ */x(R,{className:"size-5"}),color:"error",size:"sm","aria-label":"Delete upload",tooltip:"Delete",onClick:n=>{n.stopPropagation(),n.preventDefault(),t(e._id)}})]})]}),
|
|
7
|
+
/* @__PURE__ */x("button",{type:"button","aria-label":`Status: ${i?.title||"Unknown"}`,onClick:e=>{e.stopPropagation(),e.preventDefault(),r(o)},className:n("pointer-events-auto absolute top-1 right-1 cursor-pointer rounded-full p-1 transition-opacity hover:opacity-80",i?.bgColor||"bg-gray-500/20"),children:/* @__PURE__ */x("span",{className:n("block size-5",i?.color||"text-gray-500"),children:i?.icon||null})})]})})}),H=({content:e,onClose:n})=>{const[r,o]=C(""),s=function(){const e=g(),{user:t,props:n}=D(),r=n?.organizationId,o=t?.token,s=t?._id??t?.uid??null,l=[y.USER_UPLOADS,r??"",s];return E({mutationKey:["update-upload-caption",r??"",s],mutationFn:async({contentId:e,caption:t})=>{const n=await i.post(h.UPDATE_CONTENT_CAPTION,{json:{contentId:e,caption:t},throwHttpErrors:!1,headers:{"x-org-id":r,...o?{Authorization:`Bearer ${o}`}:{}}}).json();if(n.error)throw new Error(n.error);return{contentId:e,caption:t,content:n.data}},onMutate:async({contentId:t,caption:n})=>{await e.cancelQueries({queryKey:l,exact:!1});const r=e.getQueriesData({queryKey:l,exact:!1});return e.setQueriesData({queryKey:l,exact:!1},e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,data:e.data.map(e=>e._id===t?{...e,caption:n,status:a.IN_REVIEW}:e)}))}:e),{previousData:r}},onError:(t,n,a)=>{a?.previousData?.forEach(([t,n])=>{e.setQueryData(t,n)})}})}();return t(()=>{o(e?.caption??"")},[e]),/* @__PURE__ */x(U,{open:Boolean(e),onOpenChange:e=>!e&&n(),children:/* @__PURE__ */x(_,{className:"w-full max-w-lg",children:[
|
|
8
|
+
/* @__PURE__ */x(z,{children:/* @__PURE__ */x(M,{children:"Update caption"})}),
|
|
9
|
+
/* @__PURE__ */x("div",{className:"px-4",children:/* @__PURE__ */x(B,{label:"Caption",value:r,maxLength:1e3,rows:4,disabled:s.isPending,error:s.error instanceof Error?s.error.message:void 0,onInput:e=>o(e.currentTarget.value)})}),
|
|
10
|
+
/* @__PURE__ */x(S,{children:[/* @__PURE__ */x(A,{variant:"outlined",color:"foreground",disabled:s.isPending,onClick:n,children:"Cancel"}),/* @__PURE__ */x(A,{loading:s.isPending,onClick:async()=>{if(e)try{await s.mutateAsync({contentId:e._id,caption:r}),n()}catch{}},children:"Save"})]})]})})},G=e=>new Date(e).toLocaleDateString("en-US",{month:"short",year:"numeric"}),W=e=>{if(0===e.length)return"";if(1===e.length)return G(e[0].createdAt);const{minTime:t,maxTime:n}=e.reduce((e,t)=>{const n=new Date(t.createdAt).getTime();return{minTime:Math.min(e.minTime,n),maxTime:Math.max(e.maxTime,n)}},{minTime:1/0,maxTime:-1/0}),a=G(new Date(t).toISOString()),r=G(new Date(n).toISOString());return a===r?a:`${a} - ${r}`},J=()=>{const a=P(),p=s(),g=l(),{user:v,loadingUser:b,portalContainer:E,organization:z}=D(),S=N(null),q=N(null),O=N(!1),$=N(null),F=N(null),L=N(null),[B,R]=C(null),[Y,G]=C(null),[J,X]=C(null),{contents:ee,loading:te,hasNextPage:ne,fetchNextPage:ae,isFetchingNextPage:re,hasPreviousPage:oe,fetchPreviousPage:ie,isFetchingPreviousPage:se}=function({sort:e="-createdAt",limit:t=20}={}){const{user:n,loadingUser:a,props:r,organization:s}=D(),l=r?.organizationId,c=n?.token,d=n?._id??n?.uid??null,{data:p,isLoading:m,isError:g,error:v,isFetchingNextPage:f,hasNextPage:w,fetchNextPage:x,isFetchingPreviousPage:b,hasPreviousPage:N,fetchPreviousPage:P,refetch:T}=o({queryKey:[y.USER_UPLOADS,l??"",d,t,e],queryFn:async({pageParam:n=1})=>await i.get(h.MY_UPLOADS,{searchParams:"string"==typeof n?{after:n,limit:t,sort:e}:{page:n,limit:t,sort:e},headers:{"x-org-id":l,...c?{Authorization:`Bearer ${c}`}:{}}}).json(),initialPageParam:1,getPreviousPageParam:u,getNextPageParam:K,maxPages:25,staleTime:12e4,gcTime:3e5,enabled:!a&&!!n&&!0===s?.integrationSettings?.enableMyUploads});return{contents:I(()=>p?.pages?.flatMap(e=>e?.data??[])??[],[p]),loading:m,isError:g,error:v,isFetchingNextPage:f,isFetchingPreviousPage:b,hasPreviousPage:!!N,fetchPreviousPage:P,hasNextPage:!!w,fetchNextPage:x,refetch:T,totalCount:p?.pages?.[0]?.meta?.totalCount??0}}({sort:"-createdAt",limit:20});t(()=>{b||v||a("/auth/login",{state:{referrer:p.pathname},replace:!0})},[b,v,a,p.pathname]),t(()=>{b||!z||z.integrationSettings?.enableMyUploads||a("/",{replace:!0})},[b,z,a]);const le=ee.length>0,ce=!te&&!le,ue=I(()=>{if(!ee.length)return[];const e={};return ee.forEach(t=>{const n=t.eventId||"unknown";e[n]||(e[n]={eventId:n,eventName:t.event?.name||"Event",uploads:[]}),e[n].uploads.push(t)}),Object.values(e).sort((e,t)=>{const n=new Date(e.uploads[0]?.createdAt||0).getTime();return new Date(t.uploads[0]?.createdAt||0).getTime()-n})},[ee]);t(()=>()=>{q.current?.destroy(),q.current=null,S.current?.destroy?.(),S.current=null},[E]),t(()=>{const t=q.current;"memory"===g&&t?.isActive()&&!e(p.state)&&t.handleBack()},[p.state,g]);const de=T(async e=>{if(S.current||O.current)return;const t=$.current,n=e.target.closest("a");if(!t||!n||!t.contains(n))return;e.preventDefault(),O.current=!0;const r=Array.from(t.querySelectorAll("a")).indexOf(n);try{const[{default:e},{default:n},{default:o},{loadPhotoSwipe:i}]=await Promise.all([import("./FE0pIRqe.js").then(e=>e.u),import("./Bo39kG4k.js"),import("./BlwHCgeI.js"),import("./FE0pIRqe.js").then(e=>e.l)]),s=new e({gallery:t,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:i,appendToEl:E??document.body});S.current=s;const l=new m(()=>window.pswp,"memory"===g?{location:p.pathname,state:p.state,push:(e,t)=>a(e,{state:t}),replace:(e,t)=>a(e,{state:t,replace:!0}),go:e=>a(e)}:void 0);q.current=l,s.on?.("beforeOpen",()=>l.open()),s.on?.("close",()=>{l.close(),q.current===l&&(q.current=null),S.current===s&&(S.current=null)}),new n(s),new o(s),s.init(),r>=0&&S.current?.loadAndOpen?.(r)}finally{O.current=!1}},[p.pathname,p.state,a,E,g]);t(()=>{const e=F.current;if(!e||!ne)return;const t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&ne&&!re&&ae()},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[ne,re,ae]),t(()=>{const e=L.current;if(!e||!oe)return;const t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&oe&&!se&&ie()},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[oe,se,ie]);const pe=I(()=>ee.find(e=>e._id===B)??null,[B,ee]),me=I(()=>ee.find(e=>e._id===Y)??null,[Y,ee]),he=J?V[J]:null;return z&&!z.integrationSettings?.enableMyUploads?null:/* @__PURE__ */x("div",{className:"bg-background min-h-screen w-full",children:[
|
|
11
|
+
/* @__PURE__ */x("div",{className:"relative flex items-center justify-center",children:[/* @__PURE__ */x(j,{}),/* @__PURE__ */x(f,{variant:"h4",align:"center",children:"My Uploads"})]}),
|
|
12
|
+
/* @__PURE__ */x("section",{className:"space-y-3",children:te?/* @__PURE__ */x(c,{}):ce?/* @__PURE__ */x(w,{className:"py-12",title:"No uploads yet",description:"Photos and videos you upload to events will appear here."}):/* @__PURE__ */x(r,{children:[
|
|
13
|
+
/* @__PURE__ */x("div",{ref:L,className:"h-px w-full"}),se&&/* @__PURE__ */x("div",{className:"my-6 w-full",children:/* @__PURE__ */x(d,{})}),
|
|
14
|
+
/* @__PURE__ */x("div",{ref:$,onClickCapture:de,className:"space-y-8 py-4",children:ue.map(e=>/* @__PURE__ */x("div",{className:"space-y-4",children:[/* @__PURE__ */x("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */x(f,{variant:"h5",color:"muted",children:e.eventName}),/* @__PURE__ */x("span",{className:"text-muted-foreground text-sm font-light uppercase sm:text-base",children:W(e.uploads)})]}),/* @__PURE__ */x("div",{className:"grid grid-cols-2 gap-1 sm:grid-cols-3 lg:grid-cols-4",children:e.uploads.map(e=>/* @__PURE__ */x("div",{className:"h-52 lg:h-64",children:/* @__PURE__ */x(Z,{content:e,onDelete:R,onEditCaption:G,onStatusClick:X})},e._id))})]},e.eventId))}),
|
|
15
|
+
/* @__PURE__ */x("div",{ref:F,className:"h-px w-full"}),re&&/* @__PURE__ */x("div",{className:"my-6 w-full",children:/* @__PURE__ */x(d,{})})]})}),
|
|
16
|
+
/* @__PURE__ */x(Q,{content:pe,onClose:()=>R(null),onDeleted:()=>R(null)}),
|
|
17
|
+
/* @__PURE__ */x(H,{content:me,onClose:()=>G(null)}),
|
|
18
|
+
/* @__PURE__ */x(U,{open:Boolean(J),onOpenChange:e=>!e&&X(null),children:/* @__PURE__ */x(_,{className:"w-full max-w-lg",children:[/* @__PURE__ */x("div",{className:"flex flex-col gap-4 p-2 sm:flex-row sm:items-start sm:p-4",children:[/* @__PURE__ */x("div",{className:n("mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10",he?.bgColor||"bg-gray-500/20"),children:/* @__PURE__ */x("span",{className:n("size-6",he?.color||"text-gray-500"),children:he?.icon||null})}),/* @__PURE__ */x("div",{className:"flex-1 space-y-2 text-center sm:text-left",children:[/* @__PURE__ */x(M,{children:he?.title||"Unknown Status"}),/* @__PURE__ */x(k,{children:he?.description||"Status information unavailable."})]})]}),/* @__PURE__ */x("div",{className:"flex justify-end p-4",children:/* @__PURE__ */x(A,{variant:"outlined",color:"foreground",onClick:()=>X(null),children:"Got it"})})]})})]})};export{J as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{n as e}from"./BlsbPO0-.js";import{$t as t,Cn as o,Kt as r,Zt as n,_n as l,et as i,hn as a,kt as s,un as d,vt as c,wn as m,xn as p,xt as g,yn as u}from"./FE0pIRqe.js";var h=(e,t)=>e.filter(e=>(e.parentFolderId??null)===t).map(t=>{return{folder:t,children:h(e,t._id),eventCount:t.boundary?.length??0,centroid:(o=t.boundary,o?.length?[o.reduce((e,t)=>e+t.x,0)/o.length,o.reduce((e,t)=>e+t.y,0)/o.length]:null),color:t.color||"#fb8500"};var o}).filter(e=>e.eventCount>0||e.children.length>0),f=e=>e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),x=()=>{const{folders:e,organization:r}=g(),[l,i]=p(null),a=Boolean(r?.integrationSettings?.enableFolderView),d=u(()=>a?h(e??[],null):[],[e,a]),c=t({queryKey:["map-all-events",r?._id],queryFn:async()=>{const e=await n.get(s.PUBLIC_EVENTS,{headers:{"x-org-id":r?._id??""},searchParams:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json();return f(e.data??[])},enabled:Boolean(r?._id)&&(!a||0===d.length),staleTime:3e5,gcTime:6e5,retry:!1}),x=t({queryKey:["map-folder-events",r?._id,l],queryFn:async()=>{const e=await n.get(s.PUBLIC_EVENTS,{headers:{"x-org-id":r?._id??""},searchParams:{folderId:l,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json();return f(e.data??[])},enabled:Boolean(r?._id)&&a&&Boolean(l),staleTime:3e5,gcTime:6e5,retry:!1}),v=u(()=>(e??[]).find(e=>e._id===l)??null,[e,l]);o(()=>{a||i(null)},[a]);const y=m(e=>{i(e)},[]),b=a&&d.length>0;return{folderTree:d,activeFolderId:l,activeFolder:v,visibleEvents:b?x.data??[]:c.data??[],setActiveFolderId:y,isLoadingEvents:b?Boolean(l)&&(x.isLoading||x.isFetching):c.isLoading||c.isFetching}},v=/* @__PURE__ */e({default:()=>L}),y=l(()=>import("./DuVfaq4G.js")),b=l(()=>import("./DVDZfY1d.js")),w=l(()=>import("./DwhpFWNq.js")),_=l(()=>import("./BiNwD6VL.js")),E=()=>/* @__PURE__ */d("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */d("div",{class:"text-center",children:[
|
|
2
|
+
/* @__PURE__ */d("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__ */d("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__ */d("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
3
|
+
/* @__PURE__ */d("p",{class:"text-foreground",children:"No location data available."}),
|
|
4
|
+
/* @__PURE__ */d("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need location data to appear on the map."})]})}),j=()=>/* @__PURE__ */d(i,{className:"size-full min-h-[70vh] rounded-lg"}),L=({events:e,isLoading:t=!1})=>{const{organization:o}=g(),n=c(),l=o?.integrationSettings??{},i=l.mapProvider??"openstreetmap",s=m(e=>{n(r.GALLERY(e))},[n]);if("openstreetmap_free"===i)/* @__PURE__ */return d("div",{class:"relative mt-3 h-screen sm:mt-6",children:/* @__PURE__ */d(a,{fallback:/* @__PURE__ */d(j,{}),children:/* @__PURE__ */d(y,{onExplore:s,logoUrl:o?.logoUrl})})});const p=l.mapTilerApiKey??"",u=l.googleMapsApiKey??"",h=l.mapboxApiKey??"",f=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);/* @__PURE__ */
|
|
5
|
+
return d("div",{class:"relative mt-3 h-screen sm:mt-6",children:t?/* @__PURE__ */d(j,{}):"openstreetmap"===i&&!p||"google"===i&&!u||"mapbox"===i&&!h?/* @__PURE__ */d("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */d("div",{class:"text-center",children:[
|
|
6
|
+
/* @__PURE__ */d("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__ */d("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__ */d("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
7
|
+
/* @__PURE__ */d("p",{class:"text-foreground",children:"API key is required to display the map."}),
|
|
8
|
+
/* @__PURE__ */d("p",{class:"text-muted-foreground mt-1 text-xs",children:"Provide a map API key in your organization settings."})]})}):0===f.length?/* @__PURE__ */d(E,{}):/* @__PURE__ */d(a,{fallback:/* @__PURE__ */d(j,{}),children:["openstreetmap"===i&&/* @__PURE__ */d(b,{is3D:!1,apiKey:p,onExplore:s,logoUrl:o?.logoUrl}),"mapbox"===i&&/* @__PURE__ */d(_,{onExplore:s,apiKey:h,is3D:!1,logoUrl:o?.logoUrl}),"google"===i&&/* @__PURE__ */d(w,{apiKey:u,mapId:"DEMO_MAP_ID",onExplore:s,logoUrl:o?.logoUrl})]})})};export{L as default,x as n,v as t};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{Ct as r,kn as e,
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
return
|
|
7
|
-
return
|
|
1
|
+
import{Ct as r,kn as e,ot as t,un as a}from"./FE0pIRqe.js";function i({className:r}){/* @__PURE__ */
|
|
2
|
+
return a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:[
|
|
3
|
+
/* @__PURE__ */a("circle",{cx:"18",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */a("animate",{attributeName:"r",begin:".67",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|
|
4
|
+
/* @__PURE__ */a("circle",{cx:"12",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */a("animate",{attributeName:"r",begin:".33",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|
|
5
|
+
/* @__PURE__ */a("circle",{cx:"6",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */a("animate",{attributeName:"r",begin:"0",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})})]})}function n({children:r,asChild:t=!1,...i}){if(t){const t=Array.isArray(r)?r[0]:r;if(t&&t.type)return e(t,{...i,...t.props})}/* @__PURE__ */
|
|
6
|
+
return a("button",{...i,children:r})}var o=t("shadow-outer inline-flex size-fit cursor-pointer items-center justify-center rounded font-medium transition-all duration-200 active:scale-95 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"gap-1 p-2 text-sm",md:"gap-2 px-4 py-2 text-sm sm:text-base",lg:"gap-2 px-4 py-3 text-lg",icon:"h-9 w-9 p-0"},color:{foreground:"bg-background text-foreground hover:bg-muted active:bg-muted/80",primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",info:"bg-info hover:bg-info/90 active:bg-info/80 text-white",warning:"bg-warning hover:bg-warning/90 active:bg-warning/80 text-white",success:"bg-success hover:bg-success/90 active:bg-success/80 text-white",error:"bg-destructive hover:bg-destructive/90 active:bg-destructive/80 text-white"},variant:{default:"",outlined:"bg-transparent hover:bg-current/10 active:bg-current/15",ghost:"border-transparent bg-transparent shadow-none hover:bg-current/10 active:bg-current/15"}},compoundVariants:[{variant:"default",color:"primary",class:"border-primary border"},{variant:"default",color:"info",class:"border-info border"},{variant:"default",color:"warning",class:"border-warning border"},{variant:"default",color:"success",class:"border-success border"},{variant:"default",color:"error",class:"border-destructive border"},{variant:"outlined",color:"foreground",class:"text-foreground border-border hover:bg-foreground/10 border bg-transparent"},{variant:"outlined",color:"primary",class:"border-primary text-primary hover:bg-primary/10 border bg-transparent"},{variant:"outlined",color:"info",class:"border-info text-info hover:bg-info/10 border bg-transparent"},{variant:"outlined",color:"warning",class:"border-warning text-warning hover:bg-warning/10 border bg-transparent"},{variant:"outlined",color:"success",class:"border-success text-success hover:bg-success/10 border bg-transparent"},{variant:"outlined",color:"error",class:"border-destructive text-destructive hover:bg-destructive/10 border bg-transparent"},{variant:"ghost",color:"primary",class:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"info",class:"text-info hover:bg-info/10"},{variant:"ghost",color:"warning",class:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"success",class:"text-success hover:bg-success/10"},{variant:"ghost",color:"error",class:"text-destructive hover:bg-destructive/10"}],defaultVariants:{variant:"default",size:"md",color:"primary"}}),s=({className:e,type:t="button",disabled:s,loading:c,fullWidth:l,color:d,size:u,variant:b,icon:g,asChild:v=!1,immutable:p,elementRef:h,children:f,...m})=>{const x=v?{asChild:!0}:{},y=g;/* @__PURE__ */
|
|
7
|
+
return a(v?n:"button",{ref:h,type:t,disabled:s||c,className:r(o({color:d,size:u,variant:b}),"relative",e,l&&"w-full"),...x,...m,children:[/* @__PURE__ */a("div",{className:r(c?"invisible":"visible flex items-center gap-3"),children:[y&&!c&&y,f]}),c&&/* @__PURE__ */a(i,{className:"absolute inset-0 m-auto size-6"})]})};export{i as n,s as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{An as n,Tn as r,
|
|
1
|
+
import{An as n,Tn as r,un as o,wn as a,yn as s}from"./FE0pIRqe.js";var t={loading:"Loading...",error:"Error",not_found:"Translation not found"},e=n({locale:"en",translations:t,isLoading:!1,error:null}),i=()=>{const n=r(e);if(!n)throw new Error("useI18n must be used within an I18nProvider");const{translations:o,isLoading:s,error:i}=n;return{t:a((n,r)=>s?t.loading:i?t.error:o[n]||r||n,[o,s,i])}},l=i,d=({children:n,locale:r="en",translations:a})=>{const i=s(()=>({locale:r,translations:{...t,...a||{}},isLoading:!1,error:null}),[r,a]);/* @__PURE__ */
|
|
2
2
|
return o(e.Provider,{value:i,children:n})};export{i as n,l as r,d as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Dt as e,M as t,N as n,Ot as r,St as o,Zt as a,kt as i,
|
|
1
|
+
import{Dt as e,M as t,N as n,Ot as r,St as o,Zt as a,kt as i,un as s,vn as c,wn as l,xt as d}from"./FE0pIRqe.js";function w({className:e}){/* @__PURE__ */
|
|
2
2
|
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M12 7.125v7.8l3.15 1.925l-.825-3.6l2.775-2.4l-3.65-.325zm0 10.15l-4.15 2.5q-.275.175-.575.15t-.525-.2t-.35-.437t-.05-.588l1.1-4.725L3.775 10.8q-.25-.225-.312-.513t.037-.562t.3-.45t.55-.225l4.85-.425l1.875-4.45q.125-.3.388-.45t.537-.15t.537.15t.388.45l1.875 4.45l4.85.425q.35.05.55.225t.3.45t.038.563t-.313.512l-3.675 3.175l1.1 4.725q.075.325-.05.588t-.35.437t-.525.2t-.575-.15z"})})}function u({className:e}){/* @__PURE__ */
|
|
3
3
|
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4t5.675 2.325T20 12t-2.325 5.675T12 20m0-2q2.5 0 4.25-1.75T18 12q0-.425-.062-.837t-.188-.813q-.375.075-.75.113t-.75.037q-1.575 0-3-.6T10.7 8.15q-.7 1.425-1.925 2.475T6 12.15q.075 2.45 1.812 4.15T12 18M6.4 9.85q1.1-.575 1.675-1.337T9.2 6.7q-.95.5-1.675 1.313T6.4 9.85m2.388 3.863Q8.5 13.425 8.5 13t.288-.712T9.5 12t.713.288t.287.712t-.288.713T9.5 14t-.712-.288M16.25 8.5h.3q.15 0 .3-.025q-.825-1.125-2.087-1.8T12 6h-.3q-.15 0-.275.025q.975 1.125 2.062 1.8t2.763.675m-2.463 5.213Q13.5 13.425 13.5 13t.288-.712T14.5 12t.713.288t.287.712t-.288.713T14.5 14t-.712-.288M1 5V3q0-.825.588-1.412T3 1h2q.425 0 .713.288T6 2t-.288.713T5 3H3v2q0 .425-.288.713T2 6t-.712-.288T1 5m4 18H3q-.825 0-1.412-.587T1 21v-2q0-.425.288-.712T2 18t.713.288T3 19v2h2q.425 0 .713.288T6 22t-.288.713T5 23m16 0h-2q-.425 0-.712-.288T18 22t.288-.712T19 21h2v-3h2v3q0 .825-.587 1.413T21 23m0-18V3h-2q-.425 0-.712-.288T18 2t.288-.712T19 1h2q.825 0 1.413.588T23 3v2q0 .425-.288.713T22 6t-.712-.288T21 5M9.2 6.7"})})}var m=null,p=!1,g=()=>m||(m=new Promise(e=>{if("undefined"==typeof window)return void e();if(window.googletag=window.googletag||{cmd:[]},document.querySelector('script[src*="gpt.js"]'))return void e();const t=document.createElement("script");t.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",t.async=!0,t.crossOrigin="anonymous",t.onload=()=>e(),t.onerror=()=>e(),document.head.appendChild(t)})),h=()=>{p||(p=!0,window.googletag.enableServices())},T=e=>{try{const t=(window.googletag.pubads().getSlots?.()??[]).find(t=>t.getSlotElementId?.()===e);t&&window.googletag.destroySlots([t])}catch{}},v=async()=>{try{return await(async()=>{const e=await o();return"string"==typeof e?e:e?.fingerprint})()}catch(e){return console.error("[Qrati Connect] Browser fingerprint unavailable:",e),null}},f=()=>{const o=c(null),{props:s,sessionId:w,user:u}=d(),m=s?.organizationId,p=c(null),g=c(null),h=l(async e=>{if(e&&(o.current||(o.current=await v()),o.current))try{await a.post(i.TRACK_EVENT,{json:{kind:"view",eventSlug:e,browserFingerprint:o.current},headers:{"x-org-id":m,...u?{Authorization:`Bearer ${u.token}`}:{}}})}catch(t){console.error(t)}},[m,u]),T=l(async(e,t)=>{if(e&&t&&(o.current||(o.current=await v()),o.current))try{await a.post(i.TRACK_EVENT,{json:{kind:"ad",adId:e,type:t,browserFingerprint:o.current},headers:{"x-org-id":m}})}catch(n){console.error(n)}},[m]),f=l(async t=>T(t,e.AD_IMPRESSION),[T]),E=l(async t=>T(t,e.AD_ENGAGEMENT),[T]),q=l((o,a,i)=>{if(T(o,e.AD_CLICK),!i)return;const s=String(i);switch(a){case r.LINK:t(s,["http:","https:"])&&window.open(s,"_blank","noopener,noreferrer");break;case r.EMAIL:{const e=n(s);e&&(window.location.href=`mailto:${e}`);break}case r.PHONE:{const e=n(s);e&&(window.location.href=`tel:${e}`);break}case r.SMS:{const e=n(s);e&&(window.location.href=`sms:${e}`);break}case r.WHATSAPP:{const e=n(s);e&&(window.location.href=`https://wa.me/${encodeURIComponent(e)}`);break}case r.MESSENGER:{const e=n(s);e&&(window.location.href=`https://m.me/${encodeURIComponent(e)}`);break}default:t(s,["http:","https:"])&&window.open(s,"_blank","noopener,noreferrer")}},[T]),y=l(e=>{if(p.current&&g.current){const e={page:p.current,entryTime:g.current,exitTime:Date.now()};I([e])}p.current=e??null,g.current=Date.now()},[]),I=l(async e=>{if(w)try{await a.post(i.UPDATE_SESSION,{headers:{"x-org-id":m},json:{sessionId:w,pageViews:e}})}catch(t){console.error(t)}},[m,w]);return{incrementEventView:h,captureAdImpression:f,captureAdEngagement:E,captureAdClick:q,trackPageView:y,exportPageViewsData:I,trackGamAnalytics:l(async({eventId:e,organizationId:t,type:n,creativeId:r,lineItemId:s,advertiserId:c,isEmpty:l})=>{if(!e||!n)return;if(o.current||(o.current=await v()),!o.current)return;const d=t||m;if(d)try{await a.post(i.TRACK_EVENT,{json:{kind:"gam",eventId:e,organizationId:d,type:n,browserFingerprint:o.current,...r?{creativeId:r}:{},...s?{lineItemId:s}:{},...c?{advertiserId:c}:{},...void 0!==l?{isEmpty:l}:{}},headers:{"x-org-id":d}})}catch(w){console.error(w)}},[m])}},E=({container:e,onClick:t})=>{let n=!1,r=!1,o=0,a=null;const i=()=>{n=!0,o=Date.now()},s=()=>{n=!1},c=()=>{null!==a&&(window.clearTimeout(a),a=null)},l=()=>{a=window.setTimeout(()=>{const a=document.activeElement,i=a instanceof HTMLIFrameElement&&e.contains(a),s=Date.now()-o<=1500;!r&&(i||n&&s)&&(r=!0,t())},0)};return e.addEventListener("pointerenter",i),e.addEventListener("pointerleave",s),window.addEventListener("blur",l),window.addEventListener("focus",c),()=>{e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",l),window.removeEventListener("focus",c),null!==a&&window.clearTimeout(a)}};export{g as a,h as i,f as n,u as o,T as r,w as s,E as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Zt as c,kt as e,
|
|
1
|
+
import{Zt as c,kt as e,un as l}from"./FE0pIRqe.js";var a={bing:{id:"bing",label:"Bing",policyUrl:"https://privacy.microsoft.com/en-us/privacystatement",buildUrl:c=>`https://www.bing.com/images/search?view=detailv2&iss=sbi&form=SBIVSP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(c)}`},google:{id:"google",label:"Google Lens",policyUrl:"https://policies.google.com/privacy",buildUrl:c=>`https://lens.google.com/uploadbyurl?url=${encodeURIComponent(c)}`},yandex:{id:"yandex",label:"Yandex",policyUrl:"https://yandex.com/legal/confidential/",buildUrl:c=>`https://yandex.com/images/search?rpt=imageview&url=${encodeURIComponent(c)}`},tineye:{id:"tineye",label:"TinEye",policyUrl:"https://tineye.com/privacy",buildUrl:c=>`https://tineye.com/search?url=${encodeURIComponent(c)}`}},i=Object.keys(a);function t(c){return i.includes(c)}var o=[],n={bing:function({className:c}){/* @__PURE__ */
|
|
2
2
|
return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 388",className:c,children:[
|
|
3
3
|
/* @__PURE__ */l("defs",{children:[
|
|
4
4
|
/* @__PURE__ */l("radialGradient",{id:"bingIconGradA",cx:"93.717%",cy:"77.818%",r:"143.121%",fx:"93.717%",fy:"77.818%",gradientTransform:"matrix(-.65486 -.5438 .75575 -.4712 .963 1.654)",children:[/* @__PURE__ */l("stop",{offset:"0%","stop-color":"#00cacc"}),/* @__PURE__ */l("stop",{offset:"100%","stop-color":"#048fce"})]}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Nt as c,Zt as t,kt as a}from"./Cr5o77zq.js";import{i as e,r as i}from"./BOweSM9Y.js";var r={bing:"<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 388'><defs><radialGradient id='pswpImageSearchBingIconGradA' cx='93.717%' cy='77.818%' r='143.121%' fx='93.717%' fy='77.818%' gradientTransform='matrix(-.65486 -.5438 .75575 -.4712 .963 1.654)'><stop offset='0%' stop-color='#00cacc' /><stop offset='100%' stop-color='#048fce' /></radialGradient><radialGradient id='pswpImageSearchBingIconGradB' 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='pswpImageSearchBingIconGradC' 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(#pswpImageSearchBingIconGradA)' 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(#pswpImageSearchBingIconGradB)' 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(#pswpImageSearchBingIconGradC)' 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>",google:"<svg focusable='false' viewBox='24 24 144 144' xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'><rect fill='none' height='192' width='192'></rect><g><circle fill='#34A853' cx='144.07' cy='144' r='16'></circle><circle fill='#4285F4' cx='96.07' cy='104' r='24'></circle><path fill='#EA4335' d='M24,135.2c0,18.11,14.69,32.8,32.8,32.8H96v-16l-40.1-0.1c-8.8,0-15.9-8.19-15.9-17.9v-18H24V135.2z'></path><path fill='#FBBC05' d='M168,72.8c0-18.11-14.69-32.8-32.8-32.8H116l20,16c8.8,0,16,8.29,16,18v30h16V72.8z'></path><path fill='#4285F4' d='M112,24l-32,0L68,40H56.8C38.69,40,24,54.69,24,72.8V92h16V74c0-9.71,7.2-18,16-18h80L112,24z'></path></g></svg>",yandex:"<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 512 512'><path d='M0 0h512v512H0z' fill='none' /><path fill='#fc3f1d' d='M215.4 512v-51.6c0-70-8.1-104.6-36.2-165L42.5 0h94.6l116 252.7c34 73.7 48.8 112 48.8 196.7V512zm55.4-264.5L378.6 0h90.9L360.2 247.5z' /></svg>",tineye:"<svg viewBox='1 1 1068.602 1130.2890000000002' xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'><path d='M1 146.465c1.012-3.903 1.838-7.409 3.07-10.766 5.624-15.345 16.325-25.676 31.703-30.943 17.155-5.875 33.28-3.237 47.818 7.437 16.318 11.982 22.46 28.84 20.238 48.376-2.052 18.038-12.097 31.13-28.646 39.863 0-1.39-.118-2.196.038-2.945.121-.585.582-1.099 1.068-1.954-7.978-4.868-15.508-9.882-25.418-9.679-5.159.106-7.615 2.867-8.59 6.88-.82 3.38-.169 7.119-.169 10.678-15.082.424-38.897-18.662-40.722-43.27C1 155.642 1 151.285 1 146.464zM697.563 1c3.152.66 5.846 1.434 8.586 1.962 21.387 4.124 36.727 21.703 39.678 42.526 2.322 16.39-2.362 31.39-13.7 43.634-3.924 4.238-9.373 7.064-14.794 11.024V86.514c-8.367-2.075-16.536-6.866-26.074-4.537-6.647 1.623-8.387 4.166-7.21 10.652.674 3.714 1.697 7.365 2.568 11.069-23.52-2.48-45.548-23.77-43.578-54.88 1.495-23.6 20.856-45.936 47.813-47.423C693.042 1 695.083 1 697.562 1z' fill='#ff8e4d' /><path d='M833.776 655.58c-10.198 10.224-20.302 20.53-27.821 33.009-.845 1.402-1.502 2.918-1.834 4.622 19.7-22.734 40.135-44.277 69.395-55.173-3.002 7.006-6.19 13.825-8.871 20.84-4.69 12.265-8.02 24.904-8.616 38.099-.485 10.743-1.676 21.576-.832 32.232 1.972 24.88 8.432 48.532 22.772 69.482 9.841 14.377 22.553 24.875 40.261 27.128 12.076 1.536 22.903-3.039 32.61-10.162 11.464-8.413 18.832-20.01 25.134-32.428 1.015-1.999 1.977-4.024 3.16-6.435 3.462 1.316 6.734 2.41 9.853 3.84.898.41 1.98 1.83 1.917 2.71-.816 11.438-1.7 22.875-2.824 34.286-.83 8.425-1.606 16.893-3.166 25.2-3.51 18.704-7.07 37.418-11.386 55.947-5.88 25.242-16.105 49.031-26.748 72.517-7.348 16.217-15.96 31.923-24.895 47.343-8.305 14.334-19.022 26.979-31.267 38.22-12.997 11.93-27.803 20.952-44.338 27.097-12.342 4.587-25.07 6.994-38.231 8.246-15.726 1.496-31.241.584-46.78-1.242-12.261-1.441-24.662-2.456-36.66-5.171-13.244-2.998-26.222-7.358-39.091-11.78-15.205-5.225-28.167-14.694-41.412-23.493-9.622-6.391-20.643-8.736-31.506-11.436-21.082-5.238-42.684-6.441-64.165-4.817-19.712 1.491-38.637 6.86-55.184 18.671-9.74 6.952-17.283 15.785-24.144 25.464-13.112 18.498-28.924 34.11-49.937 43.535-13.625 6.11-28.204 9.358-42.883 6.8-20.243-3.526-39.004-11.365-55.833-23.652-16.86-12.308-30.797-26.983-41.591-44.967-8.502-14.164-14.824-29.127-20.083-44.668-6.874-20.315-13.436-40.75-20.89-60.853-8.184-22.07-16.908-43.955-26.017-65.66-5.701-13.584-11.68-27.197-19.108-39.874-8.543-14.576-18.478-28.385-28.435-42.072-13.246-18.208-30.907-31.683-49.654-43.726-13.449-8.64-28.179-14.483-43.703-18.219-7.177-1.728-14.458-3.024-22.076-4.595.232-14.352 4.716-27.508 11.967-39.735 10.145-17.104 24.47-29.948 42.045-39.022 12.592-6.501 25.934-10.992 39.912-13.76 21.243-4.205 42.73-6.09 64.225-4.73 32.393 2.051 64.226 7.228 93.188 23.455 19.679 11.026 35.886 25.733 48.805 44.249 13.232 18.965 29.348 34.85 50.806 44.414 10.33 4.604 21.108 8 32.504 8.64 9.738.547 19.514 1.23 29.243.922 14.455-.456 28.58-3.25 42.498-7.357 18.897-5.576 35.259-15.42 48.973-29.285 12.7-12.84 22.52-28.006 32.437-43.073a1466.113 1466.113 0 0 1 35.434-51.417c6.192-8.588 12.99-16.884 20.458-24.371 9.269-9.293 18.948-18.377 29.472-26.17 15.528-11.499 31.456-22.645 48.152-32.32 15.104-8.754 31.1-16.27 47.368-22.63 18.478-7.223 37.565-13 56.638-18.546 11.712-3.405 23.842-5.473 35.873-7.651 23.644-4.28 47.586-4.891 71.484-3.91 23.363.959 46.105 5.144 67.855 14.681 17.212 7.548 31.471 18.688 43.382 32.658 7.468 8.759 12.993 19.172 19.418 28.824 2.862 4.3 5.794 8.553 8.568 12.64l-27.055 14.844c-8.802-7.399-17.266-15.134-26.382-22.002-9.389-7.073-20.492-10.987-31.998-12.606-10.873-1.53-22.022-2.578-32.941-1.947-17.924 1.035-35.542 4.802-52.31 11.431-11.769 4.653-23.328 9.9-34.717 15.423-6.627 3.214-13.073 7.052-18.941 11.481-3.194 2.41-4.626 7.023-7.528 9.979-5.936 6.045-12.084 11.936-18.588 17.357-10.634 8.86-22.608 16.338-32.174 26.188-8.913 9.178-15.89 20.388-22.893 31.238-13.673 21.186-23.306 44.306-30.348 68.458-3.638 12.476-6.514 25.175-9.703 37.78-.157.621-.02 1.317-.02 3.079 1.318-1.914 2.148-2.964 2.813-4.11 13.397-23.077 26.412-46.387 40.267-69.187 12.027-19.79 25.918-38.324 42.665-54.45 6.49-6.248 13.345-12.349 23-14.775.733.24.88.344 1.027.448m-32.505 40.628c-.785 1.906-1.569 3.813-2.914 5.913l-.121 1.619c.44-.315.879-.63 1.878-1.424.885-1.91 1.77-3.818 3.216-6.215l.76-2.262-.984-.397c-.394.827-.789 1.654-1.835 2.766z' fill='#2c71a1' /><path d='M111.274 531.919c-1.425-2.304-2.883-4.587-4.267-6.914-6.663-11.196-14.614-21.852-19.626-33.745-6.375-15.128-11.098-31.076-15.144-47.022-3.174-12.51-4.482-25.522-6.163-38.37-1.374-10.505-3.456-21.193-2.74-31.629.992-14.457 3.509-28.946 6.886-43.06 2.776-11.599 6.764-23.155 12-33.857 7.262-14.839 17.008-28.15 28.216-40.56 16.136-17.864 34.4-32.98 54.856-45.321 15.683-9.462 32.147-17.63 48.289-26.329.5-.27 1.274-.034 2.357-.034-6.557 12.2-10.399 24.806-9.872 39.006 10.55-1.929 20.784-3.912 31.06-5.645 9.599-1.618 19.24-2.979 28.866-4.437 10.91-1.652 21.804-3.434 32.742-4.883 9.383-1.242 18.819-2.075 28.227-3.124 11.671-1.302 23.335-2.676 35.01-3.945 4.238-.46 8.496-.76 12.751-1.04 15.587-1.025 31.178-1.987 46.763-3.032 2.756-.185 5.616-.286 8.19-1.141 1.363-.453 2.604-2.279 3.239-3.767 8.277-19.404 20.902-35.287 39.157-45.93 13.107-7.642 27.702-8.734 42.6-6.323 2.597.42 5.346-.13 7.96.23 10.593 1.464 21.227 2.76 31.72 4.777 12.325 2.37 24.687 4.843 36.723 8.336a336.134 336.134 0 0 1 36.653 12.97c12.702 5.346 25.388 11.062 37.208 18.086 13.702 8.143 26.668 17.6 39.413 27.204 2.245 1.69 2.33 6.872 2.567 10.497 1.183 18.076 2.13 36.168 3.006 54.262.077 1.599-.49 3.719-1.56 4.807-9.856 10.019-16.62 21.46-17.384 35.853-.952 17.956 1.755 34.995 15.008 48.278 3.72 3.729 9.444 6.317 14.682 7.482a53.559 53.559 0 0 0 27.013-.97c9.915-2.969 16.342-10.268 19.165-19.798 7.535-25.441 3.02-48.47-15.62-68.054-1.33-1.397-2.909-2.674-4.598-3.59-8.758-4.752-10.2-13.713-12.5-21.998-2.093-7.535-3.397-15.29-4.296-23.5 3.045 3.265 6.42 6.284 9.074 9.84 8.51 11.401 17.147 22.74 25.01 34.584 12.224 18.418 20.751 38.61 27.103 59.774 4.034 13.439 7.075 26.985 6.993 41.104-.058 10.003.715 20.072-.18 29.996-1.367 15.159-6.268 29.186-16.355 41.103-9.711 11.474-21.865 19.756-34.937 26.61-16.19 8.488-32.696 16.389-49.227 24.2-12.315 5.82-24.892 11.085-37.337 16.63-1.019.453-1.928 1.153-3.437 2.06-11.006 5.07-21.508 9.721-31.899 14.61-4.036 1.9-7.82 4.335-11.72 6.526-5.516 2.17-11.126 4.13-16.53 6.551-13.01 5.83-25.846 12.054-38.9 17.783-13.787 6.05-27.527 12.32-41.684 17.39a854.019 854.019 0 0 1-55.83 17.861c-10.218 2.886-20.923 4.317-31.507 5.57-12.69 1.504-25.478 2.227-38.238 3.082-8.07.54-16.17.638-24.25 1.055-11.674.603-23.37 2.176-35.006 1.801-23.602-.76-46.949-3.724-70.058-9.165-20.113-4.736-38.798-13.253-58.266-19.643-10.038-3.294-20.61-5.183-30.314-9.218-15.067-6.264-29.406-14.109-41.517-25.423-2.854-2.665-6.02-4.995-9.414-7.896-3.625-3.797-6.878-7.176-10.131-10.555m73.558-223.68c-1.957.918-3.883 1.906-5.873 2.743-20.59 8.662-39.373 20.002-54.226 37.019-2.474 2.835-4.878 6.043-6.214 9.504-4.8 12.437-7.296 25.488-7.29 38.777.006 11.572.882 23.173 1.934 34.71 1.411 15.463 5.677 30.27 12.6 44.154 12.145 24.355 32.196 40.286 56.833 50.359 29.439 12.036 60.666 16.402 92.158 17.14 26.376.618 52.813-.85 79.207-1.824a483.46 483.46 0 0 0 39.068-3.048c18.999-2.253 38.009-4.661 56.847-7.958 24.862-4.352 49.655-9.203 74.307-14.616a567.756 567.756 0 0 0 83.14-25.058c15.603-6.037 30.865-12.955 46.237-19.576 1.24-.534 2.146-1.845 3.207-2.795-.88-.849-1.666-1.831-2.655-2.525-5.937-4.168-12.375-7.749-17.806-12.487-18.845-16.442-28.918-38.217-35.25-61.762-4.044-15.042-8.05-30.257-7.175-46.145.045-.809-.316-1.635-.317-2.454-.02-13.269-.305-26.546.087-39.804.288-9.74 1.627-19.445 2.076-29.184.064-1.37-2.163-3.982-3.514-4.112-23.36-2.246-46.715-4.981-70.141-5.964-19.903-.834-39.896.37-59.846.795-6.79.144-13.588.486-20.357 1.037-14.823 1.207-29.63 2.597-44.443 3.928-11.357 1.021-22.737 1.855-34.064 3.154-15.241 1.75-30.458 3.746-45.654 5.856-16.343 2.27-32.75 4.263-48.95 7.326-28.293 5.348-56.174 12.428-83.926 22.81z' fill='#2c71a1' /><path d='M185.21 308.158c27.374-10.3 55.255-17.38 83.548-22.73 16.2-3.062 32.607-5.055 48.95-7.325 15.196-2.11 30.413-4.107 45.654-5.856 11.327-1.299 22.707-2.133 34.064-3.154 14.813-1.331 29.62-2.721 44.443-3.928 6.77-.55 13.566-.893 20.357-1.037 19.95-.424 39.943-1.63 59.846-.795 23.426.983 46.781 3.718 70.141 5.964 1.35.13 3.578 2.742 3.514 4.112-.45 9.74-1.788 19.445-2.076 29.184-.392 13.258-.107 26.535-.087 39.804 0 .819.362 1.645.317 2.454-.876 15.888 3.131 31.103 7.176 46.145 6.33 23.545 16.404 45.32 35.249 61.762 5.431 4.738 11.869 8.319 17.806 12.487.989.694 1.775 1.676 2.655 2.525-1.061.95-1.967 2.26-3.207 2.795-15.372 6.621-30.634 13.54-46.236 19.576a567.756 567.756 0 0 1-83.14 25.058c-24.653 5.413-49.446 10.264-74.308 14.616-18.838 3.297-37.848 5.705-56.847 7.958a483.46 483.46 0 0 1-39.068 3.048c-26.394.975-52.831 2.442-79.207 1.824-31.492-.738-62.72-5.104-92.158-17.14-24.637-10.073-44.688-26.004-56.833-50.359-6.923-13.884-11.189-28.69-12.6-44.154-1.052-11.537-1.928-23.138-1.934-34.71-.006-13.29 2.49-26.34 7.29-38.777 1.336-3.46 3.74-6.67 6.214-9.504 14.853-17.017 33.635-28.357 54.226-37.019 1.99-.837 3.916-1.825 6.251-2.824m201.146 114.733c3.146 6.947 5.851 14.138 9.519 20.798 11.592 21.054 26.994 38.551 49.189 48.882 24.235 11.28 46.022 5.832 61.441-13.842 16.128-20.578 19.654-45.064 17.3-70.257-1.75-18.72-7.447-36.601-16.597-53.217-11.632-21.12-27.003-38.54-49.269-48.838-17.506-8.097-34.753-7.824-50.904 3.538-9.657 6.795-15.44 16.686-20.256 27.253-8.104 17.78-9.529 36.447-6.972 55.437 1.337 9.936 4.121 19.677 6.549 30.246m-205.288 6.26c.279.95.58 1.896.834 2.855 8.37 31.684 24.064 58.327 52.575 76.068 10.332 6.429 21.605 10.803 33.816 9.782 15.072-1.262 26.844-9.179 34.787-21.995 12.524-20.21 15.326-42.372 11.611-65.506-2.51-15.637-7.657-30.41-15.519-44.222-11.426-20.073-26.468-36.252-47.802-46.146-21.335-9.894-40.216-5.203-53.795 9.063-12.745 13.39-17.955 30.418-18.49 48.578-.301 10.198 1.181 20.449 1.983 31.522z' /><path d='M386.208 422.521c-2.28-10.199-5.064-19.94-6.401-29.876-2.557-18.99-1.132-37.658 6.972-55.437 4.817-10.567 10.599-20.458 20.256-27.253 16.15-11.362 33.398-11.635 50.904-3.538 22.266 10.298 37.637 27.718 49.269 48.838 9.15 16.616 14.848 34.497 16.597 53.217 2.354 25.193-1.172 49.679-17.3 70.257-15.419 19.674-37.206 25.123-61.441 13.842-22.195-10.33-37.597-27.828-49.19-48.882-3.667-6.66-6.372-13.85-9.666-21.168m25.884-3.891c-.513 8.802.736 17.129 6.055 24.535 9.544 13.288 26.966 12.323 35.396.758 8.54-11.714 9.476-24.526 4.363-37.58-5.39-13.761-18.67-20.01-30.185-14.433-10.514 5.093-14.972 14.421-15.629 26.72zM181.007 428.727c-.74-10.65-2.223-20.901-1.923-31.1.536-18.16 5.746-35.187 18.491-48.577 13.579-14.266 32.46-18.957 53.795-9.063 21.334 9.894 36.376 26.073 47.802 46.146 7.862 13.811 13.009 28.585 15.52 44.222 3.714 23.134.912 45.296-11.612 65.506-7.943 12.816-19.715 20.733-34.787 21.995-12.21 1.021-23.484-3.353-33.816-9.782-28.511-17.741-44.204-44.384-52.575-76.068-.253-.959-.555-1.904-.895-3.28m22.423 22.124c.91 3.328 1.434 6.827 2.808 9.951 3.527 8.018 9.159 13.987 18.316 15.025 9.436 1.07 16.428-2.542 21.25-11.198 8.09-14.52 8.726-28.544-.864-42.536-7.955-11.606-26.807-11.4-35 .093-6.043 8.476-7.465 17.831-6.51 28.665z' fill='#fff' /><path d='M412.092 418.16c.657-11.829 5.115-21.157 15.63-26.25 11.515-5.577 24.794.672 30.184 14.433 5.113 13.054 4.178 25.866-4.363 37.58-8.43 11.565-25.852 12.53-35.396-.758-5.319-7.406-6.568-15.733-6.055-25.006zM203.28 450.427c-.805-10.41.617-19.766 6.66-28.242 8.193-11.492 27.045-11.699 35-.093 9.59 13.992 8.954 28.016.865 42.536-4.823 8.656-11.815 12.268-21.25 11.198-9.158-1.038-14.79-7.007-18.317-15.025-1.374-3.124-1.897-6.623-2.958-10.374z' /></svg>"},o=class{constructor(c,t=[],a={}){this.lightbox=c,this.providers=t.filter(e),this.organizationId=a.organizationId,this.eventId=a.eventId,c.on("init",()=>{this.initPswpEvents(c.pswp)})}trackClick(c,e){this.organizationId&&this.eventId&&t.post(a.TRACK_EVENT,{json:{kind:"image-search",organizationId:this.organizationId,eventId:this.eventId,contentId:e,provider:c,surface:"lightbox"},headers:{"x-org-id":this.organizationId}}).catch(()=>{})}initPswpEvents(t){if(0===this.providers.length)return;const a=()=>{const a=t.currSlide?.data?.type?.toLowerCase()===c.IMAGE.toLowerCase();t.element?.classList.toggle("pswp--image-search-allowed",a)};t.on("change",a),t.on("afterInit",a),t.on("uiRegister",()=>{this.providers.forEach(a=>{const e=i[a];t.ui.registerElement({name:`image-search-button-${a}`,className:"pswp__button--image-search-button",order:7,isButton:!0,tagName:"button",title:`Search this image on ${e.label}`,html:{isCustomSVG:!0,inner:r[a],outlineID:`pswp__icn-image-search-${a}`},onClick:(t,i,r)=>{const o=r.currSlide?.data;o?.type?.toLowerCase()===c.IMAGE.toLowerCase()&&o.src&&(window.open(e.buildUrl(o.src),"_blank","noopener,noreferrer"),this.trackClick(a,o.id))}})})})}};export{o as default};
|
|
1
|
+
import{Nt as c,Zt as t,kt as a}from"./FE0pIRqe.js";import{i as e,r as i}from"./DA0XxXKx.js";var r={bing:"<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 388'><defs><radialGradient id='pswpImageSearchBingIconGradA' cx='93.717%' cy='77.818%' r='143.121%' fx='93.717%' fy='77.818%' gradientTransform='matrix(-.65486 -.5438 .75575 -.4712 .963 1.654)'><stop offset='0%' stop-color='#00cacc' /><stop offset='100%' stop-color='#048fce' /></radialGradient><radialGradient id='pswpImageSearchBingIconGradB' 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='pswpImageSearchBingIconGradC' 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(#pswpImageSearchBingIconGradA)' 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(#pswpImageSearchBingIconGradB)' 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(#pswpImageSearchBingIconGradC)' 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>",google:"<svg focusable='false' viewBox='24 24 144 144' xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'><rect fill='none' height='192' width='192'></rect><g><circle fill='#34A853' cx='144.07' cy='144' r='16'></circle><circle fill='#4285F4' cx='96.07' cy='104' r='24'></circle><path fill='#EA4335' d='M24,135.2c0,18.11,14.69,32.8,32.8,32.8H96v-16l-40.1-0.1c-8.8,0-15.9-8.19-15.9-17.9v-18H24V135.2z'></path><path fill='#FBBC05' d='M168,72.8c0-18.11-14.69-32.8-32.8-32.8H116l20,16c8.8,0,16,8.29,16,18v30h16V72.8z'></path><path fill='#4285F4' d='M112,24l-32,0L68,40H56.8C38.69,40,24,54.69,24,72.8V92h16V74c0-9.71,7.2-18,16-18h80L112,24z'></path></g></svg>",yandex:"<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 512 512'><path d='M0 0h512v512H0z' fill='none' /><path fill='#fc3f1d' d='M215.4 512v-51.6c0-70-8.1-104.6-36.2-165L42.5 0h94.6l116 252.7c34 73.7 48.8 112 48.8 196.7V512zm55.4-264.5L378.6 0h90.9L360.2 247.5z' /></svg>",tineye:"<svg viewBox='1 1 1068.602 1130.2890000000002' xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'><path d='M1 146.465c1.012-3.903 1.838-7.409 3.07-10.766 5.624-15.345 16.325-25.676 31.703-30.943 17.155-5.875 33.28-3.237 47.818 7.437 16.318 11.982 22.46 28.84 20.238 48.376-2.052 18.038-12.097 31.13-28.646 39.863 0-1.39-.118-2.196.038-2.945.121-.585.582-1.099 1.068-1.954-7.978-4.868-15.508-9.882-25.418-9.679-5.159.106-7.615 2.867-8.59 6.88-.82 3.38-.169 7.119-.169 10.678-15.082.424-38.897-18.662-40.722-43.27C1 155.642 1 151.285 1 146.464zM697.563 1c3.152.66 5.846 1.434 8.586 1.962 21.387 4.124 36.727 21.703 39.678 42.526 2.322 16.39-2.362 31.39-13.7 43.634-3.924 4.238-9.373 7.064-14.794 11.024V86.514c-8.367-2.075-16.536-6.866-26.074-4.537-6.647 1.623-8.387 4.166-7.21 10.652.674 3.714 1.697 7.365 2.568 11.069-23.52-2.48-45.548-23.77-43.578-54.88 1.495-23.6 20.856-45.936 47.813-47.423C693.042 1 695.083 1 697.562 1z' fill='#ff8e4d' /><path d='M833.776 655.58c-10.198 10.224-20.302 20.53-27.821 33.009-.845 1.402-1.502 2.918-1.834 4.622 19.7-22.734 40.135-44.277 69.395-55.173-3.002 7.006-6.19 13.825-8.871 20.84-4.69 12.265-8.02 24.904-8.616 38.099-.485 10.743-1.676 21.576-.832 32.232 1.972 24.88 8.432 48.532 22.772 69.482 9.841 14.377 22.553 24.875 40.261 27.128 12.076 1.536 22.903-3.039 32.61-10.162 11.464-8.413 18.832-20.01 25.134-32.428 1.015-1.999 1.977-4.024 3.16-6.435 3.462 1.316 6.734 2.41 9.853 3.84.898.41 1.98 1.83 1.917 2.71-.816 11.438-1.7 22.875-2.824 34.286-.83 8.425-1.606 16.893-3.166 25.2-3.51 18.704-7.07 37.418-11.386 55.947-5.88 25.242-16.105 49.031-26.748 72.517-7.348 16.217-15.96 31.923-24.895 47.343-8.305 14.334-19.022 26.979-31.267 38.22-12.997 11.93-27.803 20.952-44.338 27.097-12.342 4.587-25.07 6.994-38.231 8.246-15.726 1.496-31.241.584-46.78-1.242-12.261-1.441-24.662-2.456-36.66-5.171-13.244-2.998-26.222-7.358-39.091-11.78-15.205-5.225-28.167-14.694-41.412-23.493-9.622-6.391-20.643-8.736-31.506-11.436-21.082-5.238-42.684-6.441-64.165-4.817-19.712 1.491-38.637 6.86-55.184 18.671-9.74 6.952-17.283 15.785-24.144 25.464-13.112 18.498-28.924 34.11-49.937 43.535-13.625 6.11-28.204 9.358-42.883 6.8-20.243-3.526-39.004-11.365-55.833-23.652-16.86-12.308-30.797-26.983-41.591-44.967-8.502-14.164-14.824-29.127-20.083-44.668-6.874-20.315-13.436-40.75-20.89-60.853-8.184-22.07-16.908-43.955-26.017-65.66-5.701-13.584-11.68-27.197-19.108-39.874-8.543-14.576-18.478-28.385-28.435-42.072-13.246-18.208-30.907-31.683-49.654-43.726-13.449-8.64-28.179-14.483-43.703-18.219-7.177-1.728-14.458-3.024-22.076-4.595.232-14.352 4.716-27.508 11.967-39.735 10.145-17.104 24.47-29.948 42.045-39.022 12.592-6.501 25.934-10.992 39.912-13.76 21.243-4.205 42.73-6.09 64.225-4.73 32.393 2.051 64.226 7.228 93.188 23.455 19.679 11.026 35.886 25.733 48.805 44.249 13.232 18.965 29.348 34.85 50.806 44.414 10.33 4.604 21.108 8 32.504 8.64 9.738.547 19.514 1.23 29.243.922 14.455-.456 28.58-3.25 42.498-7.357 18.897-5.576 35.259-15.42 48.973-29.285 12.7-12.84 22.52-28.006 32.437-43.073a1466.113 1466.113 0 0 1 35.434-51.417c6.192-8.588 12.99-16.884 20.458-24.371 9.269-9.293 18.948-18.377 29.472-26.17 15.528-11.499 31.456-22.645 48.152-32.32 15.104-8.754 31.1-16.27 47.368-22.63 18.478-7.223 37.565-13 56.638-18.546 11.712-3.405 23.842-5.473 35.873-7.651 23.644-4.28 47.586-4.891 71.484-3.91 23.363.959 46.105 5.144 67.855 14.681 17.212 7.548 31.471 18.688 43.382 32.658 7.468 8.759 12.993 19.172 19.418 28.824 2.862 4.3 5.794 8.553 8.568 12.64l-27.055 14.844c-8.802-7.399-17.266-15.134-26.382-22.002-9.389-7.073-20.492-10.987-31.998-12.606-10.873-1.53-22.022-2.578-32.941-1.947-17.924 1.035-35.542 4.802-52.31 11.431-11.769 4.653-23.328 9.9-34.717 15.423-6.627 3.214-13.073 7.052-18.941 11.481-3.194 2.41-4.626 7.023-7.528 9.979-5.936 6.045-12.084 11.936-18.588 17.357-10.634 8.86-22.608 16.338-32.174 26.188-8.913 9.178-15.89 20.388-22.893 31.238-13.673 21.186-23.306 44.306-30.348 68.458-3.638 12.476-6.514 25.175-9.703 37.78-.157.621-.02 1.317-.02 3.079 1.318-1.914 2.148-2.964 2.813-4.11 13.397-23.077 26.412-46.387 40.267-69.187 12.027-19.79 25.918-38.324 42.665-54.45 6.49-6.248 13.345-12.349 23-14.775.733.24.88.344 1.027.448m-32.505 40.628c-.785 1.906-1.569 3.813-2.914 5.913l-.121 1.619c.44-.315.879-.63 1.878-1.424.885-1.91 1.77-3.818 3.216-6.215l.76-2.262-.984-.397c-.394.827-.789 1.654-1.835 2.766z' fill='#2c71a1' /><path d='M111.274 531.919c-1.425-2.304-2.883-4.587-4.267-6.914-6.663-11.196-14.614-21.852-19.626-33.745-6.375-15.128-11.098-31.076-15.144-47.022-3.174-12.51-4.482-25.522-6.163-38.37-1.374-10.505-3.456-21.193-2.74-31.629.992-14.457 3.509-28.946 6.886-43.06 2.776-11.599 6.764-23.155 12-33.857 7.262-14.839 17.008-28.15 28.216-40.56 16.136-17.864 34.4-32.98 54.856-45.321 15.683-9.462 32.147-17.63 48.289-26.329.5-.27 1.274-.034 2.357-.034-6.557 12.2-10.399 24.806-9.872 39.006 10.55-1.929 20.784-3.912 31.06-5.645 9.599-1.618 19.24-2.979 28.866-4.437 10.91-1.652 21.804-3.434 32.742-4.883 9.383-1.242 18.819-2.075 28.227-3.124 11.671-1.302 23.335-2.676 35.01-3.945 4.238-.46 8.496-.76 12.751-1.04 15.587-1.025 31.178-1.987 46.763-3.032 2.756-.185 5.616-.286 8.19-1.141 1.363-.453 2.604-2.279 3.239-3.767 8.277-19.404 20.902-35.287 39.157-45.93 13.107-7.642 27.702-8.734 42.6-6.323 2.597.42 5.346-.13 7.96.23 10.593 1.464 21.227 2.76 31.72 4.777 12.325 2.37 24.687 4.843 36.723 8.336a336.134 336.134 0 0 1 36.653 12.97c12.702 5.346 25.388 11.062 37.208 18.086 13.702 8.143 26.668 17.6 39.413 27.204 2.245 1.69 2.33 6.872 2.567 10.497 1.183 18.076 2.13 36.168 3.006 54.262.077 1.599-.49 3.719-1.56 4.807-9.856 10.019-16.62 21.46-17.384 35.853-.952 17.956 1.755 34.995 15.008 48.278 3.72 3.729 9.444 6.317 14.682 7.482a53.559 53.559 0 0 0 27.013-.97c9.915-2.969 16.342-10.268 19.165-19.798 7.535-25.441 3.02-48.47-15.62-68.054-1.33-1.397-2.909-2.674-4.598-3.59-8.758-4.752-10.2-13.713-12.5-21.998-2.093-7.535-3.397-15.29-4.296-23.5 3.045 3.265 6.42 6.284 9.074 9.84 8.51 11.401 17.147 22.74 25.01 34.584 12.224 18.418 20.751 38.61 27.103 59.774 4.034 13.439 7.075 26.985 6.993 41.104-.058 10.003.715 20.072-.18 29.996-1.367 15.159-6.268 29.186-16.355 41.103-9.711 11.474-21.865 19.756-34.937 26.61-16.19 8.488-32.696 16.389-49.227 24.2-12.315 5.82-24.892 11.085-37.337 16.63-1.019.453-1.928 1.153-3.437 2.06-11.006 5.07-21.508 9.721-31.899 14.61-4.036 1.9-7.82 4.335-11.72 6.526-5.516 2.17-11.126 4.13-16.53 6.551-13.01 5.83-25.846 12.054-38.9 17.783-13.787 6.05-27.527 12.32-41.684 17.39a854.019 854.019 0 0 1-55.83 17.861c-10.218 2.886-20.923 4.317-31.507 5.57-12.69 1.504-25.478 2.227-38.238 3.082-8.07.54-16.17.638-24.25 1.055-11.674.603-23.37 2.176-35.006 1.801-23.602-.76-46.949-3.724-70.058-9.165-20.113-4.736-38.798-13.253-58.266-19.643-10.038-3.294-20.61-5.183-30.314-9.218-15.067-6.264-29.406-14.109-41.517-25.423-2.854-2.665-6.02-4.995-9.414-7.896-3.625-3.797-6.878-7.176-10.131-10.555m73.558-223.68c-1.957.918-3.883 1.906-5.873 2.743-20.59 8.662-39.373 20.002-54.226 37.019-2.474 2.835-4.878 6.043-6.214 9.504-4.8 12.437-7.296 25.488-7.29 38.777.006 11.572.882 23.173 1.934 34.71 1.411 15.463 5.677 30.27 12.6 44.154 12.145 24.355 32.196 40.286 56.833 50.359 29.439 12.036 60.666 16.402 92.158 17.14 26.376.618 52.813-.85 79.207-1.824a483.46 483.46 0 0 0 39.068-3.048c18.999-2.253 38.009-4.661 56.847-7.958 24.862-4.352 49.655-9.203 74.307-14.616a567.756 567.756 0 0 0 83.14-25.058c15.603-6.037 30.865-12.955 46.237-19.576 1.24-.534 2.146-1.845 3.207-2.795-.88-.849-1.666-1.831-2.655-2.525-5.937-4.168-12.375-7.749-17.806-12.487-18.845-16.442-28.918-38.217-35.25-61.762-4.044-15.042-8.05-30.257-7.175-46.145.045-.809-.316-1.635-.317-2.454-.02-13.269-.305-26.546.087-39.804.288-9.74 1.627-19.445 2.076-29.184.064-1.37-2.163-3.982-3.514-4.112-23.36-2.246-46.715-4.981-70.141-5.964-19.903-.834-39.896.37-59.846.795-6.79.144-13.588.486-20.357 1.037-14.823 1.207-29.63 2.597-44.443 3.928-11.357 1.021-22.737 1.855-34.064 3.154-15.241 1.75-30.458 3.746-45.654 5.856-16.343 2.27-32.75 4.263-48.95 7.326-28.293 5.348-56.174 12.428-83.926 22.81z' fill='#2c71a1' /><path d='M185.21 308.158c27.374-10.3 55.255-17.38 83.548-22.73 16.2-3.062 32.607-5.055 48.95-7.325 15.196-2.11 30.413-4.107 45.654-5.856 11.327-1.299 22.707-2.133 34.064-3.154 14.813-1.331 29.62-2.721 44.443-3.928 6.77-.55 13.566-.893 20.357-1.037 19.95-.424 39.943-1.63 59.846-.795 23.426.983 46.781 3.718 70.141 5.964 1.35.13 3.578 2.742 3.514 4.112-.45 9.74-1.788 19.445-2.076 29.184-.392 13.258-.107 26.535-.087 39.804 0 .819.362 1.645.317 2.454-.876 15.888 3.131 31.103 7.176 46.145 6.33 23.545 16.404 45.32 35.249 61.762 5.431 4.738 11.869 8.319 17.806 12.487.989.694 1.775 1.676 2.655 2.525-1.061.95-1.967 2.26-3.207 2.795-15.372 6.621-30.634 13.54-46.236 19.576a567.756 567.756 0 0 1-83.14 25.058c-24.653 5.413-49.446 10.264-74.308 14.616-18.838 3.297-37.848 5.705-56.847 7.958a483.46 483.46 0 0 1-39.068 3.048c-26.394.975-52.831 2.442-79.207 1.824-31.492-.738-62.72-5.104-92.158-17.14-24.637-10.073-44.688-26.004-56.833-50.359-6.923-13.884-11.189-28.69-12.6-44.154-1.052-11.537-1.928-23.138-1.934-34.71-.006-13.29 2.49-26.34 7.29-38.777 1.336-3.46 3.74-6.67 6.214-9.504 14.853-17.017 33.635-28.357 54.226-37.019 1.99-.837 3.916-1.825 6.251-2.824m201.146 114.733c3.146 6.947 5.851 14.138 9.519 20.798 11.592 21.054 26.994 38.551 49.189 48.882 24.235 11.28 46.022 5.832 61.441-13.842 16.128-20.578 19.654-45.064 17.3-70.257-1.75-18.72-7.447-36.601-16.597-53.217-11.632-21.12-27.003-38.54-49.269-48.838-17.506-8.097-34.753-7.824-50.904 3.538-9.657 6.795-15.44 16.686-20.256 27.253-8.104 17.78-9.529 36.447-6.972 55.437 1.337 9.936 4.121 19.677 6.549 30.246m-205.288 6.26c.279.95.58 1.896.834 2.855 8.37 31.684 24.064 58.327 52.575 76.068 10.332 6.429 21.605 10.803 33.816 9.782 15.072-1.262 26.844-9.179 34.787-21.995 12.524-20.21 15.326-42.372 11.611-65.506-2.51-15.637-7.657-30.41-15.519-44.222-11.426-20.073-26.468-36.252-47.802-46.146-21.335-9.894-40.216-5.203-53.795 9.063-12.745 13.39-17.955 30.418-18.49 48.578-.301 10.198 1.181 20.449 1.983 31.522z' /><path d='M386.208 422.521c-2.28-10.199-5.064-19.94-6.401-29.876-2.557-18.99-1.132-37.658 6.972-55.437 4.817-10.567 10.599-20.458 20.256-27.253 16.15-11.362 33.398-11.635 50.904-3.538 22.266 10.298 37.637 27.718 49.269 48.838 9.15 16.616 14.848 34.497 16.597 53.217 2.354 25.193-1.172 49.679-17.3 70.257-15.419 19.674-37.206 25.123-61.441 13.842-22.195-10.33-37.597-27.828-49.19-48.882-3.667-6.66-6.372-13.85-9.666-21.168m25.884-3.891c-.513 8.802.736 17.129 6.055 24.535 9.544 13.288 26.966 12.323 35.396.758 8.54-11.714 9.476-24.526 4.363-37.58-5.39-13.761-18.67-20.01-30.185-14.433-10.514 5.093-14.972 14.421-15.629 26.72zM181.007 428.727c-.74-10.65-2.223-20.901-1.923-31.1.536-18.16 5.746-35.187 18.491-48.577 13.579-14.266 32.46-18.957 53.795-9.063 21.334 9.894 36.376 26.073 47.802 46.146 7.862 13.811 13.009 28.585 15.52 44.222 3.714 23.134.912 45.296-11.612 65.506-7.943 12.816-19.715 20.733-34.787 21.995-12.21 1.021-23.484-3.353-33.816-9.782-28.511-17.741-44.204-44.384-52.575-76.068-.253-.959-.555-1.904-.895-3.28m22.423 22.124c.91 3.328 1.434 6.827 2.808 9.951 3.527 8.018 9.159 13.987 18.316 15.025 9.436 1.07 16.428-2.542 21.25-11.198 8.09-14.52 8.726-28.544-.864-42.536-7.955-11.606-26.807-11.4-35 .093-6.043 8.476-7.465 17.831-6.51 28.665z' fill='#fff' /><path d='M412.092 418.16c.657-11.829 5.115-21.157 15.63-26.25 11.515-5.577 24.794.672 30.184 14.433 5.113 13.054 4.178 25.866-4.363 37.58-8.43 11.565-25.852 12.53-35.396-.758-5.319-7.406-6.568-15.733-6.055-25.006zM203.28 450.427c-.805-10.41.617-19.766 6.66-28.242 8.193-11.492 27.045-11.699 35-.093 9.59 13.992 8.954 28.016.865 42.536-4.823 8.656-11.815 12.268-21.25 11.198-9.158-1.038-14.79-7.007-18.317-15.025-1.374-3.124-1.897-6.623-2.958-10.374z' /></svg>"},o=class{constructor(c,t=[],a={}){this.lightbox=c,this.providers=t.filter(e),this.organizationId=a.organizationId,this.eventId=a.eventId,c.on("init",()=>{this.initPswpEvents(c.pswp)})}trackClick(c,e){this.organizationId&&this.eventId&&t.post(a.TRACK_EVENT,{json:{kind:"image-search",organizationId:this.organizationId,eventId:this.eventId,contentId:e,provider:c,surface:"lightbox"},headers:{"x-org-id":this.organizationId}}).catch(()=>{})}initPswpEvents(t){if(0===this.providers.length)return;const a=()=>{const a=t.currSlide?.data?.type?.toLowerCase()===c.IMAGE.toLowerCase();t.element?.classList.toggle("pswp--image-search-allowed",a)};t.on("change",a),t.on("afterInit",a),t.on("uiRegister",()=>{this.providers.forEach(a=>{const e=i[a];t.ui.registerElement({name:`image-search-button-${a}`,className:"pswp__button--image-search-button",order:7,isButton:!0,tagName:"button",title:`Search this image on ${e.label}`,html:{isCustomSVG:!0,inner:r[a],outlineID:`pswp__icn-image-search-${a}`},onClick:(t,i,r)=>{const o=r.currSlide?.data;o?.type?.toLowerCase()===c.IMAGE.toLowerCase()&&o.src&&(window.open(e.buildUrl(o.src),"_blank","noopener,noreferrer"),this.trackClick(a,o.id))}})})})}};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as t,D as i,E as s,O as e,S as o,T as n,_ as a,b as r,d as h,f as p,g as l,h as c,m as d,p as m,v as u,w as _,x as v,y as g}from"./Cr5o77zq.js";var y=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&r(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:i,dragAxis:s}=this.gestures,{currSlide:e}=this.pswp;if("y"===s&&this.pswp.options.closeOnVerticalDrag&&e&&e.currZoomLevel<=e.zoomLevels.fit&&!this.gestures.isMultitouch){const s=e.pan.y+(t.y-i.y);if(!this.pswp.dispatch("verticalDrag",{panY:s}).defaultPrevented){this._setPanWithFriction("y",s,.6);const t=1-Math.abs(this._getVerticalDragRatio(e.pan.y));this.pswp.applyBgOpacity(t),e.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),e&&(_(e.pan),e.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:s}=this.pswp;let e=0;if(this.pswp.animations.stopAll(),i.isShifted()){const s=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&s<0||t.x<.1&&s<-.5?(e=1,t.x=Math.min(t.x,0)):(t.x>.5&&s>0||t.x>-.1&&s>.5)&&(e=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(e,!0,t.x,!0)}s&&s.currZoomLevel>s.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:i}=this.gestures,{currSlide:s}=this.pswp;if(!s)return;const{pan:e,bounds:o}=s,n=e[t],r=this.pswp.bgOpacity<1&&"y"===t,h=n+i[t]*.995/(1-.995);if(r){const t=this._getVerticalDragRatio(n),i=this._getVerticalDragRatio(h);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const p=o.correctPan(t,h);if(n===p)return;const l=p===h?1:.82,c=this.pswp.bgOpacity,d=p-n;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:n,end:p,velocity:i[t],dampingRatio:l,onUpdate:i=>{if(r&&this.pswp.bgOpacity<1){const t=1-(p-i)/d;this.pswp.applyBgOpacity(a(c+(1-c)*t,0,1))}e[t]=Math.floor(i),s.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:i,dragAxis:s,prevP1:e,isMultitouch:o}=this.gestures,{currSlide:n,mainScroll:a}=this.pswp,r=i[t]-e[t],h=a.x+r;if(!r||!n)return!1;if("x"===t&&!n.isPannable()&&!o)return a.moveTo(h,!0),!0;const{bounds:p}=n,l=n.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===s&&"x"===t&&!o){const i=a.getCurrSlideX(),s=a.x-i,e=r>0,o=!e;if(l>p.min[t]&&e){if(p.min[t]<=this.startPan[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(l<p.max[t]&&o){if(this.startPan[t]<=p.max[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(0!==s){if(s>0)return a.moveTo(Math.max(h,i),!0),!0;if(s<0)return a.moveTo(Math.min(h,i),!0),!0}else this._setPanWithFriction(t,l)}else"y"===t&&(a.isShifted()||p.min.y===p.max.y)||this._setPanWithFriction(t,l);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,i,s){const{currSlide:e}=this.pswp;if(!e)return;const{pan:o,bounds:n}=e;if(n.correctPan(t,i)!==i||s){const e=Math.round(i-o[t]);o[t]+=e*(s||.35)}else o[t]=i}};function w(t){return!!t.target.closest(".pswp__container")}var f=class{constructor(t){this.gestures=t}click(t,i){const s=i.target.classList,e=s.contains("pswp__img"),o=s.contains("pswp__item")||s.contains("pswp__zoom-wrap");e?this._doClickOrTapAction("imageClick",t,i):o&&this._doClickOrTapAction("bgClick",t,i)}tap(t,i){w(i)&&this._doClickOrTapAction("tap",t,i)}doubleTap(t,i){w(i)&&this._doClickOrTapAction("doubleTap",t,i)}_doClickOrTapAction(t,i,s){const{pswp:e}=this.gestures,{currSlide:o}=e,n=`${t}Action`,a=e.options[n];if(!e.dispatch(n,{point:i,originalEvent:s}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":e[a]();break;case"zoom":o?.toggleZoom(i);break;case"zoom-or-close":o?.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(i):e.options.clickToCloseNonZoomable&&e.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else a.call(e,i,s)}};function P(t,i,s){return t.x=(i.x+s.x)/2,t.y=(i.y+s.y)/2,t}var x=class{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,r(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:i,p2:s,startP2:e,pswp:o}=this.gestures,{currSlide:n}=o;if(!n)return;const a=n.zoomLevels.min,r=n.zoomLevels.max;if(!n.isZoomable()||o.mainScroll.isShifted())return;P(this._startZoomPoint,i,e),P(this._zoomPoint,t,s);let h=1/v(i,e)*v(t,s)*this._startZoomLevel;if(h>n.zoomLevels.initial+n.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),h<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=n.zoomLevels.initial){const t=1-(a-h)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||o.applyBgOpacity(t)}else h=a-.15*(a-h);else h>r&&(h=r+.05*(h-r));n.pan.x=this._calculatePanForZoomLevel("x",h),n.pan.y=this._calculatePanForZoomLevel("y",h),n.setZoomLevel(h),n.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,i){const s=i/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*s}correctZoomPan(t){const{pswp:i}=this.gestures,{currSlide:s}=i;if(!s?.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const e=s.currZoomLevel;let n,h=!0;e<s.zoomLevels.initial?n=s.zoomLevels.initial:e>s.zoomLevels.max?n=s.zoomLevels.max:(h=!1,n=e);const p=i.bgOpacity,l=i.bgOpacity<1,c=r({x:0,y:0},s.pan);let d=r({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=e,r(this._startPan,c)),h&&(d={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),s.setZoomLevel(n),d={x:s.bounds.correctPan("x",d.x),y:s.bounds.correctPan("y",d.y)},s.setZoomLevel(e);const m=!o(d,c);if(!m&&!h&&!l)return s._setResolution(n),void s.applyCurrentZoomPan();i.animations.stopAllPan(),i.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,m||h){if(m&&(s.pan.x=c.x+(d.x-c.x)*t,s.pan.y=c.y+(d.y-c.y)*t),h){const i=e+(n-e)*t;s.setZoomLevel(i)}s.applyCurrentZoomPan()}l&&i.bgOpacity<1&&i.applyBgOpacity(a(p+(1-p)*t,0,1))},onComplete:()=>{s._setResolution(n),s.applyCurrentZoomPan()}})}},S=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new y(this),this.zoomLevels=new x(this),this.tapHandler=new f(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,i,s,e){const{pswp:o}=this,{events:n}=o,a=e?t+e:"";n.add(o.scrollWrap,t+i,this.onPointerDown.bind(this)),n.add(window,`${t}move`,this.onPointerMove.bind(this)),n.add(window,t+s,this.onPointerUp.bind(this)),a&&n.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const i="mousedown"===t.type||"mouse"===t.pointerType;if(i&&t.button>0)return;const{pswp:s}=this;s.opener.isOpen?s.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(s.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),s.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,r(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,r(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?o(this.p1,this.prevP1)||this.drag.change():o(this.p1,this.prevP1)&&o(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const i=Date.now(),s=i-this._intervalTime;s<50&&!t||(this.velocity.x=this._getVelocity("x",s),this.velocity.y=this._getVelocity("y",s),this._intervalTime=i,r(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:i}=this.pswp;if(i.isShifted())return void i.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const s=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),v(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(r(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},s))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,i){const s=this.p1[t]-this._intervalP1[t];return Math.abs(s)>1&&i>5?s/i:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}_updatePoints(t,i){if(this._pointerEventEnabled){const s=t,e=this._ongoingPointers.findIndex(t=>t.id===s.pointerId);"up"===i&&e>-1?this._ongoingPointers.splice(e,1):"down"===i&&-1===e?this._ongoingPointers.push(this._convertEventPosToPoint(s,{x:0,y:0})):e>-1&&this._convertEventPosToPoint(s,this._ongoingPointers[e]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&r(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&r(this.p2,this._ongoingPointers[1])}else{const s=t;this._numActivePoints=0,s.type.indexOf("touch")>-1?s.touches&&s.touches.length>0&&(this._convertEventPosToPoint(s.touches[0],this.p1),this._numActivePoints++,s.touches.length>1&&(this._convertEventPosToPoint(s.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===i?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){r(this.prevP1,this.p1),r(this.prevP2,this.p2)}_updateStartPoints(){r(this.startP1,this.p1),r(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}_convertEventPosToPoint(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:void 0!==t.identifier&&(i.id=t.identifier),i}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},b=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:i}=this.slide,s=this.slide["x"===t?"width":"height"]*this.currZoomLevel,e=l("x"===t?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-s)/2)+e,this.max[t]=s>o?Math.round(o-s)+e:this.center[t],this.min[t]=s>o?e:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return a(i,this.max[t],this.min[t])}},T=class{constructor(t,i,s){this.data=t,this.index=i,this.pswp=s,this.isActive=i===s.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!s.opener.isOpen,this.zoomLevels=new m(s.options,t,i,s),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=u("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new b(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const i=this.currentResolution||this.zoomLevels.initial;if(!i)return;const s=Math.round(this.width*i)||this.pswp.viewportSize.x,e=Math.round(this.height*i)||this.pswp.viewportSize.y;(this.sizeChanged(s,e)||t)&&this.content.setDisplayedSize(s,e)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,i,s,e){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:i,transitionDuration:s}),o.animations.stopAllPan();const n=this.currZoomLevel;e||(t=a(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",i,n),this.pan.y=this.calculateZoomToPanOffset("y",i,n),_(this.pan);const r=()=>{this._setResolution(t),this.applyCurrentZoomPan()};s?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:r,duration:s,easing:o.options.easing}):r()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,s){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),s||(s=this.zoomLevels.initial);const e=this.currZoomLevel/s;return this.bounds.correctPan(t,(this.pan[t]-i[t])*e+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),r(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,i,s){s/=this.currentResolution||this.zoomLevels.initial,n(this.container,t,i,s)}calculateSize(){const{pswp:t}=this;r(this.panAreaSize,d(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return e(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function L(t,i,s){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(t.disabled=s?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))})}var z={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:L},A={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,i)=>{L(t,i,!0)}},C={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},Z={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},I={name:"counter",order:5,onInit:(t,i)=>{i.on("change",()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}},O={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,i)=>{let s,e=null;const o=i=>{var e;s!==i&&(s=i,e=i,t.classList.toggle("pswp__preloader--active",e))},n=()=>{if(!i.currSlide?.content.isLoading())return o(!1),void(e&&(clearTimeout(e),e=null));e||(e=setTimeout(()=>{o(Boolean(i.currSlide?.content.isLoading())),e=null},i.options.preloaderDelay))};i.on("change",n),i.on("loadComplete",t=>{i.currSlide===t.slide&&n()}),i.ui&&(i.ui.updatePreloaderVisibility=n)}},D=class{constructor(t,i){const s=i.name||i.className;let e=i.html;if(!1===t.options[s])return;"string"==typeof t.options[`${s}SVG`]&&(e=t.options[`${s}SVG`]),t.dispatch("uiElementCreate",{data:i});let o="";i.isButton?(o+="pswp__button ",o+=i.className||`pswp__button--${i.name}`):o+=i.className||`pswp__${i.name}`;let n=i.isButton?i.tagName||"button":i.tagName||"div";n=n.toLowerCase();const a=u(o,n);if(i.isButton){"button"===n&&(a.type="button");let{title:e}=i;const{ariaLabel:o}=i;"string"==typeof t.options[`${s}Title`]&&(e=t.options[`${s}Title`]),e&&(a.title=e);const r=o||e;r&&a.setAttribute("aria-label",r)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let s='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return s=s.split("%d").join(i.size||32),i.outlineID&&(s+=`<use class="pswp__icn-shadow" xlink:href="#${i.outlineID}"/>`),s+=i.inner,s+="</svg>",s}(e),i.onInit&&i.onInit(a,t),i.onClick&&(a.onclick=s=>{"string"==typeof i.onClick?t[i.onClick]():"function"==typeof i.onClick&&i.onClick(s,a,t)});const r=i.appendTo||"bar";let h=t.element;"bar"===r?(t.topBar||(t.topBar=u("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),h=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===r&&(h=t.scrollWrap)),h?.appendChild(t.applyFilters("uiElement",a,i))}};function E(t,i){t.classList.toggle("pswp--zoomed-in",i)}var B=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[C,z,A,Z,O,I],t.dispatch("uiRegister"),this.uiElementsData.sort((t,i)=>(t.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new D(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:i,options:s}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:e}=i;if(this.pswp.opener.isOpen||(e=i.zoomLevels.initial),e===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=e;const o=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(o)<.01||!i.isZoomable())return E(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),E(t,(e===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=e),"zoom"!==s.imageClickAction&&"zoom-or-close"!==s.imageClickAction||t.classList.add("pswp--click-to-zoom")}},M="cubic-bezier(.4,0,.22,1)",F=class{constructor(t){this.props=t;const{target:i,onComplete:e,transform:o,onFinish:n=()=>{},duration:a=333,easing:r=M}=t;this.onFinish=n;const h=o?"transform":"opacity",p=t[h]??"";this._target=i,this._onComplete=e,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{s(i,h,a,r),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[h]=p},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),t(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},R=class{constructor(t,i,s){this.velocity=1e3*t,this._dampingRatio=i||.75,this._naturalFrequency=s||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,i){let s,e=0;i/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*i);if(1===this._dampingRatio)s=this.velocity+this._naturalFrequency*t,e=(t+s*i)*o,this.velocity=e*-this._naturalFrequency+s*o;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const n=Math.cos(this._dampedFrequency*i),a=Math.sin(this._dampedFrequency*i);e=o*(t*n+s*a),this.velocity=e*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*s*n)}return e}},k=class{constructor(t){this.props=t,this._raf=0;const{start:i,end:s,velocity:e,onUpdate:o,onComplete:n,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:h}=t;this.onFinish=a;const p=new R(e,r,h);let l=Date.now(),c=i-s;const d=()=>{this._raf&&(c=p.easeFrame(c,Date.now()-l),Math.abs(c)<1&&Math.abs(p.velocity)<50?(o(s),n&&n(),this.onFinish()):(l=Date.now(),o(c+s),this._raf=requestAnimationFrame(d)))};this._raf=requestAnimationFrame(d)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},H=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,i){const s=i?new k(t):new F(t);return this.activeAnimations.push(s),s.onFinish=()=>this.stop(s),s}stop(t){t.destroy();const i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}},W=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{W=!0}}))}catch(J){}var N=class{constructor(){this._pool=[]}add(t,i,s,e){this._toggleListener(t,i,s,e)}remove(t,i,s,e){this._toggleListener(t,i,s,e,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,i,s,e,o,n){if(!t)return;const a=o?"removeEventListener":"addEventListener";i.split(" ").forEach(i=>{if(i){n||(o?this._pool=this._pool.filter(e=>e.type!==i||e.listener!==s||e.target!==t):this._pool.push({target:t,type:i,listener:s,passive:e}));const r=!!W&&{passive:e||!1};t[a](i,s,r)}})}},V={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},q=(t,i)=>i?t:V[t],U=class{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const i=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&i&&this._wasFocused&&i.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:s}=this;if(s.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(i(t))return;let e,o,n=!1;const a="key"in t;switch(a?t.key:t.keyCode){case q("Escape",a):s.options.escKey&&(e="close");break;case q("z",a):e="toggleZoom";break;case q("ArrowLeft",a):o="x";break;case q("ArrowUp",a):o="y";break;case q("ArrowRight",a):o="x",n=!0;break;case q("ArrowDown",a):n=!0,o="y";break;case q("Tab",a):this._focusRoot()}if(o){t.preventDefault();const{currSlide:i}=s;s.options.arrowKeys&&"x"===o&&s.getNumItems()>1?e=n?"next":"prev":i&&i.currZoomLevel>i.zoomLevels.fit&&(i.pan[o]+=n?-80:80,i.panTo(i.pan.x,i.pan.y))}e&&(t.preventDefault(),s[e]())}_onFocusIn(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}},$=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:i}=this,s=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),e=s!==this.slideWidth;e&&(this.slideWidth=s,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((i,s)=>{e&&n(i.el,(s+this._containerShiftIndex)*this.slideWidth),t&&i.slide&&i.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const i=u("pswp__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===t?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,s){const{pswp:e}=this;let o=e.potentialIndex+t;const n=e.getNumItems();if(e.canLoop()){o=e.getLoopedIndex(o);const i=(t+n)%n;t=i<=n/2?i:i-n}else o<0?o=0:o>=n&&(o=n-1),t=o-e.potentialIndex;e.potentialIndex=o,this._currPositionIndex-=t,e.animations.stopMainScroll();const a=this.getCurrSlideX();if(i){e.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:s||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),e.appendHeavy()}});let t=e.potentialIndex-e.currIndex;if(e.canLoop()){const i=(t+n)%n;t=i<=n/2?i:i-n}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let s,e=Math.abs(i);e>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),e=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let o=0;o<e;o++)i>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,n(s.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(s,t.currIndex-e+o+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,n(s.el,this._containerShiftIndex*this.slideWidth),t.setContent(s,t.currIndex+e-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,i)=>{t.slide&&t.slide.setIsActive(1===i)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(i),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+.35*s)}this.x=t,this.pswp.container&&n(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:i??!1})}},G=.003,X=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,i=this.pswp.currSlide,{options:s}=t;if("fade"===s.showHideAnimationType?(s.showHideOpacity=!0,this._thumbBounds=void 0):"none"===s.showHideAnimationType?(s.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=i?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&i?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=s.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>G,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(G)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=`${t.viewportSize.x}px`)):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(G)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(G)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(G)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let i=!1,s=!0;g(this._placeholder).finally(()=>{i=!0,s||t(!0)}),setTimeout(()=>{s=!1,i&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",`${this._duration}ms`),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:i}=this,{innerRect:s}=this._thumbBounds,{currSlide:o,viewportSize:a}=i;if(this._croppedZoom&&s&&this._cropContainer1&&this._cropContainer2){const i=-a.x+(this._thumbBounds.x-s.x)+s.w,o=-a.y+(this._thumbBounds.y-s.y)+s.h,r=a.x-s.w,h=a.y-s.h;t?(this._animateTo(this._cropContainer1,"transform",e(i,o)),this._animateTo(this._cropContainer2,"transform",e(r,h))):(n(this._cropContainer1,i,o),n(this._cropContainer2,r,h))}o&&(r(o.pan,s||this._thumbBounds),o.currZoomLevel=this._thumbBounds.w/o.width,t?this._animateTo(o.container,"transform",o.getCurrentTransform()):o.applyCurrentZoomPan())}_animateTo(t,i,s){if(!this._duration)return void(t.style[i]=s);const{animations:e}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{e.activeAnimations.length||this._onAnimationComplete()},target:t};o[i]=s,e.startTransition(o)}},K=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:i}=this.pswp;let{deltaX:s,deltaY:e}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let s=-e;1===t.deltaMode?s*=.05:s*=t.deltaMode?1:.002,s=2**s;const o=i.currZoomLevel*s;i.zoomTo(o,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(s*=18,e*=18),i.panTo(i.pan.x-s,i.pan.y-e))}},Y={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},j=class extends h{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new N,this.animations=new H,this.mainScroll=new $(this),this.gestures=new S(this),this.opener=new X(this),this.keyboard=new U(this),this.contentLoader=new p(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=` ${this.options.mainClass}`),this.element&&(this.element.className+=` ${t}`),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new K(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),a(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((i,s)=>{let e=(this.currSlide?.index??0)-1+s;this.canLoop()&&(e=this.getLoopedIndex(e)),e===t&&(this.setContent(i,t,!0),1===s&&(this.currSlide=i.slide,i.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,i,s){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!s)return;t.slide.destroy(),t.slide=void 0}!this.canLoop()&&(i<0||i>=this.getNumItems())||(t.slide=new T(this.getItemData(i),i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el))}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const i=c(this.options,this);!t&&o(i,this._prevViewportSize)||(r(this._prevViewportSize,i),this.dispatch("beforeResize"),r(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=u("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=u("pswp__bg","div",this.element),this.scrollWrap=u("pswp__scroll-wrap","section",this.element),this.container=u("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new B(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,s){const e=s.dispatch("thumbBounds",{index:t,itemData:i,instance:s});if(e.thumbBounds)return e.thumbBounds;const{element:o}=i;let n,a;if(o&&!1!==s.options.thumbSelector){const t=s.options.thumbSelector||"img";a=o.matches(t)?o:o.querySelector(t)}return a=s.applyFilters("thumbEl",a,i,t),a&&(n=i.thumbCropped?function(t,i,s){const e=t.getBoundingClientRect(),o=e.width/i,n=e.height/s,a=o>n?o:n,r=(e.width-i*a)/2,h=(e.height-s*a)/2,p={x:e.left+r,y:e.top+h,w:i*a};return p.innerRect={w:e.width,h:e.height,x:r,y:h},p}(a,i.width||i.w||0,i.height||i.h||0):function(t){const i=t.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}(a)),s.applyFilters("thumbBounds",n,i,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...Y,...t}}};export{j as default};
|
|
1
|
+
import{C as t,D as i,E as s,O as e,S as o,T as n,_ as a,b as r,d as h,f as p,g as l,h as c,m as d,p as u,v as m,w as _,x as v,y as g}from"./FE0pIRqe.js";var y=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&r(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:i,dragAxis:s}=this.gestures,{currSlide:e}=this.pswp;if("y"===s&&this.pswp.options.closeOnVerticalDrag&&e&&e.currZoomLevel<=e.zoomLevels.fit&&!this.gestures.isMultitouch){const s=e.pan.y+(t.y-i.y);if(!this.pswp.dispatch("verticalDrag",{panY:s}).defaultPrevented){this._setPanWithFriction("y",s,.6);const t=1-Math.abs(this._getVerticalDragRatio(e.pan.y));this.pswp.applyBgOpacity(t),e.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),e&&(_(e.pan),e.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:s}=this.pswp;let e=0;if(this.pswp.animations.stopAll(),i.isShifted()){const s=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&s<0||t.x<.1&&s<-.5?(e=1,t.x=Math.min(t.x,0)):(t.x>.5&&s>0||t.x>-.1&&s>.5)&&(e=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(e,!0,t.x,!0)}s&&s.currZoomLevel>s.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:i}=this.gestures,{currSlide:s}=this.pswp;if(!s)return;const{pan:e,bounds:o}=s,n=e[t],r=this.pswp.bgOpacity<1&&"y"===t,h=n+i[t]*.995/(1-.995);if(r){const t=this._getVerticalDragRatio(n),i=this._getVerticalDragRatio(h);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const p=o.correctPan(t,h);if(n===p)return;const l=p===h?1:.82,c=this.pswp.bgOpacity,d=p-n;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:n,end:p,velocity:i[t],dampingRatio:l,onUpdate:i=>{if(r&&this.pswp.bgOpacity<1){const t=1-(p-i)/d;this.pswp.applyBgOpacity(a(c+(1-c)*t,0,1))}e[t]=Math.floor(i),s.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:i,dragAxis:s,prevP1:e,isMultitouch:o}=this.gestures,{currSlide:n,mainScroll:a}=this.pswp,r=i[t]-e[t],h=a.x+r;if(!r||!n)return!1;if("x"===t&&!n.isPannable()&&!o)return a.moveTo(h,!0),!0;const{bounds:p}=n,l=n.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===s&&"x"===t&&!o){const i=a.getCurrSlideX(),s=a.x-i,e=r>0,o=!e;if(l>p.min[t]&&e){if(p.min[t]<=this.startPan[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(l<p.max[t]&&o){if(this.startPan[t]<=p.max[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(0!==s){if(s>0)return a.moveTo(Math.max(h,i),!0),!0;if(s<0)return a.moveTo(Math.min(h,i),!0),!0}else this._setPanWithFriction(t,l)}else"y"===t&&(a.isShifted()||p.min.y===p.max.y)||this._setPanWithFriction(t,l);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,i,s){const{currSlide:e}=this.pswp;if(!e)return;const{pan:o,bounds:n}=e;if(n.correctPan(t,i)!==i||s){const e=Math.round(i-o[t]);o[t]+=e*(s||.35)}else o[t]=i}};function w(t){return!!t.target.closest(".pswp__container")}var f=class{constructor(t){this.gestures=t}click(t,i){const s=i.target.classList,e=s.contains("pswp__img"),o=s.contains("pswp__item")||s.contains("pswp__zoom-wrap");e?this._doClickOrTapAction("imageClick",t,i):o&&this._doClickOrTapAction("bgClick",t,i)}tap(t,i){w(i)&&this._doClickOrTapAction("tap",t,i)}doubleTap(t,i){w(i)&&this._doClickOrTapAction("doubleTap",t,i)}_doClickOrTapAction(t,i,s){const{pswp:e}=this.gestures,{currSlide:o}=e,n=`${t}Action`,a=e.options[n];if(!e.dispatch(n,{point:i,originalEvent:s}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":e[a]();break;case"zoom":o?.toggleZoom(i);break;case"zoom-or-close":o?.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(i):e.options.clickToCloseNonZoomable&&e.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else a.call(e,i,s)}};function P(t,i,s){return t.x=(i.x+s.x)/2,t.y=(i.y+s.y)/2,t}var x=class{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,r(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:i,p2:s,startP2:e,pswp:o}=this.gestures,{currSlide:n}=o;if(!n)return;const a=n.zoomLevels.min,r=n.zoomLevels.max;if(!n.isZoomable()||o.mainScroll.isShifted())return;P(this._startZoomPoint,i,e),P(this._zoomPoint,t,s);let h=1/v(i,e)*v(t,s)*this._startZoomLevel;if(h>n.zoomLevels.initial+n.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),h<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=n.zoomLevels.initial){const t=1-(a-h)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||o.applyBgOpacity(t)}else h=a-.15*(a-h);else h>r&&(h=r+.05*(h-r));n.pan.x=this._calculatePanForZoomLevel("x",h),n.pan.y=this._calculatePanForZoomLevel("y",h),n.setZoomLevel(h),n.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,i){const s=i/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*s}correctZoomPan(t){const{pswp:i}=this.gestures,{currSlide:s}=i;if(!s?.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const e=s.currZoomLevel;let n,h=!0;e<s.zoomLevels.initial?n=s.zoomLevels.initial:e>s.zoomLevels.max?n=s.zoomLevels.max:(h=!1,n=e);const p=i.bgOpacity,l=i.bgOpacity<1,c=r({x:0,y:0},s.pan);let d=r({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=e,r(this._startPan,c)),h&&(d={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),s.setZoomLevel(n),d={x:s.bounds.correctPan("x",d.x),y:s.bounds.correctPan("y",d.y)},s.setZoomLevel(e);const u=!o(d,c);if(!u&&!h&&!l)return s._setResolution(n),void s.applyCurrentZoomPan();i.animations.stopAllPan(),i.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,u||h){if(u&&(s.pan.x=c.x+(d.x-c.x)*t,s.pan.y=c.y+(d.y-c.y)*t),h){const i=e+(n-e)*t;s.setZoomLevel(i)}s.applyCurrentZoomPan()}l&&i.bgOpacity<1&&i.applyBgOpacity(a(p+(1-p)*t,0,1))},onComplete:()=>{s._setResolution(n),s.applyCurrentZoomPan()}})}},S=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new y(this),this.zoomLevels=new x(this),this.tapHandler=new f(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,i,s,e){const{pswp:o}=this,{events:n}=o,a=e?t+e:"";n.add(o.scrollWrap,t+i,this.onPointerDown.bind(this)),n.add(window,`${t}move`,this.onPointerMove.bind(this)),n.add(window,t+s,this.onPointerUp.bind(this)),a&&n.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const i="mousedown"===t.type||"mouse"===t.pointerType;if(i&&t.button>0)return;const{pswp:s}=this;s.opener.isOpen?s.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(s.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),s.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,r(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,r(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?o(this.p1,this.prevP1)||this.drag.change():o(this.p1,this.prevP1)&&o(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const i=Date.now(),s=i-this._intervalTime;s<50&&!t||(this.velocity.x=this._getVelocity("x",s),this.velocity.y=this._getVelocity("y",s),this._intervalTime=i,r(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:i}=this.pswp;if(i.isShifted())return void i.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const s=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),v(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(r(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},s))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,i){const s=this.p1[t]-this._intervalP1[t];return Math.abs(s)>1&&i>5?s/i:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}_updatePoints(t,i){if(this._pointerEventEnabled){const s=t,e=this._ongoingPointers.findIndex(t=>t.id===s.pointerId);"up"===i&&e>-1?this._ongoingPointers.splice(e,1):"down"===i&&-1===e?this._ongoingPointers.push(this._convertEventPosToPoint(s,{x:0,y:0})):e>-1&&this._convertEventPosToPoint(s,this._ongoingPointers[e]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&r(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&r(this.p2,this._ongoingPointers[1])}else{const s=t;this._numActivePoints=0,s.type.indexOf("touch")>-1?s.touches&&s.touches.length>0&&(this._convertEventPosToPoint(s.touches[0],this.p1),this._numActivePoints++,s.touches.length>1&&(this._convertEventPosToPoint(s.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===i?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){r(this.prevP1,this.p1),r(this.prevP2,this.p2)}_updateStartPoints(){r(this.startP1,this.p1),r(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}_convertEventPosToPoint(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:void 0!==t.identifier&&(i.id=t.identifier),i}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},b=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:i}=this.slide,s=this.slide["x"===t?"width":"height"]*this.currZoomLevel,e=l("x"===t?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-s)/2)+e,this.max[t]=s>o?Math.round(o-s)+e:this.center[t],this.min[t]=s>o?e:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return a(i,this.max[t],this.min[t])}},T=class{constructor(t,i,s){this.data=t,this.index=i,this.pswp=s,this.isActive=i===s.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!s.opener.isOpen,this.zoomLevels=new u(s.options,t,i,s),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=m("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new b(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const i=this.currentResolution||this.zoomLevels.initial;if(!i)return;const s=Math.round(this.width*i)||this.pswp.viewportSize.x,e=Math.round(this.height*i)||this.pswp.viewportSize.y;(this.sizeChanged(s,e)||t)&&this.content.setDisplayedSize(s,e)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,i,s,e){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:i,transitionDuration:s}),o.animations.stopAllPan();const n=this.currZoomLevel;e||(t=a(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",i,n),this.pan.y=this.calculateZoomToPanOffset("y",i,n),_(this.pan);const r=()=>{this._setResolution(t),this.applyCurrentZoomPan()};s?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:r,duration:s,easing:o.options.easing}):r()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,s){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),s||(s=this.zoomLevels.initial);const e=this.currZoomLevel/s;return this.bounds.correctPan(t,(this.pan[t]-i[t])*e+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),r(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,i,s){s/=this.currentResolution||this.zoomLevels.initial,n(this.container,t,i,s)}calculateSize(){const{pswp:t}=this;r(this.panAreaSize,d(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return e(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function L(t,i,s){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(t.disabled=s?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))})}var z={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:L},A={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,i)=>{L(t,i,!0)}},C={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},Z={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},I={name:"counter",order:5,onInit:(t,i)=>{i.on("change",()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}},O={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,i)=>{let s,e=null;const o=i=>{var e;s!==i&&(s=i,e=i,t.classList.toggle("pswp__preloader--active",e))},n=()=>{if(!i.currSlide?.content.isLoading())return o(!1),void(e&&(clearTimeout(e),e=null));e||(e=setTimeout(()=>{o(Boolean(i.currSlide?.content.isLoading())),e=null},i.options.preloaderDelay))};i.on("change",n),i.on("loadComplete",t=>{i.currSlide===t.slide&&n()}),i.ui&&(i.ui.updatePreloaderVisibility=n)}},D=class{constructor(t,i){const s=i.name||i.className;let e=i.html;if(!1===t.options[s])return;"string"==typeof t.options[`${s}SVG`]&&(e=t.options[`${s}SVG`]),t.dispatch("uiElementCreate",{data:i});let o="";i.isButton?(o+="pswp__button ",o+=i.className||`pswp__button--${i.name}`):o+=i.className||`pswp__${i.name}`;let n=i.isButton?i.tagName||"button":i.tagName||"div";n=n.toLowerCase();const a=m(o,n);if(i.isButton){"button"===n&&(a.type="button");let{title:e}=i;const{ariaLabel:o}=i;"string"==typeof t.options[`${s}Title`]&&(e=t.options[`${s}Title`]),e&&(a.title=e);const r=o||e;r&&a.setAttribute("aria-label",r)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let s='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return s=s.split("%d").join(i.size||32),i.outlineID&&(s+=`<use class="pswp__icn-shadow" xlink:href="#${i.outlineID}"/>`),s+=i.inner,s+="</svg>",s}(e),i.onInit&&i.onInit(a,t),i.onClick&&(a.onclick=s=>{"string"==typeof i.onClick?t[i.onClick]():"function"==typeof i.onClick&&i.onClick(s,a,t)});const r=i.appendTo||"bar";let h=t.element;"bar"===r?(t.topBar||(t.topBar=m("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),h=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===r&&(h=t.scrollWrap)),h?.appendChild(t.applyFilters("uiElement",a,i))}};function E(t,i){t.classList.toggle("pswp--zoomed-in",i)}var B=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[C,z,A,Z,O,I],t.dispatch("uiRegister"),this.uiElementsData.sort((t,i)=>(t.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new D(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:i,options:s}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:e}=i;if(this.pswp.opener.isOpen||(e=i.zoomLevels.initial),e===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=e;const o=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(o)<.01||!i.isZoomable())return E(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),E(t,(e===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=e),"zoom"!==s.imageClickAction&&"zoom-or-close"!==s.imageClickAction||t.classList.add("pswp--click-to-zoom")}},M="cubic-bezier(.4,0,.22,1)",F=class{constructor(t){this.props=t;const{target:i,onComplete:e,transform:o,onFinish:n=()=>{},duration:a=333,easing:r=M}=t;this.onFinish=n;const h=o?"transform":"opacity",p=t[h]??"";this._target=i,this._onComplete=e,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{s(i,h,a,r),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[h]=p},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),t(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},R=class{constructor(t,i,s){this.velocity=1e3*t,this._dampingRatio=i||.75,this._naturalFrequency=s||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,i){let s,e=0;i/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*i);if(1===this._dampingRatio)s=this.velocity+this._naturalFrequency*t,e=(t+s*i)*o,this.velocity=e*-this._naturalFrequency+s*o;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const n=Math.cos(this._dampedFrequency*i),a=Math.sin(this._dampedFrequency*i);e=o*(t*n+s*a),this.velocity=e*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*s*n)}return e}},k=class{constructor(t){this.props=t,this._raf=0;const{start:i,end:s,velocity:e,onUpdate:o,onComplete:n,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:h}=t;this.onFinish=a;const p=new R(e,r,h);let l=Date.now(),c=i-s;const d=()=>{this._raf&&(c=p.easeFrame(c,Date.now()-l),Math.abs(c)<1&&Math.abs(p.velocity)<50?(o(s),n&&n(),this.onFinish()):(l=Date.now(),o(c+s),this._raf=requestAnimationFrame(d)))};this._raf=requestAnimationFrame(d)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},H=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,i){const s=i?new k(t):new F(t);return this.activeAnimations.push(s),s.onFinish=()=>this.stop(s),s}stop(t){t.destroy();const i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}},W=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{W=!0}}))}catch(J){}var N=class{constructor(){this._pool=[]}add(t,i,s,e){this._toggleListener(t,i,s,e)}remove(t,i,s,e){this._toggleListener(t,i,s,e,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,i,s,e,o,n){if(!t)return;const a=o?"removeEventListener":"addEventListener";i.split(" ").forEach(i=>{if(i){n||(o?this._pool=this._pool.filter(e=>e.type!==i||e.listener!==s||e.target!==t):this._pool.push({target:t,type:i,listener:s,passive:e}));const r=!!W&&{passive:e||!1};t[a](i,s,r)}})}},V={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},q=(t,i)=>i?t:V[t],U=class{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const i=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&i&&this._wasFocused&&i.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:s}=this;if(s.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(i(t))return;let e,o,n=!1;const a="key"in t;switch(a?t.key:t.keyCode){case q("Escape",a):s.options.escKey&&(e="close");break;case q("z",a):e="toggleZoom";break;case q("ArrowLeft",a):o="x";break;case q("ArrowUp",a):o="y";break;case q("ArrowRight",a):o="x",n=!0;break;case q("ArrowDown",a):n=!0,o="y";break;case q("Tab",a):this._focusRoot()}if(o){t.preventDefault();const{currSlide:i}=s;s.options.arrowKeys&&"x"===o&&s.getNumItems()>1?e=n?"next":"prev":i&&i.currZoomLevel>i.zoomLevels.fit&&(i.pan[o]+=n?-80:80,i.panTo(i.pan.x,i.pan.y))}e&&(t.preventDefault(),s[e]())}_onFocusIn(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}},$=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:i}=this,s=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),e=s!==this.slideWidth;e&&(this.slideWidth=s,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((i,s)=>{e&&n(i.el,(s+this._containerShiftIndex)*this.slideWidth),t&&i.slide&&i.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const i=m("pswp__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===t?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,s){const{pswp:e}=this;let o=e.potentialIndex+t;const n=e.getNumItems();if(e.canLoop()){o=e.getLoopedIndex(o);const i=(t+n)%n;t=i<=n/2?i:i-n}else o<0?o=0:o>=n&&(o=n-1),t=o-e.potentialIndex;e.potentialIndex=o,this._currPositionIndex-=t,e.animations.stopMainScroll();const a=this.getCurrSlideX();if(i){e.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:s||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),e.appendHeavy()}});let t=e.potentialIndex-e.currIndex;if(e.canLoop()){const i=(t+n)%n;t=i<=n/2?i:i-n}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let s,e=Math.abs(i);e>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),e=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let o=0;o<e;o++)i>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,n(s.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(s,t.currIndex-e+o+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,n(s.el,this._containerShiftIndex*this.slideWidth),t.setContent(s,t.currIndex+e-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,i)=>{t.slide&&t.slide.setIsActive(1===i)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(i),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+.35*s)}this.x=t,this.pswp.container&&n(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:i??!1})}},G=.003,X=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,i=this.pswp.currSlide,{options:s}=t;if("fade"===s.showHideAnimationType?(s.showHideOpacity=!0,this._thumbBounds=void 0):"none"===s.showHideAnimationType?(s.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=i?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&i?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=s.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>G,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(G)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=`${t.viewportSize.x}px`)):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(G)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(G)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(G)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let i=!1,s=!0;g(this._placeholder).finally(()=>{i=!0,s||t(!0)}),setTimeout(()=>{s=!1,i&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",`${this._duration}ms`),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:i}=this,{innerRect:s}=this._thumbBounds,{currSlide:o,viewportSize:a}=i;if(this._croppedZoom&&s&&this._cropContainer1&&this._cropContainer2){const i=-a.x+(this._thumbBounds.x-s.x)+s.w,o=-a.y+(this._thumbBounds.y-s.y)+s.h,r=a.x-s.w,h=a.y-s.h;t?(this._animateTo(this._cropContainer1,"transform",e(i,o)),this._animateTo(this._cropContainer2,"transform",e(r,h))):(n(this._cropContainer1,i,o),n(this._cropContainer2,r,h))}o&&(r(o.pan,s||this._thumbBounds),o.currZoomLevel=this._thumbBounds.w/o.width,t?this._animateTo(o.container,"transform",o.getCurrentTransform()):o.applyCurrentZoomPan())}_animateTo(t,i,s){if(!this._duration)return void(t.style[i]=s);const{animations:e}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{e.activeAnimations.length||this._onAnimationComplete()},target:t};o[i]=s,e.startTransition(o)}},K=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:i}=this.pswp;let{deltaX:s,deltaY:e}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let s=-e;1===t.deltaMode?s*=.05:s*=t.deltaMode?1:.002,s=2**s;const o=i.currZoomLevel*s;i.zoomTo(o,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(s*=18,e*=18),i.panTo(i.pan.x-s,i.pan.y-e))}},Y={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},j=class extends h{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new N,this.animations=new H,this.mainScroll=new $(this),this.gestures=new S(this),this.opener=new X(this),this.keyboard=new U(this),this.contentLoader=new p(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=` ${this.options.mainClass}`),this.element&&(this.element.className+=` ${t}`),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new K(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),a(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((i,s)=>{let e=(this.currSlide?.index??0)-1+s;this.canLoop()&&(e=this.getLoopedIndex(e)),e===t&&(this.setContent(i,t,!0),1===s&&(this.currSlide=i.slide,i.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,i,s){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!s)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(i<0||i>=this.getNumItems()))return;const e=this.getItemData(i);t.slide=new T(e,i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const i=c(this.options,this);!t&&o(i,this._prevViewportSize)||(r(this._prevViewportSize,i),this.dispatch("beforeResize"),r(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=m("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=m("pswp__bg","div",this.element),this.scrollWrap=m("pswp__scroll-wrap","section",this.element),this.container=m("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new B(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,s){const e=s.dispatch("thumbBounds",{index:t,itemData:i,instance:s});if(e.thumbBounds)return e.thumbBounds;const{element:o}=i;let n,a;if(o&&!1!==s.options.thumbSelector){const t=s.options.thumbSelector||"img";a=o.matches(t)?o:o.querySelector(t)}return a=s.applyFilters("thumbEl",a,i,t),a&&(n=i.thumbCropped?function(t,i,s){const e=t.getBoundingClientRect(),o=e.width/i,n=e.height/s,a=o>n?o:n,r=(e.width-i*a)/2,h=(e.height-s*a)/2,p={x:e.left+r,y:e.top+h,w:i*a};return p.innerRect={w:e.width,h:e.height,x:r,y:h},p}(a,i.width||i.w||0,i.height||i.h||0):function(t){const i=t.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}(a)),s.applyFilters("thumbBounds",n,i,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...Y,...t}}};export{j as default};
|