1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CalmCorner-Dk5S-s1v.js","assets/ui-vendor-XNsX7NFl.js","assets/i18n-BCZ_8xSB.js","assets/index-Dg7geK91.js","assets/react-router-oAHNt2ka.js","assets/firebase-auth-BWbhO1CC.js","assets/firebase-db-Csu2kn54.js","assets/capacitor-DQeCf45c.js","assets/index-C97XaIpM.css","assets/emotionConstants-B6UviN0Q.js","assets/calmCornerPreloader-CJH7dJAA.js","assets/milestoneService-CFL88J1Q.js","assets/MilestoneToast-M7knOVKu.js"])))=>i.map(i=>d[i]); 2import{u as k,a as e,_ as R}from"./i18n-BCZ_8xSB.js";import{j as a,m as h,W as B,A as S}from"./ui-vendor-XNsX7NFl.js";import{bI as I,u as F,J as z,bJ as q}from"./index-Dg7geK91.js";import{p as V}from"./calmCornerPreloader-CJH7dJAA.js";import{s as $}from"./MilestoneToast-M7knOVKu.js";let O=!1;const D=()=>O,H=()=>{O=!0};let l=[];const W=()=>{try{return globalThis.location?.pathname||"/"}catch{return"/"}};function G(t){typeof t!="string"||!t||l.includes(t)||(l=[...l,t])}function J({pathname:t=W(),show:n=$}={}){const i=l;return l=[],i.length===0||I(t)?[]:(i.forEach(c=>n(c)),i)}const U=e.lazy(()=>R(()=>import("./CalmCorner-Dk5S-s1v.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),Q={initial:{opacity:0}
2,animate:{opacity:1},transition:{duration:.2}},Y={animate:{scale:[1,1.1,1]},transition:{duration:4,repeat:1,ease:"easeInOut"}},K={initial:{opacity:0,width:0},animate:{opacity:1,width:"auto"},exit:{opacity:0,width:0}},_="--calm-fab-clearance",m="3.75rem + 1rem",M=Object.freeze({compact:`calc(var(--mobile-floating-offset) + var(--floating-stack-offset, 0px) + ${m})`,wide:`calc(2rem + var(--safe-area-bottom) + var(--floating-stack-offset, 0px) + ${m})`}),v="--calm-fab-rest-clearance",P=Object.freeze({compact:`calc(var(--mobile-floating-offset) + ${m})`,wide:`calc(2rem + var(--safe-area-bottom) + ${m})`}),X="(min-width: 1024px)",w=400,g=(t,n)=>t?{}:n,Z=({childId:t=null})=>{const{t:n}=k("calmCorner"),{user:i}=F(),c=z(),[s,b]=e.useState(!1),[T,A]=e.useState(!1),[L]=e.useState(()=>!D()),E=e.useRef(null),C=e.useRef(!1),x=e.useRef(!1),u=e.useRef(null),N=i?.tier,o=q(N);e.useEffect(()=>{o&&(V(),R(()=>import("./CalmCorner-Dk5S-s1v.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])))},[o]),e.useEffect(()=>{o&&H()},[o]),e.useEffect(()=>{if(!o||typeof document>"u")return;const r=document.documentElement,d=typeof window.matchMedia=="function"?window.matchMedia(X):null,p=()=>{const y=d?.matches?"wide":"compact";r.style.setProperty(_,M[y]),r.style.setProperty(v,P[y])};return p(),d?.addEventListener?.("change",p),()=>{d?.removeEventListener?.("change",p),r.style.removeProperty(_),r.style.removeProperty(v)}},[o]);const f=e.useCallback(()=>{clearTimeout(u.current),u.current=setTimeout(()=>{u.current=null,J()},w)},[]),j=e.useCallback(r=>{G(r),x.current||f()},[f]);return e.useEffect(()=>()=>clearTimeout(u.current),[]),e.useEffect(()=>{x.current=s,C.current&&!s&&(E.current?.focus(),f()),C.current=s},[s,f]),o?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed bottom-[calc(var(--mobile-floating-offset)+var(--floating-stack-offset,0px)+var(--page-action-bar-height,0px))] right-[calc(1rem+var(--safe-area-right))] lg:bottom-[calc(2rem+var(--safe-area-bottom)+var(--floating-stack-offset,0px)+var(--page-action-bar-height,0px))] lg:right-[calc(2rem+var(--safe-area-right))] z-40 flex flex-col items-end gap-2",children:a.jsxs(h.button,{...g(c,Q),ref:E,type:"button",onClick:()=>b(!0),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),className:"flex min-h-[56px] min-w-[56px] items-center justify-center gap-2 rounded-full bg-sage-700 p-3 text-white shadow-lg transition-colors hover:bg-sage-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sage-600 focus-visible:ring-offset-2 sm:p-4 dark:focus-visible:ring-sage-300 dark:focus-visible:ring-offset-dim-deep","aria-label":n("quickAccess"),"aria-haspopup":"dialog","aria-expanded":s,children:[a.jsx(h.span,{...g(c||!L,Y),className:"flex","aria-hidden":"true","data-testid":"calm-fab-glyph",children:a.jsx(B,{className:"h-6 w-6 sm:h-7 sm:w-7",strokeWidth:2})}),a.jsx(S,{children:T&&!s&&a.jsx(h.span,{...g(c,K),className:"hidden sm:block font-medium whitespace-nowrap overflow-hidden",children:n("quickAccess")})})]})}),s&&a.jsx(e.Suspense,{fallback:null,children:a.jsx(U,{isOpen:s,onClose:()=>b(!1),childId:t,onMilestone:j})})]}):null},ne=Object.freeze(Object.defineProperty({__proto__:null,CALM_FAB_CLEARANCE:M,CALM_FAB_CLEARANCE_VAR:_,CALM_FAB_REST_CLEARANCE:P,CALM_FAB_REST_CLEARANCE_VAR:v,MILESTONE_AFTER_CLOSE_MS:w,default:Z},Symbol.toStringTag,{value:"Module"}));export{ne as C,G as q};
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.