@qratilabs/qrati-connect 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/element/B8jogRzT.js +4 -0
- package/element/{wHbQZdly.js → BiQECCnr.js} +1 -1
- package/element/{B4-Qw59P.js → BjbDXTeP.js} +3 -3
- package/element/{DPOkh0eJ.js → COUnPxHl.js} +1 -1
- package/element/{DODG2TX4.js → CkfXzc1_.js} +1 -1
- package/element/{B28y50Bi.js → DGeYAYfl.js} +1 -1
- package/element/{CUOOhGTj.js → DXPR6JWg.js} +1 -1
- package/element/{D4xTzxjA.js → DqOnDVHH.js} +1 -1
- package/element/ThtSVXLE.js +32 -0
- package/element/{CH2f_afH.js → gajcOMzQ.js} +1 -1
- package/element/{Cf1QDu0i.js → ojjN3KY4.js} +1 -1
- package/element/web.es.js +192 -183
- package/element/xqhGemdL.js +16 -0
- package/package.json +1 -1
- package/react/{C4TTO8j2.js → B0pbGxj0.js} +1 -1
- package/react/B57jvRJw.js +1 -0
- package/react/{B8FlrdhF.js → B74JcfT2.js} +1 -1
- package/react/{Cs3wia2w.js → BBaYBpSS.js} +1 -1
- package/react/{pIx9IeV5.js → BUm8-ZtV.js} +1 -1
- package/react/Bran9aUe.js +32 -0
- package/react/{BaT1o9UO.js → CDAGXOJa.js} +1 -1
- package/react/{aragUG-J.js → CMUYyO6F.js} +1 -1
- package/react/CPs8NoX7.js +1 -0
- package/react/{DOw70z3P.js → CdZcv5CJ.js} +1 -1
- package/react/Ce4GGag_.js +1 -0
- package/react/CnRdB6_J.js +16 -0
- package/react/{e8YBtYhk.js → CzNVO0Zz.js} +1 -1
- package/react/{D7c4q3kj.js → D6h9tRAZ.js} +1 -1
- package/react/{DLf4fPpy.js → DCjmEjZr.js} +1 -1
- package/react/{BXiO9Rt2.js → DJ-3Sziz.js} +1 -1
- package/react/{DB3DJWUI.js → DKvJBrWM.js} +3 -3
- package/react/DSAOtDOg.js +4 -0
- package/react/{DEIcfk-y.js → DaQR1Bft.js} +1 -1
- package/react/{CT_Cvh8-.js → Dbq_PyC6.js} +1 -1
- package/react/{sxfIEK17.js → DdmNkEML.js} +1 -1
- package/react/{CNAEfadS.js → buiUjKpV.js} +1 -1
- package/react/{Czrz88CD.js → dLaHt9rf.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +419 -410
- package/react/{Dljj3ToS.js → zrUJi_8F.js} +1 -1
- package/umd/web.umd.js +1 -1
- package/element/BKzoEuEi.js +0 -4
- package/element/B_TauT26.js +0 -1
- package/element/CudAoK3L.js +0 -32
- package/element/DHTkVJH6.js +0 -1
- package/element/Dc7DVn3n.js +0 -16
- package/react/BD2gDjZu.js +0 -1
- package/react/BUcttdEL.js +0 -1
- package/react/BXe4I1MJ.js +0 -32
- package/react/B_TauT26.js +0 -1
- package/react/BhU5cdLs.js +0 -1
- package/react/C1A9nC-v.js +0 -16
- package/react/DDbNaN3e.js +0 -4
- package/react/DHTkVJH6.js +0 -1
- package/react/DV6DJ1Br.js +0 -1
- package/react/QPXxc9eb.js +0 -1
- /package/element/{DMDEuqn7.js → BppxGns9.js} +0 -0
- /package/element/{Ccwm5LwS.js → C2ydm0ZD.js} +0 -0
- /package/element/{DSjmSa7l.js → CjmNvKgB.js} +0 -0
- /package/element/{ZShDCNL_.js → CziefUVo.js} +0 -0
- /package/element/{DD-DUfz5.js → DUlbZyIi.js} +0 -0
- /package/react/{CCCbXwws.js → BT55gXKs.js} +0 -0
- /package/react/{CEEUMvOM.js → Bxitmzur.js} +0 -0
- /package/react/{Bqe_56Ho.js → CO70kETi.js} +0 -0
- /package/react/{CssqM9iA.js → CR2MwRBM.js} +0 -0
- /package/react/{DV8H8PH6.js → CtCRzhKd.js} +0 -0
- /package/react/{BxS4S1Bm.js → CvLw8owR.js} +0 -0
- /package/react/{bYucjLbl.js → D5puLxf7.js} +0 -0
- /package/react/{BqRDSbh4.js → DtvJNH06.js} +0 -0
- /package/react/{DvZVbBR7.js → LDusNFdQ.js} +0 -0
- /package/react/{DYyT8DeU.js → zyOknCLQ.js} +0 -0
package/element/Dc7DVn3n.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{At as t,Dt as e,E as n,Et as i,Ft as s,I as o,It as r,M as a,Mt as l,N as c,Ot as d,P as h,Pt as p,Rt as u,T as m,Tt as g,c as f,jt as w,kt as y,l as T,m as v,n as b,s as x,t as k,w as _,wt as q,y as S}from"./wHbQZdly.js";import{a as E,n as I}from"./CudAoK3L.js";import{a as C,n as L,r as A,t as N}from"./DPOkh0eJ.js";import{a as M,c as B,f as V,i as R,l as z,n as O,p as P,r as D,s as $,t as H,u as F}from"./BKzoEuEi.js";function U(t,e){const[n,i]=t;if(n===e)return t;if(void 0!==i&&void 0!==e&&void 0!==n&&e===i&&Math.abs(e-n)<=20){const s=Math.min(n,e),o=Math.max(n,e);return s===n&&o===i?t:[s,o]}return[e,n]}function j(n,i,s){const[[o],r]=y(U,[s]),a=function(t){const[n,i]=e(t);return t===n||t&&n&&t.length===n.length&&!t.some((t,e)=>t!==n[e])?n:(i(t),t)}(i),l=q(void 0);return{containerRef:t(t=>{l.current?.disconnect(),l.current=void 0;const e=()=>r(function(t,e){let n=t?.clientWidth;if(void 0!==n&&e&&e.length>0){const t=[...e.filter(t=>t>0)].sort((t,e)=>e-t);t.push(Math.floor(t[t.length-1]/2)),n=t.find((e,i)=>e<=n||i===t.length-1)}return n}(t,a));e(),t&&"undefined"!=typeof ResizeObserver&&(l.current=new ResizeObserver(e),l.current.observe(t)),"function"==typeof n?n(t):n&&(n.current=t)},[n,a]),containerWidth:o}}function W(t){return["react-photo-album",t].filter(Boolean).join("--")}function G({width:t,height:e}){const n=t/e;return Number.isFinite(n)?n:1}var K=Object.freeze([1200,600,300,0]);function Y(t,e){return"function"==typeof t?t(e):t}function Z(t,e){return void 0!==e?Y(t,e):void 0}function Q(t,e,n,i=0){if(void 0===e)return;const s=Z(t,e);return Math.round(Math.max(void 0===s?function(t,e){const n=K.findIndex(t=>t<=e);return Y(t[Math.max(n,0)],e)}(n,e):s,i))}function J(t,{spacing:e,padding:n,componentsProps:i,render:s}){return{spacing:Q(e,t,[20,15,10,5]),padding:Q(n,t,[0,0,0,0]),componentsProps:Y(i,t)||{},render:Y(s,t)}}function X(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function tt(t,e,n,i,s,o,r){let a,l;const c=t=>{const e=o*(s-1)+2*r*s;return`calc((${t.match(/^\s*calc\((.*)\)\s*$/)?.[1]??t} - ${e}px) / ${X((i-e)/n,5)})`},d=t.srcSet;return d&&d.length>0&&(a=d.concat(d.some(({width:e})=>e===t.width)?[]:[{src:t.src,width:t.width,height:t.height}]).sort((t,e)=>t.width-e.width).map(t=>`${t.src} ${t.width}w`).join(", ")),l=e?.size?(e.sizes||[]).map(({viewport:t,size:e})=>`${t} ${c(e)}`).concat(c(e.size)).join(", "):`${Math.ceil(n/i*100)}vw`,{srcSet:a,sizes:l}}var et=o(function({as:t,render:e,context:n,classes:i=[],variables:s={},style:o,className:r,children:a,...l},d){const h=function(...t){return t.filter(Boolean).join(" ")}(...(Array.isArray(i)?i:[i]).filter(t=>"string"==typeof t).map(W),r),p={style:{...Object.fromEntries(Object.entries(s).map(([t,e])=>{return[(n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),`--${W(n)}`),"number"==typeof e?X(e,5):e];var n})),...o},className:h,children:a,...l};if(e){const t=e({ref:d,...p},n);if(t)return t}return c(t||"div",{ref:d,...p})}),nt=o(function({photo:t,index:e,width:n,height:i,onClick:s,render:{wrapper:o,link:r,button:a,image:l,extras:d}={},componentsProps:{link:h,button:p,wrapper:u,image:m}={}},g){const{href:f}=t,w={photo:t,index:e,width:X(n,3),height:X(i,3)};let y;return y=f?{...h,as:"a",render:r,classes:["photo","link"],href:f,onClick:s}:s?{...p,as:"button",type:"button",render:a,classes:["photo","button"],onClick:s}:{...u,render:o,classes:"photo"},c(et,{ref:g,variables:{photoWidth:w.width,photoHeight:w.height},context:w,...y,children:[c(et,{as:"img",classes:"image",render:l,context:w,...m}),d?.({},w)]})}),it=o(function({layout:t,sizes:e,model:n,skeleton:i,onClick:s,render:{container:o,track:a,photo:l,...d}={},componentsProps:{container:h,track:p,link:u,button:m,wrapper:g,image:f}={}},w){const{spacing:y,padding:T,containerWidth:v,tracks:b,variables:x,horizontal:k}=n||{};return c(et,{role:"group","aria-label":"Photo album",...h,variables:{spacing:y,padding:T,containerWidth:v,...x},classes:["",t],render:o,ref:w,children:[void 0!==y&&void 0!==T&&void 0!==v&&b?.map(({photos:t,variables:n},i)=>{const o=t.length,h=k?o:b.length;return r(et,{...p,key:i,render:a,classes:"track",variables:{trackSize:o,...n}},t.map(t=>{const{photo:n,index:i,width:o}=t,{key:r,src:a,alt:p="",title:w,label:b}=n,x=s?t=>{s({event:t,photo:n,index:i})}:void 0;if(l){const e=l({onClick:x},t);if(e)return e}const k=t=>b?{"aria-label":b,...t}:t;return c(nt,{onClick:x,render:d,componentsProps:{image:{loading:"lazy",decoding:"async",src:a,alt:p,title:w,...tt(n,e,o,v,h,y,T),...Y(f,t)},link:k(Y(u,t)),button:k(Y(m,t)),wrapper:Y(g,t)},...t},r??i)}))}),void 0===v&&i]})});function st(t,e,n){return function(t,e){if(!t)return;const n=[];for(let i=e;void 0!==i;i=t.get(i))n.push(i);return n.reverse()}(function(t,e,n){const i=/* @__PURE__ */new Map,s=/* @__PURE__ */new Set,o=/* @__PURE__ */new Map;o.set(e,0);const r=function(t){let e=0;const n=[],i=(e,i)=>t(n[e],n[i])<0,s=(t,e)=>{const i=n[t];n[t]=n[e],n[e]=i};return{push:t=>{e+=1,n[e]=t,(t=>{let e=t,n=Math.floor(e/2);for(;e>1&&i(n,e);)s(n,e),e=n,n=Math.floor(e/2)})(e)},pop:()=>{if(0===e)return;s(1,e),e-=1;const t=n.pop();return(()=>{let t=1,n=2*t;for(;n<=e&&(n<e&&i(n,n+1)&&(n+=1),i(t,n));)s(t,n),t=n,n=2*t})(),t},size:()=>e}}((a=t=>t[1],(t,e)=>a(e)-a(t)));var a;for(r.push([e,0]);r.size()>0;){const[e,n]=r.pop();if(!s.has(e)){const a=t(e);s.add(e),a.forEach((t,s)=>{const a=n+t,l=i.get(s),c=o.get(s);(void 0===c||c>a&&(c/a>1.005||void 0!==l&&l<e))&&(o.set(s,a),r.push([s,a]),i.set(s,e))})}}return o.has(n)?i:void 0}(t,e,n),n)}function ot(t,e,n,i){return(e-(t.length-1)*n-2*i*t.length)/t.reduce((t,e)=>t+G(e),0)}function rt(t,e,n,i,s,o,r){const a=t.slice(e,n),l=ot(a,i,s,o);return l>0?(l-r)**2*a.length:void 0}var at=o(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:o,containerWidth:r}=j(s,e,n),{spacing:a,padding:l,targetRowHeight:d,minPhotos:h,maxPhotos:p,...u}=function(t,{photos:e,targetRowHeight:n,rowConstraints:i,...s}){const{spacing:o,padding:r,componentsProps:a,render:l}=J(t,s),{singleRowMaxHeight:c,minPhotos:d,maxPhotos:h}=Z(i,t)||{};if(void 0!==c&&void 0!==o&&void 0!==r){const t=Math.floor(e.reduce((t,{width:e,height:n})=>t+e/n*c+2*r,o*(e.length-1)));t>0&&(a.container={...a.container},a.container.style={maxWidth:t,...a.container.style})}return{...s,targetRowHeight:Q(n,t,[t=>t/5,t=>t/4,t=>t/3,t=>t/2]),render:l,spacing:o,padding:r,minPhotos:d,maxPhotos:h,componentsProps:a}}(r,{photos:t,...i});return c(it,{layout:"rows",ref:o,model:g(()=>void 0!==r&&void 0!==a&&void 0!==l&&void 0!==d?function(t,e,n,i,s,o,r){const a=st(function(t,e,n,i,s,o,r,a){return l=>{const c=/* @__PURE__ */new Map;c.set(l,0);const d=r||1,h=Math.min(o,a||1/0);for(let o=l+d;o<t.length+1&&!(o-l>h);o+=1){const r=rt(t,l,o,i,e,n,s);if(void 0===r)break;c.set(o,r)}return c}}(t,e,n,i,s,function(t,e,n,i){return X(e/n/Math.min(...t.map(t=>G(t))))+(i||0)+2}(t,i,s,o),o,r),0,t.length);if(!a)return;const l=[];for(let c=1;c<a.length;c+=1){const s=t.slice(a[c-1],a[c]).map((t,e)=>({photo:t,index:a[c-1]+e})),o=ot(s.map(({photo:t})=>t),i,e,n);l.push({photos:s.map(({photo:t,index:e})=>({photo:t,index:e,width:o*G(t),height:o}))})}return{spacing:e,padding:n,containerWidth:i,tracks:l,horizontal:!0}}(t,a,l,r,d,h,p):void 0,[t,a,l,r,d,h,p]),...u})});function lt(t,e,n,i,s,o,r){const a=[],l=r.reduce((t,e)=>t+e,0);for(let c=0;c<t.length-1;c+=1){const d=e.slice(t[c],t[c+1]).map((e,n)=>({photo:e,index:t[c]+n})),h=r.reduce((t,e,n)=>t+(o[c]-o[n])*e,0),p=(s-(t.length-2)*n-2*(t.length-1)*i-h)*r[c]/l;a.push({photos:d.map(({photo:t,index:e})=>({photo:t,index:e,width:p,height:p/G(t)})),variables:{adjustedGaps:h,columnRatio:r[c]}})}return{tracks:a,variables:{totalRatio:l}}}function ct(t,e,n,i,s,o){const r=[],a=[];if(t.length<=o){const s=t.length>0?t.reduce((t,e)=>t+G(e),0)/t.length:1;for(let e=0;e<o;e+=1)r[e]=2*n,a[e]=e<t.length?G(t[e]):s;return lt(Array.from({length:o+1},(e,n)=>Math.min(n,t.length)),t,e,n,i,r,a)}const l=(c=function(t,e,n,i,s){return o=>{const r=[],a=1.5*s;let l=i/G(t[o])+2*n;for(let c=o+1;c<t.length+1&&(r.push([c,(s-l)**2]),!(l>a||c===t.length));c+=1)l+=i/G(t[c])+e+2*n;return r}}(t,e,n,s,(t.reduce((t,e)=>t+s/G(e),0)+e*(t.length-o)+2*n*t.length)/o),d=o,h=0,p=t.length,function(t,e,n){const i=[n];for(let s=n,o=e;o>0;o-=1)[s]=t.get(s)[o],i.push(s);return i.reverse()}(function(t,e,n,i){const s=/* @__PURE__ */new Map,o=/* @__PURE__ */new Set;o.add(n);for(let r=0;r<e;r+=1){const n=[...o.keys()];o.clear(),n.forEach(n=>{const a=r>0?s.get(n)[r][1]:0;t(n).forEach(([t,l])=>{let c=s.get(t);c||(c=[],s.set(t,c));const d=a+l,h=c[r+1];(!h||h[1]>d&&(h[1]/d>1.0001||n<h[0]))&&(c[r+1]=[n,d]),r<e-1&&t!==i&&o.add(t)})})}return s}(c,d,h,p),d,p));var c,d,h,p;for(let u=0;u<l.length-1;u+=1){const i=t.slice(l[u],l[u+1]);r[u]=e*(i.length-1)+2*n*i.length,a[u]=1/i.reduce((t,e)=>t+1/G(e),0)}return lt(l,t,e,n,i,r,a)}function dt(t,e,n,i,s){const{tracks:o,variables:r}=ct(t,e,n,i,(i-e*(s-1)-2*n*s)/s,s);return o.some(t=>t.photos.some(({width:t,height:e})=>t<=0||e<=0))?s>1?dt(t,e,n,i,s-1):void 0:{tracks:o,spacing:e,padding:n,containerWidth:i,variables:{columns:s,...r}}}var ht=o(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:o,containerWidth:r}=j(s,e,n),{spacing:a,padding:l,columns:d,...h}=function(t,{columns:e,...n}){return{...n,...J(t,n),columns:Q(e,t,[5,4,3,2],1)}}(r,{photos:t,...i});return c(it,{layout:"columns",ref:o,model:g(()=>void 0!==r&&void 0!==a&&void 0!==l&&void 0!==d?dt(t,a,l,r,d):void 0,[t,a,l,r,d]),...h})});function pt(t,e,n,i,s){const o=(i-e*(s-1)-2*n*s)/s;if(o<=0)return s>1?pt(t,e,n,i,s-1):void 0;const r=[];for(let l=0;l<s;l+=1)r[l]=0;const a=t.reduce((t,i,s)=>{const a=r.reduce((t,e,n)=>e<r[t]-1?n:t,0);return r[a]=r[a]+o/G(i)+e+2*n,t[a].push({photo:i,index:s}),t},Array.from({length:s},()=>[]));return{spacing:e,padding:n,containerWidth:i,variables:{columns:s},tracks:a.map(t=>({photos:t.map(({photo:t,index:e})=>({photo:t,index:e,width:o,height:o/G(t)}))}))}}var ut=o(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:o,containerWidth:r}=j(s,e,n),{spacing:a,padding:l,columns:d,...h}=function(t,{columns:e,...n}){return{...n,...J(t,n),columns:Q(e,t,[5,4,3,2],1)}}(r,{photos:t,...i});return c(it,{layout:"masonry",ref:o,model:g(()=>void 0!==r&&void 0!==a&&void 0!==l&&void 0!==d?pt(t,a,l,r,d):void 0,[t,a,l,r,d]),...h})});function mt(t){return t?String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var gt=class{constructor(t,e={}){this.lightbox=t,this.aiSummaryVisible=!1,this.currentSummary=null,this.options={aiSummaryButtonOrder:7,width:"400px",height:"300px",transition:"0.3s ease",...e},document.head.insertAdjacentHTML("beforeend",`<style>\n .pswp__ai-summary-panel {\n background: rgba(30, 30, 30, 0.9);\n color: white;\n position: absolute;\n overflow-y: auto;\n z-index: 1;\n transition: transform ${this.options.transition};\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);\n padding: 20px;\n }\n\n /* Desktop styles */\n @media (min-width: 768px) {\n .pswp__ai-summary-panel {\n top: 0;\n right: 0;\n height: 100%;\n width: ${this.options.width};\n transform: translateX(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateX(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateX(-${this.options.width});\n transition: transform ${this.options.transition};\n }\n }\n\n /* Mobile styles */\n @media (max-width: 767px) {\n .pswp__ai-summary-panel {\n bottom: 0;\n left: 0;\n width: 100%;\n height: ${this.options.height};\n transform: translateY(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateY(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateY(-${this.options.height});\n transition: transform ${this.options.transition};\n }\n }\n\n .pswp__ai-summary-close {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 32px;\n height: 32px;\n opacity: 0.6;\n cursor: pointer;\n z-index: 2;\n background: rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.3s;\n }\n\n .pswp__ai-summary-close:hover {\n opacity: 1;\n }\n\n .pswp__ai-summary-close:before,\n .pswp__ai-summary-close:after {\n position: absolute;\n content: '';\n width: 16px;\n height: 2px;\n background-color: white;\n }\n\n .pswp__ai-summary-close:before {\n transform: rotate(45deg);\n }\n\n .pswp__ai-summary-close:after {\n transform: rotate(-45deg);\n }\n\n .pswp__ai-summary-content {\n margin-top: 20px;\n }\n\n .pswp__ai-summary-title {\n margin-bottom: 16px;\n font-size: 18px;\n font-weight: bold;\n padding-right: 30px; /* Add space for the close button */\n }\n\n .pswp__ai-summary-section {\n margin-bottom: 16px;\n }\n\n .pswp__ai-summary-section-title {\n font-weight: bold;\n margin-bottom: 8px;\n }\n\n .pswp__ai-summary-label {\n display: inline-flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 4px 12px;\n margin-right: 8px;\n margin-bottom: 8px;\n font-size: 14px;\n }\n\n .pswp__ai-summary-description {\n font-size: 14px;\n line-height: 1.5;\n }\n\n .pswp__ai-summary-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n color: rgba(255, 255, 255, 0.6);\n font-style: italic;\n }\n\n .pswp__ai-summary-bing-search {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n z-index: 2;\n }\n\n .pswp__ai-summary-bing-button {\n height: 32px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: background-color 0.3s;\n }\n\n .pswp__ai-summary-bing-button:hover {\n background: rgba(255, 255, 255, 0.4);\n }\n\n .pswp__ai-summary-bing-icon {\n width: 20px;\n height: 20px;\n }\n\n .pswp__ai-summary-disclaimer {\n font-size: 12px;\n color: rgba(255, 255, 255, 0.7);\n text-align: center;\n margin-top: 32px;\n padding: 0 10px;\n line-height: 1.4;\n font-style: italic;\n }\n </style>`),t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"ai-summary-toggle-button",title:"Toggle AI summary view",order:this.options.aiSummaryButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24">\n <use class="pswp__icn-shadow" xlink:href="#pswp__icn-ai-summary"/>\n <path d="M12 17q.425 0 .713-.288T13 16v-4q0-.425-.288-.712T12 11t-.712.288T11 12v4q0 .425.288.713T12 17m0-8q.425 0 .713-.288T13 8t-.288-.712T12 7t-.712.288T11 8t.288.713T12 9m0 13q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8"/>\n </svg>',onClick:()=>{this.toggleAISummary(t)}}),t.ui.registerElement({name:"ai-summary-panel",isButton:!1,appendTo:"root",html:'<div class="pswp__ai-summary-panel"><div class="pswp__ai-summary-close"></div></div>'})}),t.on("change",()=>{this.aiSummaryVisible&&this.updateAISummary(t)}),t.on("close",()=>{this.hideAISummary(t)}),t.on("firstUpdate",()=>{const e=t.element.querySelector(".pswp__ai-summary-close");e&&e.addEventListener("click",()=>{this.hideAISummary(t)})})}toggleAISummary(t){this.aiSummaryVisible?this.hideAISummary(t):this.showAISummary(t)}showAISummary(t){const e=t.container,n=t.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!0,n.classList.add("visible"),e.classList.add("shifted-for-ai-summary"),this.updateAISummary(t))}hideAISummary(t){const e=t.container,n=t.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!1,n.classList.remove("visible"),e.classList.remove("shifted-for-ai-summary"))}updateAISummary(t){if(!t.currSlide)return;const e=t.element.querySelector(".pswp__ai-summary-panel");if(!e)return;const n=t.currSlide.data,i=n.src||n.url||"";let s=null;try{n.contentSummary&&(s=JSON.parse(n.contentSummary),this.currentSummary=s)}catch(r){console.error("Error parsing AI summary data:",r)}const o=i?`<a class="pswp__ai-summary-bing-search" href="https://www.bing.com/images/search?view=detailv2&iss=SBI&form=SBIIRP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(i)}&idpbck=1&selectedindex=0&id=${encodeURIComponent(i)}&mediaurl=${encodeURIComponent(i)}" target="_blank" rel="noopener noreferrer" class="pswp__ai-summary-bing-button">\n <svg xmlns="http://www.w3.org/2000/svg" style="height:24px;width:24px" width="256" height="388" viewBox="0 0 256 388"><defs><radialGradient id="logosBing0" cx="93.717%" cy="77.818%" r="143.121%" fx="93.717%" fy="77.818%" gradientTransform="scale(-1 -.71954)rotate(49.091 2.036 -2.204)"><stop offset="0%" stop-color="#00cacc"/><stop offset="100%" stop-color="#048fce"/></radialGradient><radialGradient id="logosBing1" cx="13.893%" cy="71.448%" r="150.086%" fx="13.893%" fy="71.448%" gradientTransform="matrix(.55155 -.39387 .23634 .91917 -.107 .112)"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></radialGradient><linearGradient id="logosBing2" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></linearGradient></defs><path fill="url(#logosBing0)" d="M129.424 122.047c-7.133.829-12.573 6.622-13.079 13.928c-.218 3.147-.15 3.36 6.986 21.722c16.233 41.774 20.166 51.828 20.827 53.243c1.603 3.427 3.856 6.65 6.672 9.544c2.16 2.22 3.585 3.414 5.994 5.024c4.236 2.829 6.337 3.61 22.818 8.49c16.053 4.754 24.824 7.913 32.381 11.664c9.791 4.86 16.623 10.387 20.944 16.946c3.1 4.706 5.846 13.145 7.04 21.64c.468 3.321.47 10.661.006 13.663c-1.008 6.516-3.021 11.976-6.101 16.545c-1.638 2.43-1.068 2.023 1.313-.939c6.74-8.379 13.605-22.7 17.108-35.687c4.24-15.718 4.817-32.596 1.66-48.57c-6.147-31.108-25.786-57.955-53.444-73.06c-1.738-.95-8.357-4.42-17.331-9.085a1633 1633 0 0 1-4.127-2.154c-.907-.477-2.764-1.447-4.126-2.154c-1.362-.708-5.282-2.75-8.711-4.539l-8.528-4.446a6021 6021 0 0 1-8.344-4.357c-8.893-4.655-12.657-6.537-13.73-6.863c-1.125-.343-3.984-.782-4.701-.723c-.152.012-.838.088-1.527.168"/><path fill="url(#logosBing1)" d="M148.81 277.994c-.493.292-1.184.714-1.537.938c-.354.225-1.137.712-1.743 1.083a8315 8315 0 0 0-13.204 8.137a2848 2848 0 0 0-8.07 4.997a388 388 0 0 1-3.576 2.198c-.454.271-2.393 1.465-4.31 2.654a2652 2652 0 0 1-7.427 4.586a3958 3958 0 0 0-8.62 5.316a3011 3011 0 0 1-7.518 4.637c-1.564.959-3.008 1.885-3.21 2.058c-.3.257-14.205 8.87-21.182 13.121c-5.3 3.228-11.43 5.387-17.705 6.235c-2.921.395-8.45.396-11.363.003c-7.9-1.067-15.176-4.013-21.409-8.666c-2.444-1.826-7.047-6.425-8.806-8.8c-4.147-5.598-6.829-11.602-8.218-18.396c-.32-1.564-.622-2.884-.672-2.935c-.13-.13.105 2.231.528 5.319c.44 3.211 1.377 7.856 2.387 11.829c7.814 30.743 30.05 55.749 60.15 67.646c8.668 3.424 17.415 5.582 26.932 6.64c3.576.4 13.699.56 17.43.276c17.117-1.296 32.02-6.334 47.308-15.996c1.362-.86 3.92-2.474 5.685-3.585a877 877 0 0 0 4.952-3.14c.958-.615 2.114-1.341 2.567-1.614a91 91 0 0 0 2.018-1.268c.656-.424 3.461-2.2 6.235-3.944l11.092-7.006l3.809-2.406l.137-.086l.42-.265l.199-.126l2.804-1.771l9.69-6.121c12.348-7.759 16.03-10.483 21.766-16.102c2.392-2.342 5.997-6.34 6.176-6.848c.037-.104.678-1.092 1.424-2.197c3.036-4.492 5.06-9.995 6.064-16.484c.465-3.002.462-10.342-.005-13.663c-.903-6.42-2.955-13.702-5.167-18.339c-3.627-7.603-11.353-14.512-22.453-20.076c-3.065-1.537-6.23-2.943-6.583-2.924c-.168.009-10.497 6.322-22.954 14.03c-12.457 7.71-23.268 14.4-24.025 14.87s-2.056 1.263-2.888 1.764z"/><path fill="url(#logosBing2)" d="m.053 241.013l.054 53.689l.695 3.118c2.172 9.747 5.937 16.775 12.482 23.302c3.078 3.07 5.432 4.922 8.768 6.896c7.06 4.177 14.657 6.238 22.978 6.235c8.716-.005 16.256-2.179 24.025-6.928c1.311-.801 6.449-3.964 11.416-7.029l9.032-5.572v-127.4l-.002-58.273c-.002-37.177-.07-59.256-.188-60.988c-.74-10.885-5.293-20.892-12.948-28.461c-2.349-2.323-4.356-3.875-10.336-7.99a25160 25160 0 0 1-12.104-8.336L28.617 5.835C22.838 1.85 22.386 1.574 20.639.949C18.367.136 15.959-.163 13.67.084C6.998.804 1.657 5.622.269 12.171C.053 13.191.013 26.751.01 100.35l-.003 86.975H0z"/></svg>\n <span>Search on Bing</span>\n </a>\n <div class="pswp__ai-summary-disclaimer">\n These are AI generated summaries based on the content. Please verify the information before using it.\n </div>`:"";if(s){e.innerHTML=`<div class="pswp__ai-summary-close"></div>${this.renderAISummary(s)}${o}`;const n=e.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(t)})}else{e.innerHTML=`<div class="pswp__ai-summary-close"></div><div class="pswp__ai-summary-empty">No AI summary available for this content</div>${o}`;const n=e.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(t)})}}renderAISummary(t){let e='<div class="pswp__ai-summary-content">';return t.subject&&(e+=`<div class="pswp__ai-summary-title">${mt(t.subject)}</div>`),t.labels&&Object.entries(t.labels).filter(([t,e])=>Array.isArray(e)&&e.length>0).forEach(([t,n])=>{e+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-section-title">${mt(t.replace("_"," ").replace(/\b\w/g,t=>t.toUpperCase()))}</div>\n <div class="pswp__ai-summary-labels space-y-2">\n ${n.map(t=>`<span class="pswp__ai-summary-label">${mt(t)}</span>`).join("")}\n </div>\n </div>\n `}),t.description&&(e+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-description">${mt(t.description)}</div>\n </div>\n `),e+="</div>",e}},ft='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")',wt=class{constructor(t){this.backdropOn=!1,this.lightbox=t,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("afterInit",()=>{setTimeout(()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"},[500])}),t.on("uiRegister",()=>{t.ui.registerElement({name:"toggle-backdrop-button",title:"Toggle blur backdrop",order:this.options.toggleBackdropButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-backdrop"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-backdrop"/><path id="pswp__icn-show-backdrop" style="display:none" d="M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m0-4q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m0-4q-.425 0-.712-.288T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m0-4q-.425 0-.712-.288T5 6t.288-.712T6 5t.713.288T7 6t-.288.713T6 7m4 8.5q-.625 0-1.062-.437T8.5 14t.438-1.062T10 12.5t1.063.438T11.5 14t-.437 1.063T10 15.5m0-4q-.625 0-1.062-.437T8.5 10t.438-1.062T10 8.5t1.063.438T11.5 10t-.437 1.063T10 11.5m0 7.5q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m0-12q-.425 0-.712-.288T9 6t.288-.712T10 5t.713.288T11 6t-.288.713T10 7m0 14.5q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 12q-.625 0-1.062-.437T12.5 14t.438-1.062T14 12.5t1.063.438T15.5 14t-.437 1.063T14 15.5m0-4q-.625 0-1.062-.437T12.5 10t.438-1.062T14 8.5t1.063.438T15.5 10t-.437 1.063T14 11.5m0 7.5q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m0-12q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m0 14.5q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M18 19q-.425 0-.712-.288T17 18t.288-.712T18 17t.713.288T19 18t-.288.713T18 19m0-4q-.425 0-.712-.288T17 14t.288-.712T18 13t.713.288T19 14t-.288.713T18 15m0-4q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m0-4q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m3 7.5q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15"/><path id="pswp__icn-hide-backdrop" d="m19.1 21.9l-17-17q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-9.1-.4q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m4 0q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m4 0q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m-4-3.5q-.65 0-1.075-.425T8.5 14t.425-1.075T10 12.5t1.075.425T11.5 14t-.425 1.075T10 15.5M6 15q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m11.8-.025l-.775-.775q-.1-.5.213-.85T18 13q.425 0 .713.288T19 14q0 .45-.35.763t-.85.212M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m-6.7-3.05L12.55 9.7q.125-.525.5-.862T14 8.5q.65 0 1.075.425T15.5 10q0 .575-.35.963t-.85.487M6 11q-.425 0-.712-.287T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m12 0q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m-15-.5q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M14 7q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m-4.175-.025l-.8-.8q-.075-.5.225-.837T10 5q.425 0 .712.287T11 6q0 .45-.337.75t-.838.225M18 7q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m-8-3.5q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15" /></svg>',onClick:()=>{this.toggleBackdrop(t)}}),this.createBlurBackground(t)}),t.on("change",()=>{this.backdropOn&&this.updateBlurBackground(t)}),t.on("close",()=>{this.removeBlurBackground(),this.backdropOn=!1})}createBlurBackground(t){const e=t.element;if(!this.backgroundElement){const t=document.createElement("div");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.backgroundSize="cover",t.style.backgroundPosition="center",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.transition="background-image 0.5s ease, opacity 0.5s ease",t.style.display="none",t.style.backgroundImage=ft,e.append(t),this.backgroundElement=t}if(!this.backgroundVideoElement){const t=document.createElement("video");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.objectFit="cover",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.display="none",t.style.transition="opacity 0.5s ease",t.muted=!0,t.loop=!0,t.autoplay=!1,t.muted=!0,t.volume=0,e.append(t),this.backgroundVideoElement=t}}toggleBackdrop(t){this.backdropOn?(this.backgroundElement.style.backgroundImage=ft,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(t),this.backdropOn=!0),document.querySelector("#pswp__icn-hide-backdrop").style.display=this.backdropOn?"none":"inline",document.querySelector("#pswp__icn-show-backdrop").style.display=this.backdropOn?"inline":"none"}updateBlurBackground(t){const e=t.currSlide;if(e?.data)if("video"===e.data.type){const t=this.backgroundVideoElement,n=e.content.element;"video"===n?.tagName?.toLowerCase()&&(this.referenceVideoElement=n,this.registerVideoEvents(n,t)),t.style.opacity=0,setTimeout(()=>{t.src=e.data.src,t.load(),this.initBackgroundVideo(),t.style.opacity=1},500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else{if(this.backgroundElement){const t=e.data.blurhash||"LEHV6nWB2yk8pyo0adR*.7kCMdnj";if(t){const e=this.createBlurhashCanvas(t,200,200);e.startsWith("data:")?this.backgroundElement.style.backgroundImage=`url('${e}')`:(this.backgroundElement.style.backgroundImage="none",this.backgroundElement.style.backgroundColor=e)}else this.backgroundElement.style.backgroundImage=`url('${e.data.thumbnailUrl}')`;this.backgroundElement.style.opacity=1}this.backgroundVideoElement&&(this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.src="")}}initBackgroundVideo(){this.referenceVideoElement&&(this.backgroundVideoElement.currentTime=this.referenceVideoElement.currentTime,this.referenceVideoElement.currentTime>0&&!this.referenceVideoElement.paused&&!this.referenceVideoElement.ended&&this.referenceVideoElement.readyState>2&&this.backgroundVideoElement.play())}removeBlurBackground(){this.backgroundElement&&(this.backgroundElement.remove(),this.backgroundVideoElement.remove(),this.backgroundElement=null,this.backgroundVideoElement=null)}createBlurhashCanvas(t,e=100,n=100){const i=document.createElement("canvas");i.width=e,i.height=n;try{const s=i.getContext("2d"),o=L(t,e,n);if(o&&o.length>0){const t=s.createImageData(e,n);return t.data.set(o),s.putImageData(t,0,0),i.toDataURL()}throw new Error("Empty pixels array")}catch(s){return console.warn("Failed to decode blurhash for backdrop:",s),this.blurhashToColor(t)}}blurhashToColor(t){const e=["#8B9DC3","#DFB2A3","#C4B5A0","#A8B8C8","#B8A898"];return e[t.charCodeAt(0)%e.length]}registerVideoEvents(t,e){this.foregroundVideoElement=t,t.addEventListener("play",()=>{e.currentTime=t.currentTime,e.play()}),t.addEventListener("pause",()=>{e.pause()}),t.addEventListener("ended",()=>{e.pause(),e.currentTime=0})}};function yt(t){return t?String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var Tt={[x.LINK]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h14v-6q0-.425.288-.712T20 12t.713.288T21 13v6q0 .825-.587 1.413T19 21zM19 6.4L10.4 15q-.275.275-.7.275T9 15t-.275-.7t.275-.7L17.6 5H15q-.425 0-.712-.288T14 4t.288-.712T15 3h5q.425 0 .713.288T21 4v5q0 .425-.288.713T20 10t-.712-.288T19 9z"/></svg>',[x.EMAIL]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm0-7q1.25 0 2.125-.875T15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15"/></svg>',[x.PHONE]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"/></svg>',[x.SMS]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4-5q.425 0 .713-.288T9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11m4 0q.425 0 .713-.288T13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11m4 0q.425 0 .713-.288T17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11"/></svg>',[x.WHATSAPP]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 258"><defs><linearGradient id="logosWhatsappIcon0" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1faf38"/><stop offset="100%" stop-color="#60d669"/></linearGradient><linearGradient id="logosWhatsappIcon1" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#f9f9f9"/><stop offset="100%" stop-color="#fff"/></linearGradient></defs><path fill="url(#logosWhatsappIcon0)" d="M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"/><path fill="url(#logosWhatsappIcon1)" d="M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"/><path fill="#fff" d="M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"/></svg>',[x.MESSENGER]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><radialGradient id="logosMessenger0" cx="19.247%" cy="99.465%" r="108.96%" fx="19.247%" fy="99.465%"><stop offset="0%" stop-color="#09f"/><stop offset="60.975%" stop-color="#a033ff"/><stop offset="93.482%" stop-color="#ff5280"/><stop offset="100%" stop-color="#ff7061"/></radialGradient></defs><path fill="url(#logosMessenger0)" d="M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"/><path fill="#fff" d="m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"/></svg>'},vt=class{constructor(t,e,n){this.lightbox=t,this.captureAdImpression=e,this.captureAdClick=n,this.captionOn=!0,this.options={captionButtonOrder:8},t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-caption"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-caption"/><path id="pswp__icn-show-caption" d="M5 20q-.825 0-1.412-.587T3 18V6q0-.825.588-1.412T5 4h14q.825 0 1.413.588T21 6v12q0 .825-.587 1.413T19 20zm0-2h14V6H5zm2-3h3q.425 0 .713-.288T11 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T11 10.5V10q0-.425-.288-.712T10 9H7q-.425 0-.712.288T6 10v4q0 .425.288.713T7 15m10-6h-3q-.425 0-.712.288T13 10v4q0 .425.288.713T14 15h3q.425 0 .713-.288T18 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T18 10.5V10q0-.425-.288-.712T17 9M5 18V6z"/><path id="pswp__icn-hide-caption" style="display:none" d="m9.025 9l1.5 1.5H7.5v3h2q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375v.5q0 .425-.288.713T10 15H7q-.425 0-.712-.288T6 14v-4q0-.425.288-.712T7 9zM21 6v10q0 .5-.325.763t-.7.262t-.675-.262T19 16V6H8.975q-.5 0-.75-.312T7.975 5t.25-.687t.75-.313H19q.825 0 1.413.588T21 6m-3 8q0 .225-.088.438t-.262.337L16.375 13.5h.125q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375zm-1-5q.425 0 .713.288T18 10v.5q0 .225-.15.375t-.375.15h-.45q-.225 0-.375-.15t-.15-.375h-2v1.125l-1.5-1.5V10q0-.425.288-.712T14 9zM5 20q-.825 0-1.412-.587T3 18V6q0-.625.338-1.112t.862-.713L6.025 6H5v12h10.175L1.375 4.225q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.375 18.375q.3.3.3.713t-.3.712t-.712.3t-.713-.3L17.175 20z"/></svg>',onClick:()=>{this.toggleCaption(t)}}),t.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full"></div>'})}),t.on("change",()=>{this.captionOn&&this.updateCaption(t)}),t.on("close",()=>{this.clearCaption()})}toggleCaption(t){this.captionOn?this.clearCaption():this.updateCaption(t),this.captionOn=!this.captionOn,document.querySelector("#pswp__icn-show-caption").style.display=this.captionOn?"inline":"none",document.querySelector("#pswp__icn-hide-caption").style.display=this.captionOn?"none":"inline"}createCaptionHTML(t){const{id:e,type:n,caption:i,title:s,description:o,targetType:r,targetText:a,targetUrl:l}=t||{};switch("ad"===n&&this.captureAdImpression&&this.captureAdImpression(e),n){case"image":case"video":return i?.length>0?`\n <div class=" w-full bg-black bg-opacity-50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${yt(i)}</h3>\n </div>\n `:"";case"ad":return`\n <div class=" w-full bg-black/85 p-4 text-white">\n <div class=" mx-auto w-full max-w-2xl space-y-2 text-center">\n <h3 class=" text-center sm:text-lg">${yt(s)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${yt(o)}</h4>\n <button\n class=" flex w-full items-center justify-center gap-3 rounded-md bg-white py-1 text-lg text-black caption-action-button"\n data-id="${yt(e)}"\n data-target-type="${yt(r||x.LINK)}"\n data-target-url="${yt(l)}">\n ${Tt[r||x.LINK]}\n ${yt(a)}\n </button>\n </div>\n </div>\n `;default:return""}}updateCaption(t){try{const e=document.getElementById("pswp-caption-container");if(!e)return;const n=t.currSlide?.data;e.innerHTML=this.createCaptionHTML(n);const i=e.querySelector(". caption-action-button");i&&i.addEventListener("click",t=>{const e=t.currentTarget.dataset.id,n=t.currentTarget.dataset.targetType,i=t.currentTarget.dataset.targetUrl;this.captureAdClick&&e&&this.captureAdClick(e,n,i)})}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const t=document.getElementById("pswp-caption-container");t&&(t.innerHTML="")}},bt=class{constructor(t){this.lightbox=t,this.fullscreen=!1,this.options={fullScreenButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}initPswpEvents(t){t.on("uiRegister",()=>{(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&t.ui.registerElement({name:"fullscreen-button",title:"Toggle fullscreen view",order:this.options.fullScreenButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-1" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-fullscreen"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-exit-fullscreen"/><path id="pswp__icn-fullscreen" d="M5 19h2q.425 0 .713.288T8 20t-.288.713T7 21H4q-.425 0-.712-.288T3 20v-3q0-.425.288-.712T4 16t.713.288T5 17zm14 0v-2q0-.425.288-.712T20 16t.713.288T21 17v3q0 .425-.288.713T20 21h-3q-.425 0-.712-.288T16 20t.288-.712T17 19zM5 5v2q0 .425-.288.713T4 8t-.712-.288T3 7V4q0-.425.288-.712T4 3h3q.425 0 .713.288T8 4t-.288.713T7 5zm14 0h-2q-.425 0-.712-.288T16 4t.288-.712T17 3h3q.425 0 .713.288T21 4v3q0 .425-.288.713T20 8t-.712-.288T19 7z"/><path id="pswp__icn-exit-fullscreen" style="display:none" d="M6 18H4q-.425 0-.712-.288T3 17t.288-.712T4 16h3q.425 0 .713.288T8 17v3q0 .425-.288.713T7 21t-.712-.288T6 20zm12 0v2q0 .425-.288.713T17 21t-.712-.288T16 20v-3q0-.425.288-.712T17 16h3q.425 0 .713.288T21 17t-.288.713T20 18zM6 6V4q0-.425.288-.712T7 3t.713.288T8 4v3q0 .425-.288.713T7 8H4q-.425 0-.712-.288T3 7t.288-.712T4 6zm12 0h2q.425 0 .713.288T21 7t-.288.713T20 8h-3q-.425 0-.712-.288T16 7V4q0-.425.288-.712T17 3t.713.288T18 4z"/></svg>',onClick:()=>{this.toggleFullscreen(t)}})})}toggleFullscreen(t){const e=t.element;this.fullscreen?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),t.options.showHideAnimationType="zoom",this.fullscreen=!1):(e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen(),t.options.showHideAnimationType="fade",this.fullscreen=!0),document.querySelector("#pswp__icn-exit-fullscreen").style.display=this.fullscreen?"inline":"none",document.querySelector("#pswp__icn-fullscreen").style.display=this.fullscreen?"none":"inline"}},xt=class{constructor(t,e={}){this.lightbox=t,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},e),this.setSlideshowLength(Number(localStorage.getItem("pswp_delay"))||this.options.defaultDelayMs),document.head.insertAdjacentHTML("beforeend",`<style>.pswp__progress-bar{position:fixed;${this.options.progressBarPosition}:0;width:0;height:0}.pswp__progress-bar.running{width:100%;height:2px;transition-property:width;background:#ff4800}</style>`),this.slideshowIsRunning=!1,this.slideshowTimerID=null,this.wakeLockIsRunning=!1,this.wakeLockSentinel=null,this.lightbox.on("init",()=>{this.init(this.lightbox.pswp)})}init(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"playpause-button",title:"Toggle slideshow (Space)\nChange delay with +/- while running",order:this.options.playPauseButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-play"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-stop"/><path id="pswp__icn-play" d="M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"/><path id="pswp__icn-stop" style="display:none" d="M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"/></svg>',onClick:()=>{this.setSlideshowState()}}),t.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),t.events.add(document,"keydown",t=>{switch(t.code){case"Space":this.setSlideshowState(),t.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),t.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),t.preventDefault()}})}),this.lightbox.on("change",()=>{this.slideshowIsRunning&&this.options.restartOnSlideChange&&this.goToNextSlideAfterTimeout()}),this.lightbox.on("close",()=>{this.slideshowIsRunning&&this.setSlideshowState()})}showUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.add("pswp--ui-visible"),this.uiVisible=!0}stopAutoHideTimer(){this.autoHideTimer&&(clearTimeout(this.autoHideTimer),this.autoHideTimer=null)}hideUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.remove("pswp--ui-visible"),this.uiVisible=!1}resetAutoHideTimer(){this.autoHideTimer&&clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(()=>{this.slideshowIsRunning&&this.hideUI(),this.autoHideTimer=null},[3e3])}setSlideshowState(){this.slideshowIsRunning=!this.slideshowIsRunning,this.slideshowIsRunning?(this.goToNextSlideAfterTimeout(),this.showUI(),this.resetAutoHideTimer(),document.addEventListener("touchstart",()=>{this.stopAutoHideTimer(),this.showUI()}),document.addEventListener("touchend",()=>{this.resetAutoHideTimer()}),document.addEventListener("mousemove",()=>{this.uiVisible||this.showUI(),this.resetAutoHideTimer()})):(this.showUI(),this.resetSlideshow(),this.stopAutoHideTimer()),document.querySelector("#pswp__icn-stop").style.display=this.slideshowIsRunning?"inline":"none",document.querySelector("#pswp__icn-play").style.display=this.slideshowIsRunning?"none":"inline",document.querySelector(".pswp__progress-bar").style.opacity=this.options.autoHideProgressBar?null:1,this.toggleWakeLock()}setSlideshowLength(t){this.options.defaultDelayMs=Math.min(Math.max(t,1e3),2147483647),this.options.defaultDelayMs!=t&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(t){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+t),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const e=document.querySelector(".pswp__counter");e&&(e.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(t){return"video"===t?.data?.type}getSlideTimeout(){const t=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(t)){const e=t.element;if(e.paused)return this.options.defaultDelayMs;const n=e.duration,i=e.currentTime;return isNaN(n)||isNaN(i)?this.options.defaultDelayMs:1e3*(n-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const t=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(t)){const e=t.element;return e.ended||e.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(e.networkState)}return!t.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const t=this.getSlideTimeout();this.slideshowTimerID=setTimeout(()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()},t),setTimeout(()=>{this.slideshowIsRunning&&this.toggleProgressBar(t)},100)}else this.slideshowTimerID=setTimeout(()=>{this.goToNextSlideAfterTimeout()},200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(t){const e=document.querySelector(".pswp__progress-bar");t?(e.style.transitionTimingFunction=this.getSlideTransition(),e.style.transitionDuration=`${t}ms`,e.classList.add("running")):e.classList.remove("running")}toggleWakeLock(){this.wakeLockIsRunning!=this.slideshowIsRunning&&("keepAwake"in screen?screen.keepAwake=this.slideshowIsRunning:"wakeLock"in navigator&&(this.wakeLockSentinel?this.wakeLockSentinel.release().then(()=>(this.wakeLockSentinel=null,!0)).catch(t=>console.error(t)):navigator.wakeLock.request("screen").then(t=>(this.wakeLockSentinel=t,this.wakeLockSentinel.addEventListener("release",()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1}),!0)).catch(t=>{})),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}},kt={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function _t(t){return t&&t.data&&"video"===t.data.type}var qt=class{constructor(t,e){this.options=e,this.initLightboxEvents(t),t.on("init",()=>{this.initPswpEvents(t.pswp)})}initLightboxEvents(t){t.on("contentLoad",this.onContentLoad.bind(this)),t.on("contentDestroy",this.onContentDestroy.bind(this)),t.on("contentActivate",this.onContentActivate.bind(this)),t.on("contentDeactivate",this.onContentDeactivate.bind(this)),t.on("contentAppend",this.onContentAppend.bind(this)),t.on("contentResize",this.onContentResize.bind(this)),t.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),t.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),t.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),t.addFilter("domItemData",(t,e,n)=>("video"===t.type&&n&&(n.dataset.pswpVideoSources?t.videoSources=JSON.parse(n.dataset.pswpVideoSources):n.dataset.pswpVideoSrc?t.videoSrc=n.dataset.pswpVideoSrc:t.videoSrc=n.href),t))}initPswpEvents(t){t.on("pointerDown",e=>{const n=t.currSlide;if(_t(n)&&this.options.preventDragOffset){const i=e.originalEvent;if("pointerdown"===i.type){const s=Math.ceil(n.height*n.currZoomLevel)+n.bounds.center.y,o=i.pageY-t.offset.y;o>s-this.options.preventDragOffset&&o<s&&e.preventDefault()}}}),t.on("appendHeavy",t=>{_t(t.slide)&&!t.slide.isActive&&t.preventDefault()}),t.on("close",()=>{_t(t.currSlide.content)&&this.pauseVideo(t.currSlide.content)})}onContentDestroy({content:t}){_t(t)&&t._videoPosterImg&&(t._videoPosterImg.onload=t._videoPosterImg.onerror=null,t._videoPosterImg=null)}onContentResize(t){if(_t(t.content)){t.preventDefault();const e=t.width,n=t.height,i=t.content;if(i.element&&(i.element.style.width=`${e}px`,i.element.style.height=`${n}px`),i.slide&&i.slide.placeholder){const t=i.slide.placeholder.element.style;t.transform="none",t.width=`${e}px`,t.height=`${n}px`}}}isKeepingPlaceholder(t,e){return!_t(e)&&t}isContentZoomable(t,e){return!_t(e)&&t}onContentActivate({content:t}){_t(t)&&this.options.autoplay&&this.playVideo(t)}onContentDeactivate({content:t}){_t(t)&&this.pauseVideo(t)}onContentAppend(t){_t(t.content)&&(t.preventDefault(),t.content.isAttached=!0,t.content.appendImage())}onContentLoad(t){const e=t.content;if(_t(t.content)&&(t.preventDefault(),!e.element)){if(e.state="loading",e.type="video",e.element=document.createElement("video"),this.options.videoAttributes)for(let t in this.options.videoAttributes)e.element.setAttribute(t,this.options.videoAttributes[t]||"");e.element.setAttribute("poster",e.data.msrc),this.preloadVideoPoster(e,e.data.msrc),e.element.style.position="relative",e.element.style.left=0,e.element.style.top=0,e.data.videoSources?e.data.videoSources.forEach(t=>{let n=document.createElement("source");n.src=t.src,n.type=t.type,e.element.appendChild(n)}):e.data.videoSrc&&(e.element.src=e.data.videoSrc)}}preloadVideoPoster(t,e){!t._videoPosterImg&&e&&(t._videoPosterImg=new Image,t._videoPosterImg.src=e,t._videoPosterImg.complete?t.onLoaded():t._videoPosterImg.onload=t._videoPosterImg.onerror=()=>{t.onLoaded()})}playVideo(t){t.element&&t.element.play()}pauseVideo(t){t.element&&t.element.pause()}useContentPlaceholder(t,e){return!!_t(e)||t}},St=class{constructor(t,e={}){new qt(t,{...kt,...e})}},Et=({open:t,ad:e,onClose:n,captureAdClick:i})=>/* @__PURE__ */c(D,{open:Boolean(t&&e),onOpenChange:t=>!t&&n?.(),children:/* @__PURE__ */c(R,{children:[/* @__PURE__ */c($,{className:"hidden",children:[/* @__PURE__ */c(B,{children:e?.title}),/* @__PURE__ */c(M,{children:e?.description})]}),/* @__PURE__ */c("div",{className:"flex max-w-lg flex-col overflow-hidden",children:[
|
|
2
|
-
/* @__PURE__ */c("img",{className:"h-auto max-h-96 w-full object-contain",src:e?.imageUrl,alt:"Image not found"}),
|
|
3
|
-
/* @__PURE__ */c("div",{className:"flex flex-col gap-2 p-3",children:[/* @__PURE__ */c(F,{variant:"h4",align:"center",lines:2,children:e?.title}),/* @__PURE__ */c(F,{variant:"body3",color:"secondary",align:"center",lines:6,children:e?.description})]}),
|
|
4
|
-
/* @__PURE__ */c(V,{fullWidth:!0,className:"rounded-t-none",onClick:()=>i?.(e?._id,e?.targetType??x.LINK,e?.targetUrl),icon:f[e?.targetType]??f[x.LINK],children:e?.targetText})]})]})}),It=({url:t,alt:e="",thumbnailUrl:n,blurhash:i,pswpData:s={},curateLink:o,onClick:r})=>{const a=/* @__PURE__ */c(u,{children:[/* @__PURE__ */c(N,{threshold:.1,src:n||t,blurhash:i,alt:e}),s.type===v.VIDEO&&/* @__PURE__ */c("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */c("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */c("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});return r?/* @__PURE__ */c("button",{className:"h-full w-full",onClick:r,children:a}):o?/* @__PURE__ */c(C,{to:o,className:"h-full w-full",children:a}):/* @__PURE__ */c("a",{href:t,className:"pswp-item block h-full w-full",...Object.keys(s).reduce((t,e)=>{var n;return t[`data-pswp-${n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=String(s[e]),t},{}),target:"_blank",rel:"noreferrer",children:a})},Ct=({style:t,content:e,curateLink:n,onAdClick:i})=>{const{captureAdImpression:s,captureAdEngagement:o,captureAdClick:r}=z();/* @__PURE__ */
|
|
5
|
-
return c("div",{style:t,className:"group relative mb-1 overflow-hidden rounded",children:[/* @__PURE__ */c(A,{className:"size-full",threshold:.8,triggerOnce:!0,onChange:t=>{t&&s(e._id)},onClick:()=>o(e._id),children:/* @__PURE__ */c(It,{url:e.src,thumbnailUrl:e.src,blurhash:e.blurhash,alt:e.caption,onClick:n?i:void 0,pswpData:{id:e._id,type:v.AD,hash:e._id,width:e.width,height:e.height,title:e.title,description:e.description,targetType:e.targetType,targetText:e.targetText,targetUrl:e.targetUrl,thumbnailUrl:e.imageUrl,blurhash:e.blurhash}})}),/* @__PURE__ */c("div",{className:"transition-opacity duration-500 group-hover:opacity-100 sm:opacity-0",children:/* @__PURE__ */c("div",{className:"text-foreground bg-background bg-opacity-75 absolute bottom-0 w-full flex-col items-center justify-between sm:flex sm:flex-row",children:[/* @__PURE__ */c("h3",{className:"text-foreground line-clamp-2 p-2 text-sm font-medium sm:ml-3 sm:line-clamp-1 sm:p-0",children:e.title}),e?.targetType!==x.NONE&&/* @__PURE__ */c(V,{immutable:!0,className:"w-full rounded-t-none py-1 text-nowrap sm:w-auto sm:rounded-t-none sm:rounded-bl-none sm:py-2",onClick:()=>r(e._id,e.targetType,e.targetUrl),icon:f[e?.targetType??x.LINK],children:e?.targetText})]})})]})},Lt=s(null),At=()=>{const t=w(Lt);if(!t)throw new Error("Popover components must be used within a Popover");return t},Nt=({children:t,className:n,open:i,onOpenChange:s})=>{const[o,r]=e(!1),a="boolean"==typeof i,l=a?i:o,h=d(),p=`popover-trigger-${h}`,u=`popover-content-${h}`,m=q(null);/* @__PURE__ */
|
|
6
|
-
return c(Lt.Provider,{value:{isOpen:l,setIsOpen:t=>{a||r(t),s?.(t)},triggerId:p,contentId:u,triggerRef:m},children:/* @__PURE__ */c("div",{"data-slot":"popover",className:k("relative inline-block",n),children:t})})},Mt=({children:t,asChild:e,className:n,onClick:i,...s})=>{const{isOpen:o,setIsOpen:r,triggerId:a,contentId:d,triggerRef:h}=At();if(l(()=>{if(!e)return;const t=document.getElementById(a);return h.current=t,()=>{h.current===t&&(h.current=null)}},[e,a,h]),e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type){const t=e.props?.className;return p(e,{id:a,className:n?t?`${t} ${n}`:n:t,"aria-haspopup":"dialog","aria-expanded":o,"aria-controls":o?d:void 0,onClick:t=>{r(!o),e.props?.onClick?.(t)},"data-state":o?"open":"closed"})}}/* @__PURE__ */
|
|
7
|
-
return c("button",{ref:h,id:a,type:"button","aria-haspopup":"dialog","aria-expanded":o,"aria-controls":o?d:void 0,"data-slot":"popover-trigger","data-state":o?"open":"closed",className:n,onClick:t=>{r(!o),i?.(t)},...s,children:t})},Bt=({children:t,className:n,align:s="center",side:o="top",sideOffset:r=4,...a})=>{const{isOpen:d,setIsOpen:p,contentId:u,triggerRef:m}=At(),{organization:g}=I(),f=q(null),[w,y]=e(null);if(i(()=>{if(!d)return;const t=()=>{if(!m.current||!f.current)return;const t=m.current.getBoundingClientRect(),e=f.current.getBoundingClientRect();let n=t.left,i=t.bottom+r;"center"===s&&(n=t.left+t.width/2-e.width/2),"end"===s&&(n=t.right-e.width),"top"===o&&(i=t.top-e.height-r),"left"===o&&(n=t.left-e.width-r,i=t.top+t.height/2-e.height/2),"right"===o&&(n=t.right+r,i=t.top+t.height/2-e.height/2),"bottom"===o&&(i=t.bottom+r),y({top:i,left:n})},e=requestAnimationFrame(t);return window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{cancelAnimationFrame(e),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[s,d,o,r,m]),l(()=>{if(!d)return;const t=t=>{const e=t.target;f.current&&!f.current.contains(e)&&m.current&&!m.current.contains(e)&&p(!1)},e=t=>{"Escape"===t.key&&(p(!1),m.current?.focus())},n=window.setTimeout(()=>{document.addEventListener("mousedown",t)},0);return document.addEventListener("keydown",e),()=>{window.clearTimeout(n),document.removeEventListener("mousedown",t),document.removeEventListener("keydown",e)}},[d,p,m]),!d)return null;const T=/* @__PURE__ */c("div",{ref:f,id:u,role:"dialog","aria-modal":"false","data-state":d?"open":"closed",className:k("bg-background text-foreground border-border shadow-outer rounded outline-none",n),style:{position:"fixed",top:w?.top??0,left:w?.left??0,zIndex:2010,...b(g)},...a,children:t});return"undefined"!=typeof document?h(T,document.body):T},Vt=({eventId:t,contentId:i,emojis:s=[],counts:o={},userReaction:r})=>{const{user:l,props:d,organization:h}=I(),p=d?.loginUrl,{handleReactionClick:u}=(()=>{const t=a(),{props:e,user:i}=I(),s=e?.organizationId;return{handleReactionClick:async(e,o,r)=>{if(!e||!o||!r)return!1;if(!i)return O.error("Please login to react"),!1;const a=[n.CONTENTS_BY_EVENT(e)],l=t.getQueriesData({queryKey:a});t.setQueriesData({queryKey:a},t=>t?.pages&&Array.isArray(t.pages)?{...t,pages:t.pages.map(t=>t.data?{...t,data:t.data.map(t=>{if(t._id===o){const e={...t.reactionCounts};return t.userReaction&&t.userReaction!==r&&(e[t.userReaction]=Math.max(0,(e[t.userReaction]??1)-1)),t.userReaction===r?(e[r]=Math.max(0,(e[r]??1)-1),{...t,reactionCounts:e,userReaction:void 0}):(e[r]=(e[r]??0)+1,{...t,reactionCounts:e,userReaction:r})}return t})}:t)}:t);try{return await E.post(T.UPDATE_REACTION,{json:{eventId:e,contentId:o,reaction:r},headers:{"x-org-id":s,Authorization:`Bearer ${i.token}`}}),!0}catch(c){return l.forEach(([e,n])=>{t.setQueryData(e,n)}),O.error("Failed to add reaction"),console.error("Error handling reaction click:",c),!1}}}})(),[g,f]=e(!1),[w,y]=e(!1),v=Object.values(o).reduce((t,e)=>t+e,0);/* @__PURE__ */
|
|
8
|
-
return c(Nt,{open:g,onOpenChange:f,children:[/* @__PURE__ */c(Mt,{children:/* @__PURE__ */c("div",{className:k("bg-background/50 flex items-center gap-1 rounded px-2 py-1 backdrop-blur-sm transition-transform active:scale-90 sm:gap-2 sm:py-0",r&&"ring-primary ring-1"),children:[(s||[]).slice().sort((t,e)=>(o[e]||0)-(o[t]||0)).slice(0,1).map(t=>/* @__PURE__ */c("span",{className:"text-sm sm:text-lg",children:r||t},`${i}-${t}-1`)),v>0&&/* @__PURE__ */c("span",{className:"text-xs font-bold sm:text-sm",children:v||0})]})}),/* @__PURE__ */c(Bt,{side:"top",align:"end",children:[l?null:/* @__PURE__ */c("div",h?.customAuth?{className:"p-2 font-semibold",children:["Please"," ",
|
|
9
|
-
/* @__PURE__ */c("a",{className:"text-info underline",href:p,children:"Login"})," ","to react"]}:{className:"p-2 font-semibold",children:["Please"," ",
|
|
10
|
-
/* @__PURE__ */c(C,{className:"text-info underline",to:m.LOGIN,children:"Login"})," ","to react"]}),l&&/* @__PURE__ */c("div",{className:"flex gap-1 p-2",children:s.map(e=>{const n=r===e;/* @__PURE__ */
|
|
11
|
-
return c("div",{className:"flex flex-col items-center",children:[/* @__PURE__ */c("span",{className:"text-xs font-medium",children:o[e]||0}),/* @__PURE__ */c("button",{type:"button",disabled:w,className:k("text-3xl transition-transform disabled:opacity-50",n?"scale-125":"hover:scale-110",w&&"cursor-not-allowed"),onClick:()=>(async e=>{!w&&u&&(y(!0),await u(t,i,e)&&f(!1),y(!1))})(e),children:e})]},`${i}-${e}-2`)})})]})]})},Rt=({event:t={},content:e,curateLink:n})=>t.engagementStyle===S.CONTEST?/* @__PURE__ */c("button",{className:"bg-background/75 flex items-center gap-1 rounded px-2 py-1",children:[/* @__PURE__ */c(P,{name:"material-symbols:star-half-rounded",className:"size-4"}),/* @__PURE__ */c("span",{className:"text-xs font-semibold",children:parseFloat(String(e.score||0)).toFixed(1)})]}):t.engagementStyle===S.REACTION&&t.reactionEmojis?.length?/* @__PURE__ */c(Vt,{eventId:t?._id,contentId:e._id,emojis:t?.reactionEmojis,engagementStyle:t?.engagementStyle,counts:e.reactionCounts||{},userReaction:e.userReaction}):null,zt=({content:t})=>/* @__PURE__ */c("div",{className:"w-full space-y-3 px-3 pb-3",children:[t?.caption&&/* @__PURE__ */c("span",{className:"hidden w-full py-1 text-xs drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)] sm:block","data-tooltip-target":"tooltip-default",children:/* @__PURE__ */c("div",{className:"hover:text-foreground lg:text-md line-clamp-2 text-xs text-white lg:font-medium",title:t?.caption,role:"note",children:t?.caption})}),/* @__PURE__ */c("div",{className:"flex items-center justify-between",children:/* @__PURE__ */c("span",{className:"lg:text-md line-clamp-1 text-sm font-medium text-white drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]",children:t?.user?.name})})]}),Ot=({event:t,content:e,style:n,timestampField:i,curateLink:s,onChangeFaceUrl:o,hideControls:r})=>{const{organization:a}=I(),l=`content-${e._id}`,d=((t,e)=>{if(!t||!e)return null;const n=e?.[t];if(!n)return null;try{const t=new Date(String(n)),e=/* @__PURE__ */new Date,i=t.getFullYear()===e.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),t.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(i,e);/* @__PURE__ */
|
|
12
|
-
return c("div",{id:l,style:n,className:"group relative mb-1 overflow-hidden rounded",children:[/* @__PURE__ */c(It,{url:e.src,alt:e.caption,blurhash:e.blurhash,thumbnailUrl:e.thumbnailUrl,curateLink:s,pswpData:{id:e._id,type:v.IMAGE,hash:e._id,width:e.width,height:e.height,thumbnailUrl:e.thumbnailUrl,blurhash:e.blurhash,caption:e.caption,contentSummary:JSON.stringify(e.contentSummary)}}),!r&&/* @__PURE__ */c(u,{children:[d&&/* @__PURE__ */c("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:d}),a?.integrationSettings?.showQuickSearch&&(e.faces?.length??0)>0&&/* @__PURE__ */c("button",{className:"bg-primary absolute top-2 right-2 rounded-full p-1 text-gray-200 opacity-50 transition-all sm:p-1.5 sm:hover:scale-110 sm:hover:opacity-100",onClick:()=>{o?.(e?.url);const t=document.getElementById("media-gallery-container");t&&t.scrollIntoView({behavior:"smooth",block:"start"})},children:/* @__PURE__ */c(P,{color:"a11y",name:"material-symbols:familiar-face-and-zone-outline-rounded"})}),
|
|
13
|
-
/* @__PURE__ */c("div",{className:"",children:[/* @__PURE__ */c("div",{className:"absolute bottom-0 w-full rounded-b",children:/* @__PURE__ */c(zt,{content:e})}),/* @__PURE__ */c("div",{className:"absolute right-2 bottom-2",children:/* @__PURE__ */c(Rt,{event:t,content:e,curateLink:s})})]})]})]})},Pt=({content:t,style:e,event:n,timestampField:i,curateLink:s,hideControls:o})=>{const r=((t,e)=>{if(!t||!e)return null;const n=e?.[t];if(!n)return null;try{const t=new Date(String(n)),e=/* @__PURE__ */new Date,i=t.getFullYear()===e.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),t.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(i,t);/* @__PURE__ */
|
|
14
|
-
return c("div",{id:`content-${t._id}`,className:"group relative mb-1 overflow-hidden rounded",style:e,children:[/* @__PURE__ */c(It,{url:t.src??t.url,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,alt:t.caption,curateLink:s,pswpData:{id:t._id,type:v.VIDEO,hash:t._id,width:t.width,height:t.height,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,caption:t.caption}}),!o&&/* @__PURE__ */c("div",{className:"transition-opacity duration-500",children:[r&&/* @__PURE__ */c("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:r}),
|
|
15
|
-
/* @__PURE__ */c("div",{className:"absolute bottom-0 w-full rounded-b",children:/* @__PURE__ */c(zt,{content:t})}),
|
|
16
|
-
/* @__PURE__ */c("div",{className:"absolute right-2 bottom-2",children:/* @__PURE__ */c(Rt,{event:n,content:t,curateLink:s})})]})]})},Dt=({event:t,contents:n=[],singleColumnMode:i,kioskMode:s,timestampField:o,curateLink:r,onChangeFaceUrl:a})=>{const d=q(null),h=g(()=>`gallery-${t?._id??""}`,[t]),{captureAdImpression:p,captureAdClick:m}=z(),{organization:f}=I(),[w,y]=e(null);return l(()=>{if(!r){const t=new H({gallery:`#${h}`,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:()=>import("./B_TauT26.js")});d.current=t,new St(t),new wt(t),new vt(t,p,m),new bt(t),new xt(t),f?.navigationSettings?.showAIDescription&&new gt(t,{width:"400px",height:"40%"}),t.init()}return()=>{d.current?.destroy?.(),d.current=null}},[t?.galleryLayout,r,m,p,h,f]),/* @__PURE__ */c(u,{children:[/* @__PURE__ */c(g(()=>{switch(t?.galleryLayout){case _.ROW:return at;case _.COLUMN:return ht;case _.MASONRY:return ut;default:return at}},[i,t?.galleryLayout]),{spacing:4,targetRowHeight:i?500:360,columns:t=>i?1:t<400?2:t<800?3:4,photos:n.map(t=>({src:t.type===v.IMAGE||t.type===v.VIDEO?t.url:t.imageUrl,width:t.dimension?.width,height:t.dimension?.height,...t})),render:{container:({ref:t,className:e,children:n})=>/* @__PURE__ */c("div",{id:h,ref:t,className:k(e??"",i?"w-full lg:w-1/3":"w-full"),children:n}),photo:(e,{photo:n,width:i,height:l,index:d})=>{const h=n;let p=null;switch(h.type){case v.IMAGE:p=Ot;break;case v.VIDEO:p=Pt;break;case v.AD:p=Ct;break;default:p=null}return p&&/* @__PURE__ */c(p,{style:{width:i,height:l},event:t,content:h,timestampField:o,onAdClick:()=>{y(h)},hideControls:s,curateLink:r?`${r}/${h._id}`:null,onChangeFaceUrl:a},`${h._id??d}-${d}`)}}}),/* @__PURE__ */c(Et,{ad:w,onClose:()=>y(null),captureAdClick:m})]})};export{Dt as default};
|
package/react/BD2gDjZu.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=require("./BhU5cdLs.js");var i=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&t.equalizePoints(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:i,prevP1:e,dragAxis:s}=this.gestures,{currSlide:o}=this.pswp;if("y"===s&&this.pswp.options.closeOnVerticalDrag&&o&&o.currZoomLevel<=o.zoomLevels.fit&&!this.gestures.isMultitouch){const t=o.pan.y+(i.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:t}).defaultPrevented){this._setPanWithFriction("y",t,.6);const i=1-Math.abs(this._getVerticalDragRatio(o.pan.y));this.pswp.applyBgOpacity(i),o.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),o&&(t.roundPoint(o.pan),o.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:e}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),i.isShifted()){const e=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&e<0||t.x<.1&&e<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&e>0||t.x>-.1&&e>.5)&&(s=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(s,!0,t.x,!0)}e&&e.currZoomLevel>e.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(i){const{velocity:e}=this.gestures,{currSlide:s}=this.pswp;if(!s)return;const{pan:o,bounds:n}=s,a=o[i],r=this.pswp.bgOpacity<1&&"y"===i,h=a+e[i]*.995/(1-.995);if(r){const t=this._getVerticalDragRatio(a),i=this._getVerticalDragRatio(h);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const p=n.correctPan(i,h);if(a===p)return;const l=p===h?1:.82,c=this.pswp.bgOpacity,d=p-a;this.pswp.animations.startSpring({name:`panGesture${i}`,isPan:!0,start:a,end:p,velocity:e[i],dampingRatio:l,onUpdate:e=>{if(r&&this.pswp.bgOpacity<1){const i=1-(p-e)/d;this.pswp.applyBgOpacity(t.clamp(c+(1-c)*i,0,1))}o[i]=Math.floor(e),s.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:i,dragAxis:e,prevP1:s,isMultitouch:o}=this.gestures,{currSlide:n,mainScroll:a}=this.pswp,r=i[t]-s[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"===e&&"x"===t&&!o){const i=a.getCurrSlideX(),e=a.x-i,s=r>0,o=!s;if(l>p.min[t]&&s){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!==e){if(e>0)return a.moveTo(Math.max(h,i),!0),!0;if(e<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,e){const{currSlide:s}=this.pswp;if(!s)return;const{pan:o,bounds:n}=s;if(n.correctPan(t,i)!==i||e){const s=Math.round(i-o[t]);o[t]+=s*(e||.35)}else o[t]=i}};function e(t){return!!t.target.closest(".pswp__container")}var s=class{constructor(t){this.gestures=t}click(t,i){const e=i.target.classList,s=e.contains("pswp__img"),o=e.contains("pswp__item")||e.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,i):o&&this._doClickOrTapAction("bgClick",t,i)}tap(t,i){e(i)&&this._doClickOrTapAction("tap",t,i)}doubleTap(t,i){e(i)&&this._doClickOrTapAction("doubleTap",t,i)}_doClickOrTapAction(t,i,e){const{pswp:s}=this.gestures,{currSlide:o}=s,n=`${t}Action`,a=s.options[n];if(!s.dispatch(n,{point:i,originalEvent:e}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":s[a]();break;case"zoom":o?.toggleZoom(i);break;case"zoom-or-close":o?.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(i):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else a.call(s,i,e)}};function o(t,i,e){return t.x=(i.x+e.x)/2,t.y=(i.y+e.y)/2,t}var n=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:i}=this.gestures.pswp;i&&(this._startZoomLevel=i.currZoomLevel,t.equalizePoints(this._startPan,i.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:i,startP1:e,p2:s,startP2:n,pswp:a}=this.gestures,{currSlide:r}=a;if(!r)return;const h=r.zoomLevels.min,p=r.zoomLevels.max;if(!r.isZoomable()||a.mainScroll.isShifted())return;o(this._startZoomPoint,e,n),o(this._zoomPoint,i,s);let l=1/t.getDistanceBetween(e,n)*t.getDistanceBetween(i,s)*this._startZoomLevel;if(l>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),l<h)if(a.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const t=1-(h-l)/(h/1.2);a.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||a.applyBgOpacity(t)}else l=h-.15*(h-l);else l>p&&(l=p+.05*(l-p));r.pan.x=this._calculatePanForZoomLevel("x",l),r.pan.y=this._calculatePanForZoomLevel("y",l),r.setZoomLevel(l),r.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 e=i/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*e}correctZoomPan(i){const{pswp:e}=this.gestures,{currSlide:s}=e;if(!s?.isZoomable())return;0===this._zoomPoint.x&&(i=!0);const o=s.currZoomLevel;let n,a=!0;o<s.zoomLevels.initial?n=s.zoomLevels.initial:o>s.zoomLevels.max?n=s.zoomLevels.max:(a=!1,n=o);const r=e.bgOpacity,h=e.bgOpacity<1,p=t.equalizePoints({x:0,y:0},s.pan);let l=t.equalizePoints({x:0,y:0},p);i&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=o,t.equalizePoints(this._startPan,p)),a&&(l={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),s.setZoomLevel(n),l={x:s.bounds.correctPan("x",l.x),y:s.bounds.correctPan("y",l.y)},s.setZoomLevel(o);const c=!t.pointsEqual(l,p);if(!c&&!a&&!h)return s._setResolution(n),void s.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:i=>{if(i/=1e3,c||a){if(c&&(s.pan.x=p.x+(l.x-p.x)*i,s.pan.y=p.y+(l.y-p.y)*i),a){const t=o+(n-o)*i;s.setZoomLevel(t)}s.applyCurrentZoomPan()}h&&e.bgOpacity<1&&e.applyBgOpacity(t.clamp(r+(1-r)*i,0,1))},onComplete:()=>{s._setResolution(n),s.applyCurrentZoomPan()}})}},a=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 i(this),this.zoomLevels=new n(this),this.tapHandler=new s(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,e,s){const{pswp:o}=this,{events:n}=o,a=s?t+s:"";n.add(o.scrollWrap,t+i,this.onPointerDown.bind(this)),n.add(window,`${t}move`,this.onPointerMove.bind(this)),n.add(window,t+e,this.onPointerUp.bind(this)),a&&n.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(i){const e="mousedown"===i.type||"mouse"===i.pointerType;if(e&&i.button>0)return;const{pswp:s}=this;s.opener.isOpen?s.dispatch("pointerDown",{originalEvent:i}).defaultPrevented||(e&&(s.mouseDetected(),this._preventPointerEventBehaviour(i,"down")),s.animations.stopAll(),this._updatePoints(i,"down"),1===this._numActivePoints&&(this.dragAxis=null,t.equalizePoints(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):i.preventDefault()}onPointerMove(i){this._preventPointerEventBehaviour(i,"move"),this._numActivePoints&&(this._updatePoints(i,"move"),this.pswp.dispatch("pointerMove",{originalEvent:i}).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,t.equalizePoints(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?t.pointsEqual(this.p1,this.prevP1)||this.drag.change():t.pointsEqual(this.p1,this.prevP1)&&t.pointsEqual(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(i){const e=Date.now(),s=e-this._intervalTime;s<50&&!i||(this.velocity.x=this._getVelocity("x",s),this.velocity.y=this._getVelocity("y",s),this._intervalTime=e,t.equalizePoints(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(i){const{mainScroll:e}=this.pswp;if(e.isShifted())return void e.moveIndexBy(0,!0);if(i.type.indexOf("cancel")>0)return;if("mouseup"===i.type||"mouse"===i.pointerType)return void this.tapHandler.click(this.startP1,i);const s=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),t.getDistanceBetween(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,i)):(t.equalizePoints(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,i),this._clearTapTimer()},s))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,i){const e=this.p1[t]-this._intervalP1[t];return Math.abs(e)>1&&i>5?e/i:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}_updatePoints(i,e){if(this._pointerEventEnabled){const s=i,o=this._ongoingPointers.findIndex(t=>t.id===s.pointerId);"up"===e&&o>-1?this._ongoingPointers.splice(o,1):"down"===e&&-1===o?this._ongoingPointers.push(this._convertEventPosToPoint(s,{x:0,y:0})):o>-1&&this._convertEventPosToPoint(s,this._ongoingPointers[o]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&t.equalizePoints(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&t.equalizePoints(this.p2,this._ongoingPointers[1])}else{const t=i;this._numActivePoints=0,t.type.indexOf("touch")>-1?t.touches&&t.touches.length>0&&(this._convertEventPosToPoint(t.touches[0],this.p1),this._numActivePoints++,t.touches.length>1&&(this._convertEventPosToPoint(t.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(i,this.p1),"up"===e?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){t.equalizePoints(this.prevP1,this.p1),t.equalizePoints(this.prevP2,this.p2)}_updateStartPoints(){t.equalizePoints(this.startP1,this.p1),t.equalizePoints(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())}},r=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(i){const{pswp:e}=this.slide,s=this.slide["x"===i?"width":"height"]*this.currZoomLevel,o=t.parsePaddingOption("x"===i?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[i];this.center[i]=Math.round((n-s)/2)+o,this.max[i]=s>n?Math.round(n-s)+o:this.center[i],this.min[i]=s>n?o:this.center[i]}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(i,e){return t.clamp(e,this.max[i],this.min[i])}},h=class{constructor(i,e,s){this.data=i,this.index=e,this.pswp=s,this.isActive=e===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 t.ZoomLevel(s.options,i,e,s),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=t.createElement("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 r(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.isActive,1)&&(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 e=Math.round(this.width*i)||this.pswp.viewportSize.x,s=Math.round(this.height*i)||this.pswp.viewportSize.y;(this.sizeChanged(e,s)||t)&&this.content.setDisplayedSize(e,s)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(i,e,s,o){const{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:i,centerPoint:e,transitionDuration:s}),n.animations.stopAllPan();const a=this.currZoomLevel;o||(i=t.clamp(i,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(i),this.pan.x=this.calculateZoomToPanOffset("x",e,a),this.pan.y=this.calculateZoomToPanOffset("y",e,a),t.roundPoint(this.pan);const r=()=>{this._setResolution(i),this.applyCurrentZoomPan()};s?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:r,duration:s,easing:n.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,e){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),e||(e=this.zoomLevels.initial);const s=this.currZoomLevel/e;return this.bounds.correctPan(t,(this.pan[t]-i[t])*s+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),t.equalizePoints(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(i,e,s){s/=this.currentResolution||this.zoomLevels.initial,t.setTransform(this.container,i,e,s)}calculateSize(){const{pswp:i}=this;t.equalizePoints(this.panAreaSize,t.getPanAreaSize(i.options,i.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),i.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const i=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return t.toTransformString(this.pan.x,this.pan.y,i)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function p(t,i,e){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(t.disabled=e?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))})}var l={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:p},c={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)=>{p(t,i,!0)}},d={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"},u={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"},m={name:"counter",order:5,onInit:(t,i)=>{i.on("change",()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}},_={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 e,s=null;const o=i=>{var s;e!==i&&(e=i,s=i,t.classList.toggle("pswp__preloader--active",s))},n=()=>{if(!i.currSlide?.content.isLoading())return o(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout(()=>{o(Boolean(i.currSlide?.content.isLoading())),s=null},i.options.preloaderDelay))};i.on("change",n),i.on("loadComplete",t=>{i.currSlide===t.slide&&n()}),i.ui&&(i.ui.updatePreloaderVisibility=n)}},v=class{constructor(i,e){const s=e.name||e.className;let o=e.html;if(!1===i.options[s])return;"string"==typeof i.options[`${s}SVG`]&&(o=i.options[`${s}SVG`]),i.dispatch("uiElementCreate",{data:e});let n="";e.isButton?(n+="pswp__button ",n+=e.className||`pswp__button--${e.name}`):n+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();const r=t.createElement(n,a);if(e.isButton){"button"===a&&(r.type="button");let{title:t}=e;const{ariaLabel:o}=e;"string"==typeof i.options[`${s}Title`]&&(t=i.options[`${s}Title`]),t&&(r.title=t);const n=o||t;n&&r.setAttribute("aria-label",n)}r.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(i.size||32),i.outlineID&&(e+=`<use class="pswp__icn-shadow" xlink:href="#${i.outlineID}"/>`),e+=i.inner,e+="</svg>",e}(o),e.onInit&&e.onInit(r,i),e.onClick&&(r.onclick=t=>{"string"==typeof e.onClick?i[e.onClick]():"function"==typeof e.onClick&&e.onClick(t,r,i)});const h=e.appendTo||"bar";let p=i.element;"bar"===h?(i.topBar||(i.topBar=t.createElement("pswp__top-bar pswp__hide-on-close","div",i.scrollWrap)),p=i.topBar):(r.classList.add("pswp__hide-on-close"),"wrapper"===h&&(p=i.scrollWrap)),p?.appendChild(i.applyFilters("uiElement",r,e))}};function g(t,i){t.classList.toggle("pswp--zoomed-in",i)}var y=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=[d,l,c,u,_,m],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 v(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:i,options:e}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:s}=i;if(this.pswp.opener.isOpen||(s=i.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const o=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(o)<.01||!i.isZoomable())return g(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),g(t,(s===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=s),"zoom"!==e.imageClickAction&&"zoom-or-close"!==e.imageClickAction||t.classList.add("pswp--click-to-zoom")}},w="cubic-bezier(.4,0,.22,1)",f=class{constructor(i){this.props=i;const{target:e,onComplete:s,transform:o,onFinish:n=()=>{},duration:a=333,easing:r=w}=i;this.onFinish=n;const h=o?"transform":"opacity",p=i[h]??"";this._target=e,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{t.setTransitionStyle(e,h,a,r),this._helperTimeout=setTimeout(()=>{e.addEventListener("transitionend",this._onTransitionEnd,!1),e.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),e.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.removeTransitionStyle(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},P=class{constructor(t,i,e){this.velocity=1e3*t,this._dampingRatio=i||.75,this._naturalFrequency=e||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,i){let e,s=0;i/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*i);if(1===this._dampingRatio)e=this.velocity+this._naturalFrequency*t,s=(t+e*i)*o,this.velocity=s*-this._naturalFrequency+e*o;else if(this._dampingRatio<1){e=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const n=Math.cos(this._dampedFrequency*i),a=Math.sin(this._dampedFrequency*i);s=o*(t*n+e*a),this.velocity=s*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*e*n)}return s}},x=class{constructor(t){this.props=t,this._raf=0;const{start:i,end:e,velocity:s,onUpdate:o,onComplete:n,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:h}=t;this.onFinish=a;const p=new P(s,r,h);let l=Date.now(),c=i-e;const d=()=>{this._raf&&(c=p.easeFrame(c,Date.now()-l),Math.abs(c)<1&&Math.abs(p.velocity)<50?(o(e),n&&n(),this.onFinish()):(l=Date.now(),o(c+e),this._raf=requestAnimationFrame(d)))};this._raf=requestAnimationFrame(d)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},S=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,i){const e=i?new x(t):new f(t);return this.activeAnimations.push(e),e.onFinish=()=>this.stop(e),e}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)}},b=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{b=!0}}))}catch(B){}var z=class{constructor(){this._pool=[]}add(t,i,e,s){this._toggleListener(t,i,e,s)}remove(t,i,e,s){this._toggleListener(t,i,e,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,i,e,s,o,n){if(!t)return;const a=o?"removeEventListener":"addEventListener";i.split(" ").forEach(i=>{if(i){n||(o?this._pool=this._pool.filter(s=>s.type!==i||s.listener!==e||s.target!==t):this._pool.push({target:t,type:i,listener:e,passive:s}));const r=!!b&&{passive:s||!1};t[a](i,e,r)}})}},T={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},L=(t,i)=>i?t:T[t],A=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(i){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:i}).defaultPrevented)return;if(t.specialKeyUsed(i))return;let s,o,n=!1;const a="key"in i;switch(a?i.key:i.keyCode){case L("Escape",a):e.options.escKey&&(s="close");break;case L("z",a):s="toggleZoom";break;case L("ArrowLeft",a):o="x";break;case L("ArrowUp",a):o="y";break;case L("ArrowRight",a):o="x",n=!0;break;case L("ArrowDown",a):n=!0,o="y";break;case L("Tab",a):this._focusRoot()}if(o){i.preventDefault();const{currSlide:t}=e;e.options.arrowKeys&&"x"===o&&e.getNumItems()>1?s=n?"next":"prev":t&&t.currZoomLevel>t.zoomLevels.fit&&(t.pan[o]+=n?-80:80,t.panTo(t.pan.x,t.pan.y))}s&&(i.preventDefault(),e[s]())}_onFocusIn(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}},C=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(i){const{pswp:e}=this,s=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),o=s!==this.slideWidth;o&&(this.slideWidth=s,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((e,s)=>{o&&t.setTransform(e.el,(s+this._containerShiftIndex)*this.slideWidth),i&&e.slide&&e.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let i=0;i<3;i++){const e=t.createElement("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=1===i?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,e){const{pswp:s}=this;let o=s.potentialIndex+t;const n=s.getNumItems();if(s.canLoop()){o=s.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-s.potentialIndex;s.potentialIndex=o,this._currPositionIndex-=t,s.animations.stopMainScroll();const a=this.getCurrSlideX();if(i){s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:e||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.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:i}=this,e=this._prevPositionIndex-this._currPositionIndex;if(!e)return;this._prevPositionIndex=this._currPositionIndex,i.currIndex=i.potentialIndex;let s,o=Math.abs(e);o>=3&&(this._containerShiftIndex+=e+(e>0?-3:3),o=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let n=0;n<o;n++)e>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,t.setTransform(s.el,(this._containerShiftIndex+2)*this.slideWidth),i.setContent(s,i.currIndex-o+n+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,t.setTransform(s.el,this._containerShiftIndex*this.slideWidth),i.setContent(s,i.currIndex+o-n-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),i.animations.stopAllPan(),this.itemHolders.forEach((t,i)=>{t.slide&&t.slide.setIsActive(1===i)}),i.currSlide=this.itemHolders[1]?.slide,i.contentLoader.updateLazy(e),i.currSlide&&i.currSlide.applyCurrentZoomPan(),i.dispatch("change")}moveTo(i,e){if(!this.pswp.canLoop()&&e){let t=(this.slideWidth*this._currPositionIndex-i)/this.slideWidth;t+=this.pswp.currIndex;const e=Math.round(i-this.x);(t<0&&e>0||t>=this.pswp.getNumItems()-1&&e<0)&&(i=this.x+.35*e)}this.x=i,this.pswp.container&&t.setTransform(this.pswp.container,i),this.pswp.dispatch("moveMainScroll",{x:i,dragging:e??!1})}},Z=.003,I=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:e}=t;if("fade"===e.showHideAnimationType?(e.showHideOpacity=!0,this._thumbBounds=void 0):"none"===e.showHideAnimationType?(e.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=e.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Z,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(Z)),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(Z)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(Z)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Z)))):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(i=>{let e=!1,s=!0;t.decodeImage(this._placeholder).finally(()=>{e=!0,s||i(!0)}),setTimeout(()=>{s=!1,e&&i(!0)},50),setTimeout(i,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(i){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:s}=this._thumbBounds,{currSlide:o,viewportSize:n}=e;if(this._croppedZoom&&s&&this._cropContainer1&&this._cropContainer2){const e=-n.x+(this._thumbBounds.x-s.x)+s.w,o=-n.y+(this._thumbBounds.y-s.y)+s.h,a=n.x-s.w,r=n.y-s.h;i?(this._animateTo(this._cropContainer1,"transform",t.toTransformString(e,o)),this._animateTo(this._cropContainer2,"transform",t.toTransformString(a,r))):(t.setTransform(this._cropContainer1,e,o),t.setTransform(this._cropContainer2,a,r))}o&&(t.equalizePoints(o.pan,s||this._thumbBounds),o.currZoomLevel=this._thumbBounds.w/o.width,i?this._animateTo(o.container,"transform",o.getCurrentTransform()):o.applyCurrentZoomPan())}_animateTo(t,i,e){if(!this._duration)return void(t.style[i]=e);const{animations:s}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};o[i]=e,s.startTransition(o)}},O=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:e,deltaY:s}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let e=-s;1===t.deltaMode?e*=.05:e*=t.deltaMode?1:.002,e=2**e;const o=i.currZoomLevel*e;i.zoomTo(o,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(e*=18,s*=18),i.panTo(i.pan.x-e,i.pan.y-s))}},E={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)"},D=class extends t.PhotoSwipeBase{constructor(i){super(),this.options=this._prepareOptions(i||{}),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 z,this.animations=new S,this.mainScroll=new C(this),this.gestures=new a(this),this.opener=new I(this),this.keyboard=new A(this),this.contentLoader=new t.ContentLoader(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 O(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(i){const e=this.getNumItems();return this.options.loop&&(i>e-1&&(i-=e),i<0&&(i+=e)),t.clamp(i,0,e-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,e)=>{let s=(this.currSlide?.index??0)-1+e;this.canLoop()&&(s=this.getLoopedIndex(s)),s===t&&(this.setContent(i,t,!0),1===e&&(this.currSlide=i.slide,i.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,i,e){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!e)return;t.slide.destroy(),t.slide=void 0}!this.canLoop()&&(i<0||i>=this.getNumItems())||(t.slide=new h(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(i){if(this.isDestroying)return;const e=t.getViewportSize(this.options,this);!i&&t.pointsEqual(e,this._prevViewportSize)||(t.equalizePoints(this._prevViewportSize,e),this.dispatch("beforeResize"),t.equalizePoints(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=t.createElement("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=t.createElement("pswp__bg","div",this.element),this.scrollWrap=t.createElement("pswp__scroll-wrap","section",this.element),this.container=t.createElement("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 y(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,e){const s=e.dispatch("thumbBounds",{index:t,itemData:i,instance:e});if(s.thumbBounds)return s.thumbBounds;const{element:o}=i;let n,a;if(o&&!1!==e.options.thumbSelector){const t=e.options.thumbSelector||"img";a=o.matches(t)?o:o.querySelector(t)}return a=e.applyFilters("thumbEl",a,i,t),a&&(n=i.thumbCropped?function(t,i,e){const s=t.getBoundingClientRect(),o=s.width/i,n=s.height/e,a=o>n?o:n,r=(s.width-i*a)/2,h=(s.height-e*a)/2,p={x:s.left+r,y:s.top+h,w:i*a};return p.innerRect={w:s.width,h:s.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)),e.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),{...E,...t}}};exports.default=D;
|
package/react/BUcttdEL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=require("./D4geS7mP.js"),e=require("./DV6DJ1Br.js"),o=require("./sxfIEK17.js"),r=require("./BhU5cdLs.js");let n=require("react");n=t.__toESM(n);var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),s=Object.freeze({...i,...a}),c=Object.freeze({...s,body:"",hidden:!1});function l(t,e){const o=function(t,e){const o={};!t.hFlip!=!e.hFlip&&(o.hFlip=!0),!t.vFlip!=!e.vFlip&&(o.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(o.rotate=r),o}(t,e);for(const r in c)r in a?r in t&&!(r in o)&&(o[r]=a[r]):r in e?o[r]=e[r]:r in t&&(o[r]=t[r]);return o}function f(t,e,o){const r=t.icons,n=t.aliases||Object.create(null);let i={};function a(t){i=l(r[t]||n[t],i)}return a(e),o.forEach(a),l(t,i)}function d(t,e){const o=[];if("object"!=typeof t||"object"!=typeof t.icons)return o;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),o.push(t)});const r=function(t){const e=t.icons,o=t.aliases||Object.create(null),r=Object.create(null);return Object.keys(e).concat(Object.keys(o)).forEach(function t(n){if(e[n])return r[n]=[];if(!(n in r)){r[n]=null;const e=o[n]&&o[n].parent,i=e&&t(e);i&&(r[n]=[e].concat(i))}return r[n]}),r}(t);for(const n in r){const i=r[n];i&&(e(n,f(t,n,i)),o.push(n))}return o}var u={provider:"",aliases:{},not_found:{},...i};function p(t,e){for(const o in e)if(o in t&&typeof t[o]!=typeof e[o])return!1;return!0}function g(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!p(t,u))return null;const o=e.icons;for(const n in o){const t=o[n];if(!n||"string"!=typeof t.body||!p(t,c))return null}const r=e.aliases||Object.create(null);for(const n in r){const t=r[n],e=t.parent;if(!n||"string"!=typeof e||!o[e]&&!r[e]||!p(t,c))return null}return e}var m=Object.create(null);function y(t,e){const o=m[t]||(m[t]=Object.create(null));return o[e]||(o[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function h(t,e){return g(e)?d(e,(e,o)=>{o?t.icons[e]=o:t.missing.add(e)}):[]}var b=/^[a-z0-9]+(-[a-z0-9]+)*$/,v=(t,e,o,r="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),o=n.pop(),i={provider:n.length>0?n[0]:r,prefix:o,name:t};return e&&!_(i)?null:i}const i=n[0],a=i.split("-");if(a.length>1){const t={provider:r,prefix:a.shift(),name:a.join("-")};return e&&!_(t)?null:t}if(o&&""===r){const t={provider:r,prefix:"",name:i};return e&&!_(t,o)?null:t}return null},_=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),x=!1;function T(t){return"boolean"==typeof t&&(x=t),x}function w(t){const e="string"==typeof t?v(t,!0,x):t;if(e){const t=y(e.provider,e.prefix),o=e.name;return t.icons[o]||(t.missing.has(o)?null:void 0)}}var k=Object.freeze({width:null,height:null}),E=Object.freeze({...k,...a}),O=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function j(t,e,o){if(1===e)return t;if(o=o||100,"number"==typeof t)return Math.ceil(t*e*o)/o;if("string"!=typeof t)return t;const r=t.split(O);if(null===r||!r.length)return t;const n=[];let i=r.shift(),a=I.test(i);for(;;){if(a){const t=parseFloat(i);isNaN(t)?n.push(i):n.push(Math.ceil(t*e*o)/o)}else n.push(i);if(i=r.shift(),void 0===i)return n.join("");a=!a}}var S=/\sid="(\S+)"/g,A="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),P=0;function z(t,e=A){const o=[];let r;for(;r=S.exec(t);)o.push(r[1]);if(!o.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return o.forEach(o=>{const r="function"==typeof e?e(o):e+(P++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var C=Object.create(null);function N(t){return C[t]||C[""]}function L(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}for(var F=Object.create(null),D=["https://api.simplesvg.com","https://api.unisvg.com"],R=[];D.length>0;)1===D.length||Math.random()>.5?R.push(D.shift()):R.push(D.pop());function M(t,e){const o=L(e);return null!==o&&(F[t]=o,!0)}function $(t){return F[t]}F[""]=L({resources:["https://api.iconify.design"].concat(R)});var U=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),V={prepare:(t,e,o)=>{const r=[],n=function(t,e){const o=$(t);if(!o)return 0;let r;if(o.maxURL){let t=0;o.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";r=o.maxURL-t-o.path.length-n.length}else r=0;return r}(t,e),i="icons";let a={type:i,provider:t,prefix:e,icons:[]},s=0;return o.forEach((o,c)=>{s+=o.length+1,s>=n&&c>0&&(r.push(a),a={type:i,provider:t,prefix:e,icons:[]},s=o.length),a.icons.push(o)}),r.push(a),r},send:(t,e,o)=>{if(!U)return void o("abort",424);let r=function(t){if("string"==typeof t){const e=$(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,o=e.icons.join(",");r+=t+".json?"+new URLSearchParams({icons:o}).toString();break}case"custom":{const t=e.uri;r+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void o("abort",400)}let n=503;U(t+r).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{o(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{o("success",t)}):setTimeout(()=>{404===t?o("abort",t):o("next",n)})}).catch(()=>{o("next",n)})}};function Y(t,e){t.forEach(t=>{const o=t.loaderCallbacks;o&&(t.loaderCallbacks=o.filter(t=>t.id!==e))})}var q=0,B={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function X(t){const e={...B,...t};let o=[];function r(){o=o.filter(t=>"pending"===t().status)}return{query:function(t,n,i){const a=function(t,e,o,r){const n=t.resources.length,i=t.random?Math.floor(Math.random()*n):t.index;let a;if(t.random){let e=t.resources.slice(0);for(a=[];e.length>1;){const t=Math.floor(Math.random()*e.length);a.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}a=a.concat(e)}else a=t.resources.slice(i).concat(t.resources.slice(0,i));const s=Date.now();let c,l="pending",f=0,d=null,u=[],p=[];function g(){d&&(clearTimeout(d),d=null)}function m(){"pending"===l&&(l="aborted"),g(),u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}function y(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function h(){l="failed",p.forEach(t=>{t(void 0,c)})}function b(){u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}return"function"==typeof r&&p.push(r),setTimeout(function r(){if("pending"!==l)return;g();const n=a.shift();if(void 0===n)return u.length?void(d=setTimeout(()=>{g(),"pending"===l&&(b(),h())},t.timeout)):void h();const i={status:"pending",resource:n,callback:(e,o)=>{!function(e,o,n){const i="success"!==o;switch(u=u.filter(t=>t!==e),l){case"pending":break;case"failed":if(i||!t.dataAfterTimeout)return;break;default:return}if("abort"===o)return c=n,void h();if(i)return c=n,void(u.length||(a.length?r():h()));if(g(),b(),!t.random){const o=t.resources.indexOf(e.resource);-1!==o&&o!==t.index&&(t.index=o)}l="completed",p.forEach(t=>{t(n)})}(i,e,o)}};u.push(i),f++,d=setTimeout(r,t.rotate),o(n,e,i.callback)}),function(){return{startTime:s,payload:e,status:l,queriesSent:f,queriesPending:u.length,subscribe:y,abort:m}}}(e,t,n,(t,e)=>{r(),i&&i(t,e)});return o.push(a),a},find:function(t){return o.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:r}}function G(){}var H=Object.create(null);function Q(){}function W(t,e,o){function r(){const o=t.pendingIcons;e.forEach(e=>{o&&o.delete(e),t.icons[e]||t.missing.add(e)})}if(o&&"object"==typeof o)try{if(!h(t,o).length)return void r()}catch(n){console.error(n)}r(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let o=!1;const r=t.provider,n=t.prefix;e.forEach(e=>{const i=e.icons,a=i.pending.length;i.pending=i.pending.filter(e=>{if(e.prefix!==n)return!0;const a=e.name;if(t.icons[a])i.loaded.push({provider:r,prefix:n,name:a});else{if(!t.missing.has(a))return o=!0,!0;i.missing.push({provider:r,prefix:n,name:a})}return!1}),i.pending.length!==a&&(o||Y([t],e.id),e.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),e.abort))})}))}(t)}))}(t)}function K(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function J(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:o}=t,r=t.iconsToLoad;if(delete t.iconsToLoad,!r||!r.length)return;const n=t.loadIcon;if(t.loadIcons&&(r.length>1||!n))return void K(t.loadIcons(r,o,e),e=>{W(t,r,e)});if(n)return void r.forEach(r=>{K(n(r,o,e),e=>{W(t,[r],e?{prefix:o,icons:{[r]:e}}:null)})});const{valid:i,invalid:a}=function(t){const e=[],o=[];return t.forEach(t=>{(t.match(b)?e:o).push(t)}),{valid:e,invalid:o}}(r);if(a.length&&W(t,a,null),!i.length)return;const s=o.match(b)?N(e):null;s?s.prepare(e,o,i).forEach(o=>{!function(t,e,o){let r,n;if("string"==typeof t){const e=N(t);if(!e)return o(void 0,424),G;n=e.send;const i=function(t){if(!H[t]){const e=$(t);if(!e)return;H[t]={config:e,redundancy:X(e)}}return H[t]}(t);i&&(r=i.redundancy)}else{const e=L(t);if(e){r=X(e);const o=N(t.resources?t.resources[0]:"");o&&(n=o.send)}}r&&n?r.query(e,n,o)().abort:o(void 0,424)}(e,o,e=>{W(t,o.icons,e)})}):W(t,i,null)}))}var Z,tt=(t,e)=>{const o=function(t){const e={loaded:[],missing:[],pending:[]},o=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let r={provider:"",prefix:"",name:""};return t.forEach(t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const n=t.provider,i=t.prefix,a=t.name,s=o[n]||(o[n]=Object.create(null)),c=s[i]||(s[i]=y(n,i));let l;l=a in c.icons?e.loaded:""===i||c.missing.has(a)?e.missing:e.pending;const f={provider:n,prefix:i,name:a};l.push(f)}),e}(function(t,e=!0,o=!1){const r=[];return t.forEach(t=>{const n="string"==typeof t?v(t,e,o):t;n&&r.push(n)}),r}(t,!0,T()));if(!o.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(o.loaded,o.missing,o.pending,Q)}),()=>{t=!1}}const r=Object.create(null),n=[];let i,a;return o.pending.forEach(t=>{const{provider:e,prefix:o}=t;if(o===a&&e===i)return;i=e,a=o,n.push(y(e,o));const s=r[e]||(r[e]=Object.create(null));s[o]||(s[o]=[])}),o.pending.forEach(t=>{const{provider:e,prefix:o,name:n}=t,i=y(e,o),a=i.pendingIcons||(i.pendingIcons=new Set);a.has(n)||(a.add(n),r[e][o].push(n))}),n.forEach(t=>{const e=r[t.provider][t.prefix];e.length&&J(t,e)}),e?function(t,e,o){const r=q++,n=Y.bind(null,o,r);if(!e.pending.length)return n;const i={id:r,icons:e,callback:t,abort:n};return o.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(i)}),n}(e,o,n):Q},et=/[\s,]+/;function ot(t,e){e.split(et).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function rt(t,e=0){const o=t.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(""===o){const e=parseInt(t);return isNaN(e)?0:r(e)}if(o!==t){let e=0;switch(o){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-o.length));return isNaN(n)?0:(n/=e,n%1==0?r(n):0)}}return e}function nt(t){return void 0===Z&&function(){try{Z=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){Z=null}}(),Z?Z.createHTML(t):t}var it={...E,inline:!1},at={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},st={display:"inline-block"},ct={backgroundColor:"currentColor"},lt={backgroundColor:"transparent"},ft={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},dt={WebkitMask:ct,mask:ct,background:lt};for(const ne in dt){const t=dt[ne];for(const e in ft)t[ne+e]=ft[e]}var ut={...it,inline:!0};function pt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var gt;if(T(!0),gt=V,C[""]=gt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,o="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),x&&!e&&!t.prefix){let e=!1;return g(t)&&(t.prefix="",d(t,(t,r)=>{(function(t,e){const r=v(t,!0,x);if(!r)return!1;const n=y(r.provider,r.prefix);return e?function(t,e,r){try{if("string"==typeof r.body)return t.icons[e]={...r},!0}catch(o){}return!1}(n,r.name,e):(n.missing.add(r.name),!0)})(t,r)&&(e=!0)})),e}const r=t.prefix;return!!_({prefix:r,name:"a"})&&!!h(y(e,r),t)}(t))&&console.error(o)}catch(e){console.error(o)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const o="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if("object"!=typeof r||!r||void 0===r.resources)continue;M(t,r)||console.error(o)}catch(re){console.error(o)}}}}function mt(t){const[e,o]=(0,n.useState)(!!t.ssr),[r,i]=(0,n.useState)({}),[a,c]=(0,n.useState)(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const o=w(e);if(o)return{name:e,data:o}}return{name:""}}(!!t.ssr));function l(){const t=r.callback;t&&(t(),i({}))}function f(t){if(JSON.stringify(a)!==JSON.stringify(t))return l(),c(t),!0}function d(){var e;const o=t.icon;if("object"==typeof o)return void f({name:"",data:o});const r=w(o);f({name:o,data:r})&&(void 0===r?i({callback:tt([o],d)}):r&&(null===(e=t.onLoad)||void 0===e||e.call(t,o)))}(0,n.useEffect)(()=>(o(!0),l),[]),(0,n.useEffect)(()=>{e&&d()},[t.icon,e]);const{name:u,data:p}=a;return p?((t,e,o)=>{const r=e.inline?ut:it,i=function(t,e){const o={...t};for(const r in e){const t=e[r],n=typeof t;r in k?(null===t||t&&("string"===n||"number"===n))&&(o[r]=t):n===typeof o[r]&&(o[r]="rotate"===r?t%4:t)}return o}(r,e),a=e.mode||"svg",c={},l=e.style||{},f={..."svg"===a?at:{}};if(o){const t=v(o,!1,!0);if(t){const e=["iconify"];for(const o of["provider","prefix"])t[o]&&e.push("iconify--"+t[o]);f.className=e.join(" ")}}for(let n in e){const t=e[n];if(void 0!==t)switch(n){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":f.ref=t;break;case"className":f[n]=(f[n]?f[n]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":i[n]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&ot(i,t);break;case"color":c.color=t;break;case"rotate":"string"==typeof t?i[n]=rt(t):"number"==typeof t&&(i[n]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete f["aria-hidden"];break;default:void 0===r[n]&&(f[n]=t)}}const d=function(t,e){const o={...s,...t},r={...E,...e},n={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(t=>{const e=[],o=t.hFlip,r=t.vFlip;let a,s=t.rotate;switch(o?r?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):r&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=n.height/2+n.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:a=n.width/2+n.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(n.left!==n.top&&(a=n.left,n.left=n.top,n.top=a),n.width!==n.height&&(a=n.width,n.width=n.height,n.height=a)),e.length&&(i=function(t,e){const o=function(t,e="defs"){let o="";const r=t.indexOf("<"+e);for(;r>=0;){const n=t.indexOf(">",r),i=t.indexOf("</"+e);if(-1===n||-1===i)break;const a=t.indexOf(">",i);if(-1===a)break;o+=t.slice(n+1,i).trim(),t=t.slice(0,r).trim()+t.slice(a+1)}return{defs:o,content:t}}(t);return r=o.defs,n=e+o.content+"</g>",r?"<defs>"+r+"</defs>"+n:n;var r,n}(i,'<g transform="'+e.join(" ")+'">'))});const a=r.width,c=r.height,l=n.width,f=n.height;let d,u;null===a?(u=null===c?"1em":"auto"===c?f:c,d=j(u,l/f)):(d="auto"===a?l:a,u=null===c?j(d,f/l):"auto"===c?f:c);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const m=[n.left,n.top,l,f];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:i}}(t,i),u=d.attributes;if(i.inline&&(c.verticalAlign="-0.125em"),"svg"===a){f.style={...c,...l},Object.assign(f,u);let t=0,o=e.id;return"string"==typeof o&&(o=o.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:nt(z(d.body,o?()=>o+"ID"+t++:"iconifyReact"))},(0,n.createElement)("svg",f)}const{body:p,width:g,height:m}=t,y="mask"===a||"bg"!==a&&-1!==p.indexOf("currentColor"),h=function(t,e){let o=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)o+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+t+"</svg>"}(p,{...u,width:g+"",height:m+""});var b;return f.style={...c,"--svg":(b=h,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(b)+'")'),width:pt(u.width),height:pt(u.height),...st,...y?ct:lt,...l},(0,n.createElement)("span",f)})({...s,...p},t,u):t.children?t.children:t.fallback?t.fallback:(0,n.createElement)("span",{})}var yt=(0,n.forwardRef)((t,e)=>mt({...t,_ref:e})),ht=((0,n.forwardRef)((t,e)=>mt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),bt=e.clsx,vt=(t,e)=>o=>{var r;if(null==(null==e?void 0:e.variants))return bt(t,null==o?void 0:o.class,null==o?void 0:o.className);const{variants:n,defaultVariants:i}=e,a=Object.keys(n).map(t=>{const e=null==o?void 0:o[t],r=null==i?void 0:i[t];if(null===e)return null;const a=ht(e)||ht(r);return n[t][a]}),s=o&&Object.entries(o).reduce((t,e)=>{let[o,r]=e;return void 0===r||(t[o]=r),t},{});return bt(t,a,null==e||null===(r=e.compoundVariants)||void 0===r?void 0:r.reduce((t,e)=>{let{class:o,className:r,...n}=e;return Object.entries(n).every(t=>{let[e,o]=t;return Array.isArray(o)?o.includes({...i,...s}[e]):{...i,...s}[e]===o})?[...t,o,r]:t},[]),null==o?void 0:o.class,null==o?void 0:o.className)},_t=vt("",{variants:{variant:{default:"border-none",outline:"rounded",solid:"bg-background"},size:{sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7","2xl":"size-8","3xl":"size-9"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",a11y:"text-primary-foreground",inherit:""}},compoundVariants:[{variant:"outline",color:"primary",class:"border-primary"},{variant:"outline",color:"secondary",class:"border-border"},{variant:"outline",color:"info",class:"border-info"},{variant:"outline",color:"warning",class:"border-warning"},{variant:"outline",color:"success",class:"border-success"},{variant:"outline",color:"error",class:"border-destructive"},{variant:"solid",color:"primary",class:"bg-background text-foreground"},{variant:"solid",color:"secondary",class:"bg-background text-muted-foreground"},{variant:"solid",color:"info",class:"bg-info text-foreground text-text-primary-dark"},{variant:"solid",color:"warning",class:"bg-warning text-foreground text-text-primary-dark"},{variant:"solid",color:"success",class:"bg-success text-foreground text-text-primary-dark"},{variant:"solid",color:"error",class:"bg-destructive text-foreground text-text-primary-dark"}],defaultVariants:{variant:"default",size:"md",color:"foreground"}}),xt=({className:t,color:o="foreground",size:r="md",variant:n="default",name:i="line-md:iconify1",...a})=>e.u(yt,{icon:i,className:e.cn(_t({color:o,size:r,variant:n,className:t})),...a});function Tt({children:t,asChild:o=!1,...r}){if(o){const o=Array.isArray(t)?t[0]:t;if(o&&o.type)return e.Q(o,{...r,...o.props})}return e.u("button",{...r,children:t})}var wt=vt("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-muted-foreground 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"}}),kt=({className:t,type:o="button",disabled:r,loading:n,fullWidth:i,color:a,size:s,variant:c,icon:l,iconName:f,iconSvg:d,asChild:u=!1,immutable:p,elementRef:g,children:m,...y})=>{const h=u?Tt:"button",b=u?{asChild:!0}:{},v=d||l||(f?e.u(xt,{name:f,className:"text-primary-foreground"}):null);return e.u(h,{ref:g,type:o,disabled:r||n,className:e.cn(wt({color:a,size:s,variant:c}),t,i&&"w-full"),...b,...y,children:[e.u("div",{className:e.cn(n?"collapse":"visible flex items-center gap-3"),children:[v&&!n&&v,m]}),n&&e.u("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Et={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",blockquote:"blockquote",body1:"p",body2:"p",body3:"p",caption:"span",overline:"span",lead:"p"},Ot=vt("antialiased",{variants:{variant:{h1:"scroll-m-20 text-4xl font-bold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold",h5:"scroll-m-20 text-lg font-semibold",h6:"scroll-m-20 text-base font-semibold",body1:"text-base leading-relaxed font-medium",body2:"text-sm leading-relaxed",body3:"text-sm leading-relaxed sm:text-base",p:"text-base leading-7",lead:"text-muted-foreground text-xl leading-relaxed",blockquote:"border-primary/30 text-muted-foreground border-l-4 pl-4 text-base italic",caption:"text-muted-foreground text-xs",overline:"text-muted-foreground text-xs font-medium tracking-widest uppercase"},color:{foreground:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",inherit:"text-inherit",secondary:"text-muted-foreground",white:"text-white",black:"text-black",a11y:"text-primary-foreground",light:"text-text-primary-light"},align:{left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body1",color:"foreground",align:"left"}}),It=({variant:t="body1",color:o,align:r,weight:n,transform:i,lines:a,shadow:s,noWrap:c,className:l,immutable:f,...d})=>{const u=Et[t];return e.u(u,{className:e.cn(Ot({variant:t,color:o,align:r,weight:n}),i,a&&a>0?`line-clamp-${a}`:void 0,s&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",c&&"truncate",l),...d,children:d.children})},jt=async()=>{const t=await o.getBrowserFingerprint();return"string"==typeof t?t:t?.fingerprint},St=()=>{const t=e.A(null),{props:r,sessionId:n,user:i}=o.useSession(),a=r?.organizationId,s=e.A(null),c=e.A(null),l=async(r,n)=>{if(r&&n&&(t.current||(t.current=await jt()),t.current))try{await o.ky.post(e.API_ROUTES.UPDATE_AD_ANALYTICS,{json:{adId:r,type:n,browserFingerprint:t.current},headers:{"x-org-id":a}})}catch(re){console.error(re)}},f=async t=>{if(n)try{await o.ky.post(e.API_ROUTES.UPDATE_SESSION,{headers:{"x-org-id":a},json:{sessionId:n,pageViews:t}})}catch(re){console.error(re)}};return{incrementEventView:async r=>{if(r&&(t.current||(t.current=await jt()),t.current))try{await o.ky.post(e.API_ROUTES.INCREMENT_EVENT_VIEW,{json:{eventSlug:r,browserFingerprint:t.current},headers:{"x-org-id":a,Authorization:i?`Bearer ${i.token}`:void 0}})}catch(re){console.error(re)}},captureAdImpression:async t=>l(t,e.AD_ANALYTICS_TYPE.AD_IMPRESSION),captureAdEngagement:async t=>l(t,e.AD_ANALYTICS_TYPE.AD_ENGAGEMENT),captureAdClick:(t,o,r)=>{if(l(t,e.AD_ANALYTICS_TYPE.AD_CLICK),r)switch(o){case e.AD_TARGET_TYPES.LINK:window.open(String(r),"_blank");break;case e.AD_TARGET_TYPES.EMAIL:window.location.href=`mailto:${String(r)}`;break;case e.AD_TARGET_TYPES.PHONE:window.location.href=`tel:${String(r)}`;break;case e.AD_TARGET_TYPES.SMS:window.location.href=`sms:${String(r)}`;break;case e.AD_TARGET_TYPES.WHATSAPP:window.location.href=`https://wa.me/${String(r)}`;break;case e.AD_TARGET_TYPES.MESSENGER:window.location.href=`https://m.me/${String(r)}`;break;default:window.open(String(r),"_blank")}},trackPageView:t=>{s.current&&c.current&&f([{page:s.current,entryTime:c.current,exitTime:Date.now()}]),s.current=t??null,c.current=Date.now()},exportPageViewsData:f}},At=e.R(null),Pt=({open:t,onOpenChange:o,children:r})=>{const[n,i]=e.d(!!t);return e.y(()=>{"boolean"==typeof t&&i(t)},[t]),e.u(At.Provider,{value:{open:n,setOpen:t=>{i(t),o?.(t)}},children:r})},zt=({children:t})=>e.u(e.k,{children:t}),Ct=({className:t,...o})=>{const r=e.x(At);return e.u("div",{"data-state":r?.open?"open":"closed",className:e.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",t),...o})},Nt=({className:t,children:r,...n})=>{const{organization:i}=o.useSession(),a=e.x(At);return e.y(()=>{if(!a?.open)return;const t=t=>{"Escape"===t.key&&a.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[a?.open]),a?.open?e.u(zt,{children:[e.u(Ct,{onClick:()=>a.setOpen(!1)}),e.u("div",{role:"dialog","aria-modal":"true","data-state":a?.open?"open":"closed",className:e.cn("shadow-outer border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed bottom-0 left-0 z-2002 w-full max-w-5xl rounded-3xl border border-x-0 border-b-0 duration-300 sm:top-[50%] sm:left-[50%] sm:h-fit sm:w-auto sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded sm:border",t),style:e.getStyleObject(i),...n,children:r})]}):null},Lt=({className:t,...o})=>e.u("div",{className:e.cn("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...o}),Ft=({className:t,...o})=>e.u("div",{className:e.cn("flex flex-col-reverse p-4 sm:flex-row sm:justify-end sm:space-x-4",t),...o}),Dt=({className:t,...o})=>e.u("h2",{className:e.cn("text-center text-lg font-semibold",t),...o}),Rt=({className:t,...o})=>e.u("p",{className:e.cn("text-muted-foreground text-center text-sm",t),...o});!function(t){if("undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var Mt=t=>"number"==typeof t&&!isNaN(t),$t=t=>"string"==typeof t,Ut=t=>"function"==typeof t;function Vt({enter:t,exit:e,appendPosition:o=!1,collapse:r=!0,collapseDuration:i=300}){return function({children:a,position:s,preventExitTransition:c,done:l,nodeRef:f,isIn:d,playToast:u}){let p=o?`${t}--${s}`:t,g=o?`${e}--${s}`:e,m=(0,n.useRef)(0);return(0,n.useLayoutEffect)(()=>{let t=f.current,e=p.split(" "),o=r=>{r.target===f.current&&(u(),t.removeEventListener("animationend",o),t.removeEventListener("animationcancel",o),0===m.current&&"animationcancel"!==r.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",o),t.addEventListener("animationcancel",o)},[]),(0,n.useEffect)(()=>{let t=f.current,e=()=>{t.removeEventListener("animationend",e),r?function(t,e,o=300){let{scrollHeight:r,style:n}=t;requestAnimationFrame(()=>{n.minHeight="initial",n.height=r+"px",n.transition=`all ${o}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(e,o)})})}(t,l,i):l()};d||(c?e():(m.current=1,t.className+=` ${g}`,t.addEventListener("animationend",e)))},[d]),n.default.createElement(n.default.Fragment,null,a)}}var Yt=1,qt=()=>""+Yt++,Bt=new Map,Xt=[],Gt=new Set,Ht=()=>Bt.size>0;function Qt(t,e){Bt.forEach(o=>{(null==e||null==e||!e.containerId||(null==e?void 0:e.containerId)===o.id)&&o.toggle(t,null==e?void 0:e.id)})}function Wt(t){return t&&($t(t.toastId)||Mt(t.toastId))?t.toastId:qt()}function Kt(t,e){return function(t,e){(t=>(0,n.isValidElement)(t)||$t(t)||Ut(t)||Mt(t))(t)&&(Ht()||Xt.push({content:t,options:e}),Bt.forEach(o=>{o.buildToast(t,e)}))}(t,e),e.toastId}function Jt(t,e){return{...e,type:e&&e.type||t,toastId:Wt(e)}}function Zt(t){return(e,o)=>Kt(e,Jt(t,o))}function te(t,e){return Kt(t,Jt("default",e))}te.loading=(t,e)=>Kt(t,Jt("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),te.promise=function(t,{pending:e,error:o,success:r},n){let i;e&&(i=$t(e)?te.loading(e,n):te.loading(e.render,{...n,...e}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(t,e,o)=>{if(null==e)return void te.dismiss(i);let r={type:t,...a,...n,data:o},s=$t(e)?{render:e}:e;return i?te.update(i,{...r,...s}):te(s.render,{...r,...s}),o},c=Ut(t)?t():t;return c.then(t=>s("success",r,t)).catch(t=>s("error",o,t)),c},te.success=Zt("success"),te.info=Zt("info"),te.error=Zt("error"),te.warning=Zt("warning"),te.warn=te.warning,te.dark=(t,e)=>Kt(t,Jt("default",{theme:"dark",...e})),te.dismiss=function(t){!function(t){if(Ht()){if(null==t||(t=>$t(t)||Mt(t))(t))Bt.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=Bt.get(t.containerId);e?e.removeToast(t.id):Bt.forEach(e=>{e.removeToast(t.id)})}}else Xt=Xt.filter(e=>null!=t&&e.options.toastId!==t)}(t)},te.clearWaitingQueue=(t={})=>{Bt.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},te.isActive=function(t,e){var o;if(e)return!(null==(o=Bt.get(e))||!o.isToastActive(t));let r=!1;return Bt.forEach(e=>{e.isToastActive(t)&&(r=!0)}),r},te.update=(t,e={})=>{let o=((t,{containerId:e})=>{var o;return null==(o=Bt.get(e||1))?void 0:o.toasts.get(t)})(t,e);if(o){let{props:r,content:n}=o,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:qt()};i.toastId!==t&&(i.staleId=t);let a=i.render||n;delete i.render,Kt(a,i)}},te.done=t=>{te.update(t,{progress:1})},te.onChange=function(t){return Gt.add(t),()=>{Gt.delete(t)}},te.play=t=>Qt(!0,t),te.pause=t=>Qt(!1,t);var ee=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),oe=(Vt(ee("bounce",!0)),Vt(ee("slide",!0)),Vt(ee("zoom")),Vt(ee("flip")),class extends r.PhotoSwipeBase{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){r.getElementsFromOption(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(r.specialKeyUsed(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let o=this.getClickedIndex(t);o=this.applyFilters("clickedIndex",o,t,this);const n={gallery:t.currentTarget};o>=0&&(t.preventDefault(),this.loadAndOpen(o,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,o=r.getElementsFromOption(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===e||t.contains(e));return-1!==o?o:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,o){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=r.getElementsFromOption(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=o,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:o}=this;e&&(o.dataSource=e);const n=[],i=typeof o.pswpModule;if(r.isPswpClass(o.pswpModule))n.push(Promise.resolve(o.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");n.push(o.pswpModule())}"function"==typeof o.openPromise&&n.push(o.openPromise()),!1!==o.preloadFirstSlide&&t>=0&&(this._preloadedContent=r.lazyLoadSlide(t,this));const a=++this._uid;Promise.all(n).then(t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const o="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=o,window.pswp=o,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(e=>{o.on(t,e)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(e=>{o.addFilter(t,e.fn,e.priority)})}),this._preloadedContent&&(o.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),o.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),o.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},r.getElementsFromOption(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}});Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"Dialog",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,"DialogContent",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"DialogDescription",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"DialogFooter",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,"DialogHeader",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"DialogTitle",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"Iconify",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"Typography",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"cva",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,"lightbox_default",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"typographyVariants",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,"useAnalytics",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return te}});
|