PageSourceSearch

https://mypassage.ai/assets/Guide-zOa2jjpd.js

js mypassage.ai collected 2026-10-05 12:16:52 UTC 60,365 bytes, 12 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/leaflet-src-DreytlB6.js","assets/index-BUHL7mll.js","assets/index-BUrss2Ks.css"])))=>i.map(i=>d[i]);
2import{c as $t,j as e,F as it,I as je,f as n,C as Rn,aS as rt,c2 as Cn,c3 as En,c4 as Mn,c5 as Dn,a4 as Pn,H as kt,P as Nt,aR as Ce,p as Ht,o as K,_ as Ln,ax as Tn,a_ as Bt,b6 as ge,c6 as An,x as In,X as _n,c7 as Ut,W as Wt,ab as zn,bn as Fn,c8 as On,s as St,a3 as qt,bL as $n,c9 as Hn,ca as Bn,b1 as Un,aB as Wn,ba as ze,cb as qn,aY as et,b3 as Rt,bD as Vn,aE as Ct,be as Gn,bF as Yn,cc as Kn}from"./index-BUHL7mll.js";import{d as Qn,a as Zn,c as Et,b as Xn,s as tt,e as Jn,f as es}from"./guide-helpers-DEXYqUQu.js";import{C as ts}from"./calendar-days-BlLulG7d.js";import{u as ns,P as Mt,M as ss}from"./useNarrationSpeed-00RHyaNz.js";import{r as rs,f as is,s as as}from"./stop-hours-CyWpm4_1.js";import{z as os,M as ls,A as cs,B as xe,C as us,u as ds,D as ps,E as fs,F as Dt,t as ms,G as xs}from"./useStopDescription-CmYuzQ6G.js";import{L as hs,H as gs}from"./lightbulb-CRa0F-Xp.js";import{a as bs}from"./map-theme-BykZSjWg.js";import{u as ys,c as vs,b as ws,d as js,a as ks}from"./maps-DGJ4HCmh.js";import{c as nt}from"./photo-C4ersIR2.js";import{a as Ns}from"./settings-helpers-DoRkq-kb.js";import{C as Vt}from"./compass-DkEbqVWx.js";/**
3 * @license lucide-react v1.21.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const Ss=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rs=$t("chevron-down",Ss);/**
8 * @license lucide-react v1.21.0 - ISC
9 *
10 * This source code is licensed under the ISC license.
11 * See the LICENSE file in the root directory of this source tree.
12 */const Cs=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Es=$t("undo-2",Cs);function Ms({stopNumber:t,stopCount:s,completedCount:r,completedNames:o,completedIndices:c,completedExpanded:b,onToggleCompleted:a,completedPanelId:j}){const p=Array.from({length:Math.max(s,0)}),h=c?new Set(c):null;return e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center justify-between mb-2.5",children:e.jsxs("span",{className:"font-mono text-[10.5px] tracking-[0.12em] text-muted",children:["STOP ",t," OF ",s]})}),e.jsx("div",{className:"flex gap-1 mb-3.5","aria-hidden":"true",children:p.map((k,d)=>{const E=h?h.has(d):d<t-1,y=d===t-1&&!(h!=null&&h.has(d));return e.jsx("div",{className:"flex-1 h-[3px] rounded-[2px] "+(E||y?"bg-sig-btn":"bg-ink/[0.12]"),style:y?{animation:"vySeg 1.8s ease-in-out infinite"}:void 0},d)})}),r>0&&(()=>{const k=e.jsx("span",{className:"flex-none grid place-items-center w-[17px] h-[17px] rounded-full bg-sig-btn/[0.16] border border-sig-btn/[0.45] text-sig-link","aria-hidden":"true",children:e.jsx(je,{size:10,strokeWidth:3})}),d=e.jsxs("span",{className:"min-w-0 flex-1 truncate text-left",children:[r," stop",r===1?"":"s"," complete",o.length>0&&` · ${o.join(", ")}`]});return a?e.jsxs("button",{type:"button",onClick:a,"aria-expanded":!!b,"aria-controls":j,className:"w-full flex items-center gap-2.5 min-h-[44px] -mx-1 px-1 rounded-[10px] text-muted text-[12.5px] transition-colors hover:text-ink/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link",children:[k,d,e.jsx(it,{size:16,"aria-hidden":"true",className:"flex-none transition-transform duration-200 motion-reduce:transition-none "+(b?"rotate-90":"")})]}):e.jsxs("div",{className:"flex items-center gap-2.5 pt-1 pb-3 text-muted text-[12.5px]",children:[k,d]})})()]})}function Ds({dayIndex:t,dayCount:s,dayLabels:r,onPrev:o,onNext:c,onPickDay:b,onAddDay:a,canEdit:j}){const{prevLabel:p,activeLabel:h,nextLabel:k,atStart:d,atEnd:E}=Qn(t,s,r),[y,L]=n.useState(!1),M=D=>(r==null?void 0:r[D])||`Day ${D+1}`;return e.jsxs("div",{className:"relative mb-2.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d?e.jsx(Pt,{canEdit:j,onAddDay:()=>a("before"),align:"start"}):e.jsxs("button",{type:"button",onClick:o,"aria-label":"Previous day",className:"group flex min-h-[44px] items-center gap-1.5 rounded-[10px] px-1.5 -mx-1.5 text-muted transition-colors hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig/40",children:[e.jsx(Rn,{size:18,className:"flex-none","aria-hidden":"true"}),e.jsx("span",{className:"font-mono text-[10.5px] tracking-[0.08em] opacity-50 transition-opacity group-hover:opacity-80",children:p})]}),e.jsxs("button",{type:"button",onClick:()=>L(D=>!D),"aria-label":"Pick a day","aria-haspopup":"dialog","aria-expanded":y,className:"flex min-h-[44px] items-center gap-1.5 rounded-[10px] px-2.5 text-ink transition-colors hover:bg-fill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig/40",children:[e.jsx(ts,{size:14,className:"flex-none text-sig-link","aria-hidden":"true"}),e.jsx("span",{className:"font-mono text-[12.5px] tracking-[0.04em] text-sig-link",children:h})]}),E?e.jsx(Pt,{canEdit:j,onAddDay:()=>a("after"),align:"end"}):e.jsxs("button",{type:"button",onClick:c,"aria-label":"Next day",className:"group flex min-h-[44px] items-center gap-1.5 rounded-[10px] px-1.5 -mx-1.5 text-muted transition-colors hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig/40",children:[e.jsx("span",{className:"font-mono text-[10.5px] tracking-[0.08em] opacity-50 transition-opacity group-hover:opacity-80",children:k}),e.jsx(it,{size:18,className:"flex-none","aria-hidden":"true"})]})]}),y&&e.jsx(Ps,{dayIndex:t,dayCount:s,labelAt:M,onPick:D=>{b(D),L(!1)},onClose:()=>L(!1)})]})}function Pt({canEdit:t,onAddDay:s,align:r}){return t?e.jsxs("button",{type:"button",onClick:s,"aria-label":"Add a day",className:"group flex min-h-[44px] items-center gap-1.5 rounded-[10px] px-1.5 text-muted transition-colors hover:text-sig-link focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig/40 "+(r==="start"?"-ml-1.5":"-mr-1.5"),children:[r==="start"&&e.jsx(rt,{size:16,className:"flex-none","aria-hidden":"true"}),e.jsx("span",{className:"font-mono text-[10.5px] tracking-[0.08em] opacity-60 transition-opacity group-hover:opacity-100",children:"Add Day"}),r==="end"&&e.jsx(rt,{size:16,className:"flex-none","aria-hidden":"true"})]}):e.jsx("span",{"aria-hidden":"true",className:"min-h-[44px] w-9 flex-none"})}function Ps({dayIndex:t,dayCount:s,labelAt:r,onPick:o,onClose:c}){const b=n.useRef(null),a=n.useId();return n.useEffect(()=>{var k,d;(d=(k=b.current)==null?void 0:k.querySelector('[data-active="true"]'))==null||d.focus();const j=E=>{E.key==="Escape"&&c()},p=E=>{b.current&&!b.current.contains(E.target)&&c()};window.addEventListener("keydown",j);const h=window.setTimeout(()=>window.addEventListener("pointerdown",p),0);return()=>{window.removeEventListener("keydown",j),window.clearTimeout(h),window.removeEventListener("pointerdown",p)}},[c]),e.jsxs("div",{ref:b,role:"dialog","aria-modal":"false","aria-labelledby":a,className:"absolute left-1/2 top-full z-40 mt-2 w-[min(18rem,calc(100vw-2.5rem))] -translate-x-1/2 roun
12ded-card border border-hair bg-overlay p-1.5 shadow-lift",children:[e.jsx("p",{id:a,className:"px-2.5 pt-1.5 pb-1 font-mono text-[10px] tracking-[0.12em] text-muted",children:"JUMP TO DAY"}),e.jsx("ul",{className:"max-h-[50vh] overflow-y-auto",children:Array.from({length:Math.max(s,0)}).map((j,p)=>{const h=p===t;return e.jsx("li",{children:e.jsxs("button",{type:"button","data-active":h,onClick:()=>o(p),"aria-current":h?"true":void 0,className:"flex min-h-[44px] w-full items-center gap-2.5 rounded-[10px] px-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig/40 "+(h?"bg-fill text-ink":"text-ink/80 hover:bg-fill"),children:[e.jsxs("span",{className:"font-mono text-[10px] tracking-[0.08em] text-muted",children:["DAY ",p+1]}),e.jsx("span",{className:"min-w-0 truncate text-[14px]",children:r(p)}),h&&e.jsx(je,{size:14,strokeWidth:3,className:"ml-auto flex-none text-sig-link","aria-hidden":"true"})]})},p)})})]})}function Lt({speed:t,onCycle:s}){const r=`${Number(t.toFixed(2))}×`;return e.jsx("button",{type:"button",onClick:s,"aria-label":`Narration speed, currently ${t}x`,className:"flex-none grid place-items-center min-w-[44px] min-h-[44px] px-2.5 cursor-pointer select-none rounded-full font-mono text-[11px] font-semibold text-muted hover:text-ink hover:bg-fill-hover transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link focus-visible:ring-offset-2 focus-visible:ring-offset-base",children:e.jsx("span",{"aria-hidden":"true",children:r})})}function Ls(t,s){return t==="playing"||t==="loading"&&s==="play"?"pause":"play"}function Ts(t,s){if(!Number.isFinite(t)||t<=0)return null;const r=Number.isFinite(s)?s:0;return Math.max(0,Math.ceil(t-r))}function Tt(t){if(t==null||!Number.isFinite(t)||t<0)return null;const s=Math.floor(t/60),r=Math.floor(t%60);return`${s}:${String(r).padStart(2,"0")}`}function As(t){return`${t.stopId??"anon"}::${Cn(t.text,t.voiceId)}`}function Gt(t,s,r){return t!=="loading"&&s!==r?"ready":t==="loading"?"writing":"none"}const Is=400;function _s({text:t,voiceId:s,tripId:r,stopId:o,speed:c,graph:b}){const[a,j]=n.useState("idle"),[p,h]=n.useState("play"),[k,d]=n.useState(null),[E,y]=n.useState(null),[L,M]=n.useState(null),[D,S]=n.useState(null),N=n.useRef("idle"),R=n.useRef("play"),v=n.useRef(c);v.current=c;const l=m=>{N.current=m,j(m)},g=m=>{R.current=m,h(m)},f=n.useRef(0),T=n.useRef(null),U=n.useRef(null),$=n.useRef([]),X=n.useRef(null),J=n.useRef(null),G=n.useRef(null),H=n.useRef(!1),z=n.useRef(b??null);z.current=b??null;const A=m=>m===f.current;function ee(m){for(const[I,x]of $.current)m.removeEventListener(I,x);$.current=[]}function W(){G.current!=null&&(window.clearInterval(G.current),G.current=null)}function O(){var I,x;f.current++,(I=X.current)==null||I.abort(),X.current=null;const m=T.current;m&&ee(m),(x=z.current)==null||x.teardown(),W(),m&&(m.pause(),m.removeAttribute("src"),m.load(),T.current=null),U.current&&(URL.revokeObjectURL(U.current),U.current=null),J.current=null,H.current&&typeof window<"u"&&window.speechSynthesis&&window.speechSynthesis.cancel(),H.current=!1}function re(){return O(),++f.current}n.useEffect(()=>O,[]);const q=As({stopId:o,text:t,voiceId:s});n.useEffect(()=>{O(),l("idle"),g("play"),d(null),y(null),M(null),S(null)},[q]),n.useEffect(()=>{T.current&&(T.current.playbackRate=c)},[c]);function ie(m,I){const x=(P,V)=>{m.addEventListener(P,V),$.current.push([P,V])},i=P=>()=>{!A(I)||T.current!==m||P()};x("play",i(()=>{var P;g("play"),m.playbackRate=v.current,l("playing"),(P=z.current)==null||P.onPlaying(m)})),x("pause",i(()=>{var P;(P=z.current)==null||P.onPause(),!m.ended&&(g("pause"),l("paused"))})),x("ended",i(()=>{g("pause"),l("ended"),y(0)})),x("error",i(()=>{g("pause"),l("error")}));const w=i(()=>{d(Number.isFinite(m.duration)?m.duration:null)});x("loadedmetadata",w),x("durationchange",w);const C=i(()=>{y(Ts(m.duration,m.currentTime))});x("timeupdate",C),x("seeked",C)}function ue(m){G.current==null&&(G.current=window.setInterval(()=>{if(!A(m)){W();return}if(N.current!=="playing")return;const I=window.speechSynthesis;(!I||!I.speaking&&!I.pending)&&(W(),H.current=!1,g("pause"),l("idle"))},Is))}async function ae(m,I){const x=m.play();J.current=x;try{await x}catch(i){if(!A(I)||T.current!==m||R.current!=="play"||(i==null?void 0:i.name)==="AbortError")return;l("error");return}finally{J.current===x&&(J.current=null)}}async function B(){const m=re();g("play"),l("loading"),M(null),S(null),d(null),y(null);const I=new AbortController;X.current=I;
12const x=await En(t,s,{tripId:r,stopId:o,signal:I.signal});if(!A(m)){x.kind==="audio"&&URL.revokeObjectURL(x.url);return}if(X.current=null,x.kind==="denied"){Mn({reason:x.reason,feature:"narration",limit:x.limit,resetsAt:x.resetsAt}),l("idle");return}if(x.kind!=="audio"){if(M("device"),S(x.kind==="forbidden"?"viewer":"infra"),R.current==="pause"){l("idle");return}const w=Dn(t,v.current);if(H.current=w,!w){M(null),l("idle");return}l("playing"),ue(m);return}M("premium"),S(null),U.current=x.url;const i=new Audio(x.url);if(i.playbackRate=v.current,T.current=i,ie(i,m),R.current==="pause"){l("paused");return}ae(i,m)}function pe(){const m=T.current;switch(N.current){case"playing":g("pause"),H.current?(W(),window.speechSynthesis&&window.speechSynthesis.pause(),l("paused")):m==null||m.pause();return;case"paused":if(g("play"),H.current){window.speechSynthesis&&window.speechSynthesis.resume(),l("playing"),ue(f.current);return}m?ae(m,f.current):B();return;case"ended":g("play"),m?(m.currentTime=0,ae(m,f.current)):B();return;case"loading":g(R.current==="play"?"pause":"play");return;case"idle":case"error":B();return}}return{phase:a,intent:p,control:Ls(a,p),durationSec:k,remainingSec:E,source:L,notice:D,toggle:pe}}const At=6,we=.22,zs="Still writing this story — one moment.",Fs="No story for this stop yet.",Os=4e3;function It(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function _t({playing:t,mode:s,barRefs:r}){const o=["0s",".14s",".28s",".07s",".36s",".2s"],c=s==="synthetic";return e.jsx("div",{className:"flex items-end gap-[2.5px] h-[18px]","aria-hidden":"true",children:o.map((b,a)=>e.jsx("span",{ref:j=>{r.current[a]=j},className:"w-[2.5px] h-[18px] rounded-[2px] bg-sig-link origin-bottom",style:c?{animation:"vyEq .9s ease-in-out infinite",animationDelay:b,animationPlayState:t?"running":"paused"}:{transform:`scaleY(${we})`,transition:"transform .08s linear"}},a))})}function Yt({text:t,voiceId:s,variant:r="pill",tripId:o,stopId:c,textState:b="ready"}){const{speed:a,cycle:j}=ns(),p=n.useRef(null),h=n.useRef(null),k=n.useRef(null),d=n.useRef(null),E=n.useRef([]),y=n.useRef(null),[L,M]=n.useState("synthetic");function D(x){const i=Math.max(we,Math.min(1,x));for(const w of E.current)w&&(w.style.transform=`scaleY(${i})`)}function S(x){for(let i=0;i<E.current.length;i++){const w=E.current[i];w&&(w.style.transform=`scaleY(${x[i]??we})`)}}function N(){d.current!=null&&(cancelAnimationFrame(d.current),d.current=null)}function R(){var i,w;N();try{(i=h.current)==null||i.disconnect()}catch{}try{(w=k.current)==null||w.disconnect()}catch{}const x=p.current;x&&x.state!=="closed"&&x.close().catch(()=>{}),h.current=null,k.current=null,p.current=null,y.current=null,M("synthetic")}function v(){if(d.current!=null)return;if(It()){D(we);return}const x=k.current;if(!x)return;const i=new Uint8Array(x.frequencyBinCount),w=[1,2,3,4,6,8],C=()=>{const P=k.current,V=y.current;if(!P||!V||V.paused){d.current=null;return}P.getByteFrequencyData(i);const oe=new Array(At);for(let Q=0;Q<At;Q++){const ke=(i[w[Q]??Q]??0)/255;oe[Q]=Math.max(we,Math.min(1,.2+ke*.85))}S(oe),d.current=requestAnimationFrame(C)};d.current=requestAnimationFrame(C)}function l(x){var w;if(typeof window>"u"||It())return;p.current&&R();const i=window.AudioContext??window.webkitAudioContext;if(i){try{const C=new i,P=C.createMediaElementSource(x),V=C.createAnalyser();V.fftSize=64,V.smoothingTimeConstant=.8,P.connect(V),V.connect(C.destination),p.current=C,h.current=P,k.current=V,M("analyser"),(w=C.resume)==null||w.call(C).catch(()=>{})}catch{R();return}v()}}const g=Pn()?null:{onPlaying:x=>{y.current=x,p.current?v():l(x)},onPause:()=>{var x;N(),(x=y.current)!=null&&x.ended&&D(we)},teardown:()=>R()},f=_s({text:t,voiceId:s,tripId:o,stopId:c,speed:a,graph:g}),{phase:T,control:U,durationSec:$,remainingSec:X,source:J,notice:G}=f,H=T==="playing",z=T==="loading",A=U==="pause",ee=J==="device",W=b==="ready",[O,re]=n.useState(!1),q=n.useRef(null),ie=n.useRef(null);n.useEffect(()=>{W&&(re(!1),q.current!=null&&(window.clearTimeout(q.current),q.current=null))},[W]),n.useEffect(()=>()=>{q.current!=null&&window.clearTimeout(q.current)},[]);function ue(){const x=ie.current;x&&(x.style.animation="none",x.offsetWidth,x.style.animation="")}function ae(){if(!W){re(!0),ue(),q.current!=null&&window.clearTimeout(q.current),q.current=window.setTimeout(()=>re(!1),Os);return}
12f.toggle()}const B=T==="ended"?"0:00":Tt(T==="playing"||T==="paused"?X??$:$),pe=O?b==="writing"?zs:Fs:G==="infra"?"Premium narration is temporarily unavailable. Using your device voice instead.":G==="viewer"?"Read-only on a shared trip. Using your device voice instead.":null,m=pe?e.jsx("p",{role:"status","aria-live":"polite",className:"mt-1.5 text-[11px] leading-snug text-muted",children:pe}):null,I=e.jsx("span",{className:"inline-flex items-center rounded-full border border-hair bg-fill px-2 py-0.5 font-mono text-[10px] leading-none text-muted",children:"Device voice"});return r==="row"?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-[11px]",children:[e.jsx("button",{ref:ie,type:"button",onClick:ae,"aria-label":A?"Pause narration":"Listen to the story","aria-pressed":A,"aria-busy":z,className:"flex-none grid place-items-center w-[38px] h-[38px] rounded-full bg-sig-btn text-white cursor-pointer shadow-[0_6px_16px_-6px_rgba(176,71,63,.8)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link focus-visible:ring-offset-2 focus-visible:ring-offset-base"+(O?" animate-shake":""),children:z?e.jsx(kt,{size:15,className:"animate-spin","aria-hidden":"true"}):A?e.jsx(Mt,{size:14,fill:"currentColor","aria-hidden":"true"}):e.jsx(Nt,{size:14,fill:"currentColor",className:"ml-0.5","aria-hidden":"true"})}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-[13.5px] font-semibold text-ink",children:"Listen to the story"}),ee?e.jsx("span",{className:"font-mono text-[10.5px] text-muted",children:"Device voice"}):e.jsx("span",{className:"font-mono text-[10.5px] text-muted",children:B?`${B} · narrated`:"narrated"})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(_t,{playing:H,mode:L,barRefs:E}),e.jsx(Lt,{speed:a,onCycle:j})]})]}),m]}):e.jsxs("div",{className:"w-full my-[15px]",children:[e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[e.jsxs("button",{ref:ie,type:"button",onClick:ae,"aria-label":A?"Pause narration":"Listen to the story","aria-pressed":A,"aria-busy":z,className:"flex items-center gap-[11px] flex-1 rounded-[13px] bg-sig-btn/[0.14] border border-sig-btn/[0.34] px-[13px] py-2.5 cursor-pointer min-h-[44px] transition-colors hover:bg-sig-btn/[0.2] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link"+(O?" animate-shake":""),children:[e.jsx("span",{className:"flex-none grid place-items-center w-[30px] h-[30px] rounded-full bg-sig-btn text-white",children:z?e.jsx(kt,{size:13,className:"animate-spin","aria-hidden":"true"}):A?e.jsx(Mt,{size:12,fill:"currentColor","aria-hidden":"true"}):e.jsx(Nt,{size:12,fill:"currentColor",className:"ml-0.5","aria-hidden":"true"})}),e.jsx(_t,{playing:H,mode:L,barRefs:E}),ee?e.jsx("span",{className:"ml-auto",children:I}):e.jsx("span",{className:"ml-auto font-mono text-[11px] text-sig-link",children:B?`Listen · ${B}`:"Listen"})]}),e.jsx(Lt,{speed:a,onCycle:j})]}),m]})}const st=["Combobulating the description…","Asking a very well-traveled pigeon…","Walking there really quick…","Bribing the travel gods…","Consulting the tiny tour guide in our server…","Dusting off the local secrets…","Finding the good part…","Reading the plaque so you don’t have to…","Pretending we’ve been there before…","Packing the description into a carry-on…","Calling someone who knows a guy…","Traveling to the end of the world for info…","Unfolding the world’s smallest map…","Checking if this place is actually as cool as it looks…","Waiting for the postcard to arrive…","Translating vibes into words…","Doing a quick lap around the block…","Interrogating a suspiciously knowledgeable landmark…","Gathering local lore…","Making the description sound less like a brochure…"],$s=2800;function Hs({reduce:t}){const s=t?{opacity:[.35,1,.35]}:{y:[0,-4,0]},r=t?1.4:.9;return e.jsx("span",{className:"inline-flex "+(t?"items-center":"items-end")+" gap-1","aria-hidden":"true",children:[0,1,2].map(o=>e.jsx(K.span,{className:"w-1.5 h-1.5 rounded-full bg-sig-link",animate:s,transition:{duration:r,repeat:1/0,delay:o*(t?.18:.12),ease:"easeInOut"}},o))})}function Bs(){const t=Ce()??!1,[s,r]=n.useState(()=>Math.floor(Math.random()*st.length));return n.useEffect(()=>{const o=window.setInterval(()=>r(c=>(c+1)%st.length),$s);return()=>window.clearInterval(o)},[]),e.jsxs("div",{className:"flex items-center gap-2.5 py-1.5 text-muted",children:[e.jsx(Hs,{reduce:t}),e.jsx(Ht,{mode:"wait",initial:!1,children:e.jsx(K.span,{"aria-hidden":"true",className:"text-[13.5px] italic",initial:t?{opacity:0}
12:{opacity:0,y:3},animate:{opacity:1,y:0},exit:t?{opacity:0}:{opacity:0,y:-3},transition:{duration:.25},children:st[s]},s)}),e.jsx("span",{className:"sr-only",role:"status",children:"Loading description…"})]})}const zt=190,Us=[{key:"story",label:"Story"},{key:"notice",label:"Interesting Facts"},{key:"experience",label:"Experience"}];function Kt({story:t,notice:s,experience:r,facts:o=[],active:c,onChange:b,status:a="ready",onRetry:j}){const p=Array.isArray(o)?o:os(o),k=rs({story:t,notice:s,experience:r}[c]),d=c==="notice"&&p.length>0,E=k.length===0&&!d,y=p.join("�"),L=`story-panel-${c}`,[M,D]=n.useState(!1),[S,N]=n.useState(!1),R=n.useRef(null);n.useLayoutEffect(()=>{D(!1);const g=()=>{const f=R.current;f&&N(f.scrollHeight>zt+8)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[c,t,s,r,y]);const v=!M&&S,l="linear-gradient(to bottom, black 62%, transparent)";return e.jsxs("div",{children:[e.jsx("div",{role:"tablist","aria-label":"Stop details",className:"flex flex-wrap gap-x-[18px] gap-y-1.5 border-b border-hair pb-2.5 mb-3.5",children:Us.map(({key:g,label:f})=>{const T=g===c;return e.jsxs("button",{type:"button",role:"tab",id:`story-tab-${g}`,"aria-selected":T,"aria-controls":T?L:void 0,onClick:()=>b(g),className:"relative font-mono text-[10.5px] tracking-[0.1em] uppercase whitespace-nowrap pb-1 -mb-1 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link rounded-sm "+(T?"text-ink":"text-muted hover:text-ink"),children:[f,T&&e.jsx("span",{"aria-hidden":"true",className:"absolute left-0 right-0 -bottom-[11px] h-[1.5px] bg-sig-btn"})]},g)})}),e.jsxs("div",{role:"tabpanel",id:L,"aria-labelledby":`story-tab-${c}`,children:[e.jsx("div",{ref:R,className:"text-[13.5px] leading-[1.55] text-ink/80 space-y-2.5",style:v?{maxHeight:zt,overflow:"hidden",maskImage:l,WebkitMaskImage:l}:void 0,children:E?a==="loading"?e.jsx(Bs,{}):a==="locked"?e.jsx("p",{className:"text-muted italic",children:"Unlock this trip for full stories."}):a==="forbidden"?e.jsx("p",{className:"text-muted italic",children:"Stories are read-only on a shared trip."}):a==="error"?e.jsxs("div",{className:"space-y-2.5",children:[e.jsx("p",{className:"text-muted",children:"We couldn’t load this description yet."}),j&&e.jsx("button",{type:"button",onClick:j,className:"inline-flex items-center gap-1 font-mono text-[10.5px] tracking-[0.08em] uppercase text-sig-link hover:text-ink transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link rounded-sm",children:"Try again"})]}):e.jsx("p",{className:"text-muted italic",children:"Nothing here yet."}):e.jsxs(e.Fragment,{children:[d&&e.jsx("ul",{className:"space-y-2",children:p.map((g,f)=>e.jsxs("li",{className:"flex gap-2.5 items-start rounded-card bg-fill px-3 py-2.5 text-[13.5px] leading-[1.5]",children:[e.jsx("span",{"aria-hidden":"true",className:"flex-none text-sig mt-[3px]",children:e.jsx(hs,{size:14})}),e.jsx("span",{className:"text-ink/90",dangerouslySetInnerHTML:{__html:is(g)}})]},f))}),c==="experience"&&k.length>0?e.jsx("div",{className:"space-y-2.5 rounded-r-card border-l-[3px] border-amber-400 bg-amber-50 px-4 py-3 text-ink/90 dark:bg-amber-500/10",children:k.map((g,f)=>e.jsx("p",{dangerouslySetInnerHTML:{__html:g}},f))}):k.map((g,f)=>e.jsx("p",{dangerouslySetInnerHTML:{__html:g}},f))]})}),S&&e.jsxs("button",{type:"button",onClick:()=>D(g=>!g),"aria-expanded":M,className:"mt-2 inline-flex items-center gap-1 font-mono text-[10.5px] tracking-[0.08em] uppercase text-sig-link hover:text-ink transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link rounded-sm",children:[M?"Read less":"Read more",e.jsx(Rs,{size:13,"aria-hidden":"true",className:"transition-transform duration-200 motion-reduce:transition-none "+(M?"rotate-180":"")})]})]})]})}function Ws(t,s,r=.12,o=24){const c=(t.lat+s.lat)/2,b=(t.lng+s.lng)/2,a=s.lat-t.lat,j=s.lng-t.lng,p=c-j*r,h=b+a*r,k=[];for(let d=0;d<=o;d++){const E=d/o,y=1-E;k.push({lat:y*y*t.lat+2*y*E*p+E*E*s.lat,lng:y*y*t.lng+2*y*E*h+E*E*s.lng})}return k}function qs(t){return t.divIcon({className:"",html:'<div style="color:var(--sig-btn);filter:drop-shadow(0 2px 3px rgba(0,0,0,.55))"><svg width="30" height="30" viewBox="0 0 24 24" fill="currentColor" stroke="#fff" stroke-width="1.2"><path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"/><circle cx="12" cy="10" r="3" fill="#fff" stroke="none"/></svg></div>',iconSize:[30,30],iconAnchor:[15,28]})}function Vs(t){return t.divIcon({className:"",html:'<div style="position:relative;width:18px;height:18px"><span style="position:absolute;inset:0;border-radius:9999px;background:var(--sig-btn);opacity:.35;animation:vyPulse 1.6s ease-in-out infinite"></span><span style="position:absolute;inset:5px;border-radius:9999px;background:#fff;border:2px solid var(--sig-btn)"></span></div>',iconSize:[18,18],iconAnchor:[9,9]})}const Gs=n.forwardRef(function({destination:s,user:r,stopName:o,className:c,onInteracting:b},a){const j=n.useRef(null),p=n.useRef(null),h=n.useRef(null),k=n.useRef(null),d=n.useRef(null),E=n.useRef(!1),[y,L]=n.useState(0);n.useImperativeHandle(a,()=>({zoomIn:()=>{var N;return(N=p.current)==null?void 0:N.zoomIn()},zoomOut:()=>{var N;return(N=p.current)==null?void 0:N.zoomOut()}}),[]),n.useEffect(()=>{const N=j.current;if(!N||typeof window>"u"||typeof N.getBoundingClientRect!="function")return;let R=!1;return Ln(()=>import("./leaflet-src-DreytlB6.js").then(v=>v.l),__vite__mapDeps([0,1,2])).then(v=>{if(R||!j.current)return;const l=v.default??v;if(h.current=l,p.current)return;const g=l.map(j.current,{dragging:!0,touchZoom:!0,doubleClickZoom:!0,scrollWheelZoom:!1,zoomControl:!1,attributionControl:!1,keyboard:!1}
12).setView([s.lat,s.lng],15);d.current=bs(g,l),k.current=l.layerGroup().addTo(g),p.current=g,L(f=>f+1)}).catch(()=>{}),()=>{var v;R=!0,(v=d.current)==null||v.call(d),d.current=null,p.current&&(p.current.remove(),p.current=null,k.current=null)}},[]);const M=()=>{const N=h.current,R=p.current;if(!(!N||!R))if(r)try{const v=N.latLngBounds([[r.lat,r.lng],[s.lat,s.lng]]);v.isValid()&&R.fitBounds(v,{padding:[38,38],maxZoom:16})}catch{}else R.setView([s.lat,s.lng],15)},D=n.useRef(M);D.current=M,n.useEffect(()=>{const N=h.current,R=p.current,v=k.current;if(!N||!R||!v)return;v.clearLayers();const l=getComputedStyle(document.documentElement).getPropertyValue("--sig-btn").trim()||"#B0473F";N.marker([s.lat,s.lng],{icon:qs(N)}).addTo(v),r&&(N.marker([r.lat,r.lng],{icon:Vs(N)}).addTo(v),N.polyline(Ws(r,s).map(g=>[g.lat,g.lng]),{color:l,weight:3,opacity:.9,dashArray:"1 7",lineCap:"round"}).addTo(v)),E.current||(M(),E.current=!0)},[y,s.lat,s.lng,r==null?void 0:r.lat,r==null?void 0:r.lng]),n.useEffect(()=>{const N=p.current,R=j.current;if(!N||!R||typeof ResizeObserver>"u")return;const v=new ResizeObserver(()=>{try{N.invalidateSize(),D.current()}catch{}});return v.observe(R),()=>v.disconnect()},[y]);const S=n.useRef(b);return S.current=b,n.useEffect(()=>{const N=j.current;if(!N)return;let R=0;const v=()=>{var g;R+=1,R===1&&((g=S.current)==null||g.call(S,!0))},l=()=>{var g;R!==0&&(R-=1,R===0&&((g=S.current)==null||g.call(S,!1)))};return N.addEventListener("pointerdown",v,!0),window.addEventListener("pointerup",l,!0),window.addEventListener("pointercancel",l,!0),()=>{var g;N.removeEventListener("pointerdown",v,!0),window.removeEventListener("pointerup",l,!0),window.removeEventListener("pointercancel",l,!0),R>0&&((g=S.current)==null||g.call(S,!1))}},[]),e.jsxs("div",{className:"relative h-full w-full "+(c??""),children:[e.jsx("div",{ref:j,className:"absolute inset-0 bg-fill",role:"img","aria-label":`Minimap: your location relative to ${o}`}),y===0&&e.jsx("div",{className:"absolute inset-0",role:"status","aria-label":"Loading minimap",children:e.jsx(Tn,{className:"absolute inset-0 rounded-none"})}),y>0&&!r&&e.jsx("div",{className:"absolute inset-x-0 bottom-0 px-3 py-2 text-center text-[11px] text-white bg-black/45 backdrop-blur-[3px]",children:"Enable location to see where you are"})]})});function Ys(t){return t==null||!Number.isFinite(t)?null:t<1e3?`${Math.round(t)} m`:`${(t/1e3).toFixed(t<1e4?1:0)} km`}function Ks(){return e.jsx("div",{"aria-hidden":"true",className:"absolute inset-0",style:{background:"repeating-linear-gradient(135deg,rgba(255,255,255,.04) 0 1px,transparent 1px 12px),linear-gradient(160deg,#2a201d,#15110f)"}})}function Fe({stop:t,stopDate:s,heroUrl:r,distanceM:o,etaMin:c,headingLabel:b,story:a,notice:j,experience:p,facts:h=[],descriptionStatus:k="ready",onRetryDescription:d,voiceId:E,tripId:y,stopId:L,onDirections:M,onComplete:D,completed:S=!1,canComplete:N=!0,stopNumber:R,activeTab:v,onTabChange:l,enableMinimap:g=!1,userPos:f=null,onMinimapInteracting:T}){const U=Ce()??!1,[$,X]=n.useState("photo"),[J,G]=n.useState(null),{src:H,failed:z}=Bt(r),A=!!r&&r!==J&&!z&&!!H,ee=ge(t),W=g&&ee!=null,O=W&&$==="map",re=n.useRef(null),q=n.useRef(null),[ie,ue]=n.useState(0),[ae,B]=n.useState(!1),pe=Y=>{B(Y),T==null||T(Y)};n.useEffect(()=>{const Y=re.current;if(!Y||typeof ResizeObserver>"u")return;ue(Y.clientWidth);const be=new ResizeObserver(Ne=>ue(Ne[0].contentRect.width));return be.observe(Y),()=>be.disconnect()},[]);const m=O&&ie?ie:160,I=Ys(o),x=c!=null&&Number.isFinite(c)?`${Math.round(c)} MIN`:null,C=[S?"VISITED":"NOW",I,x,b||null].filter(Boolean),P=[t.type].filter(Boolean),V=as(t.hours,s),oe=!!(V||t.price||t.goodFor),Q=a||j||p||t.name,ke=Gt(k,Q,t.name);return e.jsxs("div",{className:"rounded-[18px] overflow-hidden bg-raised border border-hair shadow-[0_1px_2px_rgba(0,0,0,.4),0_26px_60px_-28px_rgba(0,0,0,.9)]",children:[e.jsxs(K.div,{ref:re,className:"relative w-full overflow-hidden bg-raised transition-shadow duration-200 "+(ae&&O?"ring-2 ring-inset ring-white/45":""),initial:!1,animate:{height:m},transition:{duration:U?0:.42,ease:[.4,0,.2,1]},children:[e.jsx(K.div,{className:"absolute inset-0 z-0",animate:{o
12pacity:O?0:1},transition:{duration:U?0:.4,ease:[.4,0,.2,1]},children:A?e.jsx("img",{src:H,alt:t.name,onError:()=>G(r??null),className:"absolute inset-0 w-full h-full object-cover"},r):e.jsx(Ks,{})}),O&&ee&&e.jsx(K.div,{className:"absolute inset-0 z-0",initial:{opacity:U?1:0},animate:{opacity:1},transition:{duration:U?0:.4,ease:[.4,0,.2,1]},children:e.jsx(Gs,{ref:q,destination:ee,user:f??null,stopName:t.name,onInteracting:pe})}),e.jsx("div",{className:"absolute inset-0 z-0 pointer-events-none","aria-hidden":"true",style:{background:"linear-gradient(180deg,rgba(0,0,0,.28) 0%,transparent 30%,transparent 40%,rgba(0,0,0,.55))"}}),R!=null&&e.jsx("span",{className:"absolute left-[13px] top-[11px] z-10 grid place-items-center min-w-[26px] h-[26px] px-1.5 rounded-full bg-black/45 backdrop-blur-[4px] border border-white/25 font-mono text-[12px] font-semibold text-white","aria-label":`Stop ${R}`,children:R}),e.jsxs("div",{className:"absolute left-[13px] bottom-[11px] z-10 inline-flex items-center gap-[7px] font-mono text-[10px] tracking-[0.07em] text-white bg-sig-btn/85 px-2.5 py-[5px] rounded-full backdrop-blur-[4px]",children:[e.jsx("span",{className:"w-[6px] h-[6px] rounded-full bg-white",style:S?void 0:{animation:"vyPulse 1.4s ease-in-out infinite"},"aria-hidden":"true"}),C.join(" · ")]}),O&&e.jsxs("div",{className:"absolute right-[11px] bottom-[64px] z-10 flex flex-col rounded-full bg-black/45 backdrop-blur-[4px] border border-white/25 overflow-hidden",children:[e.jsx("button",{type:"button",onClick:()=>{var Y;return(Y=q.current)==null?void 0:Y.zoomIn()},"aria-label":"Zoom in",className:"grid place-items-center w-11 h-9 text-white cursor-pointer transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-white/70",children:e.jsx(rt,{size:16,"aria-hidden":"true"})}),e.jsx("span",{className:"h-px bg-white/25","aria-hidden":"true"}),e.jsx("button",{type:"button",onClick:()=>{var Y;return(Y=q.current)==null?void 0:Y.zoomOut()},"aria-label":"Zoom out",className:"grid place-items-center w-11 h-9 text-white cursor-pointer transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-white/70",children:e.jsx(ls,{size:16,"aria-hidden":"true"})})]}),W&&e.jsx("button",{type:"button",onClick:()=>X(Y=>Y==="photo"?"map":"photo"),"aria-pressed":$==="map","aria-label":$==="map"?"Show photo":"Show minimap",className:"absolute right-[11px] bottom-[11px] z-10 grid place-items-center w-11 h-11 rounded-full bg-black/45 backdrop-blur-[4px] border border-white/25 text-white cursor-pointer transition-colors hover:bg-black/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70",children:$==="map"?e.jsx(An,{size:17,"aria-hidden":"true"}):e.jsx(ss,{size:17,"aria-hidden":"true"})}),W&&e.jsx("span",{className:"sr-only","aria-live":"polite",children:O?"Minimap shown":"Photo shown"})]}),e.jsxs("div",{className:"px-[17px] pt-4 pb-[15px]",children:[e.jsx("h2",{className:"font-serif font-medium text-[34px] leading-[1.02] tracking-[-0.02em] text-ink",children:t.name}),P.length>0&&e.jsx("p",{className:"text-[12.5px] text-muted mt-[5px]",children:P.join(" · ")}),oe&&e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mt-2","aria-label":"Place details",children:[V&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-fill px-2 py-0.5 text-[11.5px] font-semibold text-muted",children:[e.jsx(In,{size:12,"aria-hidden":"true"}),V]}),t.price&&e.jsx("span",{className:"inline-flex items-center gap-1 rounded-full bg-fill px-2 py-0.5 text-[11.5px] font-mono font-semibold text-muted","aria-label":`Price level ${t.price}`,children:t.price}),t.goodFor&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-fill px-2 py-0.5 text-[11.5px] font-semibold text-muted",children:[e.jsx(gs,{size:12,"aria-hidden":"true"}),t.goodFor]})]}),e.jsx(Yt,{text:Q,voiceId:E,variant:"pill",tripId:y,stopId:L,textState:ke}),e.jsx(Kt,{story:a,notice:j,experience:p,facts:h,active:v,onChange:l,status:k,onRetry:d}),e.jsxs("div",{className:"flex gap-[9px] mt-3.5",children:[e.jsx("button",{type:"button",onClick:M,className:"flex-1 rounded-[12px] bg-sig-btn text-white font-semibold text-[13.5px] py-[11px] min-h-[44px] curs
12or-pointer transition-colors hover:brightness-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link focus-visible:ring-offset-2 focus-visible:ring-offset-raised",children:"Directions"}),N&&e.jsx("button",{type:"button",onClick:D,"aria-label":S?`Mark ${t.name} not complete`:`Mark ${t.name} complete`,"aria-pressed":S,className:"flex-none grid place-items-center w-11 min-h-[44px] rounded-[12px] cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link "+(S?"border border-sig/40 bg-sig/[0.1] text-sig hover:bg-sig/[0.18]":"border border-hair-strong bg-transparent text-ink/80 hover:bg-fill"),children:e.jsx(je,{size:16,strokeWidth:2.5,"aria-hidden":"true"})})]})]})]})}function Qt({index:t,name:s,meta:r,done:o=!1,onClick:c,onToggleComplete:b}){const a=e.jsx("span",{className:"grid place-items-center w-[19px] h-[19px] rounded-full border border-sig/30 bg-sig/[0.08] text-sig",children:e.jsx(je,{size:11,strokeWidth:2.5,"aria-hidden":"true"})}),j=e.jsx("span",{className:"grid place-items-center w-[19px] h-[19px] rounded-full border border-ink/20 text-muted font-mono text-[10px]","aria-hidden":"true",children:t}),p=e.jsx("span",{className:"min-w-0 truncate text-[14px] "+(o?"text-muted line-through decoration-hair":"text-ink/80"),children:s}),h=r?e.jsx("span",{className:"ml-auto flex-none font-mono text-[10.5px] text-muted",children:r}):null;if(o&&b)return e.jsxs("div",{className:"flex items-center gap-[11px] pt-[11px] px-0.5",children:[e.jsx("button",{type:"button",onClick:b,"aria-label":`Mark ${s} not complete`,"aria-pressed":!0,className:"flex-none rounded-full cursor-pointer transition-colors hover:brightness-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link",children:a}),e.jsxs("button",{type:"button",onClick:c,"aria-label":`Open ${s}`,disabled:!c,className:"flex min-w-0 flex-1 items-center gap-[11px] py-[2px] text-left rounded-md cursor-pointer transition-colors hover:bg-fill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link disabled:cursor-default disabled:hover:bg-transparent",children:[p,h]})]});const k=e.jsxs(e.Fragment,{children:[o?a:j,p,h]});return c?e.jsx("button",{type:"button",onClick:c,"aria-label":`Open ${s}`,className:"flex w-full items-center gap-[11px] pt-[11px] pb-[2px] px-0.5 text-left rounded-md cursor-pointer transition-colors hover:bg-fill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link",children:k}):e.jsx("div",{className:"flex items-center gap-[11px] pt-[11px] px-0.5",children:k})}function Qs({stops:t,rows:s,focusedStopIndex:r,rowMeta:o,onFocus:c}){const b=s.filter(a=>a.status!=="done"&&a.index!==r);return b.length===0?null:e.jsx("div",{className:"space-y-1.5",children:b.map(a=>{const j=t[a.index];return j?e.jsx(Qt,{index:a.index+1,name:j.name,meta:o(a.index),onClick:()=>c(a.index)},a.index):null})})}function Zs({stops:t,completed:s,open:r,panelId:o,rowMeta:c,onFocus:b,onToggleComplete:a,canComplete:j}){const p=Ce()??!1;return s.length===0?null:e.jsx(Ht,{initial:!1,children:r&&e.jsx(K.div,{id:o,initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:p?0:.28,ease:[.4,0,.2,1]},className:"overflow-hidden",children:e.jsx("div",{className:"mb-3 pl-1 pt-1.5 space-y-1.5",children:s.map(h=>{const k=t[h.index];return k?e.jsx(Qt,{index:h.index+1,name:k.name,meta:c(h.index),done:!0,onClick:()=>b(h.index),onToggleComplete:j?()=>a(h.index):void 0},h.index):null})})},"completed-panel")})}function Xs({name:t,onOpen:s,onDismiss:r}){const[o,c]=n.useState(!1);return n.useEffect(()=>{const b=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(b)},[]),e.jsxs("div",{role:"status","aria-live":"polite",className:"flex items-center gap-3 rounded-[14px] bg-overlay border border-sig-btn/40 shadow-lift px-3.5 py-3 transition-all duration-300 ease-out "+(o?"opacity-100 translate-y-0":"opacity-0 -translate-y-2"),children:[e.jsx("span",{className:"flex-none w-2 h-2 rounded-full bg-sig-link",style:{animation:"vyPulse 1.4s ease-in-out infinite"},"aria-hidden":"true"}),e.jsx("button",{type:"button",onClick:s,className:"min-w-0 flex-1 flex items-center gap-1.5 text-left min-h-[44px] curs
12or-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link rounded-md -mx-1 px-1",children:e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"block text-[13.5px] text-ink",children:["You're arriving at ",e.jsx("span",{className:"font-semibold",children:t})]}),e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[12px] font-semibold text-sig-link",children:["View Guide ",e.jsx(it,{size:13,"aria-hidden":"true"})]})]})}),e.jsx("button",{type:"button",onClick:r,"aria-label":"Dismiss arrival notice",className:"flex-none grid place-items-center w-11 h-11 -mr-1 rounded-md text-muted hover:text-ink hover:bg-fill transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link",children:e.jsx(_n,{size:16,"aria-hidden":"true"})})]})}const Js=30,er=600,Ft=320;function tr(){return e.jsx("div",{"aria-hidden":"true",className:"absolute inset-0",style:{background:"repeating-linear-gradient(135deg,rgba(255,255,255,.04) 0 1px,transparent 1px 13px),linear-gradient(165deg,#2c211d,#140f0d)"}})}function nr({stop:t,heroUrl:s,story:r,notice:o,experience:c,facts:b=[],descriptionStatus:a="ready",onRetryDescription:j,voiceId:p,tripId:h,stopId:k,onComplete:d,canComplete:E=!0,activeTab:y,onTabChange:L,telemetry:M,nextLabel:D}){const S=Ce()??!1,[N,R]=n.useState(!1),[v,l]=n.useState(!1),[g,f]=n.useState(null),{src:T,failed:U}=Bt(s),$=!!s&&s!==g&&!U&&!!T,X=r||o||c||t.name,J=Gt(a,X,t.name),G=n.useRef(null),H=n.useRef(null);n.useEffect(()=>()=>{G.current!=null&&window.clearTimeout(G.current),H.current!=null&&window.clearTimeout(H.current)},[]);function z(){if(!N){if(R(!0),S){d();return}G.current=window.setTimeout(()=>{l(!0),H.current=window.setTimeout(d,Ft)},er)}}const A=t.name.length>Js;return e.jsxs(K.div,{className:"relative w-full h-full bg-base rounded-[inherit] overflow-hidden flex flex-col",initial:S?!1:{opacity:0,y:16},animate:v?S?{opacity:1}:{opacity:0,y:-10}:{opacity:1,y:0},transition:v?{duration:S?0:Ft/1e3,ease:"easeIn"}:{type:"spring",stiffness:300,damping:30},children:[e.jsxs("div",{className:"relative h-[300px] flex-none overflow-hidden",children:[$?e.jsx("img",{src:T,alt:t.name,onError:()=>
12f(s??null),className:"absolute inset-0 w-full h-full object-cover"},s):e.jsx(tr,{}),e.jsx("div",{className:"absolute inset-0","aria-hidden":"true",style:{background:"linear-gradient(180deg,rgba(0,0,0,.25) 0%,transparent 30%,rgba(10,10,12,.2) 60%,var(--base) 100%)"}}),e.jsxs("div",{className:"absolute left-[22px] right-[22px] bottom-3.5 flex flex-col gap-2",children:[e.jsxs(K.div,{className:"flex items-center gap-2.5",initial:S?!1:{opacity:0,scale:.85},animate:{opacity:1,scale:1},transition:S?{duration:0}:{type:"spring",stiffness:380,damping:22,delay:.15},children:[e.jsxs("span",{className:"relative inline-flex items-center justify-center w-[26px] h-[26px]",children:[e.jsx("span",{className:"absolute inset-0 rounded-full border-[1.5px] border-sig-link",style:{animation:"vySonar 2.1s ease-out infinite"},"aria-hidden":"true"}),e.jsx("span",{className:"grid place-items-center w-[26px] h-[26px] rounded-full bg-sig-btn text-white",children:e.jsx(je,{size:13,strokeWidth:3,"aria-hidden":"true"})})]}),e.jsx("span",{className:"font-mono text-[10.5px] tracking-[0.14em] text-white [text-shadow:0_1px_6px_rgba(0,0,0,.6)]",children:"YOU'VE ARRIVED"})]}),e.jsx("h2",{className:"font-serif font-medium leading-[1.05] tracking-[-0.02em] text-ink break-words [text-wrap:balance] "+(A?"text-[28px]":"text-[42px]"),children:t.name}),M&&e.jsx("p",{className:"font-mono text-[10.5px] tracking-[0.04em] text-ink/70",children:M})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-[22px] pt-[18px]",children:[e.jsx("div",{className:"mb-[18px]",children:e.jsx(Yt,{text:X,voiceId:p,variant:"row",tripId:h,stopId:k,textState:J})}),e.jsx(Kt,{story:r,notice:o,experience:c,facts:b,active:y,onChange:L,status:a,onRetry:j})]}),E&&e.jsxs("div",{className:"flex-none px-[22px] pt-3.5 pb-3 relative",children:[e.jsxs("div",{role:"status","aria-live":"polite",className:"absolute left-[22px] right-[22px] -top-[30px] flex items-center gap-2 bg-overlay border border-sig-btn/40 rounded-[10px] px-3 py-2 transition-all duration-300 ease-out "+(N&&D?"opacity-100 translate-y-0":"opacity-0 translate-y-2 pointer-events-none"),children:[e.jsx("span",{className:"flex-none w-1.5 h-1.5 rounded-full bg-sig-link","aria-hidden":"true"}),e.jsx("span",{className:"font-mono text-[10.5px] tracking-[0.04em] text-sig-link truncate",children:D?`ADVANCING TO ${D.toUpperCase()}`:""})]}),e.jsxs("button",{type:"button",onClick:z,disabled:N,className:"w-full rounded-[14px] font-semibold text-[15.5px] py-[15px] min-h-[44px] flex items-center justify-center gap-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig-link focus-visible:ring-offset-2 focus-visible:ring-offset-base "+(N?"bg-overlay text-sig-link cursor-default":"bg-sig-btn text-white cursor-pointer shadow-[0_10px_26px_-12px_rgba(176,71,63,.9)] hover:brightness-110"),children:[e.jsx("span",{children:N?"Completed":"Mark complete & continue"}),e.jsx("span",{"aria-hidden":"true",children:N?"✓":"→"})]})]})]})}const sr=40,rr=80;function ir(t,s,r){if(typeof s.lat!="number"||typeof s.lng!="number")return!1;const o=Ut(t,{lat:s.lat,lng:s.lng})*1e3;return r?o<=rr:o<=sr}const _={thresholdPx:92,velocityPxPerS:500,minFlickPx:36,tiltDegPerPx:.05,maxTiltDeg:8,peek:{scale:.95,y:20},prevPeek:{fromY:-110,opacity:.95},exit:{left:{x:-340,y:-230,rotate:-14,opacity:0},right:{x:340,y:230,rotate:14,opacity:0}},throwSec:.34,enterSec:.32,enterDelaySec:.03,ease:[.4,0,.2,1],enterEase:[.22,1,.36,1],spring:{type:"spring",stiffness:520,damping:38},reducedFadeSec:.14},ar=(t,s,r)=>Math.max(s,Math.min(r,t));function or(t,s,r){if(t===0)return null;const o=t<0?"left":"right";return o==="left"&&r.leftNoop||o==="right"&&r.rightNoop?null:Math.abs(t)>_.thresholdPx||Math.abs(s)>_.velocityPxPerS&&Math.abs(t)>_.minFlickPx?o:null}const lr=220;function cr(t,s){return{initial:s===0?!1:{opacity:0,x:t?0:s*20},animate:{opacity:1,x:0},transition:{duration:t?0:lr/1e3,ease:_.ease}}}const ur=600,dr=[];function Ot(t,s){return["trip-progress",t,s]}function pr(t){const s=t==null?void 0:t.completed;return{completed:Array.isArray(s)?s.filter(r=>typeof r=="string"):[]}}function fr(t,{enabled:s}){const{user:r}=Wt(),o=zn(),c=r==null?void 0:r.id,b=!!t&&!!c&&s,a=Fn({queryKey:Ot(t,c),enabled:b,staleTime:1/0,refetchOnWindowFocus:!1,retry:!1,queryFn:async()=>{try{const{data:M,error:D}=await St.rpc("get_trip_progress",{p_id:t});if(D)return{completed:[]};const S=M;return S!=null&&S.ok?pr(S.progress):{completed:[]}}catch{return{completed:[]}}}}),j=On({mutationFn:async({tripId:M,next:D})=>{try{await St.rpc("set_trip_progress",{p_id:M,p_progress:{completed:D}})}catch{}}}),p=n.useRef(null),h=n.useRef(null),k=n.useRef(j.mutate);n.useEffect(()=>{k.current=j.mutate},[j.mutate]);const d=n.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null);const M=p.current;p.current=null,M!=null&&k.current(M)},[]),E=n.useCallback(M=>{if(!b||!t)return;const D=Ot(t,c);o.cancelQueries({queryKey:D}),o.setQueryData(D,{completed:M}),p.current={tripId:t,next:M},h.current&&clearTimeout(h.current),h.current=setTimeout(d,ur)},[b,o,t,c,d]);n.useEffect(()=>d,[d]);const y=a.data;return{completed:n.useMemo(()=>(y==null?void 0:y.completed)??dr,[y]),setCompleted:E,flush:d,active:b}}function mr({tripId:t}){const s=qt();return e.jsxs("button",{onClick:()=>s(`/trip/${t}/guide/live`),"aria-label":"Start live tour",className:"inline-flex min-h-[38px] items-center gap-1.5 rounded-full border border-hair bg-fill px-3.5 py-2 text-[12.5px] font-bold text-ink transition-colors hover:bg-fill-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sig/40",children:[e.jsx(Vt,{size:15,"aria-hidden":"true"})," Live tour"]})}const xr=5e3,hr=Kn(.7,0,.84,0);function gr({ghost:t,reduce:s,onDone:r}){const{dir:o,startX:c,startRotate:b,snap:a}=t,j=s?{opacity:0}
12:_.exit[o];return e.jsx(K.div,{"aria-hidden":"true",className:"pointer-events-none absolute inset-0",style:{zIndex:30},initial:{x:c,y:0,rotate:s?0:b,opacity:1},animate:j,transition:s?{duration:_.reducedFadeSec}:{duration:_.throwSec,ease:_.ease},onAnimationComplete:r,children:e.jsx(Fe,{stop:a.stop,heroUrl:a.heroUrl,distanceM:a.distanceM,etaMin:a.etaMin,headingLabel:a.headingLabel,story:a.story,notice:a.notice,experience:a.experience,facts:a.facts,voiceId:a.voiceId,onDirections:()=>{},onComplete:()=>{},completed:a.completed,canComplete:!1,stopNumber:a.stopNumber,activeTab:a.activeTab,onTabChange:()=>{}})})}function Lr(){var vt,wt;const{trip:t,canEdit:s,isViewerMember:r,save:o,activeDay:c}=$n(),b=qt(),{user:a}=Wt(),{settings:j}=Hn(a==null?void 0:a.id),p=Bn(j.voiceId),h=t.data,k=(h==null?void 0:h.days)??[],d=Un(t),E=fr(t.id,{enabled:r}),y=s||r,L=r?E.completed:(h==null?void 0:h.completed)??[],M=E.setCompleted,D=n.useCallback(u=>{if(r){M(u);return}s&&o({data:{...t.data,completed:u}})},[r,s,o,t.data,M]),S=n.useMemo(()=>{var u;return Zn((u=t.config)==null?void 0:u.startDate,k.length,c,Wn())},[(vt=t.config)==null?void 0:vt.startDate,k.length,c]),[N,R]=n.useState(S);n.useEffect(()=>{R(S)},[S]);const v=k.length,l=Math.min(Math.max(N,0),Math.max(0,v-1)),g=k[l],f=(g==null?void 0:g.stops)??[],T=n.useMemo(()=>f.map(u=>u.name),[f]),[U,$]=n.useState("story"),[X,J]=n.useState(!1),G=n.useRef(null),H=n.useRef(!1),z=Ce()??!1,A=cs(0),ee=xe(A,u=>z?0:ar(u*_.tiltDegPerPx,-8,_.maxTiltDeg)),W=n.useRef(!1),O=n.useRef("none"),re=n.useRef(null),[q,ie]=n.useState(null),[ue,ae]=n.useState(!1),B=Et(l,T,L),[pe,m]=n.useState(B),I=n.useRef(!1);n.useEffect(()=>{I.current=!1,O.current="none",J(!1)},[l]),n.useEffect(()=>{if(I.current)return;const u=B>=0?B:0;m(F=>F===u?F:u)},[l,B]);const x=f.length===0?-1:Math.min(Math.max(pe,0),f.length-1),i=x,w=i>=0?f[i]:void 0,C=w?ge(w):null,P=i>=0&&L.includes(`${l}-${i}`),V=w?w.placeId??w.name??void 0:void 0,oe=f.length===0||i>=f.length-1,Q=i<=0,ke=xe(A,[-92,0],[oe?.42:1,0],{clamp:!0}),Y=xe(A,[0,_.thresholdPx],[0,Q?.42:1],{clamp:!0}),be=xe(A,[-92,0],[1,_.peek.scale],{clamp:!0}),Ne=xe(A,[-92,0],[0,_.peek.y],{clamp:!0}),Oe=xe(A,[-92,0],[1,0],{clamp:!0}),$e=xe(A,[0,_.thresholdPx],[_.prevPeek.fromY,0],{clamp:!0}),He=xe(A,[0,_.thresholdPx],[0,_.prevPeek.opacity],{clamp:!0,ease:hr}),at=n.useCallback(u=>{O.current="fade",I.current=!0,m(u),$("story")},[]),fe=ys(!0),Ee=fe.pos!=null&&C!=null,Be=Ee?Ut(fe.pos,C)*1e3:null,Ue=Ee?ze(fe.pos,C):null,We=Ee?vs(ws(fe.pos,C)):null,ot=i>0?ge(f[i-1]):null,qe=!Ee&&ot&&C?ze(ot,C):null,[lt,ye]=n.useState("traveling"),Ve=n.useRef(!1),Me=n.useRef(!1),De=n.useRef(null),le=n.useCallback(()=>{De.current!=null&&(window.clearTimeout(De.current),De.current=null)},[]),ct=`${l}-${i}`;n.useEffect(()=>{Ve.current=!1,Me.current=!1,le(),ye("traveling"),$("story"),ae(!1)},[ct,le]),n.useEffect(()=>{var u;H.current&&(H.current=!1,(u=G.current)==null||u.scrollIntoView({block:"start",behavior:z?"auto":"smooth"}))},[ct,z]),n.useEffect(()=>{if(!w||fe.pos==null)return;const u=ir(fe.pos,{lat:C==null?void 0:C.lat,lng:C==null?void 0:C.lng},Ve.current);Ve.current=u,u&&!Me.current&&ye(F=>F!=="traveling"?F:(le(),De.current=window.setTimeout(()=>ye("arrived"),xr),"arriving"))},[w,fe.pos,C==null?void 0:C.lat,C==null?void 0:C.lng,le]),n.useEffect(()=>le,[le]);const ce=us(w,{tripTitle:t.title,destination:d,enabled:s,tripId:t.id});ds([f[i],f[i+1],f[i+2],f[i+3]],{tripTitle:t.title,destination:d,enabled:s}),qn(Xn(f,d)),n.useEffect(()=>{if(!w||!s||ce.fromStop||!ce.content)return;const u=ps(t.data,fs(w,d),d,ce.content);u!==t.data&&o({data:u})},[ce.content,ce.fromStop,s]);const ut=w?nt(w):void 0,Zt=w&&!ut?tt(w.name,d):void 0,{url:Xt}=et(Zt),Pe=ut??Xt??void 0,me=i>=0&&i+1<f.length?f[i+1]:void 0,dt=me?nt(me):void 0,Jt=me&&!dt?tt(me.name,d):void 0,{url:en}=et(Jt),tn=dt??en??void 0,de=i>0?f[i-1]:void 0,pt=de?nt(de):void 0,nn=de&&!pt?tt(de.name,d):void 0,{url:sn}=et(nn),rn=pt??sn??void 0,an=de!=null&&L.includes(`${l}-${i-1}`),te=me?Dt(me):null,ne=de?Dt(de):null,se=ce.content,Le=(se==null?void 0:se.history)??"",Te=(se==null?void 0:se.notice)??"",Ge=(se==null?void 0:se.facts)??[],Ae=(se==null?void 0:se.tips)??"",on=n.useCallback(()=>
12{if(!w)return;const u=js({name:w.name,destination:d,coords:ge(w)??void 0},ks());u.startsWith("geo:")?window.location.href=u:window.open(u,"_blank","noopener")},[w,d]),ve=n.useCallback(u=>{!y||u<0||D(ms(L,l,u))},[y,l,L,D]),he=n.useCallback(u=>{W.current=!0,ie({dir:u,startX:A.get(),startRotate:ee.get(),snap:{stop:w,heroUrl:Pe,story:Le,notice:Te,experience:Ae,facts:Ge,voiceId:p,stopNumber:i+1,completed:P,distanceM:P?null:Be,etaMin:P?null:Ue??qe,headingLabel:P?null:We,activeTab:U}}),re.current=u==="left"?{scale:be.get(),y:Ne.get(),opacity:Oe.get()}:{scale:1,y:$e.get(),opacity:He.get()},A.set(0)},[w,Pe,Le,Te,Ae,p,i,P,Be,Ue,qe,We,U,ee,A,be,Ne,Oe,$e,He]),Ie=n.useCallback(()=>{if(W.current)return;if(P){ve(i);return}const u=[...L,`${l}-${i}`],F=Et(l,T,u),Z=i===B&&F>i;Z&&(he("left"),O.current="below"),ve(i),Z?(H.current=!0,m(F)):(Me.current=!0,ye("traveling"))},[P,ve,i,B,l,L,T,he]),ft=n.useCallback(()=>{if(!(W.current||oe)){if(!y){he("left"),O.current="below",I.current=!0,$("story"),m(Math.min(i+1,f.length-1));return}if(!P){Ie();return}he("left"),O.current="below",I.current=!0,$("story"),m(Math.min(i+1,f.length-1))}},[oe,y,P,Ie,he,i,f.length]),mt=n.useCallback(()=>{if(W.current||Q)return;const u=i-1;he("right"),O.current="above",I.current=!0,$("story"),y&&L.includes(`${l}-${u}`)&&ve(u),m(u)},[Q,y,he,i,l,L,ve]),ln=n.useCallback((u,F)=>{const Z=or(F.offset.x,F.velocity.x,{leftNoop:oe,rightNoop:Q});Z==="left"?ft():Z==="right"?mt():xs(A,0,z?{duration:.12}:_.spring)},[oe,Q,ft,mt,A,z]),cn=n.useCallback(()=>{le(),ye("arrived")},[le]),un=n.useCallback(()=>{le(),Me.current=!0,ye("traveling")},[le]),dn=n.useCallback(()=>R(u=>Math.max(0,u-1)),[]),pn=n.useCallback(()=>R(u=>Math.min(v-1,u+1)),[v]),fn=n.useCallback(u=>R(Math.min(Math.max(u,0),Math.max(0,v-1))),[v]),[mn,Ye]=n.useState(!1),xn=Rt(t,v),xt=Vn(xn),hn=n.useCallback(()=>{s&&Ye(!0)},[s]),gn=n.useCallback(()=>{var Z,Re;if(!s)return;const{config:u,data:F}=Ns(t,{title:t.title||(typeof((Z=t.config)==null?void 0:Z.title)=="string"?t.config.title:"")||"",subtitle:t.subtitle??"",startDate:((Re=t.config)==null?void 0:Re.startDate)||"",numDays:v+1});o({config:u,data:F}),Ye(!1),b("/trip/"+t.id)},[s,t,v,o,b]),ht=Ct(t,l),Ke=Rt(t,l)??void 0,Qe=Jn(l,T,L),bn=Qe.map(u=>u.index),Ze=Qe.map(u=>u.name),gt=n.useId(),bt=X,Xe=n.useRef(l),yn=l>Xe.current?1:l<Xe.current?-1:0;n.useEffect(()=>{Xe.current=l},[l]);const vn=es(l,f.length,L),wn=B<0&&f.length>0,Je=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-2.5 flex justify-end",children:e.jsx(mr,{tripId:t.id})}),e.jsx(Ds,{dayIndex:l,dayCount:v,dayLabels:Array.from({length:v},(u,F)=>Ct(t,F)),onPrev:dn,onNext:pn,onPickDay:fn,onAddDay:hn,canEdit:s}),e.jsx(Gn,{open:mn,title:"Add a day to this travel?",body:xt?`This adds ${xt} to the end of your travel.`:"This adds a new empty day to the end of your travel.",confirmLabel:"Add day",onCancel:()=>Ye(!1),onConfirm:gn})]});if(f.length===0)return e.jsx("div",{className:"px-5 md:px-8 py-6 md:py-8",children:e.jsxs("div",{className:"mx-auto w-full max-w-md",children:[Je,e.jsx(br,{bare:!0,icon:"compass",title:"No stops on this day yet",body:`Add places to ${ht} in Plan, and Guide will bring them to life as you go.`})]})});if(!w)return e.jsx("div",{className:"px-5 md:px-8 py-6 md:py-8",children:e.jsx("div",{className:"mx-auto w-full max-w-md",children:Je})});if(lt==="arrived"){const u=f.findIndex((yr,jt)=>jt>i&&!L.includes(`${l}-${jt}`)),F=u>=0?f[u]:null,Z=F?ge(F):null,Re=C&&Z?ze(C,Z):null,Nn=F?F.name+(Re!=null?` · ${Re} MIN`:""):void 0,_e=C==null?void 0:C.lat,Sn=w.type||_e!=null?`${((wt=w.type)==null?void 0:wt.toUpperCase())??""}${_e!=null?`${w.type?" · ":""}${_e.toFixed(2)}°${_e>=0?"N":"S"}`:""}`:void 0;return e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(nr,{stop:w,heroUrl:Pe,story:Le,notice:Te,experience:Ae,facts:Ge,descriptionStatus:ce.status,onRetryDescription:ce.refetch,voiceId:p,tripId:t.id,stopId:V,onComplete:Ie,canComplete:y,activeTab:U,onTabChange:$,telemetry:Sn,nextLabel:Nn})})}const yt=u=>{const F=ge(f[u]),Z=u>0?ge(f[u-1]):null;return!F||!Z?"":`${ze(Z,F)} MIN`},Se=O.current,jn=z?Se==="none"?!1:{opacity:0}
12:Se==="below"||Se==="above"?re.current??(Se==="below"?{opacity:.9,scale:_.peek.scale,y:_.peek.y}:{opacity:0,scale:1,y:_.prevPeek.fromY}):Se==="fade"?{opacity:0}:!1,kn=e.jsxs("div",{ref:G,className:"relative scroll-mt-20",children:[q&&e.jsx(gr,{ghost:q,reduce:z,onDone:()=>{ie(null),W.current=!1}}),me&&e.jsx(K.div,{"aria-hidden":"true",className:"pointer-events-none absolute inset-0",style:{zIndex:2,scale:be,y:Ne,opacity:Oe},children:e.jsx(Fe,{stop:me,stopDate:Ke,heroUrl:tn,distanceM:null,etaMin:null,headingLabel:null,story:(te==null?void 0:te.history)??"",notice:(te==null?void 0:te.notice)??"",facts:(te==null?void 0:te.facts)??[],experience:(te==null?void 0:te.tips)??"",voiceId:p,onDirections:()=>{},onComplete:()=>{},completed:!1,canComplete:!1,stopNumber:i+2,activeTab:"story",onTabChange:()=>{}})}),de&&e.jsx(K.div,{"aria-hidden":"true",className:"pointer-events-none absolute inset-0",style:{zIndex:3,y:$e,opacity:He},children:e.jsx(Fe,{stop:de,stopDate:Ke,heroUrl:rn,distanceM:null,etaMin:null,headingLabel:null,story:(ne==null?void 0:ne.history)??"",notice:(ne==null?void 0:ne.notice)??"",facts:(ne==null?void 0:ne.facts)??[],experience:(ne==null?void 0:ne.tips)??"",voiceId:p,onDirections:()=>{},onComplete:()=>{},completed:an,canComplete:!1,stopNumber:i,activeTab:"story",onTabChange:()=>{}})}),e.jsxs(K.div,{drag:!q&&!ue?"x":!1,dragDirectionLock:!0,dragMomentum:!1,onDragEnd:ln,style:{x:A,rotate:ee,touchAction:"pan-y"},className:"relative z-10 cursor-grab active:cursor-grabbing",children:[e.jsx(K.div,{initial:jn,animate:{opacity:1,y:0,scale:1},transition:z?{duration:_.reducedFadeSec}:{duration:_.enterSec,ease:_.enterEase,delay:_.enterDelaySec},children:e.jsx(Fe,{stop:w,stopDate:Ke,heroUrl:Pe,distanceM:P?null:Be,etaMin:P?null:Ue??qe,headingLabel:P?null:We,story:Le,notice:Te,experience:Ae,facts:Ge,descriptionStatus:ce.status,onRetryDescription:ce.refetch,voiceId:p,tripId:t.id,stopId:V,onDirections:on,onComplete:Ie,completed:P,canComplete:y,stopNumber:i+1,activeTab:U,onTabChange:$,enableMinimap:!0,userPos:fe.pos,onMinimapInteracting:ae})},i),y&&e.jsxs(e.Fragment,{children:[e.jsx(K.div,{"aria-hidden":"true",style:{opacity:ke},className:"pointer-events-none absolute inset-0 grid place-items-center rounded-[18px] bg-sig-btn/85 text-white",children:e.jsxs("div",{className:"grid place-items-center gap-2",children:[e.jsx("span",{className:"grid place-items-center w-14 h-14 rounded-full border-2 border-white/80",children:e.jsx(je,{size:26,strokeWidth:2.5,"aria-hidden":"true"})}),e.jsx("span",{className:"font-mono text-[11px] tracking-[0.16em] font-semibold",children:"DONE · NEXT"})]})}),e.jsx(K.div,{"aria-hidden":"true",style:{opacity:Y},className:"pointer-events-none absolute inset-0 grid place-items-center rounded-[18px] bg-black/55 text-white backdrop-blur-[1px]",children:e.jsxs("div",{className:"grid place-items-center gap-2",children:[e.jsx("span",{className:"grid place-items-center w-14 h-14 rounded-full border-2 border-white/80",children:e.jsx(Es,{size:24,strokeWidth:2.5,"aria-hidden":"true"})}),e.jsx("span",{className:"font-mono text-[11px] tracking-[0.16em] font-semibold",children:"BACK"})]})})]})]})]});return e.jsx("div",{className:"px-5 md:px-8 py-6 md:py-8",children:e.jsxs("div",{className:"mx-auto w-full max-w-md",children:[lt==="arriving"&&e.jsx("div",{className:"mb-4",children:e.jsx(Xs,{name:w.name,onOpen:cn,onDismiss:un})}),Je,e.jsxs(K.div,{"data-testid":"day-deck",...cr(z,yn),children:[e.jsx(Ms,{stopNumber:(y?B>=0?B:f.length-1:x)+1,stopCount:f.length,completedCount:Ze.length,completedNames:Ze,completedIndices:bn,completedExpanded:bt,onToggleCompleted:Ze.length>0?()=>J(u=>!u):void 0,completedPanelId:gt}),wn&&e.jsxs("p",{className:"text-[12.5px] text-muted leading-relaxed -mt-1 mb-3.5",children:[ht," complete — every stop on this day is done. Reopen any below to revisit it, or switch days above."]}),e.jsx(Zs,{stops:f,completed:Qe,open:bt,panelId:gt,rowMeta:yt,onFocus:at,onToggleComplete:ve,canComplete:y}),kn,e.jsx(Qs,{stops:f,rows:vn,focusedStopIndex:i,rowMeta:yt,onFocus:at})]},l)]})})}function br({icon:t,title:s,body:r,bare:o=!1}){const c=t==="sparkles"?Yn:Vt,b=e.jsxs("div",{className:"text-center",children:[e.jsx("span",{"aria-hidden":"true",className:"mx-auto grid place-items-center w-14 h-14 roun
12ded-2xl border border-sig/25 bg-sig/[0.06] text-sig",children:e.jsx(c,{size:26})}),e.jsx("h2",{className:"mt-5 font-serif text-3xl md:text-4xl text-ink tracking-tight",children:s}),e.jsx("p",{className:"mx-auto mt-3 max-w-sm text-[14px] md:text-[15px] text-muted leading-relaxed",children:r})]});return o?e.jsx("div",{className:"py-10 md:py-14",children:b}):e.jsx("div",{className:"px-5 md:px-8 py-16 md:py-24",children:e.jsx("div",{className:"mx-auto w-full max-w-md",children:b})})}export{Lr as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.