@dhzh/foundry 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/index.mjs +3 -3
- package/dist/skills/foundry/references/providers.md +6 -0
- package/dist/web/assets/{BottomSheet-DQwWhhYI.js → BottomSheet-N2ewVQoq.js} +1 -1
- package/dist/web/assets/{ItemSwipeLayer-CeyoMSkM.js → ItemSwipeLayer-BEKKD84K.js} +1 -1
- package/dist/web/assets/{MenuBottomSheet-BuaZeZUh.js → MenuBottomSheet-D1ojxtu6.js} +1 -1
- package/dist/web/assets/{index-Bjtcyz6x.css → index-BkZfZMlH.css} +102 -0
- package/dist/web/assets/index-D5wx14Yb.js +105 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-B90pNaUa.js +0 -105
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,u as Mt,a as Ne,b as It,j as K,L as jt,p as Je,c as Bt,d as At,e as Dt,g as Nt,h as qt,m as mt,k as Ht,o as Yt,l as _t,n as Ft,t as $t,s as Vt,q as Kt,v as Gt,w as Ut}from"./index-B90pNaUa.js";const Wt=48,Xt=.25,Jt=/^(\d+(?:\.\d+)?|\.\d+)(px|%)$/i;function St(e,o){if(typeof e=="number")return Number.isFinite(e)&&e>0&&e<=1?e*o:null;const s=Jt.exec(e.trim());if(s===null)return null;const c=Number.parseFloat(s[1]);return c>0?s[2].toLowerCase()==="%"?c/100*o:c:null}function Qt(e){return St(e,1)!==null}function Zt(e,o){const s=[];for(const c of e){const h=St(c,o);h!==null&&s.push(h)}return s}function en(e,o,s=Wt){const h=[0,...o.filter(f=>f>0&&f<e).map(f=>e-f)].sort((f,u)=>f-u),p=[];for(const f of h){const u=p[p.length-1];(u===void 0||f-u>=s)&&p.push(f)}return p}function tn(e,o){return o.reduce((s,c)=>Math.abs(c-e)<Math.abs(s-e)?c:s,o[0])}const nn=.3;function rn(e,o){if(e.length<2||o<=0)return null;const s=e[e.length-1];return o-s<=Xt*o?s:null}function Ye(e,o,s,c){const h=c!==null,p=h?o[o.length-2]:o[o.length-1],f=h?c:s,u=h?nn:0;return e<=p?1:e>=f?u:1-(1-u)*((e-p)/(f-p))}function on(e,o,s,c){let h=o;if(s>0){const p=o.filter(f=>f>=c);p.length>0&&(h=p)}else if(s<0){const p=o.filter(f=>f<=c);p.length>0&&(h=p)}return tn(e,h)}const _e="--_sheet-keyboard-inset",sn=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);function Ve(){return window.visualViewport?.height??window.innerHeight}function cn(){return Ve()>=window.innerHeight-.5}function an(){const e=window.navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||e.includes("Macintosh")&&window.navigator.maxTouchPoints>1}function Ke(e){return e instanceof HTMLTextAreaElement?!e.disabled&&!e.readOnly:e instanceof HTMLInputElement?!e.disabled&&!e.readOnly&&!sn.has((e.getAttribute("type")??"text").toLowerCase()):e instanceof HTMLElement&&e.matches('[contenteditable]:not([contenteditable="false"])')}function gt(e,o){if(!(e instanceof Element))return null;const s=e.closest('input, textarea, [contenteditable]:not([contenteditable="false"])');if(o.contains(s)&&Ke(s))return s;const c=e.closest("label"),h=c instanceof HTMLLabelElement?c.control:null;return o.contains(h)&&Ke(h)?h:null}function ln({bodyRef:e,bottomClearance:o,isEnabled:s,isFullyExpanded:c,isPageScrollLocked:h,isSheetTraveling:p,isOpen:f,isPresented:u,sheetRef:j}){const E=n.useRef(!1),B=n.useRef(!1),A=n.useRef(c),M=n.useRef(f);A.current=c,M.current=f,n.useEffect(()=>{if(!s||!p)return;const i=j.current,b=document.activeElement;i&&b instanceof HTMLElement&&b!==i&&i.contains(b)&&(B.current=E.current,i.focus({preventScroll:!0}))},[s,p,j]),n.useEffect(()=>{if(!s||!u||f)return;const i=j.current,b=document.activeElement;i&&b instanceof HTMLElement&&b!==i&&i.contains(b)&&(B.current=E.current,b.blur())},[s,f,u,j]),n.useEffect(()=>{const i=e.current,b=j.current;if(!s||!u||!i)return;let P=null,D=null;const N=an(),ee=()=>{i.style.setProperty(_e,"0px"),P=null,D=null,E.current=!1,B.current=!1},F=(d,x)=>{if(typeof i.scrollBy!="function"){i.scrollTop+=d;return}const S=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;i.scrollBy({top:d,behavior:x&&!S?"smooth":"instant"})},Q=(d,x)=>{const S=i.getBoundingClientRect(),I=d.getBoundingClientRect(),q=Ve(),se=Math.max(0,S.bottom-q)>0?o:0,re=S.top,C=Math.min(S.bottom,q-se);C<=re||(I.bottom>C?F(I.bottom-C,x):I.top<re&&F(I.top-re,x))},R=d=>{const x=Ve();if(cn()){ee();return}if(Math.max(0,d.bodyBottom-x)===0){ee();return}const I=Math.max(0,d.bodyBottom-(x-o));i.style.setProperty(_e,`${I}px`)},w=d=>{if(!A.current)return;const x=gt(d.relatedTarget,i);if(x){x!==document.activeElement&&x.focus({preventScroll:!0});return}const S=gt(d.target,i);M.current&&S&&!d.relatedTarget&&b?.focus({preventScroll:!0})},te=()=>{const d=document.activeElement;if(!A.current||!(d instanceof HTMLElement)||!i.contains(d)||!Ke(d)){if(B.current&&P){R(P);return}ee();return}B.current=!1;const x=i.getBoundingClientRect(),S=Ve(),I=Math.max(0,x.bottom-S),q=I>0?o:0;P=I>0?{bodyBottom:x.bottom}:null,h&&I>0&&!E.current&&(D={x:window.scrollX,y:window.scrollY}),E.current=I>0;const me=I>0?Math.max(0,x.bottom-(S-q)):0;i.style.setProperty(_e,`${me}px`),Q(d,I>0)};let H=0;const k=()=>{cancelAnimationFrame(H),H=requestAnimationFrame(te)},X=()=>{const d=D;if(d==null||window.scrollX===d.x&&window.scrollY===d.y)return;window.scrollTo(d.x,d.y);const x=document.activeElement;x instanceof HTMLElement&&i.contains(x)&&Ke(x)&&Q(x,!1)},y=typeof ResizeObserver>"u"?null:new ResizeObserver(k),$=()=>{if(!y)return;y.disconnect();const d=new Set([i]);b&&d.add(b);for(const S of i.children)d.add(S);const x=document.activeElement;if(x instanceof HTMLElement&&i.contains(x))for(let S=x;S&&S!==i;S=S.parentElement)d.add(S);for(const S of d)y.observe(S)},G=typeof MutationObserver>"u"?null:new MutationObserver(d=>{d.every(x=>x.type==="attributes"&&x.target===i)||($(),k())}),U=()=>{$(),k()},Y=()=>{B.current=E.current,k()},_=d=>{d.target===b&&d.propertyName==="transform"&&k()},ne=window.visualViewport;return N&&document.addEventListener("blur",w,!0),i.addEventListener("focusin",U),i.addEventListener("focusout",Y),b?.addEventListener("transitionend",_),ne?.addEventListener("resize",k),ne?.addEventListener("scroll",k),window.addEventListener("scroll",X),window.addEventListener("resize",k),G?.observe(i,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),$(),k(),()=>{cancelAnimationFrame(H),N&&document.removeEventListener("blur",w,!0),i.removeEventListener("focusin",U),i.removeEventListener("focusout",Y),b?.removeEventListener("transitionend",_),ne?.removeEventListener("resize",k),ne?.removeEventListener("scroll",k),window.removeEventListener("scroll",X),window.removeEventListener("resize",k),y?.disconnect(),G?.disconnect(),i.style.removeProperty(_e),E.current=!1,B.current=!1}},[e,o,s,h,u,j])}const pt=.998,un=pt/(1-pt),fn=48,Qe=100,Fe=.4,yt=40;function Ze(e){return e.syntheticTouch===!0}const dn=.35,xn=4,et=8;function hn(){typeof navigator>"u"||typeof navigator.vibrate!="function"||Rt()||navigator.vibrate(8)}function mn(e,o){let s=o[0],c=Math.abs(e-s);for(const f of o){const u=Math.abs(e-f);u<c&&(c=u,s=f)}if(c>=yt)return e;const h=c/yt,p=1-h*h;return e+(s-e)*p}function tt(e,o,s){return Math.max(0,e-o-s)}function Tt(e){const o=Number.parseFloat(getComputedStyle(e).paddingBlockEnd);return Number.isFinite(o)?o:0}function bt(e){if(!e)return 0;const o=Tt(e);return Math.max(0,e.scrollHeight-e.clientHeight-o)-e.scrollTop}function gn(e){if(e.scrollHeight-e.clientHeight<=1)return!1;const{overflowY:o}=getComputedStyle(e);return o==="auto"||o==="scroll"}function kt(e,o){const s=[];for(let c=e instanceof Element?e:null;c!=null&&c!==o;c=c.parentElement)c instanceof HTMLElement&&gn(c)&&s.push(c);return s.push(o),s}function pn(e){return e.scrollTop<=0}function yn(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-1}function $e(e){return e.every(pn)}function nt(e){return e.every(yn)}function Le(e,o,s){return Math.max(0,e-s-o)}function Rt(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function bn({isOpen:e,canDismiss:o=!0,offscreenBlockEndInset:s=0,onDismiss:c,snapHeights:h,onSnap:p,onScrimOpacity:f}){const[u,j]=n.useState(0),[E,B]=n.useState(0),[A,M]=n.useState(!1),[i,b]=n.useState(!1),[P,D]=n.useState(0),[N,ee]=n.useState(0),[F,Q]=n.useState(0),R=n.useRef(0),w=n.useRef(0),[te,H]=n.useState(null),[k,X]=n.useState(!1),y=n.useRef(0),$=n.useRef(null),G=n.useRef(null),U=n.useRef(s);U.current=Math.max(0,s);const Y=n.useCallback(t=>{const r=Math.max(0,t);R.current=r,Q(r)},[]),_=n.useCallback(t=>{const r=Math.max(0,t);Math.abs(r-y.current)>.5&&(y.current=r,ee(r))},[]),ne=n.useCallback(()=>{X(!0),$.current=null,H(null);const t=G.current;G.current=null,t!=null&&_(t)},[_]),d=n.useCallback((t,r,m,T,g,L,a)=>{const v=tt(t,m,L);if(a&&Math.abs(T-r)>.5&&!Rt()){G.current=v,$.current=g,H(g);return}G.current=null,$.current=null,H(null),X(Math.abs(g-m)>.5),_(v)},[_]),x=n.useRef(0);A||(x.current=E);const S=n.useRef(e);S.current=e;const I=n.useRef(h);I.current=h;const q=n.useRef(c),me=n.useRef(o),se=n.useRef(p),re=n.useRef(f);n.useEffect(()=>{q.current=c,me.current=o,se.current=p,re.current=f});const C=n.useRef(null),ge=n.useRef(0),pe=n.useRef(null),ye=n.useRef(null),be=n.useRef(null);n.useLayoutEffect(()=>{if(!k)return;pe.current?.offsetHeight;const t=requestAnimationFrame(()=>{X(!1)});return()=>cancelAnimationFrame(t)},[k]);const le=n.useCallback(t=>{t<=0||!S.current||x.current>0||(ge.current=t,D(r=>r===t?r:t))},[]),Ge=n.useCallback(t=>{if(be.current?.disconnect(),be.current=null,pe.current=t,!t||typeof ResizeObserver>"u"){t&&le(t.getBoundingClientRect().height);return}le(t.getBoundingClientRect().height);const r=new ResizeObserver(m=>{const T=m[0];if(T){const g=T.borderBoxSize?.[0]?.blockSize;le(g??T.target.getBoundingClientRect().height)}});r.observe(t),be.current=r},[le]);n.useEffect(()=>()=>be.current?.disconnect(),[]),n.useEffect(()=>{e&&(j(0),B(0),M(!1),b(!1),X(!1),Y(0),w.current=0,y.current=0,$.current=null,G.current=null,ee(0),H(null))},[e,Y]);const ue=n.useCallback(()=>ge.current>0?ge.current:pe.current?.getBoundingClientRect().height??0,[]),oe=n.useCallback(t=>{const r=Le(t,0,U.current),m=en(r,I.current?.()??[]);return{offsets:m,peekOffset:rn(m,r)}},[]),Re=n.useCallback(()=>{const t=pe.current;if(!t)return ge.current;const r=t.style.height;if(r==="")return t.getBoundingClientRect().height;t.style.height="";const m=t.getBoundingClientRect().height;return t.style.height=r,m},[]),ce=n.useCallback(()=>{if(!S.current||C.current!=null||$.current!=null)return;const t=Re();if(t<=0)return;const{offsets:r,peekOffset:m}=oe(t),T=Math.min(w.current,r.length-1),g=r[T],L=g===m?0:g,a=R.current;if(t===ge.current&&Math.abs(g-x.current)<=.5&&Math.abs(L-a)<=.5)return;ge.current=t,D(t),w.current=T,d(a,g,L,g,a,bt(ye.current),!1),Y(L),B(g),se.current?.(Le(t,g,U.current));const v=r[r.length-1],l=Le(t,v,U.current);re.current?.(Ye(g,r,v+l*Fe,m))},[Re,d,Y,oe]);n.useEffect(()=>{if(!(!e||typeof window>"u"))return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),()=>{window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce)}},[e,ce]);const Be=n.useRef(!1);n.useLayoutEffect(()=>{if(!Be.current){Be.current=!0;return}ce()},[ce,h]);const qe=n.useCallback((t,r)=>{const m=pe.current;if(m==null)return;const T=t-r;m.style.transform=T!==0?`translateY(${T}px)`:""},[]),J=n.useCallback(t=>{const r=C.current;if(r==null)return;C.current=null,t?.hasPointerCapture?.(r.pointerId)&&t.releasePointerCapture(r.pointerId),j(r.baseOffset),M(!1),b(!1),d(r.baseLayoutOffset,r.baseOffset,r.baseLayoutOffset,r.renderedOffset,r.layoutOffset,r.naturalEndGap,!0);const{offsets:m,peekOffset:T}=oe(r.height),g=m[m.length-1],L=Le(r.height,g,U.current),a=g+L*Fe;re.current?.(Ye(r.baseOffset,m,a,T))},[d,oe]);n.useEffect(()=>{const t=()=>J(),r=()=>{document.visibilityState==="hidden"&&J()};return window.addEventListener("blur",t),document.addEventListener("visibilitychange",r),()=>{window.removeEventListener("blur",t),document.removeEventListener("visibilitychange",r)}},[J]);const He=n.useCallback((t,r,m,T,g,L,a,v,l,z)=>{const{offsets:W,peekOffset:xe}=oe(m),Se=W[W.length-1],ae=Le(m,Se,U.current),Oe=Se+ae*Fe,De=g>fn?t+r*un:t,xt=Te=>{const ht=Te===xe?0:Te;d(a,Te,ht,v,l,z,!0),Y(ht),w.current=Math.max(0,W.indexOf(Te)),B(Te),se.current?.(Le(m,Te,U.current)),re.current?.(Ye(Te,W,Oe,xe)),Te!==L&&hn()};if(T>0&&De>Oe){me.current?(d(a,L,a,a,a,z,!1),q.current()):xt(Se);return}const zt=on(Math.min(Math.max(De,0),Se),W,T,L);xt(zt)},[d,Y,oe]),O=n.useCallback((t,r,m)=>{const T=t.currentTarget,g=Ze(t);g||T.setPointerCapture?.(t.pointerId);const L=m??t.clientY,a=bt(ye.current),v=R.current;C.current={syntheticTouch:g,pointerId:t.pointerId,startCoord:L,lastCoord:t.clientY,lastTime:t.timeStamp,samples:[{t:t.timeStamp,y:t.clientY}],velocity:0,height:r,baseOffset:E,baseLayoutOffset:v,renderedOffset:E,layoutOffset:v,naturalEndGap:a,hasTraveled:!1},_(tt(v,v,a)),j(E),M(!0)},[E,_]),ke=n.useCallback(t=>{t.button!==0||!t.isPrimary||(t.preventDefault(),O(t,ue()))},[O,ue]),Z=n.useCallback(t=>{C.current!=null&&(t.preventDefault(),J(t.currentTarget))},[J]),fe=n.useCallback(t=>{C.current?.syntheticTouch||C.current?.pointerId===t.pointerId&&J()},[J]),ve=n.useCallback(t=>{const r=C.current;if(!r||r.pointerId!==t.pointerId||r.syntheticTouch&&!Ze(t))return;const m=t.clientY-r.startCoord;if(t.timeStamp-r.lastTime>0){for(r.lastCoord=t.clientY,r.lastTime=t.timeStamp,r.samples.push({t:t.timeStamp,y:t.clientY});r.samples.length>2&&t.timeStamp-r.samples[0].t>Qe;)r.samples.shift();const Oe=r.samples[0],De=Math.min(t.timeStamp-Oe.t,Qe);r.velocity=De>0?(t.clientY-Oe.y)/De:0}const{offsets:g,peekOffset:L}=oe(r.height),a=r.baseOffset+m,v=g[g.length-1];let l;a<0?l=Math.max(-48,a*dn):a>v?l=a:l=mn(a,g);const z=l<r.baseOffset?0:r.baseLayoutOffset,W=z!==r.layoutOffset;r.renderedOffset=l,r.layoutOffset=z,x.current=l,qe(l,z),W&&j(l),!r.hasTraveled&&l!==r.baseOffset&&(r.hasTraveled=!0,b(!0)),_(tt(r.baseLayoutOffset,z,r.naturalEndGap));const xe=g[g.length-1],Se=Le(r.height,xe,U.current),ae=xe+Se*Fe;re.current?.(Ye(l,g,ae,L))},[oe,_,qe]),Ee=n.useCallback(t=>{const r=C.current;if(!r||r.pointerId!==t.pointerId||r.syntheticTouch&&!Ze(t))return;const m=t.currentTarget,T=t.clientY-r.startCoord,g=Math.max(0,r.baseOffset+T),L=T===0?0:T>0?1:-1,a=t.timeStamp-r.lastTime<Qe?r.velocity:0;C.current=null,r.syntheticTouch||m.releasePointerCapture?.(t.pointerId),M(!1),b(!1),He(g,a,r.height||1,L,Math.abs(T),r.baseOffset,r.baseLayoutOffset,r.renderedOffset,r.layoutOffset,r.naturalEndGap)},[He]),de=n.useRef(null),Ce=n.useCallback(t=>{if(t.button!==0||!t.isPrimary)return;const r=kt(t.target,t.currentTarget);if(!$e(r)){de.current=null;return}de.current={pointerId:t.pointerId,startCoord:t.clientY,scrollers:r}},[]),ze=n.useCallback(t=>{if(C.current){ve(t);return}const r=de.current;if(!r||r.pointerId!==t.pointerId)return;const m=t.clientY-r.startCoord;m>et&&$e(r.scrollers)?(de.current=null,O(t,ue(),r.startCoord),ve(t)):m<0&&(de.current=null)},[O,ve,ue]),Ae=n.useCallback(t=>{de.current=null,!C.current?.syntheticTouch&&C.current&&Ee(t)},[Ee]),we=n.useRef(null),Me=n.useRef(null),ie=n.useCallback(t=>{we.current=null,de.current=null,J(t)},[J]),V=n.useRef(O),Ie=n.useRef(J),je=n.useRef(ie),Pe=n.useRef(ve),st=n.useRef(Ee),Ue=n.useRef(ue);n.useEffect(()=>{V.current=O,Ie.current=J,je.current=ie,Pe.current=ve,st.current=Ee,Ue.current=ue});const ct=n.useCallback(t=>{const r=(a,v)=>({syntheticTouch:!0,pointerId:a.identifier,clientY:a.clientY,timeStamp:Date.now(),currentTarget:v,setPointerCapture:()=>{},releasePointerCapture:()=>{}}),m=a=>{const v=a.currentTarget;if(a.touches.length>1){je.current(v);return}const l=a.changedTouches[0];if(!l){we.current=null;return}const z=kt(a.target,v),W=$e(z),xe=nt(z)&&x.current>0;we.current={id:l.identifier,startY:l.clientY,scrollers:z,top:W,bottom:xe,contentEndY:null,promotedAtContentEnd:!1}},T=a=>{const v=a.currentTarget;if(a.touches.length>1){je.current(v);return}const l=we.current;if(C.current){const ae=[...a.changedTouches].find(Oe=>Oe.identifier===C.current?.pointerId);if(!ae)return;if(l?.promotedAtContentEnd&&l.contentEndY!=null){if(ae.clientY>=l.contentEndY){l.contentEndY=null,l.promotedAtContentEnd=!1,Ie.current(v);return}Pe.current(r(ae,v));return}a.preventDefault(),Pe.current(r(ae,v));return}if(!l)return;const z=[...a.changedTouches].find(ae=>ae.identifier===l.id);if(!z)return;const W=z.clientY-l.startY,xe=l.top&&W>et&&$e(l.scrollers),Se=l.bottom&&W<-et&&nt(l.scrollers);if(xe||Se){a.preventDefault(),we.current=null,V.current(r(z,v),Ue.current(),l.startY),Pe.current(r(z,v));return}(l.top&&W<0||l.bottom&&W>0)&&(l.top=!1,l.bottom=!1),x.current>0&&nt(l.scrollers)?l.contentEndY==null?l.contentEndY=z.clientY:l.contentEndY-z.clientY>=xn&&(l.promotedAtContentEnd=!0,V.current(r(z,v),Ue.current(),l.contentEndY),Pe.current(r(z,v))):l.contentEndY=null},g=a=>{we.current=null;const v=C.current?.pointerId;if(v==null)return;const l=[...a.changedTouches].find(W=>W.identifier===v),z=a.currentTarget;l?st.current(r(l,z)):a.touches.length===0&&Ie.current(z)},L=ye.current;if(L&&Me.current){const a=Me.current;L.removeEventListener("touchstart",a.start),L.removeEventListener("touchmove",a.move),L.removeEventListener("touchend",a.end),L.removeEventListener("touchcancel",a.end)}ye.current=t,t?(t.addEventListener("touchstart",m,{passive:!0}),t.addEventListener("touchmove",T,{passive:!1}),t.addEventListener("touchend",g,{passive:!0}),t.addEventListener("touchcancel",g,{passive:!0}),Me.current={start:m,move:T,end:g}):Me.current=null},[]),it=Mt("(prefers-reduced-motion: reduce)"),at=n.useCallback(t=>{if(y.current<=0)return;const r=Tt(t),m=Math.max(0,t.scrollHeight-t.clientHeight-r),T=Math.max(0,t.scrollTop-m);T<y.current-.5&&_(T)},[_]),lt=n.useCallback(t=>{C.current!=null||$.current!=null||at(t.currentTarget)},[at]),ut=n.useCallback(t=>{if(!t.isPrimary){ie(t.currentTarget);return}ke(t)},[ke,ie]),ft=n.useCallback(t=>{if(!t.isPrimary){ie(t.currentTarget);return}Ce(t)},[Ce,ie]),We=n.useCallback(t=>{t.touches.length>1&&ie(t.currentTarget)},[ie]),dt=n.useCallback(t=>{const r=C.current;r?.pointerId!==t.pointerId||r.syntheticTouch||J(t.currentTarget)},[J]),Xe=A?u:E,Pt=n.useMemo(()=>({style:{transform:Xe!==0?`translateY(${Xe}px)`:void 0,transition:e&&(A||k||it)?"none":void 0,touchAction:"pinch-zoom",overscrollBehavior:"contain"}}),[Xe,A,e,k,it]),Ot=n.useMemo(()=>({style:{touchAction:"pinch-zoom",cursor:"grab"},onContextMenu:Z,onLostPointerCapture:fe,onPointerDown:ut,onPointerMove:ve,onPointerUp:Ee,onPointerCancel:dt,onTouchStart:We,onTouchMove:We}),[Ee,Z,dt,ut,We,fe,ve]),Lt=n.useMemo(()=>({ref:ct,onContextMenu:Z,onLostPointerCapture:fe,onPointerDown:ft,onPointerMove:ze,onPointerUp:Ae,onPointerCancel:Ae,onScroll:lt}),[ct,Ae,ft,ze,lt,Z,fe]);return{sheetRef:Ge,contentProps:Pt,handleProps:Ot,bodyProps:Lt,bodyElementRef:ye,dragOffset:u,settledOffset:E,isDragging:A,isTraveling:i,activeOffsetRef:x,sheetHeight:P,scrollPreservationInset:N,settlingLayoutOffset:te,settledLayoutOffset:F,completeScrollAreaSettle:ne}}const vt={hug:"92dvh",capped:"62dvh",tall:"92dvh"},kn=48,vn=48,En=50;function wn(){return typeof window>"u"?0:window.innerHeight}function Sn(e){let o="";for(const s of e??[])o+=`${typeof s}:${s}|`;return o}const he={sheet:{kfzvcC:"x67bb7w",kB7OPa:"x9f619",kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"x2lwn1j",kzqmXN:"xh8yej3",ks0D6T:"x11gisft",kWkggS:"x10xzikg",kEafiO:"x11xkdxz",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",k2ei4v:"xgbv0en",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",ke9TFa:"xw8tdv1",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",krdFHd:"x81l70g",kfmiAY:"x7hs6f1",kGVxlE:"x1kcpxr7",kI3sdo:"x1a2a7pz",kVQacm:"xb3r6kr",kGO01o:"x1wkw6tp",k1K539:"x1if0o47",k3aq6I:"xnn1q72 xhbqy3z",kSiTet:"x1hc1fzr",k1ekBW:"xwcsmn1",kIyJzY:"x80gvsz",kAMwcw:"xlr8y92",k6sLGO:"x1q1rmc8",k6CgDc:"xzg1mie",$$css:!0},sheetClosing:{k3aq6I:"x1weeur4",kAMwcw:"xv2sgk5",$$css:!0},sheetFading:{kSiTet:"xg01cxk",$$css:!0},sheetInactive:{kfzvcC:"x47corl",$$css:!0},body:{kzQI83:"x1iyjqo2",kAzted:"x2lwn1j",kB7OPa:"x9f619",kFalU9:"xge0x1e",kInvED:"x1wfwxd8 x1nw7mhf",kWkggS:"x10xzikg",kGO01o:"x18d9i69",$$css:!0},content:{k1xSpc:"xufnvkl",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kAzted:"x121v3j4",$$css:!0},tallKeyboardBody:{kFlMNQ:"xrw9175",k5JduY:"x1s928wv",kc3QkE:"xhkezso",k4zj60:"xu6fald",kloYau:"x2q1x1w",$$css:!0},budget:{kZKoxP:"x1tpcejd",$$css:!0},hugHeight:{kZKoxP:"xg7h5cd",kskxy:"x14bu9tk",$$css:!0}};function Tn(e){return e.kind==="open"?e.entering?"entering":null:e.kind==="retained"?e.motion==="covered"?null:e.motion:e.kind==="exiting"?"exiting":null}function Et(e,o,s){if(e==null)return s(),()=>{};let c=!1,h=null;const p=()=>{c||(c=!0,h!=null&&clearTimeout(h),e.removeEventListener("transitionend",f),e.removeEventListener("transitioncancel",f),s())},f=i=>{i.target===e&&i.propertyName===o&&p()};e.addEventListener("transitionend",f),e.addEventListener("transitioncancel",f);const u=getComputedStyle(e);if(e.style.transition.trim()==="none"||u.transition.trim()==="none")return p(),()=>{};const j=u.transitionProperty.split(",").map(i=>i.trim()),E=u.transitionDuration.split(",").map(wt),B=u.transitionDelay.split(",").map(wt);let A=!1;const M=j.reduce((i,b,P)=>{if(b!==o&&b!=="all")return i;const D=E[P%E.length],N=B[P%B.length];return D==null||N==null?(A=!0,i):Math.max(i,D+N)},0);return A?()=>{e.removeEventListener("transitionend",f),e.removeEventListener("transitioncancel",f)}:M<=0?(p(),()=>{}):(h=setTimeout(p,M+En),()=>{h!=null&&clearTimeout(h),e.removeEventListener("transitionend",f),e.removeEventListener("transitioncancel",f)})}function wt(e){const o=e.trim();if(!/^-?(?:\d+|\d*\.\d+)(?:ms|s)$/.test(o))return null;const s=Number.parseFloat(e);return o.endsWith("ms")?s:s*1e3}function rt({ref:e,state:o,height:s,label:c,children:h,padding:p,snapPoints:f,className:u,style:j,tabIndex:E,xstyle:B,isSwipeDismissAllowed:A=!0,isPageScrollLocked:M=!1,onDismiss:i,onScrimOpacity:b,onElementChange:P,onMotionStart:D,onMotionComplete:N,...ee}){const F=n.useRef(null),Q=n.useRef(o),R=n.useRef(!1),w=n.useRef(D),te=n.useRef(N),H=n.useRef(null),k=n.useRef(null),X=o.kind==="open"&&o.entering,y=Q.current,$=y.kind==="open"&&y.entering;X&&!$?R.current=y.kind==="retained":X||(R.current=!1),n.useLayoutEffect(()=>{Q.current=o,w.current=D,te.current=N},[N,D,o]);const G=o.kind==="open",U=o.kind!=="hidden",Y=o.kind==="retained",_=Y||o.kind==="exiting",ne=o.kind==="exiting",d=Y&&o.motion==="fading",x=Y?o.alignmentOffset:0,S=Sn(f),I=n.useRef(f);I.current=f;const{snapHeights:q,ignoredSnapPointsMessage:me}=n.useMemo(()=>{if(S==="")return{snapHeights:void 0,ignoredSnapPointsMessage:""};const V=(I.current??[]).filter(Ie=>!Qt(Ie));return{snapHeights:()=>Zt(I.current??[],wn()),ignoredSnapPointsMessage:V.length===0?"":`snapPoints ignored ${JSON.stringify(V)}. A snap point is a viewport fraction above 0 and up to 1 (0.5 is half the screen), a px length ('320px'), or a percentage ('50%').`}},[S]);Ne("BottomSheet",me,me!=="");const{contentProps:se,handleProps:re,bodyProps:C,bodyElementRef:ge,sheetRef:pe,dragOffset:ye,settledOffset:be,isDragging:le,isTraveling:Ge,sheetHeight:ue,scrollPreservationInset:oe,settlingLayoutOffset:Re,settledLayoutOffset:ce,completeScrollAreaSettle:Be}=bn({isOpen:G,canDismiss:A,offscreenBlockEndInset:kn,onDismiss:i,snapHeights:q,onScrimOpacity:b}),{getViewportProps:qe,getContentProps:J}=It({axis:"both",keyboardAccess:{owner:"contentOrViewport",label:c},overscroll:"contain",stickyContainment:"always"}),He=n.useCallback(V=>{pe(V),F.current=V,P?.(V)},[P,pe]);ln({bodyRef:ge,bottomClearance:vn,isEnabled:s==="tall",isFullyExpanded:be===0,isPageScrollLocked:M,isSheetTraveling:Ge,isOpen:G,isPresented:U,sheetRef:F}),n.useImperativeHandle(e,()=>F.current,[]);const O=Tn(o);n.useLayoutEffect(()=>{if(O!=null){if(H.current=null,k.current=null,O==="entering"&&R.current){k.current=O;return}return Et(F.current,O==="fading"?"opacity":"transform",()=>{H.current===O?te.current?.(O):k.current=O})}},[O]),n.useLayoutEffect(()=>{if(Re!=null)return Et(F.current,"transform",Be)},[Be,Re]),n.useEffect(()=>{if(O!=null)return w.current?.(O),H.current=O,k.current===O&&(k.current=null,te.current?.(O)),()=>{H.current===O&&(H.current=null),k.current===O&&(k.current=null)}},[O]);const ke=p==null,Z=p??4,fe=Vt[Z],Ee=typeof s=="string"&&s in vt?vt[s]:typeof s=="number"?`${s}px`:s,de=ue>0;let Ce=se.style.transform,ze;if(de){const V=le?ye<be?0:ce:Re??ce,je=(le?ye:be)-V,Pe=le||Re!=null;ze=V>0||Pe?`${Math.max(0,ue-Math.max(0,V))}px`:void 0,Ce=je!==0?`translateY(${je}px)`:void 0}const Ae=x>0?[Ce,`translateY(${x}px)`].filter(Boolean).join(" "):Ce,we=G?Ce:Y?Ae:void 0,Me=j?.transform;n.useLayoutEffect(()=>{if(le||Me!=null)return;const V=F.current;V!=null&&(V.style.transform=we??"")});const ie={transition:se.style.transition,touchAction:se.style.touchAction,overscrollBehavior:se.style.overscrollBehavior,height:ze};return K.jsxs("div",{...ee,ref:He,tabIndex:E??-1,...mt($t("bottom-sheet"),Je(Ft.reset,_t.reset,he.sheet,Yt.reset,s==="hug"?he.hugHeight:he.budget,ne&&he.sheetClosing,d&&he.sheetFading,_&&he.sheetInactive,B),u,{"--_sheet-budget":Ee,...G?ie:Y||ne?{height:ze}:{},...j}),children:[K.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1vjfegm x78zum5 x6s0dn4 xl56j7k xvpftlf xafqdz2 x1j4r261 x1jm3nie x16khyan",...re,"aria-hidden":"true",children:K.jsx("div",{className:"x1m747yf x11c6zpc xjspbzw x1m4xfpy"})}),K.jsx("div",{...qe({...C,...mt(Je(Ht.focusVisible,he.body,s==="tall"&&he.tallKeyboardBody),oe>0?{style:{paddingBlockEnd:`${oe}px`}}:{})}),children:K.jsx("div",{...J(Je(he.content,...Bt(ke?{useThemeDefault:"bottom-sheet"}:{paddingInnerX:fe,paddingInnerY:fe,paddingOuterX:fe,paddingOuterY:fe}),!ke&&Z!==4&&At[Z],!ke&&Z!==4&&Dt[Z],!ke&&Z!==4&&Nt[Z],!ke&&Z!==4&&qt[Z])),children:K.jsx(jt,{children:h})})})]})}rt.displayName="BottomSheetPanel";function Rn(){return K.jsx("div",{className:"xixxii4 x17y0mx6 x1ey2m1c x1kpxq89 x10xzikg xhtitgo x47corl x1cb67k9 xt2iwb0","data-sheet-edge-tint":"","aria-hidden":"true"})}const ot=n.createContext(null);ot.displayName="BottomSheetSwitcherContext";function Cn(e,o){switch(e){case"active":return{kind:"open",entering:!1};case"entering":return{kind:"open",entering:!0};case"covered":case"aligning":case"fading":return{kind:"retained",motion:e,alignmentOffset:o};case"exiting":return{kind:"exiting"};case"hidden":return{kind:"hidden"}}}function Ct(e,o){const s=document.activeElement;if(s!=null&&e?.contains(s))return;const c=e?.querySelector("[data-autofocus]");c!=null?c.focus({preventScroll:!0}):o&&e?.focus({preventScroll:!0})}function Pn({ref:e,isOpen:o,onOpenChange:s,label:c,children:h,height:p="capped",snapPoints:f,hasScrim:u=!0,finalFocusRef:j,purpose:E="info",xstyle:B,...A}){const M=n.useRef(null),i=n.useRef(null),b=n.useRef(null),[P,D]=n.useState(o),N=o||P,ee=o?{kind:"open",entering:!1}:P?{kind:"exiting"}:{kind:"hidden"},F=n.useCallback(()=>{o&&E!=="required"&&s(!1)},[o,s,E]),Q=n.useCallback(()=>{E==="info"&&s(!1)},[s,E]),R=n.useCallback(y=>{i.current=y},[]),w=n.useCallback(y=>{M.current?.style.setProperty("--_sheet-scrim-opacity",String(y))},[]);n.useEffect(()=>{const y=M.current;if(y==null||!o)return;D(!0),y.style.setProperty("--_sheet-scrim-opacity","1"),y.open||(u?(b.current=document.activeElement,y.showModal()):y.show(),Ct(i.current,u))},[u,o]),n.useEffect(()=>{!o&&P&&u&&w(0)},[w,u,o,P]);const te=n.useCallback(y=>{if(y!=="exiting"||o)return;const $=M.current;$?.open&&$.close(),D(!1),(j?.current??b.current)?.focus(),b.current=null},[j,o]);Kt(N&&u),Ne("BottomSheet","requires a non-empty `label` for an accessible name; the open sheet has no built-in heading to derive one from.",o&&!c);const{shouldDismissOnCloseRequest:H}=Gt({isActive:N,escapeBehavior:o&&E!=="required"?"close":"block",onDismiss:F,getContainer:()=>M.current,isPresent:()=>M.current?.open??!1}),k=n.useCallback(y=>{y.preventDefault(),H()&&F()},[F,H]),X=n.useCallback(y=>{u&&y.target===y.currentTarget&&Q()},[Q,u]);return K.jsxs("dialog",{...{0:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz"},8:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq"},4:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w"},12:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w"},2:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz x1cz9k3x"},10:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq x1cz9k3x"},6:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x"},14:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x"},1:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz x47corl xfo81ep xh8yej3 x5yr21d"},9:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq x47corl xfo81ep xh8yej3 x5yr21d"},5:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w x47corl xfo81ep xh8yej3 x5yr21d"},13:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w x47corl xfo81ep xh8yej3 x5yr21d"},3:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"},11:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"},7:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"},15:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"}}[!!N<<3|!!u<<2|!!(u&&!o&&P)<<1|!u<<0],ref:M,"aria-label":c,"aria-hidden":!o&&P?"true":void 0,"aria-modal":u&&o?"true":void 0,role:E==="required"?"alertdialog":void 0,inert:!o&&P?!0:void 0,onCancel:k,onClick:X,children:[K.jsx("div",{className:"x10l6tqk x17y0mx6 x1ey2m1c x78zum5 xl56j7k x47corl",children:K.jsx(rt,{...A,ref:e,state:ee,height:p,label:c,snapPoints:f,isSwipeDismissAllowed:E==="info",isPageScrollLocked:N&&u,xstyle:B,onDismiss:Q,onScrimOpacity:w,onElementChange:R,onMotionComplete:te,children:K.jsx(Ut,{children:h})})}),K.jsx(Rn,{})]})}function On({switcher:e,ref:o,sheetId:s,label:c,children:h,height:p="capped",snapPoints:f,purpose:u="info",xstyle:j,...E}){const{activeSheet:B,hasScrim:A,onActiveSheetChange:M,getSheetPhase:i,getSheetAlignmentOffset:b,registerSheetElement:P,registerSheetLabel:D,registerSheetPurpose:N,onSheetEnterStart:ee,onSheetTransitionComplete:F,onSheetScrimOpacityChange:Q}=e,R=typeof s=="string"&&s.length>0,w=R?i(s):"hidden",te=R?b(s):0,H=Cn(w,te),k=w==="active"||w==="entering",X=w==="covered"||w==="aligning"||w==="fading"||w==="exiting",y=w!=="hidden",$=w==="active"||w==="entering",G=n.useRef(null),U=n.useRef(w),Y=U.current,_=n.useRef(!1);n.useLayoutEffect(()=>{U.current=w},[w]);const ne=n.useCallback(()=>{u==="info"&&R&&B===s&&M(null)},[B,R,M,u,s]),d=n.useCallback(q=>{G.current=q,R&&P(s,q)},[R,P,s]),x=n.useCallback(q=>{q==="entering"&&R&&ee(s)},[R,ee,s]),S=n.useCallback(q=>{R&&F({sheetId:s,phase:q})},[R,F,s]),I=n.useCallback(q=>{R&&Q(s,q)},[R,Q,s]);return n.useLayoutEffect(()=>{if(R)return D(s,c),()=>D(s,null)},[R,c,D,s]),n.useLayoutEffect(()=>{if(R)return N(s,u),()=>N(s,null)},[R,u,N,s]),n.useEffect(()=>{if(k){const q=Y==="active"||Y==="entering";(!_.current||!q)&&Ct(G.current,A),_.current=!0}else w==="hidden"&&(_.current=!1)},[A,k,w,Y]),Ne("BottomSheet","requires a non-empty `label` for an accessible name; the open sheet has no built-in heading to derive one from.",k&&!c),K.jsx("div",{...{0:{className:"x10l6tqk x17y0mx6 x1ey2m1c x78zum5 xl56j7k x47corl"},2:{className:"x10l6tqk x17y0mx6 x1ey2m1c xl56j7k x47corl x1s85apg"},1:{className:"x10l6tqk x17y0mx6 x1ey2m1c x78zum5 xl56j7k x47corl x1vjfegm"},3:{className:"x10l6tqk x17y0mx6 x1ey2m1c xl56j7k x47corl x1s85apg x1vjfegm"}}[!y<<1|!!$<<0],hidden:!y,"aria-hidden":X?"true":void 0,inert:X?!0:void 0,children:K.jsx(rt,{...E,ref:o,state:H,height:p,label:c,snapPoints:f,isSwipeDismissAllowed:u==="info",isPageScrollLocked:A,xstyle:j,onDismiss:ne,onScrimOpacity:I,onElementChange:d,onMotionStart:x,onMotionComplete:S,children:K.jsx(ot,{value:null,children:h})})})}function Ln(e){const o=n.use(ot),s=e.sheetId,c=typeof s=="string"&&s.length>0;return Ne("BottomSheet","requires a non-empty `sheetId` when nested in BottomSheetSwitcher; standalone `isOpen` / `onOpenChange` props are ignored there.",o!=null&&!c),Ne("BottomSheet","`sheetId` only works inside BottomSheetSwitcher. Use `isOpen` and `onOpenChange` for a standalone sheet.",o==null&&s!=null),o!=null?K.jsx(On,{...e,switcher:o}):K.jsx(Pn,{...e})}Ln.displayName="BottomSheet";export{Ln as BottomSheet};
|
|
1
|
+
import{r as n,u as Mt,a as Ne,b as It,j as K,L as jt,p as Je,c as Bt,d as At,e as Dt,g as Nt,h as qt,m as mt,k as Ht,o as Yt,l as _t,n as Ft,t as $t,s as Vt,q as Kt,v as Gt,w as Ut}from"./index-D5wx14Yb.js";const Wt=48,Xt=.25,Jt=/^(\d+(?:\.\d+)?|\.\d+)(px|%)$/i;function St(e,o){if(typeof e=="number")return Number.isFinite(e)&&e>0&&e<=1?e*o:null;const s=Jt.exec(e.trim());if(s===null)return null;const c=Number.parseFloat(s[1]);return c>0?s[2].toLowerCase()==="%"?c/100*o:c:null}function Qt(e){return St(e,1)!==null}function Zt(e,o){const s=[];for(const c of e){const h=St(c,o);h!==null&&s.push(h)}return s}function en(e,o,s=Wt){const h=[0,...o.filter(f=>f>0&&f<e).map(f=>e-f)].sort((f,u)=>f-u),p=[];for(const f of h){const u=p[p.length-1];(u===void 0||f-u>=s)&&p.push(f)}return p}function tn(e,o){return o.reduce((s,c)=>Math.abs(c-e)<Math.abs(s-e)?c:s,o[0])}const nn=.3;function rn(e,o){if(e.length<2||o<=0)return null;const s=e[e.length-1];return o-s<=Xt*o?s:null}function Ye(e,o,s,c){const h=c!==null,p=h?o[o.length-2]:o[o.length-1],f=h?c:s,u=h?nn:0;return e<=p?1:e>=f?u:1-(1-u)*((e-p)/(f-p))}function on(e,o,s,c){let h=o;if(s>0){const p=o.filter(f=>f>=c);p.length>0&&(h=p)}else if(s<0){const p=o.filter(f=>f<=c);p.length>0&&(h=p)}return tn(e,h)}const _e="--_sheet-keyboard-inset",sn=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);function Ve(){return window.visualViewport?.height??window.innerHeight}function cn(){return Ve()>=window.innerHeight-.5}function an(){const e=window.navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||e.includes("Macintosh")&&window.navigator.maxTouchPoints>1}function Ke(e){return e instanceof HTMLTextAreaElement?!e.disabled&&!e.readOnly:e instanceof HTMLInputElement?!e.disabled&&!e.readOnly&&!sn.has((e.getAttribute("type")??"text").toLowerCase()):e instanceof HTMLElement&&e.matches('[contenteditable]:not([contenteditable="false"])')}function gt(e,o){if(!(e instanceof Element))return null;const s=e.closest('input, textarea, [contenteditable]:not([contenteditable="false"])');if(o.contains(s)&&Ke(s))return s;const c=e.closest("label"),h=c instanceof HTMLLabelElement?c.control:null;return o.contains(h)&&Ke(h)?h:null}function ln({bodyRef:e,bottomClearance:o,isEnabled:s,isFullyExpanded:c,isPageScrollLocked:h,isSheetTraveling:p,isOpen:f,isPresented:u,sheetRef:j}){const E=n.useRef(!1),B=n.useRef(!1),A=n.useRef(c),M=n.useRef(f);A.current=c,M.current=f,n.useEffect(()=>{if(!s||!p)return;const i=j.current,b=document.activeElement;i&&b instanceof HTMLElement&&b!==i&&i.contains(b)&&(B.current=E.current,i.focus({preventScroll:!0}))},[s,p,j]),n.useEffect(()=>{if(!s||!u||f)return;const i=j.current,b=document.activeElement;i&&b instanceof HTMLElement&&b!==i&&i.contains(b)&&(B.current=E.current,b.blur())},[s,f,u,j]),n.useEffect(()=>{const i=e.current,b=j.current;if(!s||!u||!i)return;let P=null,D=null;const N=an(),ee=()=>{i.style.setProperty(_e,"0px"),P=null,D=null,E.current=!1,B.current=!1},F=(d,x)=>{if(typeof i.scrollBy!="function"){i.scrollTop+=d;return}const S=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;i.scrollBy({top:d,behavior:x&&!S?"smooth":"instant"})},Q=(d,x)=>{const S=i.getBoundingClientRect(),I=d.getBoundingClientRect(),q=Ve(),se=Math.max(0,S.bottom-q)>0?o:0,re=S.top,C=Math.min(S.bottom,q-se);C<=re||(I.bottom>C?F(I.bottom-C,x):I.top<re&&F(I.top-re,x))},R=d=>{const x=Ve();if(cn()){ee();return}if(Math.max(0,d.bodyBottom-x)===0){ee();return}const I=Math.max(0,d.bodyBottom-(x-o));i.style.setProperty(_e,`${I}px`)},w=d=>{if(!A.current)return;const x=gt(d.relatedTarget,i);if(x){x!==document.activeElement&&x.focus({preventScroll:!0});return}const S=gt(d.target,i);M.current&&S&&!d.relatedTarget&&b?.focus({preventScroll:!0})},te=()=>{const d=document.activeElement;if(!A.current||!(d instanceof HTMLElement)||!i.contains(d)||!Ke(d)){if(B.current&&P){R(P);return}ee();return}B.current=!1;const x=i.getBoundingClientRect(),S=Ve(),I=Math.max(0,x.bottom-S),q=I>0?o:0;P=I>0?{bodyBottom:x.bottom}:null,h&&I>0&&!E.current&&(D={x:window.scrollX,y:window.scrollY}),E.current=I>0;const me=I>0?Math.max(0,x.bottom-(S-q)):0;i.style.setProperty(_e,`${me}px`),Q(d,I>0)};let H=0;const k=()=>{cancelAnimationFrame(H),H=requestAnimationFrame(te)},X=()=>{const d=D;if(d==null||window.scrollX===d.x&&window.scrollY===d.y)return;window.scrollTo(d.x,d.y);const x=document.activeElement;x instanceof HTMLElement&&i.contains(x)&&Ke(x)&&Q(x,!1)},y=typeof ResizeObserver>"u"?null:new ResizeObserver(k),$=()=>{if(!y)return;y.disconnect();const d=new Set([i]);b&&d.add(b);for(const S of i.children)d.add(S);const x=document.activeElement;if(x instanceof HTMLElement&&i.contains(x))for(let S=x;S&&S!==i;S=S.parentElement)d.add(S);for(const S of d)y.observe(S)},G=typeof MutationObserver>"u"?null:new MutationObserver(d=>{d.every(x=>x.type==="attributes"&&x.target===i)||($(),k())}),U=()=>{$(),k()},Y=()=>{B.current=E.current,k()},_=d=>{d.target===b&&d.propertyName==="transform"&&k()},ne=window.visualViewport;return N&&document.addEventListener("blur",w,!0),i.addEventListener("focusin",U),i.addEventListener("focusout",Y),b?.addEventListener("transitionend",_),ne?.addEventListener("resize",k),ne?.addEventListener("scroll",k),window.addEventListener("scroll",X),window.addEventListener("resize",k),G?.observe(i,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),$(),k(),()=>{cancelAnimationFrame(H),N&&document.removeEventListener("blur",w,!0),i.removeEventListener("focusin",U),i.removeEventListener("focusout",Y),b?.removeEventListener("transitionend",_),ne?.removeEventListener("resize",k),ne?.removeEventListener("scroll",k),window.removeEventListener("scroll",X),window.removeEventListener("resize",k),y?.disconnect(),G?.disconnect(),i.style.removeProperty(_e),E.current=!1,B.current=!1}},[e,o,s,h,u,j])}const pt=.998,un=pt/(1-pt),fn=48,Qe=100,Fe=.4,yt=40;function Ze(e){return e.syntheticTouch===!0}const dn=.35,xn=4,et=8;function hn(){typeof navigator>"u"||typeof navigator.vibrate!="function"||Rt()||navigator.vibrate(8)}function mn(e,o){let s=o[0],c=Math.abs(e-s);for(const f of o){const u=Math.abs(e-f);u<c&&(c=u,s=f)}if(c>=yt)return e;const h=c/yt,p=1-h*h;return e+(s-e)*p}function tt(e,o,s){return Math.max(0,e-o-s)}function Tt(e){const o=Number.parseFloat(getComputedStyle(e).paddingBlockEnd);return Number.isFinite(o)?o:0}function bt(e){if(!e)return 0;const o=Tt(e);return Math.max(0,e.scrollHeight-e.clientHeight-o)-e.scrollTop}function gn(e){if(e.scrollHeight-e.clientHeight<=1)return!1;const{overflowY:o}=getComputedStyle(e);return o==="auto"||o==="scroll"}function kt(e,o){const s=[];for(let c=e instanceof Element?e:null;c!=null&&c!==o;c=c.parentElement)c instanceof HTMLElement&&gn(c)&&s.push(c);return s.push(o),s}function pn(e){return e.scrollTop<=0}function yn(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-1}function $e(e){return e.every(pn)}function nt(e){return e.every(yn)}function Le(e,o,s){return Math.max(0,e-s-o)}function Rt(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function bn({isOpen:e,canDismiss:o=!0,offscreenBlockEndInset:s=0,onDismiss:c,snapHeights:h,onSnap:p,onScrimOpacity:f}){const[u,j]=n.useState(0),[E,B]=n.useState(0),[A,M]=n.useState(!1),[i,b]=n.useState(!1),[P,D]=n.useState(0),[N,ee]=n.useState(0),[F,Q]=n.useState(0),R=n.useRef(0),w=n.useRef(0),[te,H]=n.useState(null),[k,X]=n.useState(!1),y=n.useRef(0),$=n.useRef(null),G=n.useRef(null),U=n.useRef(s);U.current=Math.max(0,s);const Y=n.useCallback(t=>{const r=Math.max(0,t);R.current=r,Q(r)},[]),_=n.useCallback(t=>{const r=Math.max(0,t);Math.abs(r-y.current)>.5&&(y.current=r,ee(r))},[]),ne=n.useCallback(()=>{X(!0),$.current=null,H(null);const t=G.current;G.current=null,t!=null&&_(t)},[_]),d=n.useCallback((t,r,m,T,g,L,a)=>{const v=tt(t,m,L);if(a&&Math.abs(T-r)>.5&&!Rt()){G.current=v,$.current=g,H(g);return}G.current=null,$.current=null,H(null),X(Math.abs(g-m)>.5),_(v)},[_]),x=n.useRef(0);A||(x.current=E);const S=n.useRef(e);S.current=e;const I=n.useRef(h);I.current=h;const q=n.useRef(c),me=n.useRef(o),se=n.useRef(p),re=n.useRef(f);n.useEffect(()=>{q.current=c,me.current=o,se.current=p,re.current=f});const C=n.useRef(null),ge=n.useRef(0),pe=n.useRef(null),ye=n.useRef(null),be=n.useRef(null);n.useLayoutEffect(()=>{if(!k)return;pe.current?.offsetHeight;const t=requestAnimationFrame(()=>{X(!1)});return()=>cancelAnimationFrame(t)},[k]);const le=n.useCallback(t=>{t<=0||!S.current||x.current>0||(ge.current=t,D(r=>r===t?r:t))},[]),Ge=n.useCallback(t=>{if(be.current?.disconnect(),be.current=null,pe.current=t,!t||typeof ResizeObserver>"u"){t&&le(t.getBoundingClientRect().height);return}le(t.getBoundingClientRect().height);const r=new ResizeObserver(m=>{const T=m[0];if(T){const g=T.borderBoxSize?.[0]?.blockSize;le(g??T.target.getBoundingClientRect().height)}});r.observe(t),be.current=r},[le]);n.useEffect(()=>()=>be.current?.disconnect(),[]),n.useEffect(()=>{e&&(j(0),B(0),M(!1),b(!1),X(!1),Y(0),w.current=0,y.current=0,$.current=null,G.current=null,ee(0),H(null))},[e,Y]);const ue=n.useCallback(()=>ge.current>0?ge.current:pe.current?.getBoundingClientRect().height??0,[]),oe=n.useCallback(t=>{const r=Le(t,0,U.current),m=en(r,I.current?.()??[]);return{offsets:m,peekOffset:rn(m,r)}},[]),Re=n.useCallback(()=>{const t=pe.current;if(!t)return ge.current;const r=t.style.height;if(r==="")return t.getBoundingClientRect().height;t.style.height="";const m=t.getBoundingClientRect().height;return t.style.height=r,m},[]),ce=n.useCallback(()=>{if(!S.current||C.current!=null||$.current!=null)return;const t=Re();if(t<=0)return;const{offsets:r,peekOffset:m}=oe(t),T=Math.min(w.current,r.length-1),g=r[T],L=g===m?0:g,a=R.current;if(t===ge.current&&Math.abs(g-x.current)<=.5&&Math.abs(L-a)<=.5)return;ge.current=t,D(t),w.current=T,d(a,g,L,g,a,bt(ye.current),!1),Y(L),B(g),se.current?.(Le(t,g,U.current));const v=r[r.length-1],l=Le(t,v,U.current);re.current?.(Ye(g,r,v+l*Fe,m))},[Re,d,Y,oe]);n.useEffect(()=>{if(!(!e||typeof window>"u"))return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),()=>{window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce)}},[e,ce]);const Be=n.useRef(!1);n.useLayoutEffect(()=>{if(!Be.current){Be.current=!0;return}ce()},[ce,h]);const qe=n.useCallback((t,r)=>{const m=pe.current;if(m==null)return;const T=t-r;m.style.transform=T!==0?`translateY(${T}px)`:""},[]),J=n.useCallback(t=>{const r=C.current;if(r==null)return;C.current=null,t?.hasPointerCapture?.(r.pointerId)&&t.releasePointerCapture(r.pointerId),j(r.baseOffset),M(!1),b(!1),d(r.baseLayoutOffset,r.baseOffset,r.baseLayoutOffset,r.renderedOffset,r.layoutOffset,r.naturalEndGap,!0);const{offsets:m,peekOffset:T}=oe(r.height),g=m[m.length-1],L=Le(r.height,g,U.current),a=g+L*Fe;re.current?.(Ye(r.baseOffset,m,a,T))},[d,oe]);n.useEffect(()=>{const t=()=>J(),r=()=>{document.visibilityState==="hidden"&&J()};return window.addEventListener("blur",t),document.addEventListener("visibilitychange",r),()=>{window.removeEventListener("blur",t),document.removeEventListener("visibilitychange",r)}},[J]);const He=n.useCallback((t,r,m,T,g,L,a,v,l,z)=>{const{offsets:W,peekOffset:xe}=oe(m),Se=W[W.length-1],ae=Le(m,Se,U.current),Oe=Se+ae*Fe,De=g>fn?t+r*un:t,xt=Te=>{const ht=Te===xe?0:Te;d(a,Te,ht,v,l,z,!0),Y(ht),w.current=Math.max(0,W.indexOf(Te)),B(Te),se.current?.(Le(m,Te,U.current)),re.current?.(Ye(Te,W,Oe,xe)),Te!==L&&hn()};if(T>0&&De>Oe){me.current?(d(a,L,a,a,a,z,!1),q.current()):xt(Se);return}const zt=on(Math.min(Math.max(De,0),Se),W,T,L);xt(zt)},[d,Y,oe]),O=n.useCallback((t,r,m)=>{const T=t.currentTarget,g=Ze(t);g||T.setPointerCapture?.(t.pointerId);const L=m??t.clientY,a=bt(ye.current),v=R.current;C.current={syntheticTouch:g,pointerId:t.pointerId,startCoord:L,lastCoord:t.clientY,lastTime:t.timeStamp,samples:[{t:t.timeStamp,y:t.clientY}],velocity:0,height:r,baseOffset:E,baseLayoutOffset:v,renderedOffset:E,layoutOffset:v,naturalEndGap:a,hasTraveled:!1},_(tt(v,v,a)),j(E),M(!0)},[E,_]),ke=n.useCallback(t=>{t.button!==0||!t.isPrimary||(t.preventDefault(),O(t,ue()))},[O,ue]),Z=n.useCallback(t=>{C.current!=null&&(t.preventDefault(),J(t.currentTarget))},[J]),fe=n.useCallback(t=>{C.current?.syntheticTouch||C.current?.pointerId===t.pointerId&&J()},[J]),ve=n.useCallback(t=>{const r=C.current;if(!r||r.pointerId!==t.pointerId||r.syntheticTouch&&!Ze(t))return;const m=t.clientY-r.startCoord;if(t.timeStamp-r.lastTime>0){for(r.lastCoord=t.clientY,r.lastTime=t.timeStamp,r.samples.push({t:t.timeStamp,y:t.clientY});r.samples.length>2&&t.timeStamp-r.samples[0].t>Qe;)r.samples.shift();const Oe=r.samples[0],De=Math.min(t.timeStamp-Oe.t,Qe);r.velocity=De>0?(t.clientY-Oe.y)/De:0}const{offsets:g,peekOffset:L}=oe(r.height),a=r.baseOffset+m,v=g[g.length-1];let l;a<0?l=Math.max(-48,a*dn):a>v?l=a:l=mn(a,g);const z=l<r.baseOffset?0:r.baseLayoutOffset,W=z!==r.layoutOffset;r.renderedOffset=l,r.layoutOffset=z,x.current=l,qe(l,z),W&&j(l),!r.hasTraveled&&l!==r.baseOffset&&(r.hasTraveled=!0,b(!0)),_(tt(r.baseLayoutOffset,z,r.naturalEndGap));const xe=g[g.length-1],Se=Le(r.height,xe,U.current),ae=xe+Se*Fe;re.current?.(Ye(l,g,ae,L))},[oe,_,qe]),Ee=n.useCallback(t=>{const r=C.current;if(!r||r.pointerId!==t.pointerId||r.syntheticTouch&&!Ze(t))return;const m=t.currentTarget,T=t.clientY-r.startCoord,g=Math.max(0,r.baseOffset+T),L=T===0?0:T>0?1:-1,a=t.timeStamp-r.lastTime<Qe?r.velocity:0;C.current=null,r.syntheticTouch||m.releasePointerCapture?.(t.pointerId),M(!1),b(!1),He(g,a,r.height||1,L,Math.abs(T),r.baseOffset,r.baseLayoutOffset,r.renderedOffset,r.layoutOffset,r.naturalEndGap)},[He]),de=n.useRef(null),Ce=n.useCallback(t=>{if(t.button!==0||!t.isPrimary)return;const r=kt(t.target,t.currentTarget);if(!$e(r)){de.current=null;return}de.current={pointerId:t.pointerId,startCoord:t.clientY,scrollers:r}},[]),ze=n.useCallback(t=>{if(C.current){ve(t);return}const r=de.current;if(!r||r.pointerId!==t.pointerId)return;const m=t.clientY-r.startCoord;m>et&&$e(r.scrollers)?(de.current=null,O(t,ue(),r.startCoord),ve(t)):m<0&&(de.current=null)},[O,ve,ue]),Ae=n.useCallback(t=>{de.current=null,!C.current?.syntheticTouch&&C.current&&Ee(t)},[Ee]),we=n.useRef(null),Me=n.useRef(null),ie=n.useCallback(t=>{we.current=null,de.current=null,J(t)},[J]),V=n.useRef(O),Ie=n.useRef(J),je=n.useRef(ie),Pe=n.useRef(ve),st=n.useRef(Ee),Ue=n.useRef(ue);n.useEffect(()=>{V.current=O,Ie.current=J,je.current=ie,Pe.current=ve,st.current=Ee,Ue.current=ue});const ct=n.useCallback(t=>{const r=(a,v)=>({syntheticTouch:!0,pointerId:a.identifier,clientY:a.clientY,timeStamp:Date.now(),currentTarget:v,setPointerCapture:()=>{},releasePointerCapture:()=>{}}),m=a=>{const v=a.currentTarget;if(a.touches.length>1){je.current(v);return}const l=a.changedTouches[0];if(!l){we.current=null;return}const z=kt(a.target,v),W=$e(z),xe=nt(z)&&x.current>0;we.current={id:l.identifier,startY:l.clientY,scrollers:z,top:W,bottom:xe,contentEndY:null,promotedAtContentEnd:!1}},T=a=>{const v=a.currentTarget;if(a.touches.length>1){je.current(v);return}const l=we.current;if(C.current){const ae=[...a.changedTouches].find(Oe=>Oe.identifier===C.current?.pointerId);if(!ae)return;if(l?.promotedAtContentEnd&&l.contentEndY!=null){if(ae.clientY>=l.contentEndY){l.contentEndY=null,l.promotedAtContentEnd=!1,Ie.current(v);return}Pe.current(r(ae,v));return}a.preventDefault(),Pe.current(r(ae,v));return}if(!l)return;const z=[...a.changedTouches].find(ae=>ae.identifier===l.id);if(!z)return;const W=z.clientY-l.startY,xe=l.top&&W>et&&$e(l.scrollers),Se=l.bottom&&W<-et&&nt(l.scrollers);if(xe||Se){a.preventDefault(),we.current=null,V.current(r(z,v),Ue.current(),l.startY),Pe.current(r(z,v));return}(l.top&&W<0||l.bottom&&W>0)&&(l.top=!1,l.bottom=!1),x.current>0&&nt(l.scrollers)?l.contentEndY==null?l.contentEndY=z.clientY:l.contentEndY-z.clientY>=xn&&(l.promotedAtContentEnd=!0,V.current(r(z,v),Ue.current(),l.contentEndY),Pe.current(r(z,v))):l.contentEndY=null},g=a=>{we.current=null;const v=C.current?.pointerId;if(v==null)return;const l=[...a.changedTouches].find(W=>W.identifier===v),z=a.currentTarget;l?st.current(r(l,z)):a.touches.length===0&&Ie.current(z)},L=ye.current;if(L&&Me.current){const a=Me.current;L.removeEventListener("touchstart",a.start),L.removeEventListener("touchmove",a.move),L.removeEventListener("touchend",a.end),L.removeEventListener("touchcancel",a.end)}ye.current=t,t?(t.addEventListener("touchstart",m,{passive:!0}),t.addEventListener("touchmove",T,{passive:!1}),t.addEventListener("touchend",g,{passive:!0}),t.addEventListener("touchcancel",g,{passive:!0}),Me.current={start:m,move:T,end:g}):Me.current=null},[]),it=Mt("(prefers-reduced-motion: reduce)"),at=n.useCallback(t=>{if(y.current<=0)return;const r=Tt(t),m=Math.max(0,t.scrollHeight-t.clientHeight-r),T=Math.max(0,t.scrollTop-m);T<y.current-.5&&_(T)},[_]),lt=n.useCallback(t=>{C.current!=null||$.current!=null||at(t.currentTarget)},[at]),ut=n.useCallback(t=>{if(!t.isPrimary){ie(t.currentTarget);return}ke(t)},[ke,ie]),ft=n.useCallback(t=>{if(!t.isPrimary){ie(t.currentTarget);return}Ce(t)},[Ce,ie]),We=n.useCallback(t=>{t.touches.length>1&&ie(t.currentTarget)},[ie]),dt=n.useCallback(t=>{const r=C.current;r?.pointerId!==t.pointerId||r.syntheticTouch||J(t.currentTarget)},[J]),Xe=A?u:E,Pt=n.useMemo(()=>({style:{transform:Xe!==0?`translateY(${Xe}px)`:void 0,transition:e&&(A||k||it)?"none":void 0,touchAction:"pinch-zoom",overscrollBehavior:"contain"}}),[Xe,A,e,k,it]),Ot=n.useMemo(()=>({style:{touchAction:"pinch-zoom",cursor:"grab"},onContextMenu:Z,onLostPointerCapture:fe,onPointerDown:ut,onPointerMove:ve,onPointerUp:Ee,onPointerCancel:dt,onTouchStart:We,onTouchMove:We}),[Ee,Z,dt,ut,We,fe,ve]),Lt=n.useMemo(()=>({ref:ct,onContextMenu:Z,onLostPointerCapture:fe,onPointerDown:ft,onPointerMove:ze,onPointerUp:Ae,onPointerCancel:Ae,onScroll:lt}),[ct,Ae,ft,ze,lt,Z,fe]);return{sheetRef:Ge,contentProps:Pt,handleProps:Ot,bodyProps:Lt,bodyElementRef:ye,dragOffset:u,settledOffset:E,isDragging:A,isTraveling:i,activeOffsetRef:x,sheetHeight:P,scrollPreservationInset:N,settlingLayoutOffset:te,settledLayoutOffset:F,completeScrollAreaSettle:ne}}const vt={hug:"92dvh",capped:"62dvh",tall:"92dvh"},kn=48,vn=48,En=50;function wn(){return typeof window>"u"?0:window.innerHeight}function Sn(e){let o="";for(const s of e??[])o+=`${typeof s}:${s}|`;return o}const he={sheet:{kfzvcC:"x67bb7w",kB7OPa:"x9f619",kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"x2lwn1j",kzqmXN:"xh8yej3",ks0D6T:"x11gisft",kWkggS:"x10xzikg",kEafiO:"x11xkdxz",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",k2ei4v:"xgbv0en",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",ke9TFa:"xw8tdv1",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",krdFHd:"x81l70g",kfmiAY:"x7hs6f1",kGVxlE:"x1kcpxr7",kI3sdo:"x1a2a7pz",kVQacm:"xb3r6kr",kGO01o:"x1wkw6tp",k1K539:"x1if0o47",k3aq6I:"xnn1q72 xhbqy3z",kSiTet:"x1hc1fzr",k1ekBW:"xwcsmn1",kIyJzY:"x80gvsz",kAMwcw:"xlr8y92",k6sLGO:"x1q1rmc8",k6CgDc:"xzg1mie",$$css:!0},sheetClosing:{k3aq6I:"x1weeur4",kAMwcw:"xv2sgk5",$$css:!0},sheetFading:{kSiTet:"xg01cxk",$$css:!0},sheetInactive:{kfzvcC:"x47corl",$$css:!0},body:{kzQI83:"x1iyjqo2",kAzted:"x2lwn1j",kB7OPa:"x9f619",kFalU9:"xge0x1e",kInvED:"x1wfwxd8 x1nw7mhf",kWkggS:"x10xzikg",kGO01o:"x18d9i69",$$css:!0},content:{k1xSpc:"xufnvkl",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kAzted:"x121v3j4",$$css:!0},tallKeyboardBody:{kFlMNQ:"xrw9175",k5JduY:"x1s928wv",kc3QkE:"xhkezso",k4zj60:"xu6fald",kloYau:"x2q1x1w",$$css:!0},budget:{kZKoxP:"x1tpcejd",$$css:!0},hugHeight:{kZKoxP:"xg7h5cd",kskxy:"x14bu9tk",$$css:!0}};function Tn(e){return e.kind==="open"?e.entering?"entering":null:e.kind==="retained"?e.motion==="covered"?null:e.motion:e.kind==="exiting"?"exiting":null}function Et(e,o,s){if(e==null)return s(),()=>{};let c=!1,h=null;const p=()=>{c||(c=!0,h!=null&&clearTimeout(h),e.removeEventListener("transitionend",f),e.removeEventListener("transitioncancel",f),s())},f=i=>{i.target===e&&i.propertyName===o&&p()};e.addEventListener("transitionend",f),e.addEventListener("transitioncancel",f);const u=getComputedStyle(e);if(e.style.transition.trim()==="none"||u.transition.trim()==="none")return p(),()=>{};const j=u.transitionProperty.split(",").map(i=>i.trim()),E=u.transitionDuration.split(",").map(wt),B=u.transitionDelay.split(",").map(wt);let A=!1;const M=j.reduce((i,b,P)=>{if(b!==o&&b!=="all")return i;const D=E[P%E.length],N=B[P%B.length];return D==null||N==null?(A=!0,i):Math.max(i,D+N)},0);return A?()=>{e.removeEventListener("transitionend",f),e.removeEventListener("transitioncancel",f)}:M<=0?(p(),()=>{}):(h=setTimeout(p,M+En),()=>{h!=null&&clearTimeout(h),e.removeEventListener("transitionend",f),e.removeEventListener("transitioncancel",f)})}function wt(e){const o=e.trim();if(!/^-?(?:\d+|\d*\.\d+)(?:ms|s)$/.test(o))return null;const s=Number.parseFloat(e);return o.endsWith("ms")?s:s*1e3}function rt({ref:e,state:o,height:s,label:c,children:h,padding:p,snapPoints:f,className:u,style:j,tabIndex:E,xstyle:B,isSwipeDismissAllowed:A=!0,isPageScrollLocked:M=!1,onDismiss:i,onScrimOpacity:b,onElementChange:P,onMotionStart:D,onMotionComplete:N,...ee}){const F=n.useRef(null),Q=n.useRef(o),R=n.useRef(!1),w=n.useRef(D),te=n.useRef(N),H=n.useRef(null),k=n.useRef(null),X=o.kind==="open"&&o.entering,y=Q.current,$=y.kind==="open"&&y.entering;X&&!$?R.current=y.kind==="retained":X||(R.current=!1),n.useLayoutEffect(()=>{Q.current=o,w.current=D,te.current=N},[N,D,o]);const G=o.kind==="open",U=o.kind!=="hidden",Y=o.kind==="retained",_=Y||o.kind==="exiting",ne=o.kind==="exiting",d=Y&&o.motion==="fading",x=Y?o.alignmentOffset:0,S=Sn(f),I=n.useRef(f);I.current=f;const{snapHeights:q,ignoredSnapPointsMessage:me}=n.useMemo(()=>{if(S==="")return{snapHeights:void 0,ignoredSnapPointsMessage:""};const V=(I.current??[]).filter(Ie=>!Qt(Ie));return{snapHeights:()=>Zt(I.current??[],wn()),ignoredSnapPointsMessage:V.length===0?"":`snapPoints ignored ${JSON.stringify(V)}. A snap point is a viewport fraction above 0 and up to 1 (0.5 is half the screen), a px length ('320px'), or a percentage ('50%').`}},[S]);Ne("BottomSheet",me,me!=="");const{contentProps:se,handleProps:re,bodyProps:C,bodyElementRef:ge,sheetRef:pe,dragOffset:ye,settledOffset:be,isDragging:le,isTraveling:Ge,sheetHeight:ue,scrollPreservationInset:oe,settlingLayoutOffset:Re,settledLayoutOffset:ce,completeScrollAreaSettle:Be}=bn({isOpen:G,canDismiss:A,offscreenBlockEndInset:kn,onDismiss:i,snapHeights:q,onScrimOpacity:b}),{getViewportProps:qe,getContentProps:J}=It({axis:"both",keyboardAccess:{owner:"contentOrViewport",label:c},overscroll:"contain",stickyContainment:"always"}),He=n.useCallback(V=>{pe(V),F.current=V,P?.(V)},[P,pe]);ln({bodyRef:ge,bottomClearance:vn,isEnabled:s==="tall",isFullyExpanded:be===0,isPageScrollLocked:M,isSheetTraveling:Ge,isOpen:G,isPresented:U,sheetRef:F}),n.useImperativeHandle(e,()=>F.current,[]);const O=Tn(o);n.useLayoutEffect(()=>{if(O!=null){if(H.current=null,k.current=null,O==="entering"&&R.current){k.current=O;return}return Et(F.current,O==="fading"?"opacity":"transform",()=>{H.current===O?te.current?.(O):k.current=O})}},[O]),n.useLayoutEffect(()=>{if(Re!=null)return Et(F.current,"transform",Be)},[Be,Re]),n.useEffect(()=>{if(O!=null)return w.current?.(O),H.current=O,k.current===O&&(k.current=null,te.current?.(O)),()=>{H.current===O&&(H.current=null),k.current===O&&(k.current=null)}},[O]);const ke=p==null,Z=p??4,fe=Vt[Z],Ee=typeof s=="string"&&s in vt?vt[s]:typeof s=="number"?`${s}px`:s,de=ue>0;let Ce=se.style.transform,ze;if(de){const V=le?ye<be?0:ce:Re??ce,je=(le?ye:be)-V,Pe=le||Re!=null;ze=V>0||Pe?`${Math.max(0,ue-Math.max(0,V))}px`:void 0,Ce=je!==0?`translateY(${je}px)`:void 0}const Ae=x>0?[Ce,`translateY(${x}px)`].filter(Boolean).join(" "):Ce,we=G?Ce:Y?Ae:void 0,Me=j?.transform;n.useLayoutEffect(()=>{if(le||Me!=null)return;const V=F.current;V!=null&&(V.style.transform=we??"")});const ie={transition:se.style.transition,touchAction:se.style.touchAction,overscrollBehavior:se.style.overscrollBehavior,height:ze};return K.jsxs("div",{...ee,ref:He,tabIndex:E??-1,...mt($t("bottom-sheet"),Je(Ft.reset,_t.reset,he.sheet,Yt.reset,s==="hug"?he.hugHeight:he.budget,ne&&he.sheetClosing,d&&he.sheetFading,_&&he.sheetInactive,B),u,{"--_sheet-budget":Ee,...G?ie:Y||ne?{height:ze}:{},...j}),children:[K.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1vjfegm x78zum5 x6s0dn4 xl56j7k xvpftlf xafqdz2 x1j4r261 x1jm3nie x16khyan",...re,"aria-hidden":"true",children:K.jsx("div",{className:"x1m747yf x11c6zpc xjspbzw x1m4xfpy"})}),K.jsx("div",{...qe({...C,...mt(Je(Ht.focusVisible,he.body,s==="tall"&&he.tallKeyboardBody),oe>0?{style:{paddingBlockEnd:`${oe}px`}}:{})}),children:K.jsx("div",{...J(Je(he.content,...Bt(ke?{useThemeDefault:"bottom-sheet"}:{paddingInnerX:fe,paddingInnerY:fe,paddingOuterX:fe,paddingOuterY:fe}),!ke&&Z!==4&&At[Z],!ke&&Z!==4&&Dt[Z],!ke&&Z!==4&&Nt[Z],!ke&&Z!==4&&qt[Z])),children:K.jsx(jt,{children:h})})})]})}rt.displayName="BottomSheetPanel";function Rn(){return K.jsx("div",{className:"xixxii4 x17y0mx6 x1ey2m1c x1kpxq89 x10xzikg xhtitgo x47corl x1cb67k9 xt2iwb0","data-sheet-edge-tint":"","aria-hidden":"true"})}const ot=n.createContext(null);ot.displayName="BottomSheetSwitcherContext";function Cn(e,o){switch(e){case"active":return{kind:"open",entering:!1};case"entering":return{kind:"open",entering:!0};case"covered":case"aligning":case"fading":return{kind:"retained",motion:e,alignmentOffset:o};case"exiting":return{kind:"exiting"};case"hidden":return{kind:"hidden"}}}function Ct(e,o){const s=document.activeElement;if(s!=null&&e?.contains(s))return;const c=e?.querySelector("[data-autofocus]");c!=null?c.focus({preventScroll:!0}):o&&e?.focus({preventScroll:!0})}function Pn({ref:e,isOpen:o,onOpenChange:s,label:c,children:h,height:p="capped",snapPoints:f,hasScrim:u=!0,finalFocusRef:j,purpose:E="info",xstyle:B,...A}){const M=n.useRef(null),i=n.useRef(null),b=n.useRef(null),[P,D]=n.useState(o),N=o||P,ee=o?{kind:"open",entering:!1}:P?{kind:"exiting"}:{kind:"hidden"},F=n.useCallback(()=>{o&&E!=="required"&&s(!1)},[o,s,E]),Q=n.useCallback(()=>{E==="info"&&s(!1)},[s,E]),R=n.useCallback(y=>{i.current=y},[]),w=n.useCallback(y=>{M.current?.style.setProperty("--_sheet-scrim-opacity",String(y))},[]);n.useEffect(()=>{const y=M.current;if(y==null||!o)return;D(!0),y.style.setProperty("--_sheet-scrim-opacity","1"),y.open||(u?(b.current=document.activeElement,y.showModal()):y.show(),Ct(i.current,u))},[u,o]),n.useEffect(()=>{!o&&P&&u&&w(0)},[w,u,o,P]);const te=n.useCallback(y=>{if(y!=="exiting"||o)return;const $=M.current;$?.open&&$.close(),D(!1),(j?.current??b.current)?.focus(),b.current=null},[j,o]);Kt(N&&u),Ne("BottomSheet","requires a non-empty `label` for an accessible name; the open sheet has no built-in heading to derive one from.",o&&!c);const{shouldDismissOnCloseRequest:H}=Gt({isActive:N,escapeBehavior:o&&E!=="required"?"close":"block",onDismiss:F,getContainer:()=>M.current,isPresent:()=>M.current?.open??!1}),k=n.useCallback(y=>{y.preventDefault(),H()&&F()},[F,H]),X=n.useCallback(y=>{u&&y.target===y.currentTarget&&Q()},[Q,u]);return K.jsxs("dialog",{...{0:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz"},8:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq"},4:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w"},12:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w"},2:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz x1cz9k3x"},10:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq x1cz9k3x"},6:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x"},14:{className:"xixxii4 x10a8y8t x1o6l61p xtdtrs8 x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x"},1:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz x47corl xfo81ep xh8yej3 x5yr21d"},9:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq x47corl xfo81ep xh8yej3 x5yr21d"},5:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w x47corl xfo81ep xh8yej3 x5yr21d"},13:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x15h3t91 x142juwg x1viac0w x47corl xfo81ep xh8yej3 x5yr21d"},3:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"},11:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"},7:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1s85apg x1a2a7pz xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"},15:{className:"xixxii4 x10a8y8t x1x1rfll x7ab17h x1ghz6dp x1717udv xc342km xng3xce xjbqb8w x1rea2x4 x1a2a7pz x1lliihq xnixb3f xni466t xxiuuzi xc0dz0a xft5bk6 x142juwg x1viac0w x1cz9k3x x47corl xfo81ep xh8yej3 x5yr21d"}}[!!N<<3|!!u<<2|!!(u&&!o&&P)<<1|!u<<0],ref:M,"aria-label":c,"aria-hidden":!o&&P?"true":void 0,"aria-modal":u&&o?"true":void 0,role:E==="required"?"alertdialog":void 0,inert:!o&&P?!0:void 0,onCancel:k,onClick:X,children:[K.jsx("div",{className:"x10l6tqk x17y0mx6 x1ey2m1c x78zum5 xl56j7k x47corl",children:K.jsx(rt,{...A,ref:e,state:ee,height:p,label:c,snapPoints:f,isSwipeDismissAllowed:E==="info",isPageScrollLocked:N&&u,xstyle:B,onDismiss:Q,onScrimOpacity:w,onElementChange:R,onMotionComplete:te,children:K.jsx(Ut,{children:h})})}),K.jsx(Rn,{})]})}function On({switcher:e,ref:o,sheetId:s,label:c,children:h,height:p="capped",snapPoints:f,purpose:u="info",xstyle:j,...E}){const{activeSheet:B,hasScrim:A,onActiveSheetChange:M,getSheetPhase:i,getSheetAlignmentOffset:b,registerSheetElement:P,registerSheetLabel:D,registerSheetPurpose:N,onSheetEnterStart:ee,onSheetTransitionComplete:F,onSheetScrimOpacityChange:Q}=e,R=typeof s=="string"&&s.length>0,w=R?i(s):"hidden",te=R?b(s):0,H=Cn(w,te),k=w==="active"||w==="entering",X=w==="covered"||w==="aligning"||w==="fading"||w==="exiting",y=w!=="hidden",$=w==="active"||w==="entering",G=n.useRef(null),U=n.useRef(w),Y=U.current,_=n.useRef(!1);n.useLayoutEffect(()=>{U.current=w},[w]);const ne=n.useCallback(()=>{u==="info"&&R&&B===s&&M(null)},[B,R,M,u,s]),d=n.useCallback(q=>{G.current=q,R&&P(s,q)},[R,P,s]),x=n.useCallback(q=>{q==="entering"&&R&&ee(s)},[R,ee,s]),S=n.useCallback(q=>{R&&F({sheetId:s,phase:q})},[R,F,s]),I=n.useCallback(q=>{R&&Q(s,q)},[R,Q,s]);return n.useLayoutEffect(()=>{if(R)return D(s,c),()=>D(s,null)},[R,c,D,s]),n.useLayoutEffect(()=>{if(R)return N(s,u),()=>N(s,null)},[R,u,N,s]),n.useEffect(()=>{if(k){const q=Y==="active"||Y==="entering";(!_.current||!q)&&Ct(G.current,A),_.current=!0}else w==="hidden"&&(_.current=!1)},[A,k,w,Y]),Ne("BottomSheet","requires a non-empty `label` for an accessible name; the open sheet has no built-in heading to derive one from.",k&&!c),K.jsx("div",{...{0:{className:"x10l6tqk x17y0mx6 x1ey2m1c x78zum5 xl56j7k x47corl"},2:{className:"x10l6tqk x17y0mx6 x1ey2m1c xl56j7k x47corl x1s85apg"},1:{className:"x10l6tqk x17y0mx6 x1ey2m1c x78zum5 xl56j7k x47corl x1vjfegm"},3:{className:"x10l6tqk x17y0mx6 x1ey2m1c xl56j7k x47corl x1s85apg x1vjfegm"}}[!y<<1|!!$<<0],hidden:!y,"aria-hidden":X?"true":void 0,inert:X?!0:void 0,children:K.jsx(rt,{...E,ref:o,state:H,height:p,label:c,snapPoints:f,isSwipeDismissAllowed:u==="info",isPageScrollLocked:A,xstyle:j,onDismiss:ne,onScrimOpacity:I,onElementChange:d,onMotionStart:x,onMotionComplete:S,children:K.jsx(ot,{value:null,children:h})})})}function Ln(e){const o=n.use(ot),s=e.sheetId,c=typeof s=="string"&&s.length>0;return Ne("BottomSheet","requires a non-empty `sheetId` when nested in BottomSheetSwitcher; standalone `isOpen` / `onOpenChange` props are ignored there.",o!=null&&!c),Ne("BottomSheet","`sheetId` only works inside BottomSheetSwitcher. Use `isOpen` and `onOpenChange` for a standalone sheet.",o==null&&s!=null),o!=null?K.jsx(On,{...e,switcher:o}):K.jsx(Pn,{...e})}Ln.displayName="BottomSheet";export{Ln as BottomSheet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,i as de,u as pe,j as x,p as J,m as $,t as q,f as me}from"./index-
|
|
1
|
+
import{r as n,i as de,u as pe,j as x,p as J,m as $,t as q,f as me}from"./index-D5wx14Yb.js";const Q="--_item-swipe-travel",Z="--_item-swipe-dir",F="--_item-swipe-duration",fe=10,xe=48,ke=.5,ge=.5,he=.35,Pe=.6,we=44,ee=24,Ee=200,ye=400,te={isArmed:!1,phase:"idle",side:"leading"};function M(p){return p==="trailing"?-1:1}function L(){return typeof performance>"u"?Date.now():performance.now()}function ne(p){const P=p.querySelectorAll('button, a[href], input, [tabindex]:not([tabindex="-1"])');for(const m of P)if(m.closest("[data-swipe-panel]")==null){m.focus();return}document.activeElement instanceof HTMLElement&&document.activeElement.blur()}function Se({isEnabled:p,behavior:P,sides:m,measurePanel:T,fireOutermost:v,isReducedMotion:b=!1,rootRef:s}){const k=n.useRef(null),C=n.useRef(0),w=n.useRef(1),I=n.useRef(0),f=n.useRef(null),i=n.useRef(null),l=n.useRef(null),[E,g]=n.useState(te),h=n.useRef(E);h.current=E;const u=n.useRef(T),y=n.useRef(v),O=n.useRef(m),R=n.useRef(P),Y=n.useRef(b);n.useEffect(()=>{u.current=T,y.current=v,O.current=m,R.current=P,Y.current=b}),n.useEffect(()=>()=>{f.current!=null&&clearTimeout(f.current),i.current!=null&&cancelAnimationFrame(i.current)},[]);const A=n.useCallback(t=>{const e=s.current;e&&(C.current=t,e.style.setProperty(Q,`${t}px`))},[s]),_=n.useCallback(t=>{const e=s.current;e&&(t>0?e.style.setProperty(F,`${t}ms`):e.style.setProperty(F,"0s"))},[s]),G=n.useCallback(()=>{const t=s.current;t&&(t.style.removeProperty(Q),t.style.removeProperty(Z),t.style.removeProperty(F),C.current=0)},[s]),U=n.useCallback(()=>{i.current!=null&&cancelAnimationFrame(i.current),i.current=null,l.current=null},[]),H=n.useCallback(t=>{l.current=t,i.current==null&&(i.current=requestAnimationFrame(()=>{i.current=null;const e=l.current;l.current=null,e!=null&&A(e)}))},[A]),o=n.useCallback((t,e,r,c)=>{U();const a=Y.current?0:Ee;g({isArmed:!1,phase:"settling",side:t}),_(a),A(e),f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{f.current=null,_(0),c?.()!==!0&&(r==="idle"&&G(),g(r==="idle"?te:{isArmed:!1,phase:r,side:t}))},a)},[U,G,_,A]),K=n.useCallback((t,e)=>{const c=s.current?.clientWidth??0,a=M(t)*e*(c+ee);o(t,a,"held",()=>y.current(t)?!1:(o(t,0,"idle"),!0))},[s,o]),j=n.useCallback(()=>{const t=h.current;if(t.phase!=="resting")return;const e=s.current;e!=null&&e.contains(document.activeElement)&&ne(e),o(t.side,0,"idle")},[s,o]);n.useEffect(()=>{if(E.phase!=="resting")return;const t=e=>{const r=s.current;r!=null&&e.target instanceof Node&&!r.contains(e.target)&&j()};return document.addEventListener("pointerdown",t,!0),()=>{document.removeEventListener("pointerdown",t,!0)}},[j,s,E.phase]),n.useEffect(()=>{const t=s.current;if(t==null||!p)return;const e=r=>{k.current?.claimed===!0&&r.cancelable&&r.preventDefault()};return t.addEventListener("touchmove",e,{passive:!1}),()=>{t.removeEventListener("touchmove",e)}},[p,s]);const re=n.useCallback(t=>{const e=h.current;if(e.phase!=="resting")return;const r=s.current;if(r!=null&&r.contains(document.activeElement)&&ne(r),t()){const a=r?.clientWidth??0,d=M(e.side)*w.current*(a+ee);o(e.side,d,"held")}else o(e.side,0,"idle")},[s,o]),se=n.useCallback(t=>{const e=h.current;if(t.pointerType!=="touch"||k.current!=null||e.phase==="settling"||e.phase==="held")return;const r=s.current,c=de(r)?-1:1;w.current=c;const a=L();k.current={baseTravel:C.current*c,claimed:null,commitPx:0,inlineSign:c,lastTime:a,lastX:t.clientX,panelWidth:0,pointerId:t.pointerId,prevTime:a,prevX:t.clientX,side:e.phase==="resting"?e.side:"leading",startX:t.clientX,startY:t.clientY,travel:0}},[p,s]),ie=n.useCallback(t=>{const e=k.current;if(e==null||e.pointerId!==t.pointerId||e.claimed===!1)return;const r=(t.clientX-e.startX)*e.inlineSign,c=t.clientY-e.startY;if(e.claimed===null){if(Math.max(Math.abs(r),Math.abs(c))<fe)return;if(Math.abs(r)<=Math.abs(c)){e.claimed=!1;return}const N=h.current.phase==="resting"?e.side:r>0?"leading":"trailing";if(!O.current[N]){e.claimed=!1;return}e.claimed=!0,e.side=N,e.panelWidth=u.current(N);const oe=s.current?.clientWidth??0;e.commitPx=Math.max(e.panelWidth+xe,oe*ke),s.current!=null&&s.current.style.setProperty(Z,String(e.inlineSign)),_(0),g({isArmed:!1,phase:"dragging",side:N});try{s.current?.setPointerCapture(t.pointerId)}catch{}}const a=M(e.side),d=Math.max(0,r*a+e.baseTravel*a),W=d<=e.commitPx?d:e.commitPx+(d-e.commitPx)*he,z=d>=e.commitPx;z!==e.travel>=e.commitPx&&g({isArmed:z,phase:"dragging",side:e.side}),e.travel=d,e.prevX=e.lastX,e.prevTime=e.lastTime,e.lastX=t.clientX,e.lastTime=L(),H(a*e.inlineSign*W)},[H,s,_]),X=n.useCallback((t,e)=>{const r=k.current;if(r==null||r.pointerId!==t.pointerId||(k.current=null,r.claimed!==!0))return;I.current=L()+ye;try{s.current?.releasePointerCapture(t.pointerId)}catch{}const{side:c,inlineSign:a}=r,d=M(c)*a*r.panelWidth;if(e){o(c,0,"idle");return}const W=Math.max(1,r.lastTime-r.prevTime),B=M(c)*a*(r.lastX-r.prevX)/W>=Pe&&r.travel>=we;if(r.travel>=r.commitPx||B){K(c,a);return}if(R.current==="reveal"&&r.travel>=r.panelWidth*ge){o(c,d,"resting");return}o(c,0,"idle")},[s,o,K]),ce=n.useCallback(t=>X(t,!1),[X]),le=n.useCallback(t=>X(t,!0),[X]),D=n.useCallback(()=>L()<I.current,[]),ae=n.useCallback(t=>{!D()||t.target instanceof Element&&t.target.closest("[data-swipe-panel]")!=null||(I.current=0,t.preventDefault(),t.stopPropagation())},[D]),ue=n.useCallback(t=>{t.key==="Escape"&&h.current.phase==="resting"&&(t.stopPropagation(),j())},[j]);return{activateEntry:re,close:j,handlers:{onClickCapture:ae,onKeyDown:ue,onPointerCancel:le,onPointerDown:se,onPointerMove:ie,onPointerUp:ce},shouldSuppressClick:D,state:E}}const S={swipePanel:{kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kzqmXN:"xnalus7",k1xSpc:"x78zum5",kGNEyG:"x1qjc9v5",kB7OPa:"x9f619",kVQacm:"xb3r6kr",kaIpWk:"x1pjcqnp",k3aq6I:"x145au52",k1ekBW:"x13zkoj4",kIyJzY:"xxfakuu",kAMwcw:"xn34ekc",$$css:!0},swipePanelLeading:{kLqNvP:"x1o0tod",kjj79g:"x1nhvcw1",kzqmXN:"x96shys",$$css:!0},swipePanelTrailing:{kt4wiu:"xtijo5x",kjj79g:"x13a6bvl",kzqmXN:"x1qwjaml",$$css:!0},swipeEntry:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",k7Eaqz:"x187xtus",kZKoxP:"x5yr21d",kg3NbH:"xrrkdod",kB7OPa:"x9f619",kogj98:"x1ghz6dp",kMzoRj:"xc342km",ksu8eU:"xng3xce",kysU6D:"xjyslct",kkrTdU:"x1ypdohk x16khyan",kMv6JI:"x9ynric",kGuDYH:"x141an7d",k63SB2:"x1e4wzip",kLWn49:"x1ltkj2j",khDVqt:"xuxw1ft",$$css:!0},swipeEntryDisabled:{kSiTet:"xbyyjgo",$$css:!0}},V={neutral:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},accent:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",$$css:!0},destructive:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",$$css:!0}};function Te({rootRef:p,onBridge:P,leading:m,trailing:T,behavior:v}){const b=n.useRef(null),s=n.useRef(null),k=pe("(prefers-reduced-motion: reduce)"),C=i=>{const l=i==="leading"?m:T;return l[l.length-1]},w=Se({isEnabled:!0,behavior:v,sides:{leading:m.length>0,trailing:T.length>0},measurePanel:i=>(i==="leading"?b:s).current?.offsetWidth??0,fireOutermost:i=>{const l=C(i);return l==null||l.isDisabled===!0?!1:(l.onActivate(),l.hasRemoval===!0)},isReducedMotion:k,rootRef:p});n.useEffect(()=>(P({handlers:w.handlers,shouldSuppressClick:w.shouldSuppressClick}),()=>{P(null)}));const I=w.state.phase==="resting",f=(i,l)=>{if(l.length===0)return null;const E=l[l.length-1],g=v==="commit",h=I&&!g;return x.jsx("div",{"data-swipe-panel":i,inert:h?void 0:!0,"aria-hidden":g?!0:void 0,...$(q("item-swipe-panel",{side:i}),J(S.swipePanel,i==="leading"?S.swipePanelLeading:S.swipePanelTrailing,V[E.variant??"accent"])),children:x.jsx("div",{ref:i==="leading"?b:s,...{0:{className:"x78zum5 x2lah0s x5yr21d x10xzikg"},1:{className:"x78zum5 x2lah0s x5yr21d x10xzikg x15zctf7"}}[(i==="leading")<<0],children:l.map(u=>{const y=u.variant??"accent",O=x.jsxs(x.Fragment,{children:[u.icon,x.jsx("span",{children:u.label})]}),R=J(S.swipeEntry,V[y],u.isDisabled===!0&&S.swipeEntryDisabled);return g?x.jsx("span",{...$(q("item-swipe-action",{variant:y}),R),children:O},u.id??u.label):x.jsx("button",{type:"button",disabled:u.isDisabled===!0,onClick:()=>w.activateEntry(()=>(u.onActivate(),u.hasRemoval===!0)),...$(q("item-swipe-action",{variant:y}),me.focusVisible(S.swipeEntry,V[y],u.isDisabled===!0&&S.swipeEntryDisabled)),children:O},u.id??u.label)})})},i)};return x.jsxs(x.Fragment,{children:[f("leading",m),f("trailing",T)]})}Te.displayName="ItemSwipeLayer";export{Te as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BottomSheet as r}from"./BottomSheet-
|
|
1
|
+
import{BottomSheet as r}from"./BottomSheet-N2ewVQoq.js";import{j as e,S as a}from"./index-D5wx14Yb.js";function d({finalFocusRef:n,isOpen:o,onOpenChange:t,label:i,children:p}){return e.jsx(r,{finalFocusRef:n,isOpen:o,onOpenChange:t,label:i,height:"hug",purpose:"info",children:e.jsx(a,{paddingBlockStart:4,paddingBlockEnd:0,paddingInline:1,children:p})})}d.displayName="MenuBottomSheet";export{d as MenuBottomSheet};
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
border-color: var(--color-border-emphasized);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.x4pepcl {
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.x1kogg8i {
|
|
21
|
+
border-radius: 6px;
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
.x1e6avla {
|
|
17
25
|
border-radius: 999px;
|
|
18
26
|
}
|
|
@@ -213,6 +221,10 @@
|
|
|
213
221
|
justify-content: flex-start;
|
|
214
222
|
}
|
|
215
223
|
|
|
224
|
+
.xl1xv1r {
|
|
225
|
+
object-fit: cover;
|
|
226
|
+
}
|
|
227
|
+
|
|
216
228
|
.xnjyzlh {
|
|
217
229
|
padding-inline-end: var(--spacing-4);
|
|
218
230
|
}
|
|
@@ -225,6 +237,14 @@
|
|
|
225
237
|
pointer-events: none;
|
|
226
238
|
}
|
|
227
239
|
|
|
240
|
+
.x10l6tqk {
|
|
241
|
+
position: absolute;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.x1n2onr6 {
|
|
245
|
+
position: relative;
|
|
246
|
+
}
|
|
247
|
+
|
|
228
248
|
.xcd2776 {
|
|
229
249
|
row-gap: calc(var(--spacing-0-5) / 2);
|
|
230
250
|
}
|
|
@@ -241,6 +261,18 @@
|
|
|
241
261
|
text-align: start;
|
|
242
262
|
}
|
|
243
263
|
|
|
264
|
+
.xbb3pvg {
|
|
265
|
+
transition-duration: .14s;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.x1xkhett {
|
|
269
|
+
transition-property: filter, transform;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.x9lcvmn {
|
|
273
|
+
transition-timing-function: ease-out;
|
|
274
|
+
}
|
|
275
|
+
|
|
244
276
|
.x87ps6o {
|
|
245
277
|
-webkit-user-select: none;
|
|
246
278
|
user-select: none;
|
|
@@ -254,6 +286,18 @@
|
|
|
254
286
|
outline-offset: var(--spacing-0-5);
|
|
255
287
|
}
|
|
256
288
|
|
|
289
|
+
.xtgyt42:disabled {
|
|
290
|
+
cursor: default;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.xijokvz:disabled {
|
|
294
|
+
opacity: .5;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.xw92b1d:hover {
|
|
298
|
+
box-shadow: inset 0 0 0 1px var(--color-border-emphasized);
|
|
299
|
+
}
|
|
300
|
+
|
|
257
301
|
.x1cqbx0l:hover {
|
|
258
302
|
color: var(--color-icon-primary);
|
|
259
303
|
}
|
|
@@ -264,6 +308,24 @@
|
|
|
264
308
|
}
|
|
265
309
|
}
|
|
266
310
|
|
|
311
|
+
@media (prefers-reduced-motion: reduce) {
|
|
312
|
+
.x12w9bfk.x12w9bfk {
|
|
313
|
+
transition-duration: 0s;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.x19l8q0q:enabled:hover {
|
|
318
|
+
filter: brightness(.85);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.xnqwz4y:enabled:hover {
|
|
322
|
+
transform: scale(1.1);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.xkxev3i:enabled:active {
|
|
326
|
+
transform: scale(.95);
|
|
327
|
+
}
|
|
328
|
+
|
|
267
329
|
@container settings-panel (width <= 480px) {
|
|
268
330
|
.xp05mzj.xp05mzj {
|
|
269
331
|
align-items: stretch;
|
|
@@ -280,10 +342,26 @@
|
|
|
280
342
|
height: 100%;
|
|
281
343
|
}
|
|
282
344
|
|
|
345
|
+
.xlup9mm {
|
|
346
|
+
height: 16px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.x10w6t97 {
|
|
350
|
+
height: 32px;
|
|
351
|
+
}
|
|
352
|
+
|
|
283
353
|
.xqu0tyb {
|
|
284
354
|
height: 4px;
|
|
285
355
|
}
|
|
286
356
|
|
|
357
|
+
.xnnlda6 {
|
|
358
|
+
height: 56px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.xdk7pt {
|
|
362
|
+
height: 8px;
|
|
363
|
+
}
|
|
364
|
+
|
|
287
365
|
.x17u3quo {
|
|
288
366
|
height: calc(var(--spacing-10) * 2);
|
|
289
367
|
}
|
|
@@ -348,6 +426,14 @@
|
|
|
348
426
|
padding-top: 0;
|
|
349
427
|
}
|
|
350
428
|
|
|
429
|
+
.xzkxjte {
|
|
430
|
+
right: -4px;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.x1fo6t33 {
|
|
434
|
+
top: -4px;
|
|
435
|
+
}
|
|
436
|
+
|
|
351
437
|
.x1ng3b2o {
|
|
352
438
|
width: 100% !important;
|
|
353
439
|
}
|
|
@@ -356,14 +442,30 @@
|
|
|
356
442
|
width: 100%;
|
|
357
443
|
}
|
|
358
444
|
|
|
445
|
+
.x1kky2od {
|
|
446
|
+
width: 16px;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.x1td3qas {
|
|
450
|
+
width: 32px;
|
|
451
|
+
}
|
|
452
|
+
|
|
359
453
|
.x3hqpx7 {
|
|
360
454
|
width: 50%;
|
|
361
455
|
}
|
|
362
456
|
|
|
457
|
+
.x15yg21f {
|
|
458
|
+
width: 56px;
|
|
459
|
+
}
|
|
460
|
+
|
|
363
461
|
.x1vz4e29 {
|
|
364
462
|
width: 66%;
|
|
365
463
|
}
|
|
366
464
|
|
|
465
|
+
.x1xc55vz {
|
|
466
|
+
width: 8px;
|
|
467
|
+
}
|
|
468
|
+
|
|
367
469
|
.x1i8e1tz {
|
|
368
470
|
width: calc(var(--spacing-10) * 2);
|
|
369
471
|
}
|