@qratilabs/qrati-connect 2.5.4 → 2.5.6
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 +14 -0
- package/element/{B59V0Mhr.js → B28y50Bi.js} +1 -1
- package/element/{DLz0G_z2.js → BWU1Eb1i.js} +1 -1
- package/element/{kdp9oLRU.js → CAt6yWea.js} +1 -1
- package/element/{D_N6wPLS.js → CH2f_afH.js} +1 -1
- package/element/{D43BQzpf.js → CUOOhGTj.js} +1 -1
- package/element/{BwemkCCJ.js → Cf1QDu0i.js} +1 -1
- package/element/{OucaMSbY.js → CvA0vfrf.js} +1 -1
- package/element/{DhfeoyBz.js → D4xTzxjA.js} +1 -1
- package/element/{J72K45YE.js → DODG2TX4.js} +1 -1
- package/element/{CPPs7pi-.js → DPOkh0eJ.js} +1 -1
- package/element/{DhcdFi7M.js → DiiWe_SG.js} +2 -2
- package/element/{BrMlCiWh.js → wHbQZdly.js} +1 -1
- package/element/web.es.js +3 -3
- package/package.json +1 -1
- package/react/{DXg0jviV.js → BAbwOJvT.js} +1 -1
- package/react/{DVhoieUG.js → BXiO9Rt2.js} +1 -1
- package/react/{B-MiXFkt.js → BaT1o9UO.js} +1 -1
- package/react/{q8ln6Sqn.js → BexGhdGA.js} +2 -2
- package/react/{CYK5EdMk.js → C4TTO8j2.js} +1 -1
- package/react/{DQq5P5kz.js → CNAEfadS.js} +1 -1
- package/react/{yjP1jdU0.js → CT_Cvh8-.js} +1 -1
- package/react/{DQRcftrx.js → Cs3wia2w.js} +1 -1
- package/react/{BBNhso7S.js → Czrz88CD.js} +1 -1
- package/react/{Rx2eXHSy.js → Czw0BHMZ.js} +1 -1
- package/react/{BaqVlxbd.js → D3jlv133.js} +1 -1
- package/react/{HzUDi5NE.js → D4BACpJw.js} +1 -1
- package/react/{Bh_3jcgw.js → D6cMN4OJ.js} +1 -1
- package/react/{B9vdeEQv.js → D7c4q3kj.js} +1 -1
- package/react/{t-ii7Ss0.js → DEIcfk-y.js} +1 -1
- package/react/{-k-ffFwP.js → DGIVHiX4.js} +1 -1
- package/react/{DMqKxwcb.js → DOw70z3P.js} +1 -1
- package/react/DV6DJ1Br.js +1 -0
- package/react/{r0vUVZIh.js → Dljj3ToS.js} +1 -1
- package/react/QPXxc9eb.js +1 -0
- package/react/{BQ7Q_1WB.js → Sb4c6EUR.js} +1 -1
- package/react/{Fhq5zLvg.js → aragUG-J.js} +1 -1
- package/react/{BRLq62Uv.js → e8YBtYhk.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +3 -3
- package/react/{BTW-b-Wo.js → pIx9IeV5.js} +1 -1
- package/umd/web.umd.js +1 -1
- package/react/BJBX47Jb.js +0 -1
- package/react/C9yNmSQ8.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
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"./BrMlCiWh.js";import{a as E,n as I}from"./DhcdFi7M.js";import{a as C,n as L,r as A,t as N}from"./CPPs7pi-.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"./kdp9oLRU.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:[
|
|
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"./DiiWe_SG.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"./CAt6yWea.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
2
|
/* @__PURE__ */c("img",{className:"h-auto max-h-96 w-full object-contain",src:e?.imageUrl,alt:"Image not found"}),
|
|
3
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
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__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as n,Nt as r,j as o,wt as i}from"./
|
|
1
|
+
import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as n,Nt as r,j as o,wt as i}from"./wHbQZdly.js";import{t as a}from"./CUOOhGTj.js";import{o as s}from"./DPOkh0eJ.js";import{t as l}from"./B28y50Bi.js";var c=new a,u=(e,t)=>{r(/* @__PURE__ */n(o,{client:c,children:/* @__PURE__ */n(s,{children:/* @__PURE__ */n(l,{event:e})})}),t)},d=({events:r,apiKey:o,is3D:a})=>{const s=i(null),l=i(null),c=i(a);return t(()=>{if(!s.current||l.current)return;let t;return(async()=>{const n=(await import("./Ccwm5LwS.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;n.accessToken=o;const i=new n.Map({container:s.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:2,pitch:c.current?60:0,bearing:c.current?-20:0,antialias:!0});l.current=i,i.on("style.load",()=>{i.getLayer("3d-buildings")||i.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),i.on("load",()=>{const e=r.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const t=new n.LngLatBounds;for(const r of e){const e=r.location.x,o=r.location.y;t.extend([e,o]);const a=document.createElement("div");a.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const s=document.createElement("div");u(r,s);const l=new n.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(s);new n.Marker({element:a}).setLngLat([e,o]).setPopup(l).addTo(i)}t.isEmpty()||i.fitBounds(t,{padding:60,maxZoom:14,duration:1200})}),t=()=>{i.remove(),l.current=null}})(),()=>{t?.()}},[o]),t(()=>{l.current&&(c.current=a,l.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */n("div",{ref:s,class:"size-full"})};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t}from"./2R3GoXB1.js";import{Mt as o,N as r,Nt as n,j as e,wt as a}from"./
|
|
1
|
+
import{r as t}from"./2R3GoXB1.js";import{Mt as o,N as r,Nt as n,j as e,wt as a}from"./wHbQZdly.js";import{t as i}from"./CUOOhGTj.js";import{o as s}from"./DPOkh0eJ.js";import{t as c}from"./B28y50Bi.js";var l=new i,p=(t,o)=>{n(/* @__PURE__ */r(e,{client:l,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(c,{event:t})})}),o)},m=({events:n})=>{const e=a(null),i=a(null);return o(()=>{if(!e.current||i.current)return;let o;return(async()=>{const r=await import("./ZShDCNL_.js").then(o=>/* @__PURE__ */t(o.default,1));if(await Promise.resolve({ }),!e.current)return;const a=r.map(e.current,{center:[20,0],zoom:2,zoomControl:!0,worldCopyJump:!0});r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap contributors",maxZoom:19}).addTo(a),i.current=a;const s=n.filter(t=>"number"==typeof t.location?.x&&"number"==typeof t.location?.y);if(s.length>0){const t=r.latLngBounds([]);for(const o of s){const n=o.location.x,e=o.location.y;t.extend([e,n]);const i=r.divIcon({className:"qrati-leaflet-marker-wrapper",html:'\n <div style="\n width: 28px;\n height: 28px;\n cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n "></div>\n ',iconSize:[28,28],iconAnchor:[14,28],popupAnchor:[0,-28]}),s=r.marker([e,n],{icon:i}).addTo(a),c=document.createElement("div");p(o,c),s.bindPopup(c,{closeButton:!0,maxWidth:220})}t.isValid()&&a.fitBounds(t,{padding:[60,60],maxZoom:14})}o=()=>{a.remove(),i.current=null}})(),()=>{o?.()}},[n]),/* @__PURE__ */r("div",{ref:e,class:"size-full"})};export{m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{At as e,Dt as t,Et as n,Ft as r,I as a,It as o,K as i,L as l,Mt as s,N as u,R as c,Rt as h,Tt as p,W as d,jt as m,t as f,wt as g,z as v,zt as y}from"./BrMlCiWh.js";var b="popstate";function w(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function R(e,t){if(!1===e||null==e)throw new Error(t)}function E(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function S(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function x(e,t,n=null,r,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?k(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),unstable_mask:a}}function $({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function k(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n="/"){return function(e,t,n){let r=I(("string"==typeof t?k(t):t).pathname||"/",n);if(null==r)return null;let a=P(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let o=null;for(let i=0;null==o&&i<a.length;++i){let e=F(r);o=U(a[i],e,false)}return o}(e,t,n)}function P(e,t=[],n=[],r="",a=!1){let o=(e,o,i=a,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&i)return;R(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let u=K([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(R(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),P(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:D(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of L(e.path))o(e,t,!0,n);else o(e,t)}),t}function L(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=L(r.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var O=/^:[\w-]+$/,C=3,_=2,N=1,M=10,j=-2,A=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(A)&&(r+=j),t&&(r+=_),n.filter(e=>!A(e)).reduce((e,t)=>e+(O.test(t)?C:""===t?N:M),r)}function U(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l<r.length;++l){let e=r[l],s=l===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},u),h=e.route;if(!c&&s&&n&&!r[r.length-1].route.index&&(c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:K([o,c.pathname]),pathnameBase:V(K([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=K([o,c.pathnameBase]))}return i}function W(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){E("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,a,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[r];return e[t]=n&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function F(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function I(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var B=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function H(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function J(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Y(e,t,n,r=!1){let a;"string"==typeof e?a=k(e):(a={...e},R(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),R(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),R(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:a="",hash:o=""}="string"==typeof e?k(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?z(r.substring(1),"/"):z(r,t)):n=t,{pathname:n,search:X(a),hash:q(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var K=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",G=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Q(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Z="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e,t){let n=e;if("string"!=typeof n||!B.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Z)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=I(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:a=!0}catch(o){E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var te=["POST","PUT","PATCH","DELETE"],ne=(new Set(te),["GET",...te]),re=(new Set(ne),r(null));re.displayName="DataRouter";var ae=r(null);ae.displayName="DataRouterState";var oe=r(!1),ie=r({isTransitioning:!1});ie.displayName="ViewTransition",r(/* @__PURE__ */new Map).displayName="Fetchers",r(null).displayName="Await";var le=r(null);le.displayName="Navigation";var se=r(null);se.displayName="Location";var ue=r({outlet:null,matches:[],isDataRoute:!1});ue.displayName="Route";var ce=r(null);ce.displayName="RouteError";var he="REACT_ROUTER_ERROR";function pe(){return null!=m(se)}function de(){return R(pe(),"useLocation() may be used only in the context of a <Router> component."),m(se).location}var me="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fe(e){m(le).static||n(e)}function ge(){let{isDataRoute:t}=m(ue);return t?function(){let{router:t}=function(){let e=m(re);return R(e,Te("useNavigate")),e}(),n=Pe("useNavigate"),r=g(!1);return fe(()=>{r.current=!0}),e(async(e,a={})=>{E(r.current,me),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...a}))},[t,n])}():function(){R(pe(),"useNavigate() may be used only in the context of a <Router> component.");let t=m(re),{basename:n,navigator:r}=m(le),{matches:a}=m(ue),{pathname:o}=de(),i=JSON.stringify(J(a)),l=g(!1);return fe(()=>{l.current=!0}),e((e,a={})=>{if(E(l.current,me),!l.current)return;if("number"==typeof e)return void r.go(e);let s=Y(e,JSON.parse(i),o,"path"===a.relative);null==t&&"/"!==n&&(s.pathname="/"===s.pathname?n:K([n,s.pathname])),(a.replace?r.replace:r.push)(s,a.state,a)},[n,r,i,o,t])}()}var ve=r(null);function ye(){let{matches:e}=m(ue),t=e[e.length-1];return t?t.params:{}}function be(e,{relative:t}={}){let{matches:n}=m(ue),{pathname:r}=de(),a=JSON.stringify(J(n));return p(()=>Y(e,JSON.parse(a),r,"path"===t),[e,a,r,t])}function we(e,t,n){R(pe(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=m(le),{matches:a}=m(ue),i=a[a.length-1],l=i?i.params:{},s=i?i.pathname:"/",u=i?i.pathnameBase:"/",c=i&&i.route;{let e=c&&c.path||"";Oe(s,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,p=de();if(t){let e="string"==typeof t?k(t):t;R("/"===u||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=p;let d=h.pathname||"/",f=d;if("/"!==u){let e=u.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=T(e,{pathname:f});E(c||null!=g,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),E(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let a=e,i=r?.errors;if(null!=i){let e=a.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,s=-1;if(n&&r){l=r.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:o}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||i){n.isStatic&&(l=!0),a=s>=0?a.slice(0,s+1):[a[0]];break}}}}let u=n?.onError,c=r&&u?(e,t)=>{u(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Q(r.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,u)=>{let h,p=!1,d=null,m=null;r&&(h=i&&n.route.id?i[n.route.id]:void 0,d=n.route.errorElement||Ee,l&&(s<0&&0===u?(Oe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):s===u&&(p=!0,m=n.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,u+1)),g=()=>{let t;return t=h?d:p?m:n.route.Component?/* @__PURE__ */o(n.route.Component,null):n.route.element?n.route.element:e,/* @__PURE__ */o(ke,{match:n,routeContext:{outlet:e,matches:f,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===u)?/* @__PURE__ */o(Se,{location:r.location,revalidation:r.revalidation,component:d,error:h,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:c}):g()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:K([u,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:K([u,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,n);return t&&v?/* @__PURE__ */o(se.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},v):v}function Re(){let e=function(){let e=m(ce),t=function(e){let t=m(ae);return R(t,Te(e)),t}("useRouteError"),n=Pe("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=/* @__PURE__ */o(h,null,/* @__PURE__ */o("p",null,"💿 Hey developer 👋"),/* @__PURE__ */o("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */o("code",{style:i},"ErrorBoundary")," or"," ",/* @__PURE__ */o("code",{style:i},"errorElement")," prop on your route.")),/* @__PURE__ */o(h,null,/* @__PURE__ */o("h2",null,"Unexpected Application Error!"),/* @__PURE__ */o("h3",{style:{fontStyle:"italic"}},t),n?/* @__PURE__ */o("pre",{style:a},n):null,l)}var Ee=/* @__PURE__ */o(Re,null),Se=class extends y{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${he}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new G(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?/* @__PURE__ */o(ue.Provider,{value:this.props.routeContext},/* @__PURE__ */o(ce.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */o($e,{error:e},t):t}};Se.contextType=oe;var xe=/* @__PURE__ */new WeakMap;function $e({children:e,error:t}){let{basename:n}=m(le);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${he}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=xe.get(t);if(r)throw r;let a=ee(e.location,n);if(Z&&!xe.get(t)){if(!a.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw xe.set(t,n),n}window.location.href=a.absoluteURL||a.to}/* @__PURE__ */
|
|
1
|
+
import{At as e,Dt as t,Et as n,Ft as r,I as a,It as o,K as i,L as l,Mt as s,N as u,R as c,Rt as h,Tt as p,W as d,jt as m,t as f,wt as g,z as v,zt as y}from"./wHbQZdly.js";var b="popstate";function w(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function R(e,t){if(!1===e||null==e)throw new Error(t)}function E(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function S(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function x(e,t,n=null,r,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?k(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),unstable_mask:a}}function $({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function k(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n="/"){return function(e,t,n){let r=I(("string"==typeof t?k(t):t).pathname||"/",n);if(null==r)return null;let a=P(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let o=null;for(let i=0;null==o&&i<a.length;++i){let e=F(r);o=U(a[i],e,false)}return o}(e,t,n)}function P(e,t=[],n=[],r="",a=!1){let o=(e,o,i=a,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&i)return;R(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let u=K([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(R(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),P(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:D(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of L(e.path))o(e,t,!0,n);else o(e,t)}),t}function L(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=L(r.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var O=/^:[\w-]+$/,C=3,_=2,N=1,M=10,j=-2,A=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(A)&&(r+=j),t&&(r+=_),n.filter(e=>!A(e)).reduce((e,t)=>e+(O.test(t)?C:""===t?N:M),r)}function U(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l<r.length;++l){let e=r[l],s=l===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},u),h=e.route;if(!c&&s&&n&&!r[r.length-1].route.index&&(c=W({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:K([o,c.pathname]),pathnameBase:V(K([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=K([o,c.pathnameBase]))}return i}function W(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){E("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,a,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[r];return e[t]=n&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function F(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function I(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var B=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function H(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function J(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Y(e,t,n,r=!1){let a;"string"==typeof e?a=k(e):(a={...e},R(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),R(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),R(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:a="",hash:o=""}="string"==typeof e?k(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?z(r.substring(1),"/"):z(r,t)):n=t,{pathname:n,search:X(a),hash:q(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var K=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",G=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Q(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Z="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e,t){let n=e;if("string"!=typeof n||!B.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Z)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=I(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:a=!0}catch(o){E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var te=["POST","PUT","PATCH","DELETE"],ne=(new Set(te),["GET",...te]),re=(new Set(ne),r(null));re.displayName="DataRouter";var ae=r(null);ae.displayName="DataRouterState";var oe=r(!1),ie=r({isTransitioning:!1});ie.displayName="ViewTransition",r(/* @__PURE__ */new Map).displayName="Fetchers",r(null).displayName="Await";var le=r(null);le.displayName="Navigation";var se=r(null);se.displayName="Location";var ue=r({outlet:null,matches:[],isDataRoute:!1});ue.displayName="Route";var ce=r(null);ce.displayName="RouteError";var he="REACT_ROUTER_ERROR";function pe(){return null!=m(se)}function de(){return R(pe(),"useLocation() may be used only in the context of a <Router> component."),m(se).location}var me="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fe(e){m(le).static||n(e)}function ge(){let{isDataRoute:t}=m(ue);return t?function(){let{router:t}=function(){let e=m(re);return R(e,Te("useNavigate")),e}(),n=Pe("useNavigate"),r=g(!1);return fe(()=>{r.current=!0}),e(async(e,a={})=>{E(r.current,me),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...a}))},[t,n])}():function(){R(pe(),"useNavigate() may be used only in the context of a <Router> component.");let t=m(re),{basename:n,navigator:r}=m(le),{matches:a}=m(ue),{pathname:o}=de(),i=JSON.stringify(J(a)),l=g(!1);return fe(()=>{l.current=!0}),e((e,a={})=>{if(E(l.current,me),!l.current)return;if("number"==typeof e)return void r.go(e);let s=Y(e,JSON.parse(i),o,"path"===a.relative);null==t&&"/"!==n&&(s.pathname="/"===s.pathname?n:K([n,s.pathname])),(a.replace?r.replace:r.push)(s,a.state,a)},[n,r,i,o,t])}()}var ve=r(null);function ye(){let{matches:e}=m(ue),t=e[e.length-1];return t?t.params:{}}function be(e,{relative:t}={}){let{matches:n}=m(ue),{pathname:r}=de(),a=JSON.stringify(J(n));return p(()=>Y(e,JSON.parse(a),r,"path"===t),[e,a,r,t])}function we(e,t,n){R(pe(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=m(le),{matches:a}=m(ue),i=a[a.length-1],l=i?i.params:{},s=i?i.pathname:"/",u=i?i.pathnameBase:"/",c=i&&i.route;{let e=c&&c.path||"";Oe(s,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,p=de();if(t){let e="string"==typeof t?k(t):t;R("/"===u||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),h=e}else h=p;let d=h.pathname||"/",f=d;if("/"!==u){let e=u.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=T(e,{pathname:f});E(c||null!=g,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),E(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let a=e,i=r?.errors;if(null!=i){let e=a.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,s=-1;if(n&&r){l=r.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:o}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||i){n.isStatic&&(l=!0),a=s>=0?a.slice(0,s+1):[a[0]];break}}}}let u=n?.onError,c=r&&u?(e,t)=>{u(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Q(r.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,u)=>{let h,p=!1,d=null,m=null;r&&(h=i&&n.route.id?i[n.route.id]:void 0,d=n.route.errorElement||Ee,l&&(s<0&&0===u?(Oe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):s===u&&(p=!0,m=n.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,u+1)),g=()=>{let t;return t=h?d:p?m:n.route.Component?/* @__PURE__ */o(n.route.Component,null):n.route.element?n.route.element:e,/* @__PURE__ */o(ke,{match:n,routeContext:{outlet:e,matches:f,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===u)?/* @__PURE__ */o(Se,{location:r.location,revalidation:r.revalidation,component:d,error:h,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:c}):g()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:K([u,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:K([u,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,n);return t&&v?/* @__PURE__ */o(se.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},v):v}function Re(){let e=function(){let e=m(ce),t=function(e){let t=m(ae);return R(t,Te(e)),t}("useRouteError"),n=Pe("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=/* @__PURE__ */o(h,null,/* @__PURE__ */o("p",null,"💿 Hey developer 👋"),/* @__PURE__ */o("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */o("code",{style:i},"ErrorBoundary")," or"," ",/* @__PURE__ */o("code",{style:i},"errorElement")," prop on your route.")),/* @__PURE__ */o(h,null,/* @__PURE__ */o("h2",null,"Unexpected Application Error!"),/* @__PURE__ */o("h3",{style:{fontStyle:"italic"}},t),n?/* @__PURE__ */o("pre",{style:a},n):null,l)}var Ee=/* @__PURE__ */o(Re,null),Se=class extends y{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${he}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new G(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?/* @__PURE__ */o(ue.Provider,{value:this.props.routeContext},/* @__PURE__ */o(ce.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */o($e,{error:e},t):t}};Se.contextType=oe;var xe=/* @__PURE__ */new WeakMap;function $e({children:e,error:t}){let{basename:n}=m(le);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${he}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=xe.get(t);if(r)throw r;let a=ee(e.location,n);if(Z&&!xe.get(t)){if(!a.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw xe.set(t,n),n}window.location.href=a.absoluteURL||a.to}/* @__PURE__ */
|
|
2
2
|
return o("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function ke({routeContext:e,match:t,children:n}){let r=m(re);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),/* @__PURE__ */o(ue.Provider,{value:e},n)}function Te(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pe(e){let t=function(e){let t=m(ue);return R(t,Te(e)),t}(e),n=t.matches[t.matches.length-1];return R(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var Le={};function Oe(e,t,n){t||Le[e]||(Le[e]=!0,E(!1,n))}function Ce({basename:r,children:a,initialEntries:l,initialIndex:s,unstable_useTransitions:u}){let c=g();null==c.current&&(c.current=function(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:a=!1}=e;t=n.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.unstable_mask));let o=s(null==r?t.length-1:r),i="POP",l=null;function s(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[o]}function c(e,n=null,r,a){let o=x(t?u().pathname:"/",e,n,r,a);return E("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function h(e){return"string"==typeof e?e:$(e)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:h,createURL:e=>new URL(h(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?k(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){i="PUSH";let r=w(e)?e:c(e,n);o+=1,t.splice(o,t.length,r),a&&l&&l({action:i,location:r,delta:1})},replace(e,n){i="REPLACE";let r=w(e)?e:c(e,n);t[o]=r,a&&l&&l({action:i,location:r,delta:0})},go(e){i="POP";let n=s(o+e),r=t[n];o=n,l&&l({action:i,location:r,delta:e})},listen:e=>(l=e,()=>{l=null})}}({initialEntries:l,initialIndex:s,v5Compat:!0}));let h=c.current,[p,d]=t({action:h.action,location:h.location}),m=e(e=>{!1===u?d(e):i(()=>d(e))},[u]);return n(()=>h.listen(m),[h,m]),/* @__PURE__ */o(je,{basename:r,children:a,location:p.location,navigationType:p.action,navigator:h,unstable_useTransitions:u})}function _e({to:e,replace:t,state:n,relative:r}){R(pe(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=m(le);E(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=m(ue),{pathname:i}=de(),l=ge(),u=Y(e,J(o),i,"path"===r),c=JSON.stringify(u);return s(()=>{l(JSON.parse(c),{replace:t,state:n,relative:r})},[l,c,r,t,n]),null}function Ne(e){return function(e){let t=m(ue).outlet;return p(()=>t&&/* @__PURE__ */o(ve.Provider,{value:e},t),[t,e])}(e.context)}function Me(e){R(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function je({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:l}){R(!pe(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=p(()=>({basename:s,navigator:a,static:i,unstable_useTransitions:l,future:{}}),[s,a,i,l]);"string"==typeof n&&(n=k(n));let{pathname:c="/",search:h="",hash:d="",state:m=null,key:f="default",unstable_mask:g}=n,v=p(()=>{let e=I(c,s);return null==e?null:{location:{pathname:e,search:h,hash:d,state:m,key:f,unstable_mask:g},navigationType:r}},[s,c,h,d,m,f,r,g]);return E(null!=v,`<Router basename="${s}"> is not able to match the URL "${c}${h}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:/* @__PURE__ */o(le.Provider,{value:u},/* @__PURE__ */o(se.Provider,{children:t,value:v}))}function Ae({children:e,location:t}){return we(De(e),t)}function De(e,t=[]){let n=[];return l.forEach(e,(e,r)=>{if(!d(e))return;let a=[...t,r];if(e.type===h)return void n.push.apply(n,De(e.props.children,a));R(e.type===Me,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),R(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=De(e.props.children,a)),n.push(o)}),n}v(function({routes:e,future:t,state:n,isStatic:r,onError:a}){return we(e,void 0,{state:n,isStatic:r,onError:a,future:t})});var Ue="get",We="application/x-www-form-urlencoded";function Fe(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Ie=null,Be=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ze(e){return null==e||Be.has(e)?e:(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${We}"`),null)}function He(e,t){if(!1===e||null==e)throw new Error(t)}function Je(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Ye(e,t,n,r,a,o){let i=(e,t)=>!n[t]||e.route.id!==n[t].route.id,l=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Ke(){let e=m(re);return He(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ve=r(void 0);function Xe(){let e=m(Ve);return He(e,"You must render this element inside a <HydratedRouter> element"),e}function qe(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ge({page:e,...t}){let{router:n}=Ke(),r=p(()=>T(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?/* @__PURE__ */o(Qe,{page:e,matches:r,...t}):null}function Qe({page:e,matches:n,...r}){let a=de(),{future:i,manifest:l,routeModules:u}=Xe(),{basename:c}=Ke(),{loaderData:d,matches:f}=function(){let e=m(ae);return He(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),g=p(()=>Ye(e,n,f,l,a,"data"),[e,n,f,l,a]),v=p(()=>Ye(e,n,f,l,a,"assets"),[e,n,f,l,a]),y=p(()=>{if(e===a.pathname+a.search+a.hash)return[];let t=/* @__PURE__ */new Set,r=!1;if(n.forEach(e=>{let n=l.routes[e.route.id];n&&n.hasLoader&&(!g.some(t=>t.route.id===e.route.id)&&e.route.id in d&&u[e.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:t.add(e.route.id))}),0===t.size)return[];let o=function(e,t,n,r){let a="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:"/"===a.pathname?a.pathname=`_root.${r}`:t&&"/"===I(a.pathname,t)?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}(e,c,i.unstable_trailingSlashAwareDataRequests,"data");return r&&t.size>0&&o.searchParams.set("_routes",n.filter(e=>t.has(e.route.id)).map(e=>e.route.id).join(",")),[o.pathname+o.search]},[c,i.unstable_trailingSlashAwareDataRequests,d,a,l,g,n,e,u]),b=p(()=>function(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1),[...new Set(r)];var r}(v,l),[v,l]),w=function(e){let{manifest:n,routeModules:r}=Xe(),[a,o]=t([]);return s(()=>{let t=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Je).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,n,r).then(e=>{t||o(e)}),()=>{t=!0}},[e,n,r]),a}(v);/* @__PURE__ */
|
|
3
3
|
return o(h,null,y.map(e=>/* @__PURE__ */o("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),b.map(e=>/* @__PURE__ */o("link",{key:e,rel:"modulepreload",href:e,...r})),w.map(({key:e,link:t})=>/* @__PURE__ */o("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}function Ze(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Ve.displayName="FrameworkContext";var et="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{et&&(window.__reactRouterVersion="7.13.1")}catch(Nt){}function tt({basename:r,children:a,unstable_useTransitions:l,window:s}){let u=g();null==u.current&&(u.current=function(e={}){return function(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,i=a.history,l="POP",s=null,u=c();function c(){return(i.state||{idx:null}).idx}function h(){l="POP";let e=c(),t=null==e?null:e-u;u=e,s&&s({action:l,location:d.location,delta:t})}function p(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),R(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:$(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==u&&(u=0,i.replaceState({...i.state,idx:u},""));let d={get action(){return l},get location(){return e(a,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(b,h),s=e,()=>{a.removeEventListener(b,h),s=null}},createHref:e=>t(a,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l="PUSH";let r=w(e)?e:x(d.location,e,t);n&&n(r,e),u=c()+1;let h=S(r,u),p=d.createHref(r.unstable_mask||r);try{i.pushState(h,"",p)}catch(m){if(m instanceof DOMException&&"DataCloneError"===m.name)throw m;a.location.assign(p)}o&&s&&s({action:l,location:d.location,delta:1})},replace:function(e,t){l="REPLACE";let r=w(e)?e:x(d.location,e,t);n&&n(r,e),u=c();let a=S(r,u),h=d.createHref(r.unstable_mask||r);i.replaceState(a,"",h),o&&s&&s({action:l,location:d.location,delta:0})},go:e=>i.go(e)};return d}(function(e,t){let{pathname:n="/",search:r="",hash:a=""}=k(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),x("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:$(t))},function(e,t){E("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}({window:s,v5Compat:!0}));let c=u.current,[h,p]=t({action:c.action,location:c.location}),d=e(e=>{!1===l?p(e):i(()=>p(e))},[l]);return n(()=>c.listen(d),[c,d]),/* @__PURE__ */o(je,{basename:r,children:a,location:h.location,navigationType:h.action,navigator:c,unstable_useTransitions:l})}var nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rt=a(function({onClick:n,discover:r="render",prefetch:a="none",relative:l,reloadDocument:u,replace:c,unstable_mask:p,state:d,target:f,to:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:w,...E},S){let{basename:x,navigator:k,unstable_useTransitions:T}=m(le),P="string"==typeof v&&nt.test(v),L=ee(v,x),O=function(e,{relative:t}={}){R(pe(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m(le),{hash:a,pathname:o,search:i}=be(e,{relative:t}),l=o;return"/"!==n&&(l="/"===o?n:K([n,o])),r.createHref({pathname:l,search:i,hash:a})}(v=L.to,{relative:l}),C=de(),_=null;if(p){let e=Y(p,[],C.unstable_mask?C.unstable_mask.pathname:"/",!0);"/"!==x&&(e.pathname="/"===e.pathname?x:K([x,e.pathname])),_=k.createHref(e)}let[N,M,j]=function(e,n){let r=m(Ve),[a,o]=t(!1),[i,l]=t(!1),{onFocus:u,onBlur:c,onMouseEnter:h,onMouseLeave:p,onTouchStart:d}=n,f=g(null);s(()=>{if("render"===e&&l(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),s(()=>{if(a){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[a]);let v=()=>{o(!0)},y=()=>{o(!1),l(!1)};return r?"intent"!==e?[i,f,{}]:[i,f,{onFocus:qe(u,v),onBlur:qe(c,y),onMouseEnter:qe(h,v),onMouseLeave:qe(p,y),onTouchStart:qe(d,v)}]:[!1,f,{}]}(a,E),A=function(t,{target:n,replace:r,unstable_mask:a,state:o,preventScrollReset:l,relative:s,viewTransition:u,unstable_defaultShouldRevalidate:c,unstable_useTransitions:h}={}){let p=ge(),d=de(),m=be(t,{relative:s});return e(e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,n)){e.preventDefault();let n=void 0!==r?r:$(d)===$(m),f=()=>p(t,{replace:n,unstable_mask:a,state:o,preventScrollReset:l,relative:s,viewTransition:u,unstable_defaultShouldRevalidate:c});h?i(()=>f()):f()}},[d,p,m,r,a,o,n,t,l,s,u,c,h])}(v,{replace:c,unstable_mask:p,state:d,target:f,preventScrollReset:y,relative:l,viewTransition:b,unstable_defaultShouldRevalidate:w,unstable_useTransitions:T}),D=!(L.isExternal||u),U=/* @__PURE__ */o("a",{...E,...j,href:(D?_:void 0)||L.absoluteURL||O,onClick:D?function(e){n&&n(e),e.defaultPrevented||A(e)}:n,ref:Ze(S,M),target:f,"data-discover":P||"render"!==r?void 0:"true"});return N&&!P?/* @__PURE__ */o(h,null,U,/* @__PURE__ */o(Ge,{page:O})):U});rt.displayName="Link";var at=a(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:i,viewTransition:l,children:s,...u},c){let h=be(i,{relative:u.relative}),p=de(),d=m(ae),{navigator:f,basename:g}=m(le),v=null!=d&&function(e,{relative:t}={}){let n=m(ie);R(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=it("useViewTransitionState"),a=be(e,{relative:t});if(!n.isTransitioning)return!1;let o=I(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=I(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=W(a.pathname,i)||null!=W(a.pathname,o)}(h)&&!0===l,y=f.encodeLocation?f.encodeLocation(h).pathname:h.pathname,b=p.pathname,w=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=I(w,g)||w);const E="/"!==y&&y.endsWith("/")?y.length-1:y.length;let S,x=b===y||!r&&b.startsWith(y)&&"/"===b.charAt(E),$=null!=w&&(w===y||!r&&w.startsWith(y)&&"/"===w.charAt(y.length)),k={isActive:x,isPending:$,isTransitioning:v},T=x?e:void 0;S="function"==typeof n?n(k):[n,x?"active":null,$?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let P="function"==typeof a?a(k):a;/* @__PURE__ */
|
|
4
4
|
return o(rt,{...u,"aria-current":T,className:S,ref:c,style:P,to:i,viewTransition:l},"function"==typeof s?s(k):s)});at.displayName="NavLink";var ot=a(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:a,replace:l,state:s,method:u=Ue,action:c,onSubmit:h,relative:p,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:g,...v},y)=>{let{unstable_useTransitions:b}=m(le),w=function(){let{router:t}=it("useSubmit"),{basename:n}=m(le),r=Pe("useRouteId"),a=t.fetch,o=t.navigate;return e(async(e,t={})=>{let{action:i,method:l,encType:s,formData:u,body:c}=function(e,t){let n,r,a,o,i;if(Fe(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?I(i,t):null,n=e.getAttribute("method")||Ue,a=ze(e.getAttribute("enctype"))||We,o=new FormData(e)}else if(function(e){return Fe(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Fe(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?I(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||Ue,a=ze(e.getAttribute("formenctype"))||ze(i.getAttribute("enctype"))||We,o=new FormData(i,e),!function(){if(null===Ie)try{new FormData(document.createElement("form"),0),Ie=!1}catch(Nt){Ie=!0}return Ie}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(Fe(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ue,r=null,a=We,i=e}var l;return o&&"text/plain"===a&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:i}}(e,n);!1===t.navigate?await a(t.fetcherKey||st(),r,t.action||i,{unstable_defaultShouldRevalidate:t.unstable_defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:u,body:c,formMethod:t.method||l,formEncType:t.encType||s,flushSync:t.flushSync}):await o(t.action||i,{unstable_defaultShouldRevalidate:t.unstable_defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:u,body:c,formMethod:t.method||l,formEncType:t.encType||s,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[a,o,n,r])}(),E=function(e,{relative:t}={}){let{basename:n}=m(le),r=m(ue);R(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...be(e||".",{relative:t})},i=de();if(null==e){o.search=i.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}return e&&"."!==e||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(o.pathname="/"===o.pathname?n:K([n,o.pathname])),$(o)}(c,{relative:p}),S="get"===u.toLowerCase()?"get":"post",x="string"==typeof c&&nt.test(c);/* @__PURE__ */
|