@openchambery/web 2.1.8-beta.10 → 2.1.8-beta.12

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.
Files changed (70) hide show
  1. package/dist/assets/{AgentAvatar-mchFM3n-.js → AgentAvatar-CJQwq8UM.js} +1 -1
  2. package/dist/assets/{AssistantView-pLVk20s1.js → AssistantView-DoyxwGQq.js} +3 -3
  3. package/dist/assets/{DiagramView-DmaKTHol.js → DiagramView-5kJwxt7R.js} +1 -1
  4. package/dist/assets/{FadeInOnReveal-BXDM9joC.js → FadeInOnReveal-BNVExwoL.js} +1 -1
  5. package/dist/assets/{Icon-BGp_ize2.js → Icon-B4xKSuz3.js} +1 -1
  6. package/dist/assets/{ImageLoadingPlaceholder-DmUxjyxq.js → ImageLoadingPlaceholder-xB8WeKks.js} +1 -1
  7. package/dist/assets/{LoadingImage-DGjlKW_O.js → LoadingImage-CoT3GWhg.js} +1 -1
  8. package/dist/assets/{MarkdownRenderer-VYYHEQHc.js → MarkdownRenderer-DnI2uMt7.js} +2 -2
  9. package/dist/assets/{MarkdownRendererImpl-BQPOlcOs.js → MarkdownRendererImpl-CYdOgO3U.js} +1 -1
  10. package/dist/assets/{MarkstreamRendererImpl-B9DtJ2K2.js → MarkstreamRendererImpl-C93znX8V.js} +1 -1
  11. package/dist/assets/{MobileDetailNavigation-9MnryETM.js → MobileDetailNavigation-9QWR8yAy.js} +1 -1
  12. package/dist/assets/{MobileShareBridge-e3WTrRks.js → MobileShareBridge-DVzsgJZj.js} +1 -1
  13. package/dist/assets/{MobileTabPageHeader-Fh7QCZc7.js → MobileTabPageHeader-O44YhB7k.js} +1 -1
  14. package/dist/assets/{MultiRunWindow-sfoabcvx.js → MultiRunWindow-B4HBQnWS.js} +1 -1
  15. package/dist/assets/{OnboardingScreen-DmJgU0Jc.js → OnboardingScreen-BiLurnX5.js} +1 -1
  16. package/dist/assets/{OverlayScrollbar-BkJCkZp3.js → OverlayScrollbar-DIsrS93m.js} +1 -1
  17. package/dist/assets/{SettingsView-DbNglFY1.js → SettingsView-BFCSw1pY.js} +1 -1
  18. package/dist/assets/{SettingsWindow-BGzCAKgh.js → SettingsWindow-DXQeFK7A.js} +1 -1
  19. package/dist/assets/{TerminalView-oT_BTx_W.js → TerminalView--8tHQOCU.js} +1 -1
  20. package/dist/assets/{ToolOutputDialog-D85_cJ2B.js → ToolOutputDialog-CtStZKWX.js} +1 -1
  21. package/dist/assets/{appThemeRegistry-CGjHffdt.js → appThemeRegistry-BsAAfK7G.js} +1 -1
  22. package/dist/assets/{button-BKjGCkH3.js → button-BupmKVUs.js} +1 -1
  23. package/dist/assets/{collapsible-03FGLsF4.js → collapsible-BAPWS6G-.js} +1 -1
  24. package/dist/assets/{diagram-D4QHcaSQ.js → diagram-0a7vH45N.js} +1 -1
  25. package/dist/assets/{dialog-nm_cQEUZ.js → dialog-BYLD4Cm3.js} +1 -1
  26. package/dist/assets/{dropdown-menu.styles-WkR8IcF2.js → dropdown-menu.styles-HOWSubFF.js} +1 -1
  27. package/dist/assets/{es-C9PRwAQm.js → es-ChfgOskU.js} +2 -2
  28. package/dist/assets/{fileMentionTouchSelection-DujPmFPX.js → fileMentionTouchSelection-DQaUTN6J.js} +1 -1
  29. package/dist/assets/{fr-2tfGTcme.js → fr-DnKqN4E3.js} +2 -2
  30. package/dist/assets/{gitApi-CrqGdlbS.js → gitApi-5N7qrv0W.js} +1 -1
  31. package/dist/assets/{input-Buww8enN.js → input-DgrLdIys.js} +1 -1
  32. package/dist/assets/{insertionBoundaries-o5RDEXaZ.js → insertionBoundaries-CBi_MJ0I.js} +1 -1
  33. package/dist/assets/{ja-D7NHmhJr.js → ja-DH-a_ThB.js} +2 -2
  34. package/dist/assets/{ko-DeGmXmv6.js → ko-BXABOKd9.js} +2 -2
  35. package/dist/assets/{main-6vgvFImW.js → main-CigA7FqF.js} +5 -5
  36. package/dist/assets/{main-Zix8q1Qb.js → main-DtUGaR3T.js} +2 -2
  37. package/dist/assets/{markdownHeightCache-B6wZ-UwD.js → markdownHeightCache-Dyctmwqv.js} +1 -1
  38. package/dist/assets/{mcpQueries-BVPwR92u.js → mcpQueries-B3qgriEg.js} +1 -1
  39. package/dist/assets/{miniChat-BYZJ4yQd.js → miniChat-DqSZGUDy.js} +2 -2
  40. package/dist/assets/{mobile-CvQVwDyf.js → mobile-lOVOq3aB.js} +2 -2
  41. package/dist/assets/{multirun-BoFWk8S5.js → multirun-BaT1dhsr.js} +1 -1
  42. package/dist/assets/{pl-CyWLY1AT.js → pl-D-KNROrB.js} +2 -2
  43. package/dist/assets/{projectMeta-B073H1YC.js → projectMeta-BVaLs22H.js} +1 -1
  44. package/dist/assets/{pt-BR-D9VVxvts.js → pt-BR-UDs5YUzv.js} +2 -2
  45. package/dist/assets/{renderElectronMiniChatApp-Bu1k2_XW.js → renderElectronMiniChatApp-BhDvysDK.js} +2 -2
  46. package/dist/assets/{renderMobileApp-wEjrkNAR.js → renderMobileApp-CagDbYvN.js} +4 -4
  47. package/dist/assets/{runtimeConfig-DKN9Jyz-.js → runtimeConfig-DEiRBAH4.js} +1 -1
  48. package/dist/assets/{runtimeEndpointReset-Cqf421q-.js → runtimeEndpointReset-amInqab5.js} +2 -2
  49. package/dist/assets/{scheduledTaskNavigation-C-HGgCQA.js → scheduledTaskNavigation-C1PrFEhV.js} +1 -1
  50. package/dist/assets/{sessionChangeSummary-COHW-iNe.js → sessionChangeSummary-DWF9ekcE.js} +1 -1
  51. package/dist/assets/{sessionLookup-ByvikQSd.js → sessionLookup-BJYHc79b.js} +1 -1
  52. package/dist/assets/{sortable-tabs-strip-cHZM0f0Z.js → sortable-tabs-strip-DogWaIrG.js} +1 -1
  53. package/dist/assets/{speechSettingsQueries-BJ7hAvj0.js → speechSettingsQueries-7QMyz9Ga.js} +1 -1
  54. package/dist/assets/src-D_ebV6i-.css +2 -0
  55. package/dist/assets/{store-Ds-7Em7C.js → store-CG7Ytsg9.js} +3 -3
  56. package/dist/assets/{textarea-BZHD_GND.js → textarea-Boj9axpc.js} +1 -1
  57. package/dist/assets/{tooltip-DCeWvAqN.js → tooltip-Dbgnq-Mh.js} +1 -1
  58. package/dist/assets/{uk-Df44svOl.js → uk-CkliYeRs.js} +2 -2
  59. package/dist/assets/{useAppFontEffects-BqrJlSC2.js → useAppFontEffects-BmxJgaxo.js} +5 -5
  60. package/dist/assets/{useDesktopWindowControlsLayout-DgB-LNHC.js → useDesktopWindowControlsLayout-OgBqVsjb.js} +1 -1
  61. package/dist/assets/{useEffectiveDirectory-axifbbuL.js → useEffectiveDirectory-jb4PyBTm.js} +1 -1
  62. package/dist/assets/{useMobileNavigationStore-DnmY3KH3.js → useMobileNavigationStore-DK_b2riR.js} +6 -6
  63. package/dist/assets/{useWorkerHighlightedLines-D2YpPANs.js → useWorkerHighlightedLines-CH-W5R7G.js} +1 -1
  64. package/dist/assets/{zh-CN-wowfzo60.js → zh-CN-BH4APVTu.js} +2 -2
  65. package/dist/assets/{zh-TW-DwojcgA_.js → zh-TW-BEi6Yf50.js} +2 -2
  66. package/dist/index.html +3 -3
  67. package/dist/mini-chat.html +3 -3
  68. package/dist/mobile.html +3 -3
  69. package/package.json +1 -1
  70. package/dist/assets/src-OjoeiMbd.css +0 -2
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,nt as n,rt as r}from"./vendor-base-ui-CdzJ6My_.js";import{n as i}from"./vendor-react-BP2cRVqX.js";import{n as a}from"./vendor-reactuses-core-BpfIZ1tg.js";import{f as o,r as s,t as c}from"./button-BKjGCkH3.js";import{n as l}from"./Icon-BGp_ize2.js";import{t as u}from"./OverlayScrollbar-BkJCkZp3.js";import{a as d,s as f}from"./vendor-framer-motion-D-oiwsxL.js";var p=e(t(),1),m=i(),h=r(),g=e(n(),1),_=0,v=()=>{_=Date.now()+800},y=()=>Date.now()<_;function b(e){let t=(0,m.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`flex cursor-ns-resize touch-none justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--interactive-focus-ring)]`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,h.jsx)(`div`,{className:`pointer-events-none h-1.5 w-11 rounded-full bg-[var(--interactive-border)]`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,h.jsx)(`div`,{role:`separator`,tabIndex:0,"aria-orientation":`horizontal`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}var x=100,S=.35;function C(e,t,n){let r=e.at(-1),i=e.at(-2);for(r&&i&&Math.abs(t-r.height)>2&&(t-r.height)*(r.height-i.height)<0&&e.splice(0,e.length-1),e.push({height:t,time:n});e.length>2&&(e.length>16||e[1].time<n-x);)e.shift()}function w(e,t){let n=e.at(-1);if(!n||t-n.time>=x)return 0;let r=e.find(e=>e.time>=t-x);return!r||n.time<=r.time?0:Math.max(-4,Math.min(4,(n.height-r.height)/Math.max(1,t-r.time)))}function T(e,t,n,r,i){let a=Math.abs(r)>=S&&Math.abs(i)>=8,o=n+(a?r*180:0),s=e.reduce((e,t)=>Math.abs(t.height-o)<Math.abs(e.height-o)?t:e),c=e.find(e=>e.id===t)??s;return!a||Math.abs(s.height-c.height)>1?s.id:[...e].sort((e,t)=>r>0?e.height-t.height:t.height-e.height).find(e=>r>0?e.height>c.height+1:e.height<c.height-1)?.id??s.id}function E(e,t,n){let r=e<t?t:e>n?n:e,i=e-r;return r+Math.sign(i)*48*(1-1/(1+Math.abs(i)*.55/48))}function D(e){let t=(0,m.c)(82),{surfaceRef:n,initialPoint:r,getPoints:i,minimumHeight:o,onRelease:s,onCommit:c,renderMode:l}=e,u=l===void 0?`height`:l,[h,g]=(0,p.useState)(r),[_,v]=(0,p.useState)(!1),[y,b]=(0,p.useState)(!1),x=(0,p.useRef)(r),S=(0,p.useRef)(null),D=(0,p.useRef)(null),F=(0,p.useRef)(null),I=(0,p.useRef)(null),L=(0,p.useRef)(!1),R=(0,p.useRef)(null),z;t[0]===n?z=t[1]:(z=()=>{let e=n.current;if(!e)return 0;if(!R.current)return e.getBoundingClientRect().height;let t=parseFloat(getComputedStyle(e).translate.split(` `)[1])||0;return R.current.layoutHeight-t},t[0]=n,t[1]=z);let B=a(z),V;t[2]===n?V=t[3]:(V=e=>{let t=n.current;t&&(R.current?t.style.translate=`0 ${R.current.layoutHeight-e}px`:t.style.height=`${e}px`)},t[2]=n,t[3]=V);let H=a(V),te;t[4]!==u||t[5]!==n||t[6]!==H?(te=(e,t)=>{let r=n.current;if(r){if(u===`translate`&&!R.current){let e=Math.max(...t.map(P))+144,{maxHeight:n,position:i,bottom:a,left:o,right:s}=r.style;R.current={layoutHeight:e,styles:{maxHeight:n,position:i,bottom:a,left:o,right:s}},Object.assign(r.style,{position:`absolute`,bottom:`0px`,left:`0px`,right:`0px`}),r.style.maxHeight=`none`,r.style.height=`${e}px`}r.setAttribute(`data-height-snap-active`,``),r.style.willChange=R.current?`translate`:`height`,H(e)}},t[4]=u,t[5]=n,t[6]=H,t[7]=te):te=t[7];let U=a(te),ne;t[8]===n?ne=t[9]:(ne=()=>{let e=n.current;e&&(R.current&&(e.style.translate=``,Object.assign(e.style,R.current.styles),e.style.height=``),e.style.willChange=``,e.removeAttribute(`data-height-snap-active`)),R.current=null},t[8]=n,t[9]=ne);let W=a(ne),G;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(G=()=>{D.current!==null&&cancelAnimationFrame(D.current),D.current=null,F.current=null,I.current?.cancel(),I.current=null},t[10]=G):G=t[10];let K=a(G),re;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(re=()=>{let e=S.current;S.current=null,e?.handle.hasPointerCapture?.(e.pointerId)&&e.handle.releasePointerCapture(e.pointerId)},t[11]=re):re=t[11];let q=a(re),ie;t[12]!==K||t[13]!==W||t[14]!==i||t[15]!==c||t[16]!==U||t[17]!==B||t[18]!==q||t[19]!==n||t[20]!==H?(ie=(e,t,r,a)=>{let o=r===void 0||r,s=a===void 0?0:a,l=n.current;if(!l)return;let u=t??B();K(),H(u);let p=i(),m=p.find(t=>t.id===e);if(!m)return;if(U(u,p),q(),v(!1),b(!1),x.current=e,g(e),H(m.height),c?.(e),!o||Math.abs(u-m.height)<1||typeof l.animate!=`function`||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){W();return}b(!0);let h=R.current?.layoutHeight,_=m.height-u,y=d([l],h===void 0?{height:[`${u}px`,`${m.height}px`]}:{translate:[`0 ${h-u}px`,`0 ${h-m.height}px`]},{type:f,stiffness:576,damping:48,mass:1,velocity:s*1e3*100/_,restDelta:20/Math.abs(_),restSpeed:500/Math.abs(_)});I.current=y,y.finished.catch(ee).then(()=>{I.current===y&&(I.current=null,W(),b(!1))})},t[12]=K,t[13]=W,t[14]=i,t[15]=c,t[16]=U,t[17]=B,t[18]=q,t[19]=n,t[20]=H,t[21]=ie):ie=t[21];let J=a(ie),ae;t[22]!==K||t[23]!==i||t[24]!==o||t[25]!==U||t[26]!==B||t[27]!==n||t[28]!==H?(ae=e=>{if(S.current||!e.isPrimary||e.pointerType===`mouse`&&e.button!==0||!n.current)return;let t=B();K(),H(t);let r=i();r.length&&(b(!1),S.current={pointerId:e.pointerId,startY:e.clientY,height:t,point:x.current,points:r,handle:e.currentTarget,minimum:o??Math.min(...r.map(N)),maximum:Math.max(...r.map(M)),samples:[{height:t,time:e.timeStamp}]},L.current=!1,U(t,r),v(!0),e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault())},t[22]=K,t[23]=i,t[24]=o,t[25]=U,t[26]=B,t[27]=n,t[28]=H,t[29]=ae):ae=t[29];let oe=a(ae),Y;t[30]!==u||t[31]!==H?(Y=e=>{let t=S.current;if(!t||t.pointerId!==e.pointerId)return;let n=t.startY-e.clientY;Math.abs(n)>3&&(L.current=!0),C(t.samples,t.height+n,e.timeStamp);let r=E(t.height+n,t.minimum,t.maximum);F.current=u===`height`?Math.max(t.minimum,r):r,D.current===null&&(D.current=requestAnimationFrame(()=>{D.current=null,F.current!==null&&H(F.current)})),e.preventDefault()},t[30]=u,t[31]=H,t[32]=Y):Y=t[32];let se=a(Y),ce;t[33]!==K||t[34]!==s||t[35]!==B||t[36]!==q||t[37]!==J||t[38]!==n?(ce=(e,t)=>{let r=S.current;if(!r||r.pointerId!==e.pointerId)return;let i=F.current??B(),a=r.height+r.startY-e.clientY;t||C(r.samples,a,e.timeStamp);let o=t?0:w(r.samples,e.timeStamp);if(q(),!t&&L.current&&s?.(i,o,r.height))K(),v(!1),n.current&&(n.current.style.willChange=``);else{let e=t||!L.current?r.point:T(r.points,r.point,i,o,a-r.height);J(e,i,!0,o)}e.preventDefault()},t[33]=K,t[34]=s,t[35]=B,t[36]=q,t[37]=J,t[38]=n,t[39]=ce):ce=t[39];let X=a(ce),le;t[40]!==i||t[41]!==J?(le=e=>{let t=[...i()].sort(j),n=t.find(e=>e.id===x.current);if(!n)return;let r=e>0?t.find(e=>e.height>n.height+1):t.sort(A).find(e=>e.height<n.height-1);r&&J(r.id)},t[40]=i,t[41]=J,t[42]=le):le=t[42];let Z=a(le),Q;t[43]!==i||t[44]!==J||t[45]!==Z?(Q=()=>{if(L.current){L.current=!1;return}let e=[...i()].sort(k);x.current===e.at(-1)?.id?J(e[0].id):Z(1)},t[43]=i,t[44]=J,t[45]=Z,t[46]=Q):Q=t[46];let $=a(Q),ue;t[47]!==i||t[48]!==$||t[49]!==J||t[50]!==Z?(ue=e=>{if(![`ArrowUp`,`ArrowDown`,`Home`,`End`,`Enter`,` `].includes(e.key))return;e.preventDefault();let t=[...i()].sort(O);t.length&&(e.key===`ArrowUp`?Z(1):e.key===`ArrowDown`?Z(-1):e.key===`Home`?J(t.at(-1).id):e.key===`End`?J(t[0].id):$())},t[47]=i,t[48]=$,t[49]=J,t[50]=Z,t[51]=ue):ue=t[51];let de=a(ue),fe;t[52]!==K||t[53]!==W||t[54]!==r||t[55]!==q||t[56]!==n?(fe=()=>{K(),q(),W(),x.current=r,g(r),v(!1),b(!1),L.current=!1,n.current&&(n.current.style.height=``,n.current.style.willChange=``)},t[52]=K,t[53]=W,t[54]=r,t[55]=q,t[56]=n,t[57]=fe):fe=t[57];let pe=a(fe),me,he;t[58]!==K||t[59]!==W||t[60]!==q?(me=()=>()=>{K(),q(),W()},he=[K,q,W],t[58]=K,t[59]=W,t[60]=q,t[61]=me,t[62]=he):(me=t[61],he=t[62]),(0,p.useLayoutEffect)(me,he);let ge;t[63]===X?ge=t[64]:(ge=e=>X(e,!1),t[63]=X,t[64]=ge);let _e=a(ge),ve;t[65]===X?ve=t[66]:(ve=e=>X(e,!0),t[65]=X,t[66]=ve);let ye=a(ve),be;t[67]===X?be=t[68]:(be=e=>X(e,!0),t[67]=X,t[68]=be);let xe=a(be),Se;return t[69]!==_||t[70]!==$||t[71]!==de||t[72]!==oe||t[73]!==se||t[74]!==pe||t[75]!==J||t[76]!==y||t[77]!==h||t[78]!==_e||t[79]!==ye||t[80]!==xe?(Se={snapPoint:h,dragging:_,settling:y,settleAt:J,reset:pe,handlePointerDown:oe,handlePointerMove:se,handlePointerUp:_e,handlePointerCancel:ye,handleLostPointerCapture:xe,handleClick:$,handleKeyDown:de},t[69]=_,t[70]=$,t[71]=de,t[72]=oe,t[73]=se,t[74]=pe,t[75]=J,t[76]=y,t[77]=h,t[78]=_e,t[79]=ye,t[80]=xe,t[81]=Se):Se=t[81],Se}function O(e,t){return e.height-t.height}function k(e,t){return e.height-t.height}function A(e,t){return t.height-e.height}function j(e,t){return e.height-t.height}function M(e){return e.height}function N(e){return e.height}function ee(){}function P(e){return e.height}var F=.72,I=.98,L=64,R=()=>Math.max(1,window.innerHeight),z=(e,t)=>{let n=Math.max(1,e)*F;return t==null||!Number.isFinite(t)?n:Math.min(n,Math.max(0,t))},B=e=>{let t=(0,m.c)(20),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{initialSnapPoint:r,fitContent:i,onDismiss:o,dismissThresholdPx:s}=n,c=r===void 0?F:r,l=i!==void 0&&i,u=s===void 0?L:s,d=p.useRef(null),f=p.useRef(null),h=p.useRef(c),g=o?0:void 0,_;t[2]===l?_=t[3]:(_=()=>{let e=R(),t=d.current?.parentElement?.clientHeight||e;return l&&h.current===.72&&d.current&&!d.current.hasAttribute(`data-height-snap-active`)&&(f.current=z(e,d.current.getBoundingClientRect().height)),[{id:F,height:Math.min(t,z(e,l?f.current:void 0))},{id:I,height:Math.min(t,e*I)}]},t[2]=l,t[3]=_);let v;t[4]!==u||t[5]!==l||t[6]!==o?(v=(e,t,n)=>{let r=d.current?.parentElement?.clientHeight||R(),i=Math.min(r,z(R(),l?f.current:void 0)),a=t<-.55&&n<=i+1&&e<i-8;return!o||!a&&e>i-u?!1:(o(),!0)},t[4]=u,t[5]=l,t[6]=o,t[7]=v):v=t[7];let y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{h.current=e},t[8]=y):y=t[8];let b;t[9]!==c||t[10]!==g||t[11]!==_||t[12]!==v?(b={surfaceRef:d,initialPoint:c,renderMode:`translate`,minimumHeight:g,getPoints:_,onRelease:v,onCommit:y},t[9]=c,t[10]=g,t[11]=_,t[12]=v,t[13]=b):b=t[13];let x=D(b),S;t[14]!==x||t[15]!==c?(S=()=>{f.current=null,h.current=c,x.reset()},t[14]=x,t[15]=c,t[16]=S):S=t[16];let C=a(S),w;return t[17]!==x||t[18]!==C?(w={...x,surfaceRef:d,reset:C},t[17]=x,t[18]=C,t[19]=w):w=t[19],w},V=e=>{let t=(0,m.c)(12),{controller:n,ariaLabel:r}=e,i;t[0]===n.snapPoint?i=t[1]:(i=Math.round(n.snapPoint*100),t[0]=n.snapPoint,t[1]=i);let a;return t[2]!==r||t[3]!==n.handleClick||t[4]!==n.handleKeyDown||t[5]!==n.handleLostPointerCapture||t[6]!==n.handlePointerCancel||t[7]!==n.handlePointerDown||t[8]!==n.handlePointerMove||t[9]!==n.handlePointerUp||t[10]!==i?(a=(0,h.jsx)(b,{"data-mobile-sheet-snap-handle":!0,role:`separator`,tabIndex:0,"aria-label":r,"aria-orientation":`horizontal`,"aria-valuemin":F*100,"aria-valuemax":I*100,"aria-valuenow":i,className:`flex min-h-8 cursor-ns-resize touch-none justify-center pt-2.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--interactive-focus-ring)]`,onPointerDown:n.handlePointerDown,onPointerMove:n.handlePointerMove,onPointerUp:n.handlePointerUp,onPointerCancel:n.handlePointerCancel,onLostPointerCapture:n.handleLostPointerCapture,onClick:n.handleClick,onKeyDown:n.handleKeyDown}),t[2]=r,t[3]=n.handleClick,t[4]=n.handleKeyDown,t[5]=n.handleLostPointerCapture,t[6]=n.handlePointerCancel,t[7]=n.handlePointerDown,t[8]=n.handlePointerMove,t[9]=n.handlePointerUp,t[10]=i,t[11]=a):a=t[11],a},H=new WeakMap;function te(e){H.set(e.currentTarget,!0)}function U(e){if(H.delete(e.currentTarget))return!0;if(e.detail!==0)return!1;if(typeof document>`u`)return!0;let t=document.activeElement,n=e.currentTarget;return n instanceof Node&&t instanceof Node&&n.contains(t)}function ne(e){e.target===e.currentTarget&&te(e)}function W(e){return e.target===e.currentTarget&&U(e)}var G=new class{entries=[];listeners=new Set;previousOverflow=null;getSnapshot=()=>this.entries.at(-1)?.id??null;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));add(e,t){return this.entries=[...this.entries.filter(t=>t.id!==e.id),e],this.entries.length===1&&t&&(this.previousOverflow=t.style.overflow,t.style.overflow=`hidden`),this.emit(),()=>this.remove(e.id,t)}remove(e,t){let n=this.entries.length;this.entries=this.entries.filter(t=>t.id!==e),n>0&&this.entries.length===0&&t&&this.previousOverflow!==null&&(t.style.overflow=this.previousOverflow,this.previousOverflow=null),this.emit()}closeTop(){this.entries.at(-1)?.onClose()}emit(){for(let e of this.listeners)e()}},K=(e,t)=>{let n=`flex min-h-0 flex-col bg-background shadow-none`;if(e===`page`)return`${n} h-full w-full`;let r=`${n} pwa-overlay-panel`;return t===`top`?`${r} mx-auto mb-auto max-h-[calc(100dvh-0.75rem)] w-full max-w-lg rounded-b-xl border-x border-b border-border/50`:t===`left`?`${r} h-full w-[min(86vw,24rem)] rounded-r-xl border-r border-y border-border/50`:t===`right`?`${r} ml-auto h-full w-[min(86vw,24rem)] rounded-l-xl border-l border-y border-border/50`:`${r} mx-auto mt-auto max-h-[calc(100dvh-0.75rem)] w-full max-w-lg rounded-t-2xl border-x border-t border-border/50 pb-[max(0.5rem,var(--oc-app-bottom-safe,0px),var(--oc-safe-area-bottom,env(safe-area-inset-bottom,0px)))]`},re=e=>Math.min(1,Math.max(0,Number.isFinite(e)?e:0)),q=(e,t)=>{let n=re(t),r=`${(1-n)*100}%`;return{progress:n,scrimOpacity:n,surfaceOpacity:n,surfaceTransform:e===`left`?`translate3d(-${r}, 0, 0)`:e===`right`?`translate3d(${r}, 0, 0)`:e===`top`?`translate3d(0, -${r}, 0)`:`translate3d(0, ${r}, 0)`}},ie=(e,t)=>{let n=re(t);return e===`present`?n:1-n},J=(e,t)=>e===`present`?+(t===`commit`):t===`commit`?0:1,ae=e=>+!!e,oe=`mobile-sessions`,Y=new Map,se=e=>Y.get(e)??null,ce=(e,t)=>(Y.set(e,t),()=>{Y.get(e)===t&&Y.delete(e)}),X=`.overlay-scrollbar-container`,le=1,Z=e=>e===`left`||e===`right`?`x`:`y`,Q=e=>e===`bottom`||e===`right`?1:-1,$=(e,t,n)=>{let r=Z(e)===`x`?t:n;return Math.max(0,r*Q(e))},ue=(e,t,n,r,i)=>{let a=$(e,t,n),o=Math.abs(Z(e)===`x`?n:t);return Math.hypot(t,n)>r&&a>0&&o<a*i},de=(e,t)=>Math.min(1,Math.max(0,e/Math.max(1,t))),fe=(e,t,n,r)=>Math.min(r,Math.max(n,e*t)),pe=(e,t,n,r,i)=>e>=n||e>=i&&t>=r,me=(e,t,n,r,i)=>t!==0&&n>0?t*i/n:r>80?0:e,he=(e,t,n=le)=>{if(t===`bottom`)return e.scrollTop<=n;if(t===`top`)return e.scrollTop>=e.scrollHeight-e.clientHeight-n;if(e.matches?.(`:dir(rtl)`)){let r=e.scrollWidth-e.clientWidth;return t===`right`?Math.abs(e.scrollLeft)<=n:Math.abs(e.scrollLeft)>=r-n}return t===`right`?e.scrollLeft<=n:e.scrollLeft>=e.scrollWidth-e.clientWidth-n},ge=(e,t)=>{for(let n=0;n<e.length;n+=1){let r=e.item(n);if(r?.identifier===t)return r}return null},_e=(e,t)=>{let n=window.getComputedStyle(e),r=Z(t),i=r===`x`?n.overflowX:n.overflowY,a=r===`x`?e.scrollWidth:e.scrollHeight,o=r===`x`?e.clientWidth:e.clientHeight;return(i===`auto`||i===`scroll`||i===`overlay`)&&a>o},ve=(e,t,n,r)=>{let i=t instanceof Element?t:null,a=i instanceof HTMLElement?i:i?.parentElement??null;for(;a&&e.contains(a);){if(_e(a,n))return a;if(a===e)break;a=a.parentElement}let o=i?.closest(r)??null;return o&&e.contains(o)&&_e(o,n)?o:null},ye=e=>{let t=p.useRef(e),n=p.useRef(null),r=p.useRef(null);return t.current=e,p.useCallback(e=>{if(n.current?.(),n.current=null,!e)return;let i=()=>{let e=r.current;r.current=null,e?.active&&e.controller?.finish(`cancel`)},a=(e,t,n)=>{let r=Z(e.edge)===`x`?t.clientX:t.clientY,i=n-e.lastTime,a=r-e.lastPrimary;e.velocity=me(e.velocity,a,i,n-e.lastVelocityTime,Q(e.edge)),a!==0&&i>0&&(e.lastVelocityTime=n),e.lastPrimary=r,e.lastTime=n,e.distance=$(e.edge,t.clientX-e.startX,t.clientY-e.startY)},o=n=>{i();let a=t.current;if(a.disabled||n.touches.length!==1)return;let o=n.target instanceof Element?n.target:null,s=a.reservedTargetSelector?o?.closest(a.reservedTargetSelector):null;if(s&&e.contains(s)||o?.closest(`input, textarea, select, [contenteditable=""], [contenteditable="true"], [data-mobile-sheet-no-dismiss]`))return;let c=n.touches[0],l=ve(e,n.target,a.edge,a.scrollContainerSelector??X);if(l&&!he(l,a.edge))return;let u=e.getBoundingClientRect(),d=Z(a.edge)===`x`?u.width||window.innerWidth:u.height||window.innerHeight;r.current={edge:a.edge,motionId:a.motionId,touchId:c.identifier,startX:c.clientX,startY:c.clientY,lastPrimary:Z(a.edge)===`x`?c.clientX:c.clientY,lastTime:n.timeStamp,lastVelocityTime:n.timeStamp,velocity:0,distance:0,commitDistance:fe(d,a.commitDistanceRatio??.1,a.minCommitDistance??40,a.maxCommitDistance??64),motionDistance:d,intentDistance:a.intentDistance??8,maxOffAxisRatio:a.maxOffAxisRatio??1,flingVelocity:a.flingVelocity??.65,flingMinDistance:a.flingMinDistance??12,controller:null,active:!1}},s=e=>{let n=r.current;if(!n)return;if(t.current.disabled||e.touches.length!==1){i();return}let o=ge(e.touches,n.touchId);if(!o){i();return}if(a(n,o,e.timeStamp),!n.active){if(Math.hypot(o.clientX-n.startX,o.clientY-n.startY)<=n.intentDistance)return;if(!ue(n.edge,o.clientX-n.startX,o.clientY-n.startY,n.intentDistance,n.maxOffAxisRatio)){r.current=null;return}let e=se(n.motionId);if(!e){r.current=null;return}if(!e.begin(`dismiss`)){r.current=null;return}n.active=!0,n.controller=e}n.controller?.update(de(n.distance,n.motionDistance)),e.preventDefault()},c=e=>{let t=r.current;if(!t)return;let n=ge(e.changedTouches,t.touchId);if(!n){i();return}if(r.current=null,!t.active)return;a(t,n,e.timeStamp),t.controller?.update(de(t.distance,t.motionDistance));let o=pe(t.distance,t.velocity,t.commitDistance,t.flingVelocity,t.flingMinDistance);t.controller?.finish(o?`commit`:`cancel`),e.preventDefault()},l=()=>i();e.addEventListener(`touchstart`,o,{passive:!0,capture:!0}),e.addEventListener(`touchmove`,s,{passive:!1,capture:!0}),e.addEventListener(`touchend`,c,{passive:!1,capture:!0}),e.addEventListener(`touchcancel`,l,{passive:!0,capture:!0}),n.current=()=>{i(),e.removeEventListener(`touchstart`,o,!0),e.removeEventListener(`touchmove`,s,!0),e.removeEventListener(`touchend`,c,!0),e.removeEventListener(`touchcancel`,l,!0)}},[])},be=`mobile-overlay-root`,xe=200,Se=80,Ce=`cubic-bezier(0.32, 0.72, 0, 1)`,we=`a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,Te=()=>{if(typeof document>`u`)return null;let e=document.getElementById(be);return e||(e=document.createElement(`div`),e.id=be,document.body.appendChild(e)),e},Ee=()=>typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,De=({id:e,open:t,onOpenChange:n,keepMounted:r=!1,presentation:i=`sheet`,edge:a=`bottom`,children:o,className:c,scrimClassName:l,surfaceClassName:u,surfaceElementRef:d,dismissGesture:f=!1,onExitComplete:m,onPreviewChange:_,ariaLabel:v})=>{let b=p.useRef(null),x=p.useRef(null),S=p.useRef(null),C=p.useRef(t),w=p.useRef(n),T=p.useRef(m),E=p.useRef(_),D=p.useRef(0),O=p.useRef(0),k=p.useRef(null),A=p.useRef([]),j=p.useRef(null),M=p.useRef(`standard`),N=p.useRef(`present`),ee=p.useRef(0),P=p.useRef(!1),F=p.useRef(t),I=p.useRef(!1),L=p.useRef(t),R=p.useRef(null),[z,B]=p.useState(t),[V,H]=p.useState(t),[te,U]=p.useState(`standard`),[re,oe]=p.useState(!1),Y=te===`interactive-present`,se=p.useSyncExternalStore(G.subscribe,G.getSnapshot,G.getSnapshot),X=V&&!Y&&se===e,le=ye({motionId:e,edge:a,disabled:!f,...typeof f==`object`?f:{}}),Z=p.useCallback(e=>{S.current=e,le(e),typeof d==`function`?d(e):d&&typeof d==`object`&&(d.current=e)},[le,d]),Q=p.useCallback(()=>{L.current&&(L.current=!1,H(!1),r||B(!1),T.current?.())},[r]);C.current=t,w.current=n,T.current=m,E.current=_,p.useLayoutEffect(()=>{E.current?.(V&&Y)},[V,Y]),typeof document<`u`&&!b.current&&(b.current=Te());let $=p.useCallback(e=>{let t=q(a,e);D.current=t.progress,!(!x.current||!S.current)&&(x.current.style.opacity=String(t.scrimOpacity),S.current.style.transform=t.surfaceTransform,S.current.style.opacity=String(t.surfaceOpacity))},[a]),ue=p.useCallback(()=>{k.current!==null&&window.cancelAnimationFrame(k.current),k.current=null},[]),de=p.useCallback(()=>{x.current&&(x.current.style.willChange=``),S.current&&(S.current.style.willChange=``)},[]),fe=p.useCallback((e=A.current)=>{for(let t of e)t.cancel();A.current=[]},[]),pe=p.useCallback(()=>{ue();let e=j.current;if(e){let t=e.animations[1]?.effect?.getComputedTiming().progress;$(typeof t==`number`&&Number.isFinite(t)?e.from+(e.target-e.from)*t:D.current),fe(e.animations),j.current=null}else fe();de(),oe(!1)},[$,fe,ue,de]),me=p.useCallback((e,t)=>{if(j.current?.target===e)return;pe();let n=D.current,r=x.current,i=S.current;if(oe(!0),!r||!i||Ee()||n===e){$(e),de(),oe(!1),t?.();return}let o=q(a,n),s=q(a,e);r.style.willChange=`opacity`,i.style.willChange=`transform, opacity`;let c=Math.max(Se,xe*Math.abs(e-n)),l=[r.animate([{opacity:o.scrimOpacity},{opacity:s.scrimOpacity}],{duration:c,easing:Ce,fill:`forwards`}),i.animate([{transform:o.surfaceTransform,opacity:o.surfaceOpacity},{transform:s.surfaceTransform,opacity:s.surfaceOpacity}],{duration:c,easing:Ce,fill:`forwards`})];A.current=l;let u={from:n,target:e,animations:l};j.current=u,Promise.all(l.map(e=>e.finished.catch(()=>void 0))).then(()=>{j.current===u&&($(e),fe(l),j.current=null,de(),oe(!1),t?.())})},[$,fe,de,a,pe]);if(p.useLayoutEffect(()=>{I.current=z,z&&$(O.current)},[$,z]),p.useLayoutEffect(()=>{L.current=V},[V]),p.useEffect(()=>{t&&!I.current&&(O.current=D.current,B(!0)),t&&!L.current&&(L.current=!0,H(!0)),I.current&&M.current===`standard`&&me(ae(t),()=>{!C.current&&M.current===`standard`&&Q()})},[Q,t,me]),p.useLayoutEffect(()=>{!z||M.current!==`standard`||me(+!!t,()=>{!C.current&&M.current===`standard`&&Q()})},[Q,z,t,me]),p.useEffect(()=>{if(!(!V||Y))return window.dispatchEvent(new Event(`oc:mobile-overlay-opened`)),()=>{window.dispatchEvent(new Event(`oc:mobile-overlay-closed`))}},[V,Y]),p.useEffect(()=>{if(!(!V||Y))return G.add({id:e,onClose:()=>w.current(!1)},document.body)},[V,e,Y]),p.useEffect(()=>{if(!V||Y||!X)return;let e=S.current,t=document.activeElement instanceof HTMLElement?document.activeElement:null;e?.focus({preventScroll:!0});let n=t=>{if(t.key===`Escape`&&G.closeTop(),t.key!==`Tab`||!e)return;let n=Array.from(e.querySelectorAll(we)).filter(e=>!e.closest(`[data-mobile-sheet-snap-handle]`)),r=n[0]??e,i=n.at(-1)??e;t.shiftKey&&document.activeElement===r&&(t.preventDefault(),i.focus({preventScroll:!0})),!t.shiftKey&&document.activeElement===i&&(t.preventDefault(),r.focus({preventScroll:!0}))};return document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`keydown`,n),y()||t?.focus({preventScroll:!0})}},[V,Y,X]),R.current={begin:e=>{if(e===`dismiss`&&(!L.current||M.current===`interactive-present`))return!1;pe(),ee.current+=1,P.current=!0,N.current=e;let t=e===`present`?`interactive-present`:`interactive-dismiss`;return M.current=t,U(t),oe(!0),e===`present`&&(O.current=D.current,L.current=!0,H(!0),B(!0)),!0},update:e=>{P.current&&(O.current=ie(N.current,e),k.current===null&&(k.current=window.requestAnimationFrame(()=>{k.current=null,P.current&&$(O.current)})))},finish:e=>{if(!P.current)return;P.current=!1;let t=ee.current,n=N.current,r=J(n,e);k.current!==null&&(ue(),$(O.current)),me(r,()=>{t===ee.current&&(e===`commit`&&w.current(n===`present`),n===`present`&&e===`cancel`&&!C.current&&Q(),M.current=`standard`,U(`standard`),r===0&&Q())})},interrupt:()=>{ee.current+=1,P.current=!1;let e=M.current===`interactive-present`&&!C.current;e||(M.current=`standard`,U(`standard`)),pe(),me(ae(C.current),()=>{C.current||Q(),e&&(M.current=`standard`,U(`standard`))})}},p.useLayoutEffect(()=>{let e=F.current;F.current=t,e&&!t&&M.current!==`standard`&&R.current?.interrupt()},[t]),p.useEffect(()=>{let t=ce(e,{begin:e=>R.current?.begin(e)??!1,update:e=>R.current?.update(e),finish:e=>R.current?.finish(e),interrupt:()=>R.current?.interrupt()});return()=>{t(),ue(),fe(),j.current=null,de(),R.current=null}},[fe,ue,de,e]),!z||!b.current)return null;let he=(0,h.jsx)(`div`,{ref:x,className:s(`oc-mobile-window-motion oc-keyboard-inset-surface fixed inset-0 z-[60] flex flex-col bg-[rgb(0_0_0_/_0.45)]`,re&&`oc-mobile-window-motion-active`,!V&&!Y&&`pointer-events-none invisible`,l,c),"data-mobile-overlay-active":String(V),role:Y?void 0:`dialog`,"aria-label":Y?void 0:v,"aria-modal":V&&X?`true`:void 0,"aria-hidden":Y||!V||!X||void 0,inert:Y||!V||!X||void 0,onPointerDown:ne,onClick:e=>{!V||Y||!X||W(e)&&w.current(!1)},children:(0,h.jsx)(`div`,{ref:Z,tabIndex:-1,className:s(`oc-mobile-floating-shell`,K(i,a),u),"data-oc-motion-id":e,style:{contain:`layout paint style`},onClick:e=>e.stopPropagation(),children:o})});return(0,g.createPortal)(he,b.current)},Oe=p.createContext(null),ke=e=>{let t=(0,m.c)(5),{children:n}=e,r=p.useContext(Oe);if(!r)return null;let i;t[0]===n?i=t[1]:(i=(0,h.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:n}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,g.createPortal)(i,r),t[2]=r,t[3]=i,t[4]=a):a=t[4],a},Ae=e=>{let t=(0,m.c)(46),{id:n,open:r,onOpenChange:i,title:a,leading:o,trailing:u,ariaLabel:d,closeAriaLabel:f,resizeAriaLabel:g,initiallyExpanded:_,fitContent:v,bodyClassName:y,children:b}=e,x=_!==void 0&&_,S=v!==void 0&&v,C=x?I:void 0,w;t[0]!==i||t[1]!==r?(w=r?()=>i(!1):void 0,t[0]=i,t[1]=r,t[2]=w):w=t[2];let T;t[3]!==S||t[4]!==C||t[5]!==w?(T={initialSnapPoint:C,fitContent:S,onDismiss:w},t[3]=S,t[4]=C,t[5]=w,t[6]=T):T=t[6];let E=B(T),[D,O]=p.useState(null),k=a!=null||o!=null||u!=null,A=E.snapPoint===I,j=A||!S,M;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(M={reservedTargetSelector:`[data-mobile-sheet-snap-handle]`},t[7]=M):M=t[7];let N=A?`h-[98dvh] max-h-[98dvh]`:S?`h-auto max-h-[72dvh]`:`h-[72dvh] max-h-[98dvh]`,ee=E.surfaceRef,P=E.reset,F=j&&`flex-1`,L;t[8]===F?L=t[9]:(L=s(`flex min-h-0 flex-col`,F),t[8]=F,t[9]=L);let R;t[10]!==g||t[11]!==E?(R=(0,h.jsx)(V,{controller:E,ariaLabel:g}),t[10]=g,t[11]=E,t[12]=R):R=t[12];let z;t[13]!==f||t[14]!==S||t[15]!==k||t[16]!==o||t[17]!==i||t[18]!==a||t[19]!==u?(z=k?(0,h.jsxs)(`div`,{className:S?`flex min-h-9 items-center gap-2 px-4 pb-1`:`flex min-h-10 items-center gap-2 px-4 pb-2`,children:[o?(0,h.jsx)(`div`,{className:`flex shrink-0 items-center`,children:o}):null,(0,h.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),u?(0,h.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:u}):null,(0,h.jsx)(`div`,{ref:O,className:`contents`}),(0,h.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>i(!1),"aria-label":f,className:`shrink-0 text-muted-foreground`,style:{touchAction:`manipulation`},children:(0,h.jsx)(l,{name:`close`,className:`size-5`})})]}):null,t[13]=f,t[14]=S,t[15]=k,t[16]=o,t[17]=i,t[18]=a,t[19]=u,t[20]=z):z=t[20];let H;t[21]!==R||t[22]!==z?(H=(0,h.jsxs)(`div`,{className:`shrink-0`,children:[R,z]}),t[21]=R,t[22]=z,t[23]=H):H=t[23];let te=j&&`flex-1`,U;t[24]!==y||t[25]!==te?(U=s(`flex min-h-0 flex-col overflow-hidden`,te,y),t[24]=y,t[25]=te,t[26]=U):U=t[26];let ne;t[27]!==b||t[28]!==U?(ne=(0,h.jsx)(`div`,{className:U,"data-page-scroll-lock":`true`,children:b}),t[27]=b,t[28]=U,t[29]=ne):ne=t[29];let W;t[30]!==L||t[31]!==H||t[32]!==ne?(W=(0,h.jsxs)(`div`,{className:L,children:[H,ne]}),t[30]=L,t[31]=H,t[32]=ne,t[33]=W):W=t[33];let G;t[34]!==d||t[35]!==n||t[36]!==i||t[37]!==r||t[38]!==E.reset||t[39]!==E.surfaceRef||t[40]!==W||t[41]!==N?(G=(0,h.jsx)(De,{id:n,open:r,onOpenChange:i,presentation:`sheet`,edge:`bottom`,dismissGesture:M,ariaLabel:d,surfaceClassName:N,surfaceElementRef:ee,onExitComplete:P,children:W}),t[34]=d,t[35]=n,t[36]=i,t[37]=r,t[38]=E.reset,t[39]=E.surfaceRef,t[40]=W,t[41]=N,t[42]=G):G=t[42];let K;return t[43]!==D||t[44]!==G?(K=(0,h.jsx)(Oe.Provider,{value:D,children:G}),t[43]=D,t[44]=G,t[45]=K):K=t[45],K};function je(e,t){let n=(0,m.c)(3),r;return n[0]!==e||n[1]!==t?(r=n=>{[e,t].forEach(e=>{typeof e==`function`?e(n):e&&typeof e==`object`&&(e.current=n)})},n[0]=e,n[1]=t,n[2]=r):r=n[2],r}var Me=p.forwardRef((e,t)=>{let n=(0,m.c)(28),{as:r,orientation:i,offset:a,size:o,isEnabled:s,hideTopShadow:c,hideBottomShadow:l,observeMutations:u,onVisibilityChange:d,style:f,className:g,children:_,...v}=e,y=r===void 0?`div`:r,b=i===void 0?`vertical`:i,x=a===void 0?0:a,S=o===void 0?48:o,C=s===void 0||s,w=c!==void 0&&c,T=l!==void 0&&l,E=u===void 0||u,D=p.useRef(null),O=p.useRef(`none`),k=v[`data-scroll-shadow`];delete v[`data-scroll-shadow`];let A=f,j;n[0]!==S||n[1]!==A?(j={...A},j[`--scroll-shadow-size`]=`${S}px`,n[0]=S,n[1]=A,n[2]=j):j=n[2];let M=j,N=Ne,ee=Pe,P;n[3]!==T||n[4]!==w||n[5]!==C||n[6]!==x||n[7]!==d||n[8]!==b?(P=()=>{let e=D.current;if(!e)return;if(!C){ee(e),O.current!==`none`&&(O.current=`none`,d?.(`none`));return}let t=b===`vertical`?e.scrollTop>x+1:e.scrollLeft>x+1,n=b===`vertical`?e.scrollHeight-(e.scrollTop+e.clientHeight)>x+1:e.scrollWidth-(e.scrollLeft+e.clientWidth)>x+1,r=w&&b===`vertical`?!1:t;T&&b===`vertical`&&(n=!1),N(e,r,n,b===`vertical`?`top`:`left`,b===`vertical`?`bottom`:`right`);let i=r&&n?`both`:r?b===`vertical`?`top`:`left`:n?b===`vertical`?`bottom`:`right`:`none`;i!==O.current&&(O.current=i,d?.(i))},n[3]=T,n[4]=w,n[5]=C,n[6]=x,n[7]=d,n[8]=b,n[9]=P):P=n[9];let F=P,I,L;n[10]!==F||n[11]!==C?(I=()=>{C||F()},L=[F,C],n[10]=F,n[11]=C,n[12]=I,n[13]=L):(I=n[12],L=n[13]),p.useLayoutEffect(I,L);let R,z;n[14]!==F||n[15]!==C||n[16]!==E?(R=()=>{let e=D.current;if(!e||!C)return;let t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,F()}))},r=n,i=typeof ResizeObserver<`u`?new ResizeObserver(n):null,a=E&&typeof MutationObserver<`u`?new MutationObserver(n):null;return F(),e.addEventListener(`scroll`,r,{passive:!0}),i?.observe(e),a?.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t!==null&&cancelAnimationFrame(t),e.removeEventListener(`scroll`,r),i?.disconnect(),a?.disconnect()}},z=[F,C,E],n[14]=F,n[15]=C,n[16]=E,n[17]=R,n[18]=z):(R=n[17],z=n[18]),p.useEffect(R,z);let B=je(D,t),V=k??!0,H;return n[19]!==y||n[20]!==_||n[21]!==g||n[22]!==B||n[23]!==M||n[24]!==b||n[25]!==v||n[26]!==V?(H=(0,h.jsx)(y,{...v,ref:B,className:g,"data-orientation":b,"data-scroll-shadow":V,style:M,children:_}),n[19]=y,n[20]=_,n[21]=g,n[22]=B,n[23]=M,n[24]=b,n[25]=v,n[26]=V,n[27]=H):H=n[27],H});Me.displayName=`ScrollShadow`;function Ne(e,t,n,r,i){let a=`${r}${i.charAt(0).toUpperCase()}${i.slice(1)}Scroll`;t&&n?(e.dataset[a]=`true`,e.removeAttribute(`data-${r}-scroll`),e.removeAttribute(`data-${i}-scroll`)):(e.dataset[`${r}Scroll`]=String(t),e.dataset[`${i}Scroll`]=String(n),e.removeAttribute(`data-${r}-${i}-scroll`))}function Pe(e){[`top`,`bottom`,`top-bottom`,`left`,`right`,`left-right`].forEach(t=>{e.removeAttribute(`data-${t}-scroll`)})}var Fe=p.forwardRef((e,t)=>{let n=(0,m.c)(45),r,i,a,o,c,l,d,f,g,_,v,y,b,x,S,C;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],c=n[5],l=n[6],d=n[7],f=n[8],g=n[9],_=n[10],v=n[11],y=n[12],b=n[13],x=n[14],S=n[15],C=n[16]):({className:i,outerClassName:c,children:r,style:g,minThumbSize:o,hideDelayMs:a,as:_,scrollbarClassName:f,disableHorizontal:v,observeMutations:y,fillContainer:b,preventOverscroll:x,useScrollShadow:S,scrollShadowSize:d,userIntentOnly:C,...l}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=c,n[6]=l,n[7]=d,n[8]=f,n[9]=g,n[10]=_,n[11]=v,n[12]=y,n[13]=b,n[14]=x,n[15]=S,n[16]=C);let w=_===void 0?`div`:_,T=v!==void 0&&v,E=y===void 0||y,D=b===void 0||b,O=x!==void 0&&x,k=S!==void 0&&S,A=C!==void 0&&C,j=p.useRef(null),M,N;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>j.current,N=[],n[17]=M,n[18]=N):(M=n[17],N=n[18]),p.useImperativeHandle(t,M,N);let ee=O&&`overscroll-none`,P;n[19]!==c||n[20]!==ee?(P=s(`relative flex flex-col min-h-0 w-full overflow-hidden`,ee,c),n[19]=c,n[20]=ee,n[21]=P):P=n[21];let F;n[22]!==w||n[23]!==r||n[24]!==i||n[25]!==T||n[26]!==D||n[27]!==E||n[28]!==O||n[29]!==l||n[30]!==d||n[31]!==g||n[32]!==k?(F=k?(0,h.jsx)(Me,{as:w,ref:j,size:d,className:s(`overlay-scrollbar-target overlay-scrollbar-container`,O&&`overscroll-none`,D?`flex-1 min-h-0 w-full`:`flex-none w-full h-auto`,T?`overflow-y-auto overflow-x-hidden`:`overflow-auto`,i),style:g,observeMutations:E,...l,children:r}):(0,h.jsx)(w,{ref:j,className:s(`overlay-scrollbar-target overlay-scrollbar-container`,O&&`overscroll-none`,D?`flex-1 min-h-0 w-full`:`flex-none w-full h-auto`,T?`overflow-y-auto overflow-x-hidden`:`overflow-auto`,i),style:g,...l,children:r}),n[22]=w,n[23]=r,n[24]=i,n[25]=T,n[26]=D,n[27]=E,n[28]=O,n[29]=l,n[30]=d,n[31]=g,n[32]=k,n[33]=F):F=n[33];let I;n[34]!==T||n[35]!==a||n[36]!==o||n[37]!==E||n[38]!==f||n[39]!==A?(I=(0,h.jsx)(u,{containerRef:j,minThumbSize:o,hideDelayMs:a,className:f,disableHorizontal:T,observeMutations:E,userIntentOnly:A}),n[34]=T,n[35]=a,n[36]=o,n[37]=E,n[38]=f,n[39]=A,n[40]=I):I=n[40];let L;return n[41]!==P||n[42]!==F||n[43]!==I?(L=(0,h.jsxs)(`div`,{className:P,children:[F,I]}),n[41]=P,n[42]=F,n[43]=I,n[44]=L):L=n[44],L});Fe.displayName=`ScrollableOverlay`;function Ie(e){let t=(0,m.c)(4),{onResizeStart:n,ariaLabel:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,h.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":!0,children:(0,h.jsx)(`path`,{d:`M9.11111 2L2 9.11111M10 6.44444L6.44444 10`,className:`stroke-muted-foreground`,strokeLinecap:`round`})}),t[0]=i):i=t[0];let a;return t[1]!==r||t[2]!==n?(a=(0,h.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,"aria-label":r,onPointerDown:n,className:`pointer-events-auto -m-2 flex size-7 cursor-ns-resize items-end justify-end p-2 touch-none select-none`,children:i}),t[1]=r,t[2]=n,t[3]=a):a=t[3],a}var Le=p.forwardRef((e,t)=>{let n=(0,m.c)(64),r,i,a,c,l,u,d,f,g,_,v,y,b,x;n[0]===e?(r=n[1],i=n[2],a=n[3],c=n[4],l=n[5],u=n[6],d=n[7],f=n[8],g=n[9],_=n[10],v=n[11],y=n[12],b=n[13],x=n[14]):({className:r,outerClassName:d,scrollbarClassName:_,fillContainer:y,useScrollShadow:b,scrollShadowSize:g,hasError:l,resizedHeight:i,onResizeHeightChange:u,disabled:a,simple:v,embedded:x,endSlot:c,...f}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=c,n[5]=l,n[6]=u,n[7]=d,n[8]=f,n[9]=g,n[10]=_,n[11]=v,n[12]=y,n[13]=b,n[14]=x);let S=y!==void 0&&y,C=b!==void 0&&b,w=x!==void 0&&x,{t:T}=o(),E=p.useRef(null),D=p.useRef(null),[O,k]=p.useState(null),A=i??O,j;n[15]===u?j=n[16]:(j=e=>{let t=E.current;if(!t)return;D.current={startY:e.clientY,startHeight:t.getBoundingClientRect().height};let n=e.currentTarget;n.setPointerCapture(e.pointerId);let r=e=>{let t=D.current;if(!t)return;let n=t.startHeight+(e.clientY-t.startY),r=Math.max(82,n);u?u(r):k(r)},i=()=>{D.current=null,n.removeEventListener(`pointermove`,r),n.removeEventListener(`pointerup`,i),n.removeEventListener(`pointercancel`,i)};n.addEventListener(`pointermove`,r),n.addEventListener(`pointerup`,i),n.addEventListener(`pointercancel`,i),e.preventDefault()},n[15]=u,n[16]=j);let M=j,N;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{if(e.target.closest(`textarea, button, [role="separator"]`))return;let t=E.current?.querySelector(`textarea`);t&&document.activeElement!==t&&(e.preventDefault(),t.focus())},n[17]=N):N=n[17];let ee=N;if(v){let e=t,i=S?`[field-sizing:fixed]`:`field-sizing-content`,o;n[18]!==r||n[19]!==i?(o=s(`block w-full appearance-none resize-none bg-transparent text-foreground typography-markdown outline-none`,`px-3 py-2 md:typography-ui-label`,`placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,i,r),n[18]=r,n[19]=i,n[20]=o):o=n[20];let c;return n[21]!==a||n[22]!==S||n[23]!==d||n[24]!==f||n[25]!==g||n[26]!==_||n[27]!==e||n[28]!==o||n[29]!==C?(c=(0,h.jsx)(Fe,{as:`textarea`,ref:e,disableHorizontal:!0,fillContainer:S,useScrollShadow:C,scrollShadowSize:g,outerClassName:d,scrollbarClassName:_,className:o,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,disabled:a,...f}),n[21]=a,n[22]=S,n[23]=d,n[24]=f,n[25]=g,n[26]=_,n[27]=e,n[28]=o,n[29]=C,n[30]=c):c=n[30],c}let P;n[31]===A?P=n[32]:(P=A===null?void 0:{height:`${A}px`},n[31]=A,n[32]=P);let F;if(n[33]!==w||n[34]!==l||n[35]!==d){let e;n[37]===l?e=n[38]:(e=l&&[`ring-[var(--status-error)]`,`focus-within:ring-2 focus-within:ring-[var(--status-error)]`],n[37]=l,n[38]=e);let t;n[39]===w?t=n[40]:(t=w&&[`rounded-none bg-transparent ring-0`,`hover:[&:not(:focus-within)]:bg-transparent`,`has-[[disabled]]:bg-transparent`],n[39]=w,n[40]=t),F=s(`group/textarea relative flex w-full flex-col rounded-[var(--radius-xl)] bg-[var(--surface-elevated)] pb-2.5`,`ring-1 ring-inset ring-border/60 transition duration-200 ease-out`,`hover:[&:not(:focus-within)]:bg-[var(--surface-subtle)]`,`has-[[disabled]]:pointer-events-none has-[[disabled]]:bg-[var(--surface-subtle)] has-[[disabled]]:ring-transparent`,!l&&[`hover:[&:not(:focus-within)]:ring-transparent`,`focus-within:ring-2 focus-within:ring-[var(--interactive-focus-ring)]`],e,t,d),n[33]=w,n[34]=l,n[35]=d,n[36]=F}else F=n[36];let I;n[41]!==r||n[42]!==a?(I=s(`block w-full flex-1 min-h-0 appearance-none resize-none bg-transparent text-foreground typography-markdown outline-none`,`min-h-[82px] pl-3 pr-2.5 pt-2.5 md:typography-ui-label`,`focus-visible:outline-none disabled:cursor-not-allowed`,!a&&[`placeholder:select-none placeholder:text-muted-foreground placeholder:transition placeholder:duration-200 placeholder:ease-out`,`group-hover/textarea:placeholder:text-foreground/80`,`focus:placeholder:text-foreground/80`],a&&`text-muted-foreground/60 placeholder:text-muted-foreground/60`,r),n[41]=r,n[42]=a,n[43]=I):I=n[43];let L;n[44]!==a||n[45]!==f||n[46]!==t||n[47]!==I?(L=(0,h.jsx)(`textarea`,{ref:t,className:I,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,disabled:a,...f}),n[44]=a,n[45]=f,n[46]=t,n[47]=I,n[48]=L):L=n[48];let R;n[49]===T?R=n[50]:(R=T(`textarea.resizeHandleAria`),n[49]=T,n[50]=R);let z;n[51]!==M||n[52]!==R?(z=(0,h.jsx)(Ie,{onResizeStart:M,ariaLabel:R}),n[51]=M,n[52]=R,n[53]=z):z=n[53];let B;n[54]!==c||n[55]!==z?(B=(0,h.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5 pl-3 pr-2.5`,children:[c,z]}),n[54]=c,n[55]=z,n[56]=B):B=n[56];let V;n[57]!==B||n[58]!==L?(V=(0,h.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col gap-2`,children:[L,B]}),n[57]=B,n[58]=L,n[59]=V):V=n[59];let H;return n[60]!==V||n[61]!==P||n[62]!==F?(H=(0,h.jsx)(`div`,{ref:E,onPointerDown:ee,style:P,className:F,children:V}),n[60]=V,n[61]=P,n[62]=F,n[63]=H):H=n[63],H});Le.displayName=`Textarea`;export{b as C,D as S,v as T,ne as _,ke as a,I as b,$ as c,ue as d,pe as f,te as g,U as h,Ae as i,de as l,se as m,Fe as n,De as o,oe as p,Me as r,fe as s,Le as t,me as u,W as v,y as w,B as x,V as y};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,nt as n,rt as r}from"./vendor-base-ui-CdzJ6My_.js";import{n as i}from"./vendor-react-BP2cRVqX.js";import{n as a}from"./vendor-reactuses-core-BpfIZ1tg.js";import{f as o,r as s,t as c}from"./button-BupmKVUs.js";import{n as l}from"./Icon-B4xKSuz3.js";import{t as u}from"./OverlayScrollbar-DIsrS93m.js";import{a as d,s as f}from"./vendor-framer-motion-D-oiwsxL.js";var p=e(t(),1),m=i(),h=r(),g=e(n(),1),_=0,v=()=>{_=Date.now()+800},y=()=>Date.now()<_;function b(e){let t=(0,m.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`flex cursor-ns-resize touch-none justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--interactive-focus-ring)]`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,h.jsx)(`div`,{className:`pointer-events-none h-1.5 w-11 rounded-full bg-[var(--interactive-border)]`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,h.jsx)(`div`,{role:`separator`,tabIndex:0,"aria-orientation":`horizontal`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}var x=100,S=.35;function C(e,t,n){let r=e.at(-1),i=e.at(-2);for(r&&i&&Math.abs(t-r.height)>2&&(t-r.height)*(r.height-i.height)<0&&e.splice(0,e.length-1),e.push({height:t,time:n});e.length>2&&(e.length>16||e[1].time<n-x);)e.shift()}function w(e,t){let n=e.at(-1);if(!n||t-n.time>=x)return 0;let r=e.find(e=>e.time>=t-x);return!r||n.time<=r.time?0:Math.max(-4,Math.min(4,(n.height-r.height)/Math.max(1,t-r.time)))}function T(e,t,n,r,i){let a=Math.abs(r)>=S&&Math.abs(i)>=8,o=n+(a?r*180:0),s=e.reduce((e,t)=>Math.abs(t.height-o)<Math.abs(e.height-o)?t:e),c=e.find(e=>e.id===t)??s;return!a||Math.abs(s.height-c.height)>1?s.id:[...e].sort((e,t)=>r>0?e.height-t.height:t.height-e.height).find(e=>r>0?e.height>c.height+1:e.height<c.height-1)?.id??s.id}function E(e,t,n){let r=e<t?t:e>n?n:e,i=e-r;return r+Math.sign(i)*48*(1-1/(1+Math.abs(i)*.55/48))}function D(e){let t=(0,m.c)(82),{surfaceRef:n,initialPoint:r,getPoints:i,minimumHeight:o,onRelease:s,onCommit:c,renderMode:l}=e,u=l===void 0?`height`:l,[h,g]=(0,p.useState)(r),[_,v]=(0,p.useState)(!1),[y,b]=(0,p.useState)(!1),x=(0,p.useRef)(r),S=(0,p.useRef)(null),D=(0,p.useRef)(null),F=(0,p.useRef)(null),I=(0,p.useRef)(null),L=(0,p.useRef)(!1),R=(0,p.useRef)(null),z;t[0]===n?z=t[1]:(z=()=>{let e=n.current;if(!e)return 0;if(!R.current)return e.getBoundingClientRect().height;let t=parseFloat(getComputedStyle(e).translate.split(` `)[1])||0;return R.current.layoutHeight-t},t[0]=n,t[1]=z);let B=a(z),V;t[2]===n?V=t[3]:(V=e=>{let t=n.current;t&&(R.current?t.style.translate=`0 ${R.current.layoutHeight-e}px`:t.style.height=`${e}px`)},t[2]=n,t[3]=V);let H=a(V),te;t[4]!==u||t[5]!==n||t[6]!==H?(te=(e,t)=>{let r=n.current;if(r){if(u===`translate`&&!R.current){let e=Math.max(...t.map(P))+144,{maxHeight:n,position:i,bottom:a,left:o,right:s}=r.style;R.current={layoutHeight:e,styles:{maxHeight:n,position:i,bottom:a,left:o,right:s}},Object.assign(r.style,{position:`absolute`,bottom:`0px`,left:`0px`,right:`0px`}),r.style.maxHeight=`none`,r.style.height=`${e}px`}r.setAttribute(`data-height-snap-active`,``),r.style.willChange=R.current?`translate`:`height`,H(e)}},t[4]=u,t[5]=n,t[6]=H,t[7]=te):te=t[7];let U=a(te),ne;t[8]===n?ne=t[9]:(ne=()=>{let e=n.current;e&&(R.current&&(e.style.translate=``,Object.assign(e.style,R.current.styles),e.style.height=``),e.style.willChange=``,e.removeAttribute(`data-height-snap-active`)),R.current=null},t[8]=n,t[9]=ne);let W=a(ne),G;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(G=()=>{D.current!==null&&cancelAnimationFrame(D.current),D.current=null,F.current=null,I.current?.cancel(),I.current=null},t[10]=G):G=t[10];let K=a(G),re;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(re=()=>{let e=S.current;S.current=null,e?.handle.hasPointerCapture?.(e.pointerId)&&e.handle.releasePointerCapture(e.pointerId)},t[11]=re):re=t[11];let q=a(re),ie;t[12]!==K||t[13]!==W||t[14]!==i||t[15]!==c||t[16]!==U||t[17]!==B||t[18]!==q||t[19]!==n||t[20]!==H?(ie=(e,t,r,a)=>{let o=r===void 0||r,s=a===void 0?0:a,l=n.current;if(!l)return;let u=t??B();K(),H(u);let p=i(),m=p.find(t=>t.id===e);if(!m)return;if(U(u,p),q(),v(!1),b(!1),x.current=e,g(e),H(m.height),c?.(e),!o||Math.abs(u-m.height)<1||typeof l.animate!=`function`||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){W();return}b(!0);let h=R.current?.layoutHeight,_=m.height-u,y=d([l],h===void 0?{height:[`${u}px`,`${m.height}px`]}:{translate:[`0 ${h-u}px`,`0 ${h-m.height}px`]},{type:f,stiffness:576,damping:48,mass:1,velocity:s*1e3*100/_,restDelta:20/Math.abs(_),restSpeed:500/Math.abs(_)});I.current=y,y.finished.catch(ee).then(()=>{I.current===y&&(I.current=null,W(),b(!1))})},t[12]=K,t[13]=W,t[14]=i,t[15]=c,t[16]=U,t[17]=B,t[18]=q,t[19]=n,t[20]=H,t[21]=ie):ie=t[21];let J=a(ie),ae;t[22]!==K||t[23]!==i||t[24]!==o||t[25]!==U||t[26]!==B||t[27]!==n||t[28]!==H?(ae=e=>{if(S.current||!e.isPrimary||e.pointerType===`mouse`&&e.button!==0||!n.current)return;let t=B();K(),H(t);let r=i();r.length&&(b(!1),S.current={pointerId:e.pointerId,startY:e.clientY,height:t,point:x.current,points:r,handle:e.currentTarget,minimum:o??Math.min(...r.map(N)),maximum:Math.max(...r.map(M)),samples:[{height:t,time:e.timeStamp}]},L.current=!1,U(t,r),v(!0),e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault())},t[22]=K,t[23]=i,t[24]=o,t[25]=U,t[26]=B,t[27]=n,t[28]=H,t[29]=ae):ae=t[29];let oe=a(ae),Y;t[30]!==u||t[31]!==H?(Y=e=>{let t=S.current;if(!t||t.pointerId!==e.pointerId)return;let n=t.startY-e.clientY;Math.abs(n)>3&&(L.current=!0),C(t.samples,t.height+n,e.timeStamp);let r=E(t.height+n,t.minimum,t.maximum);F.current=u===`height`?Math.max(t.minimum,r):r,D.current===null&&(D.current=requestAnimationFrame(()=>{D.current=null,F.current!==null&&H(F.current)})),e.preventDefault()},t[30]=u,t[31]=H,t[32]=Y):Y=t[32];let se=a(Y),ce;t[33]!==K||t[34]!==s||t[35]!==B||t[36]!==q||t[37]!==J||t[38]!==n?(ce=(e,t)=>{let r=S.current;if(!r||r.pointerId!==e.pointerId)return;let i=F.current??B(),a=r.height+r.startY-e.clientY;t||C(r.samples,a,e.timeStamp);let o=t?0:w(r.samples,e.timeStamp);if(q(),!t&&L.current&&s?.(i,o,r.height))K(),v(!1),n.current&&(n.current.style.willChange=``);else{let e=t||!L.current?r.point:T(r.points,r.point,i,o,a-r.height);J(e,i,!0,o)}e.preventDefault()},t[33]=K,t[34]=s,t[35]=B,t[36]=q,t[37]=J,t[38]=n,t[39]=ce):ce=t[39];let X=a(ce),le;t[40]!==i||t[41]!==J?(le=e=>{let t=[...i()].sort(j),n=t.find(e=>e.id===x.current);if(!n)return;let r=e>0?t.find(e=>e.height>n.height+1):t.sort(A).find(e=>e.height<n.height-1);r&&J(r.id)},t[40]=i,t[41]=J,t[42]=le):le=t[42];let Z=a(le),Q;t[43]!==i||t[44]!==J||t[45]!==Z?(Q=()=>{if(L.current){L.current=!1;return}let e=[...i()].sort(k);x.current===e.at(-1)?.id?J(e[0].id):Z(1)},t[43]=i,t[44]=J,t[45]=Z,t[46]=Q):Q=t[46];let $=a(Q),ue;t[47]!==i||t[48]!==$||t[49]!==J||t[50]!==Z?(ue=e=>{if(![`ArrowUp`,`ArrowDown`,`Home`,`End`,`Enter`,` `].includes(e.key))return;e.preventDefault();let t=[...i()].sort(O);t.length&&(e.key===`ArrowUp`?Z(1):e.key===`ArrowDown`?Z(-1):e.key===`Home`?J(t.at(-1).id):e.key===`End`?J(t[0].id):$())},t[47]=i,t[48]=$,t[49]=J,t[50]=Z,t[51]=ue):ue=t[51];let de=a(ue),fe;t[52]!==K||t[53]!==W||t[54]!==r||t[55]!==q||t[56]!==n?(fe=()=>{K(),q(),W(),x.current=r,g(r),v(!1),b(!1),L.current=!1,n.current&&(n.current.style.height=``,n.current.style.willChange=``)},t[52]=K,t[53]=W,t[54]=r,t[55]=q,t[56]=n,t[57]=fe):fe=t[57];let pe=a(fe),me,he;t[58]!==K||t[59]!==W||t[60]!==q?(me=()=>()=>{K(),q(),W()},he=[K,q,W],t[58]=K,t[59]=W,t[60]=q,t[61]=me,t[62]=he):(me=t[61],he=t[62]),(0,p.useLayoutEffect)(me,he);let ge;t[63]===X?ge=t[64]:(ge=e=>X(e,!1),t[63]=X,t[64]=ge);let _e=a(ge),ve;t[65]===X?ve=t[66]:(ve=e=>X(e,!0),t[65]=X,t[66]=ve);let ye=a(ve),be;t[67]===X?be=t[68]:(be=e=>X(e,!0),t[67]=X,t[68]=be);let xe=a(be),Se;return t[69]!==_||t[70]!==$||t[71]!==de||t[72]!==oe||t[73]!==se||t[74]!==pe||t[75]!==J||t[76]!==y||t[77]!==h||t[78]!==_e||t[79]!==ye||t[80]!==xe?(Se={snapPoint:h,dragging:_,settling:y,settleAt:J,reset:pe,handlePointerDown:oe,handlePointerMove:se,handlePointerUp:_e,handlePointerCancel:ye,handleLostPointerCapture:xe,handleClick:$,handleKeyDown:de},t[69]=_,t[70]=$,t[71]=de,t[72]=oe,t[73]=se,t[74]=pe,t[75]=J,t[76]=y,t[77]=h,t[78]=_e,t[79]=ye,t[80]=xe,t[81]=Se):Se=t[81],Se}function O(e,t){return e.height-t.height}function k(e,t){return e.height-t.height}function A(e,t){return t.height-e.height}function j(e,t){return e.height-t.height}function M(e){return e.height}function N(e){return e.height}function ee(){}function P(e){return e.height}var F=.72,I=.98,L=64,R=()=>Math.max(1,window.innerHeight),z=(e,t)=>{let n=Math.max(1,e)*F;return t==null||!Number.isFinite(t)?n:Math.min(n,Math.max(0,t))},B=e=>{let t=(0,m.c)(20),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{initialSnapPoint:r,fitContent:i,onDismiss:o,dismissThresholdPx:s}=n,c=r===void 0?F:r,l=i!==void 0&&i,u=s===void 0?L:s,d=p.useRef(null),f=p.useRef(null),h=p.useRef(c),g=o?0:void 0,_;t[2]===l?_=t[3]:(_=()=>{let e=R(),t=d.current?.parentElement?.clientHeight||e;return l&&h.current===.72&&d.current&&!d.current.hasAttribute(`data-height-snap-active`)&&(f.current=z(e,d.current.getBoundingClientRect().height)),[{id:F,height:Math.min(t,z(e,l?f.current:void 0))},{id:I,height:Math.min(t,e*I)}]},t[2]=l,t[3]=_);let v;t[4]!==u||t[5]!==l||t[6]!==o?(v=(e,t,n)=>{let r=d.current?.parentElement?.clientHeight||R(),i=Math.min(r,z(R(),l?f.current:void 0)),a=t<-.55&&n<=i+1&&e<i-8;return!o||!a&&e>i-u?!1:(o(),!0)},t[4]=u,t[5]=l,t[6]=o,t[7]=v):v=t[7];let y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{h.current=e},t[8]=y):y=t[8];let b;t[9]!==c||t[10]!==g||t[11]!==_||t[12]!==v?(b={surfaceRef:d,initialPoint:c,renderMode:`translate`,minimumHeight:g,getPoints:_,onRelease:v,onCommit:y},t[9]=c,t[10]=g,t[11]=_,t[12]=v,t[13]=b):b=t[13];let x=D(b),S;t[14]!==x||t[15]!==c?(S=()=>{f.current=null,h.current=c,x.reset()},t[14]=x,t[15]=c,t[16]=S):S=t[16];let C=a(S),w;return t[17]!==x||t[18]!==C?(w={...x,surfaceRef:d,reset:C},t[17]=x,t[18]=C,t[19]=w):w=t[19],w},V=e=>{let t=(0,m.c)(12),{controller:n,ariaLabel:r}=e,i;t[0]===n.snapPoint?i=t[1]:(i=Math.round(n.snapPoint*100),t[0]=n.snapPoint,t[1]=i);let a;return t[2]!==r||t[3]!==n.handleClick||t[4]!==n.handleKeyDown||t[5]!==n.handleLostPointerCapture||t[6]!==n.handlePointerCancel||t[7]!==n.handlePointerDown||t[8]!==n.handlePointerMove||t[9]!==n.handlePointerUp||t[10]!==i?(a=(0,h.jsx)(b,{"data-mobile-sheet-snap-handle":!0,role:`separator`,tabIndex:0,"aria-label":r,"aria-orientation":`horizontal`,"aria-valuemin":F*100,"aria-valuemax":I*100,"aria-valuenow":i,className:`flex min-h-8 cursor-ns-resize touch-none justify-center pt-2.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--interactive-focus-ring)]`,onPointerDown:n.handlePointerDown,onPointerMove:n.handlePointerMove,onPointerUp:n.handlePointerUp,onPointerCancel:n.handlePointerCancel,onLostPointerCapture:n.handleLostPointerCapture,onClick:n.handleClick,onKeyDown:n.handleKeyDown}),t[2]=r,t[3]=n.handleClick,t[4]=n.handleKeyDown,t[5]=n.handleLostPointerCapture,t[6]=n.handlePointerCancel,t[7]=n.handlePointerDown,t[8]=n.handlePointerMove,t[9]=n.handlePointerUp,t[10]=i,t[11]=a):a=t[11],a},H=new WeakMap;function te(e){H.set(e.currentTarget,!0)}function U(e){if(H.delete(e.currentTarget))return!0;if(e.detail!==0)return!1;if(typeof document>`u`)return!0;let t=document.activeElement,n=e.currentTarget;return n instanceof Node&&t instanceof Node&&n.contains(t)}function ne(e){e.target===e.currentTarget&&te(e)}function W(e){return e.target===e.currentTarget&&U(e)}var G=new class{entries=[];listeners=new Set;previousOverflow=null;getSnapshot=()=>this.entries.at(-1)?.id??null;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));add(e,t){return this.entries=[...this.entries.filter(t=>t.id!==e.id),e],this.entries.length===1&&t&&(this.previousOverflow=t.style.overflow,t.style.overflow=`hidden`),this.emit(),()=>this.remove(e.id,t)}remove(e,t){let n=this.entries.length;this.entries=this.entries.filter(t=>t.id!==e),n>0&&this.entries.length===0&&t&&this.previousOverflow!==null&&(t.style.overflow=this.previousOverflow,this.previousOverflow=null),this.emit()}closeTop(){this.entries.at(-1)?.onClose()}emit(){for(let e of this.listeners)e()}},K=(e,t)=>{let n=`flex min-h-0 flex-col bg-background shadow-none`;if(e===`page`)return`${n} h-full w-full`;let r=`${n} pwa-overlay-panel`;return t===`top`?`${r} mx-auto mb-auto max-h-[calc(100dvh-0.75rem)] w-full max-w-lg rounded-b-xl border-x border-b border-border/50`:t===`left`?`${r} h-full w-[min(86vw,24rem)] rounded-r-xl border-r border-y border-border/50`:t===`right`?`${r} ml-auto h-full w-[min(86vw,24rem)] rounded-l-xl border-l border-y border-border/50`:`${r} mx-auto mt-auto max-h-[calc(100dvh-0.75rem)] w-full max-w-lg rounded-t-2xl border-x border-t border-border/50 pb-[max(0.5rem,var(--oc-app-bottom-safe,0px),var(--oc-safe-area-bottom,env(safe-area-inset-bottom,0px)))]`},re=e=>Math.min(1,Math.max(0,Number.isFinite(e)?e:0)),q=(e,t)=>{let n=re(t),r=`${(1-n)*100}%`;return{progress:n,scrimOpacity:n,surfaceOpacity:n,surfaceTransform:e===`left`?`translate3d(-${r}, 0, 0)`:e===`right`?`translate3d(${r}, 0, 0)`:e===`top`?`translate3d(0, -${r}, 0)`:`translate3d(0, ${r}, 0)`}},ie=(e,t)=>{let n=re(t);return e===`present`?n:1-n},J=(e,t)=>e===`present`?+(t===`commit`):t===`commit`?0:1,ae=e=>+!!e,oe=`mobile-sessions`,Y=new Map,se=e=>Y.get(e)??null,ce=(e,t)=>(Y.set(e,t),()=>{Y.get(e)===t&&Y.delete(e)}),X=`.overlay-scrollbar-container`,le=1,Z=e=>e===`left`||e===`right`?`x`:`y`,Q=e=>e===`bottom`||e===`right`?1:-1,$=(e,t,n)=>{let r=Z(e)===`x`?t:n;return Math.max(0,r*Q(e))},ue=(e,t,n,r,i)=>{let a=$(e,t,n),o=Math.abs(Z(e)===`x`?n:t);return Math.hypot(t,n)>r&&a>0&&o<a*i},de=(e,t)=>Math.min(1,Math.max(0,e/Math.max(1,t))),fe=(e,t,n,r)=>Math.min(r,Math.max(n,e*t)),pe=(e,t,n,r,i)=>e>=n||e>=i&&t>=r,me=(e,t,n,r,i)=>t!==0&&n>0?t*i/n:r>80?0:e,he=(e,t,n=le)=>{if(t===`bottom`)return e.scrollTop<=n;if(t===`top`)return e.scrollTop>=e.scrollHeight-e.clientHeight-n;if(e.matches?.(`:dir(rtl)`)){let r=e.scrollWidth-e.clientWidth;return t===`right`?Math.abs(e.scrollLeft)<=n:Math.abs(e.scrollLeft)>=r-n}return t===`right`?e.scrollLeft<=n:e.scrollLeft>=e.scrollWidth-e.clientWidth-n},ge=(e,t)=>{for(let n=0;n<e.length;n+=1){let r=e.item(n);if(r?.identifier===t)return r}return null},_e=(e,t)=>{let n=window.getComputedStyle(e),r=Z(t),i=r===`x`?n.overflowX:n.overflowY,a=r===`x`?e.scrollWidth:e.scrollHeight,o=r===`x`?e.clientWidth:e.clientHeight;return(i===`auto`||i===`scroll`||i===`overlay`)&&a>o},ve=(e,t,n,r)=>{let i=t instanceof Element?t:null,a=i instanceof HTMLElement?i:i?.parentElement??null;for(;a&&e.contains(a);){if(_e(a,n))return a;if(a===e)break;a=a.parentElement}let o=i?.closest(r)??null;return o&&e.contains(o)&&_e(o,n)?o:null},ye=e=>{let t=p.useRef(e),n=p.useRef(null),r=p.useRef(null);return t.current=e,p.useCallback(e=>{if(n.current?.(),n.current=null,!e)return;let i=()=>{let e=r.current;r.current=null,e?.active&&e.controller?.finish(`cancel`)},a=(e,t,n)=>{let r=Z(e.edge)===`x`?t.clientX:t.clientY,i=n-e.lastTime,a=r-e.lastPrimary;e.velocity=me(e.velocity,a,i,n-e.lastVelocityTime,Q(e.edge)),a!==0&&i>0&&(e.lastVelocityTime=n),e.lastPrimary=r,e.lastTime=n,e.distance=$(e.edge,t.clientX-e.startX,t.clientY-e.startY)},o=n=>{i();let a=t.current;if(a.disabled||n.touches.length!==1)return;let o=n.target instanceof Element?n.target:null,s=a.reservedTargetSelector?o?.closest(a.reservedTargetSelector):null;if(s&&e.contains(s)||o?.closest(`input, textarea, select, [contenteditable=""], [contenteditable="true"], [data-mobile-sheet-no-dismiss]`))return;let c=n.touches[0],l=ve(e,n.target,a.edge,a.scrollContainerSelector??X);if(l&&!he(l,a.edge))return;let u=e.getBoundingClientRect(),d=Z(a.edge)===`x`?u.width||window.innerWidth:u.height||window.innerHeight;r.current={edge:a.edge,motionId:a.motionId,touchId:c.identifier,startX:c.clientX,startY:c.clientY,lastPrimary:Z(a.edge)===`x`?c.clientX:c.clientY,lastTime:n.timeStamp,lastVelocityTime:n.timeStamp,velocity:0,distance:0,commitDistance:fe(d,a.commitDistanceRatio??.1,a.minCommitDistance??40,a.maxCommitDistance??64),motionDistance:d,intentDistance:a.intentDistance??8,maxOffAxisRatio:a.maxOffAxisRatio??1,flingVelocity:a.flingVelocity??.65,flingMinDistance:a.flingMinDistance??12,controller:null,active:!1}},s=e=>{let n=r.current;if(!n)return;if(t.current.disabled||e.touches.length!==1){i();return}let o=ge(e.touches,n.touchId);if(!o){i();return}if(a(n,o,e.timeStamp),!n.active){if(Math.hypot(o.clientX-n.startX,o.clientY-n.startY)<=n.intentDistance)return;if(!ue(n.edge,o.clientX-n.startX,o.clientY-n.startY,n.intentDistance,n.maxOffAxisRatio)){r.current=null;return}let e=se(n.motionId);if(!e){r.current=null;return}if(!e.begin(`dismiss`)){r.current=null;return}n.active=!0,n.controller=e}n.controller?.update(de(n.distance,n.motionDistance)),e.preventDefault()},c=e=>{let t=r.current;if(!t)return;let n=ge(e.changedTouches,t.touchId);if(!n){i();return}if(r.current=null,!t.active)return;a(t,n,e.timeStamp),t.controller?.update(de(t.distance,t.motionDistance));let o=pe(t.distance,t.velocity,t.commitDistance,t.flingVelocity,t.flingMinDistance);t.controller?.finish(o?`commit`:`cancel`),e.preventDefault()},l=()=>i();e.addEventListener(`touchstart`,o,{passive:!0,capture:!0}),e.addEventListener(`touchmove`,s,{passive:!1,capture:!0}),e.addEventListener(`touchend`,c,{passive:!1,capture:!0}),e.addEventListener(`touchcancel`,l,{passive:!0,capture:!0}),n.current=()=>{i(),e.removeEventListener(`touchstart`,o,!0),e.removeEventListener(`touchmove`,s,!0),e.removeEventListener(`touchend`,c,!0),e.removeEventListener(`touchcancel`,l,!0)}},[])},be=`mobile-overlay-root`,xe=200,Se=80,Ce=`cubic-bezier(0.32, 0.72, 0, 1)`,we=`a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,Te=()=>{if(typeof document>`u`)return null;let e=document.getElementById(be);return e||(e=document.createElement(`div`),e.id=be,document.body.appendChild(e)),e},Ee=()=>typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,De=({id:e,open:t,onOpenChange:n,keepMounted:r=!1,presentation:i=`sheet`,edge:a=`bottom`,children:o,className:c,scrimClassName:l,surfaceClassName:u,surfaceElementRef:d,dismissGesture:f=!1,onExitComplete:m,onPreviewChange:_,ariaLabel:v})=>{let b=p.useRef(null),x=p.useRef(null),S=p.useRef(null),C=p.useRef(t),w=p.useRef(n),T=p.useRef(m),E=p.useRef(_),D=p.useRef(0),O=p.useRef(0),k=p.useRef(null),A=p.useRef([]),j=p.useRef(null),M=p.useRef(`standard`),N=p.useRef(`present`),ee=p.useRef(0),P=p.useRef(!1),F=p.useRef(t),I=p.useRef(!1),L=p.useRef(t),R=p.useRef(null),[z,B]=p.useState(t),[V,H]=p.useState(t),[te,U]=p.useState(`standard`),[re,oe]=p.useState(!1),Y=te===`interactive-present`,se=p.useSyncExternalStore(G.subscribe,G.getSnapshot,G.getSnapshot),X=V&&!Y&&se===e,le=ye({motionId:e,edge:a,disabled:!f,...typeof f==`object`?f:{}}),Z=p.useCallback(e=>{S.current=e,le(e),typeof d==`function`?d(e):d&&typeof d==`object`&&(d.current=e)},[le,d]),Q=p.useCallback(()=>{L.current&&(L.current=!1,H(!1),r||B(!1),T.current?.())},[r]);C.current=t,w.current=n,T.current=m,E.current=_,p.useLayoutEffect(()=>{E.current?.(V&&Y)},[V,Y]),typeof document<`u`&&!b.current&&(b.current=Te());let $=p.useCallback(e=>{let t=q(a,e);D.current=t.progress,!(!x.current||!S.current)&&(x.current.style.opacity=String(t.scrimOpacity),S.current.style.transform=t.surfaceTransform,S.current.style.opacity=String(t.surfaceOpacity))},[a]),ue=p.useCallback(()=>{k.current!==null&&window.cancelAnimationFrame(k.current),k.current=null},[]),de=p.useCallback(()=>{x.current&&(x.current.style.willChange=``),S.current&&(S.current.style.willChange=``)},[]),fe=p.useCallback((e=A.current)=>{for(let t of e)t.cancel();A.current=[]},[]),pe=p.useCallback(()=>{ue();let e=j.current;if(e){let t=e.animations[1]?.effect?.getComputedTiming().progress;$(typeof t==`number`&&Number.isFinite(t)?e.from+(e.target-e.from)*t:D.current),fe(e.animations),j.current=null}else fe();de(),oe(!1)},[$,fe,ue,de]),me=p.useCallback((e,t)=>{if(j.current?.target===e)return;pe();let n=D.current,r=x.current,i=S.current;if(oe(!0),!r||!i||Ee()||n===e){$(e),de(),oe(!1),t?.();return}let o=q(a,n),s=q(a,e);r.style.willChange=`opacity`,i.style.willChange=`transform, opacity`;let c=Math.max(Se,xe*Math.abs(e-n)),l=[r.animate([{opacity:o.scrimOpacity},{opacity:s.scrimOpacity}],{duration:c,easing:Ce,fill:`forwards`}),i.animate([{transform:o.surfaceTransform,opacity:o.surfaceOpacity},{transform:s.surfaceTransform,opacity:s.surfaceOpacity}],{duration:c,easing:Ce,fill:`forwards`})];A.current=l;let u={from:n,target:e,animations:l};j.current=u,Promise.all(l.map(e=>e.finished.catch(()=>void 0))).then(()=>{j.current===u&&($(e),fe(l),j.current=null,de(),oe(!1),t?.())})},[$,fe,de,a,pe]);if(p.useLayoutEffect(()=>{I.current=z,z&&$(O.current)},[$,z]),p.useLayoutEffect(()=>{L.current=V},[V]),p.useEffect(()=>{t&&!I.current&&(O.current=D.current,B(!0)),t&&!L.current&&(L.current=!0,H(!0)),I.current&&M.current===`standard`&&me(ae(t),()=>{!C.current&&M.current===`standard`&&Q()})},[Q,t,me]),p.useLayoutEffect(()=>{!z||M.current!==`standard`||me(+!!t,()=>{!C.current&&M.current===`standard`&&Q()})},[Q,z,t,me]),p.useEffect(()=>{if(!(!V||Y))return window.dispatchEvent(new Event(`oc:mobile-overlay-opened`)),()=>{window.dispatchEvent(new Event(`oc:mobile-overlay-closed`))}},[V,Y]),p.useEffect(()=>{if(!(!V||Y))return G.add({id:e,onClose:()=>w.current(!1)},document.body)},[V,e,Y]),p.useEffect(()=>{if(!V||Y||!X)return;let e=S.current,t=document.activeElement instanceof HTMLElement?document.activeElement:null;e?.focus({preventScroll:!0});let n=t=>{if(t.key===`Escape`&&G.closeTop(),t.key!==`Tab`||!e)return;let n=Array.from(e.querySelectorAll(we)).filter(e=>!e.closest(`[data-mobile-sheet-snap-handle]`)),r=n[0]??e,i=n.at(-1)??e;t.shiftKey&&document.activeElement===r&&(t.preventDefault(),i.focus({preventScroll:!0})),!t.shiftKey&&document.activeElement===i&&(t.preventDefault(),r.focus({preventScroll:!0}))};return document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`keydown`,n),y()||t?.focus({preventScroll:!0})}},[V,Y,X]),R.current={begin:e=>{if(e===`dismiss`&&(!L.current||M.current===`interactive-present`))return!1;pe(),ee.current+=1,P.current=!0,N.current=e;let t=e===`present`?`interactive-present`:`interactive-dismiss`;return M.current=t,U(t),oe(!0),e===`present`&&(O.current=D.current,L.current=!0,H(!0),B(!0)),!0},update:e=>{P.current&&(O.current=ie(N.current,e),k.current===null&&(k.current=window.requestAnimationFrame(()=>{k.current=null,P.current&&$(O.current)})))},finish:e=>{if(!P.current)return;P.current=!1;let t=ee.current,n=N.current,r=J(n,e);k.current!==null&&(ue(),$(O.current)),me(r,()=>{t===ee.current&&(e===`commit`&&w.current(n===`present`),n===`present`&&e===`cancel`&&!C.current&&Q(),M.current=`standard`,U(`standard`),r===0&&Q())})},interrupt:()=>{ee.current+=1,P.current=!1;let e=M.current===`interactive-present`&&!C.current;e||(M.current=`standard`,U(`standard`)),pe(),me(ae(C.current),()=>{C.current||Q(),e&&(M.current=`standard`,U(`standard`))})}},p.useLayoutEffect(()=>{let e=F.current;F.current=t,e&&!t&&M.current!==`standard`&&R.current?.interrupt()},[t]),p.useEffect(()=>{let t=ce(e,{begin:e=>R.current?.begin(e)??!1,update:e=>R.current?.update(e),finish:e=>R.current?.finish(e),interrupt:()=>R.current?.interrupt()});return()=>{t(),ue(),fe(),j.current=null,de(),R.current=null}},[fe,ue,de,e]),!z||!b.current)return null;let he=(0,h.jsx)(`div`,{ref:x,className:s(`oc-mobile-window-motion oc-keyboard-inset-surface fixed inset-0 z-[60] flex flex-col bg-[rgb(0_0_0_/_0.45)]`,re&&`oc-mobile-window-motion-active`,!V&&!Y&&`pointer-events-none invisible`,l,c),"data-mobile-overlay-active":String(V),role:Y?void 0:`dialog`,"aria-label":Y?void 0:v,"aria-modal":V&&X?`true`:void 0,"aria-hidden":Y||!V||!X||void 0,inert:Y||!V||!X||void 0,onPointerDown:ne,onClick:e=>{!V||Y||!X||W(e)&&w.current(!1)},children:(0,h.jsx)(`div`,{ref:Z,tabIndex:-1,className:s(`oc-mobile-floating-shell`,K(i,a),u),"data-oc-motion-id":e,style:{contain:`layout paint style`},onClick:e=>e.stopPropagation(),children:o})});return(0,g.createPortal)(he,b.current)},Oe=p.createContext(null),ke=e=>{let t=(0,m.c)(5),{children:n}=e,r=p.useContext(Oe);if(!r)return null;let i;t[0]===n?i=t[1]:(i=(0,h.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:n}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,g.createPortal)(i,r),t[2]=r,t[3]=i,t[4]=a):a=t[4],a},Ae=e=>{let t=(0,m.c)(46),{id:n,open:r,onOpenChange:i,title:a,leading:o,trailing:u,ariaLabel:d,closeAriaLabel:f,resizeAriaLabel:g,initiallyExpanded:_,fitContent:v,bodyClassName:y,children:b}=e,x=_!==void 0&&_,S=v!==void 0&&v,C=x?I:void 0,w;t[0]!==i||t[1]!==r?(w=r?()=>i(!1):void 0,t[0]=i,t[1]=r,t[2]=w):w=t[2];let T;t[3]!==S||t[4]!==C||t[5]!==w?(T={initialSnapPoint:C,fitContent:S,onDismiss:w},t[3]=S,t[4]=C,t[5]=w,t[6]=T):T=t[6];let E=B(T),[D,O]=p.useState(null),k=a!=null||o!=null||u!=null,A=E.snapPoint===I,j=A||!S,M;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(M={reservedTargetSelector:`[data-mobile-sheet-snap-handle]`},t[7]=M):M=t[7];let N=A?`h-[98dvh] max-h-[98dvh]`:S?`h-auto max-h-[72dvh]`:`h-[72dvh] max-h-[98dvh]`,ee=E.surfaceRef,P=E.reset,F=j&&`flex-1`,L;t[8]===F?L=t[9]:(L=s(`flex min-h-0 flex-col`,F),t[8]=F,t[9]=L);let R;t[10]!==g||t[11]!==E?(R=(0,h.jsx)(V,{controller:E,ariaLabel:g}),t[10]=g,t[11]=E,t[12]=R):R=t[12];let z;t[13]!==f||t[14]!==S||t[15]!==k||t[16]!==o||t[17]!==i||t[18]!==a||t[19]!==u?(z=k?(0,h.jsxs)(`div`,{className:S?`flex min-h-9 items-center gap-2 px-4 pb-1`:`flex min-h-10 items-center gap-2 px-4 pb-2`,children:[o?(0,h.jsx)(`div`,{className:`flex shrink-0 items-center`,children:o}):null,(0,h.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),u?(0,h.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:u}):null,(0,h.jsx)(`div`,{ref:O,className:`contents`}),(0,h.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>i(!1),"aria-label":f,className:`shrink-0 text-muted-foreground`,style:{touchAction:`manipulation`},children:(0,h.jsx)(l,{name:`close`,className:`size-5`})})]}):null,t[13]=f,t[14]=S,t[15]=k,t[16]=o,t[17]=i,t[18]=a,t[19]=u,t[20]=z):z=t[20];let H;t[21]!==R||t[22]!==z?(H=(0,h.jsxs)(`div`,{className:`shrink-0`,children:[R,z]}),t[21]=R,t[22]=z,t[23]=H):H=t[23];let te=j&&`flex-1`,U;t[24]!==y||t[25]!==te?(U=s(`flex min-h-0 flex-col overflow-hidden`,te,y),t[24]=y,t[25]=te,t[26]=U):U=t[26];let ne;t[27]!==b||t[28]!==U?(ne=(0,h.jsx)(`div`,{className:U,"data-page-scroll-lock":`true`,children:b}),t[27]=b,t[28]=U,t[29]=ne):ne=t[29];let W;t[30]!==L||t[31]!==H||t[32]!==ne?(W=(0,h.jsxs)(`div`,{className:L,children:[H,ne]}),t[30]=L,t[31]=H,t[32]=ne,t[33]=W):W=t[33];let G;t[34]!==d||t[35]!==n||t[36]!==i||t[37]!==r||t[38]!==E.reset||t[39]!==E.surfaceRef||t[40]!==W||t[41]!==N?(G=(0,h.jsx)(De,{id:n,open:r,onOpenChange:i,presentation:`sheet`,edge:`bottom`,dismissGesture:M,ariaLabel:d,surfaceClassName:N,surfaceElementRef:ee,onExitComplete:P,children:W}),t[34]=d,t[35]=n,t[36]=i,t[37]=r,t[38]=E.reset,t[39]=E.surfaceRef,t[40]=W,t[41]=N,t[42]=G):G=t[42];let K;return t[43]!==D||t[44]!==G?(K=(0,h.jsx)(Oe.Provider,{value:D,children:G}),t[43]=D,t[44]=G,t[45]=K):K=t[45],K};function je(e,t){let n=(0,m.c)(3),r;return n[0]!==e||n[1]!==t?(r=n=>{[e,t].forEach(e=>{typeof e==`function`?e(n):e&&typeof e==`object`&&(e.current=n)})},n[0]=e,n[1]=t,n[2]=r):r=n[2],r}var Me=p.forwardRef((e,t)=>{let n=(0,m.c)(28),{as:r,orientation:i,offset:a,size:o,isEnabled:s,hideTopShadow:c,hideBottomShadow:l,observeMutations:u,onVisibilityChange:d,style:f,className:g,children:_,...v}=e,y=r===void 0?`div`:r,b=i===void 0?`vertical`:i,x=a===void 0?0:a,S=o===void 0?48:o,C=s===void 0||s,w=c!==void 0&&c,T=l!==void 0&&l,E=u===void 0||u,D=p.useRef(null),O=p.useRef(`none`),k=v[`data-scroll-shadow`];delete v[`data-scroll-shadow`];let A=f,j;n[0]!==S||n[1]!==A?(j={...A},j[`--scroll-shadow-size`]=`${S}px`,n[0]=S,n[1]=A,n[2]=j):j=n[2];let M=j,N=Ne,ee=Pe,P;n[3]!==T||n[4]!==w||n[5]!==C||n[6]!==x||n[7]!==d||n[8]!==b?(P=()=>{let e=D.current;if(!e)return;if(!C){ee(e),O.current!==`none`&&(O.current=`none`,d?.(`none`));return}let t=b===`vertical`?e.scrollTop>x+1:e.scrollLeft>x+1,n=b===`vertical`?e.scrollHeight-(e.scrollTop+e.clientHeight)>x+1:e.scrollWidth-(e.scrollLeft+e.clientWidth)>x+1,r=w&&b===`vertical`?!1:t;T&&b===`vertical`&&(n=!1),N(e,r,n,b===`vertical`?`top`:`left`,b===`vertical`?`bottom`:`right`);let i=r&&n?`both`:r?b===`vertical`?`top`:`left`:n?b===`vertical`?`bottom`:`right`:`none`;i!==O.current&&(O.current=i,d?.(i))},n[3]=T,n[4]=w,n[5]=C,n[6]=x,n[7]=d,n[8]=b,n[9]=P):P=n[9];let F=P,I,L;n[10]!==F||n[11]!==C?(I=()=>{C||F()},L=[F,C],n[10]=F,n[11]=C,n[12]=I,n[13]=L):(I=n[12],L=n[13]),p.useLayoutEffect(I,L);let R,z;n[14]!==F||n[15]!==C||n[16]!==E?(R=()=>{let e=D.current;if(!e||!C)return;let t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,F()}))},r=n,i=typeof ResizeObserver<`u`?new ResizeObserver(n):null,a=E&&typeof MutationObserver<`u`?new MutationObserver(n):null;return F(),e.addEventListener(`scroll`,r,{passive:!0}),i?.observe(e),a?.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t!==null&&cancelAnimationFrame(t),e.removeEventListener(`scroll`,r),i?.disconnect(),a?.disconnect()}},z=[F,C,E],n[14]=F,n[15]=C,n[16]=E,n[17]=R,n[18]=z):(R=n[17],z=n[18]),p.useEffect(R,z);let B=je(D,t),V=k??!0,H;return n[19]!==y||n[20]!==_||n[21]!==g||n[22]!==B||n[23]!==M||n[24]!==b||n[25]!==v||n[26]!==V?(H=(0,h.jsx)(y,{...v,ref:B,className:g,"data-orientation":b,"data-scroll-shadow":V,style:M,children:_}),n[19]=y,n[20]=_,n[21]=g,n[22]=B,n[23]=M,n[24]=b,n[25]=v,n[26]=V,n[27]=H):H=n[27],H});Me.displayName=`ScrollShadow`;function Ne(e,t,n,r,i){let a=`${r}${i.charAt(0).toUpperCase()}${i.slice(1)}Scroll`;t&&n?(e.dataset[a]=`true`,e.removeAttribute(`data-${r}-scroll`),e.removeAttribute(`data-${i}-scroll`)):(e.dataset[`${r}Scroll`]=String(t),e.dataset[`${i}Scroll`]=String(n),e.removeAttribute(`data-${r}-${i}-scroll`))}function Pe(e){[`top`,`bottom`,`top-bottom`,`left`,`right`,`left-right`].forEach(t=>{e.removeAttribute(`data-${t}-scroll`)})}var Fe=p.forwardRef((e,t)=>{let n=(0,m.c)(45),r,i,a,o,c,l,d,f,g,_,v,y,b,x,S,C;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],c=n[5],l=n[6],d=n[7],f=n[8],g=n[9],_=n[10],v=n[11],y=n[12],b=n[13],x=n[14],S=n[15],C=n[16]):({className:i,outerClassName:c,children:r,style:g,minThumbSize:o,hideDelayMs:a,as:_,scrollbarClassName:f,disableHorizontal:v,observeMutations:y,fillContainer:b,preventOverscroll:x,useScrollShadow:S,scrollShadowSize:d,userIntentOnly:C,...l}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=c,n[6]=l,n[7]=d,n[8]=f,n[9]=g,n[10]=_,n[11]=v,n[12]=y,n[13]=b,n[14]=x,n[15]=S,n[16]=C);let w=_===void 0?`div`:_,T=v!==void 0&&v,E=y===void 0||y,D=b===void 0||b,O=x!==void 0&&x,k=S!==void 0&&S,A=C!==void 0&&C,j=p.useRef(null),M,N;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>j.current,N=[],n[17]=M,n[18]=N):(M=n[17],N=n[18]),p.useImperativeHandle(t,M,N);let ee=O&&`overscroll-none`,P;n[19]!==c||n[20]!==ee?(P=s(`relative flex flex-col min-h-0 w-full overflow-hidden`,ee,c),n[19]=c,n[20]=ee,n[21]=P):P=n[21];let F;n[22]!==w||n[23]!==r||n[24]!==i||n[25]!==T||n[26]!==D||n[27]!==E||n[28]!==O||n[29]!==l||n[30]!==d||n[31]!==g||n[32]!==k?(F=k?(0,h.jsx)(Me,{as:w,ref:j,size:d,className:s(`overlay-scrollbar-target overlay-scrollbar-container`,O&&`overscroll-none`,D?`flex-1 min-h-0 w-full`:`flex-none w-full h-auto`,T?`overflow-y-auto overflow-x-hidden`:`overflow-auto`,i),style:g,observeMutations:E,...l,children:r}):(0,h.jsx)(w,{ref:j,className:s(`overlay-scrollbar-target overlay-scrollbar-container`,O&&`overscroll-none`,D?`flex-1 min-h-0 w-full`:`flex-none w-full h-auto`,T?`overflow-y-auto overflow-x-hidden`:`overflow-auto`,i),style:g,...l,children:r}),n[22]=w,n[23]=r,n[24]=i,n[25]=T,n[26]=D,n[27]=E,n[28]=O,n[29]=l,n[30]=d,n[31]=g,n[32]=k,n[33]=F):F=n[33];let I;n[34]!==T||n[35]!==a||n[36]!==o||n[37]!==E||n[38]!==f||n[39]!==A?(I=(0,h.jsx)(u,{containerRef:j,minThumbSize:o,hideDelayMs:a,className:f,disableHorizontal:T,observeMutations:E,userIntentOnly:A}),n[34]=T,n[35]=a,n[36]=o,n[37]=E,n[38]=f,n[39]=A,n[40]=I):I=n[40];let L;return n[41]!==P||n[42]!==F||n[43]!==I?(L=(0,h.jsxs)(`div`,{className:P,children:[F,I]}),n[41]=P,n[42]=F,n[43]=I,n[44]=L):L=n[44],L});Fe.displayName=`ScrollableOverlay`;function Ie(e){let t=(0,m.c)(4),{onResizeStart:n,ariaLabel:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,h.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":!0,children:(0,h.jsx)(`path`,{d:`M9.11111 2L2 9.11111M10 6.44444L6.44444 10`,className:`stroke-muted-foreground`,strokeLinecap:`round`})}),t[0]=i):i=t[0];let a;return t[1]!==r||t[2]!==n?(a=(0,h.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,"aria-label":r,onPointerDown:n,className:`pointer-events-auto -m-2 flex size-7 cursor-ns-resize items-end justify-end p-2 touch-none select-none`,children:i}),t[1]=r,t[2]=n,t[3]=a):a=t[3],a}var Le=p.forwardRef((e,t)=>{let n=(0,m.c)(64),r,i,a,c,l,u,d,f,g,_,v,y,b,x;n[0]===e?(r=n[1],i=n[2],a=n[3],c=n[4],l=n[5],u=n[6],d=n[7],f=n[8],g=n[9],_=n[10],v=n[11],y=n[12],b=n[13],x=n[14]):({className:r,outerClassName:d,scrollbarClassName:_,fillContainer:y,useScrollShadow:b,scrollShadowSize:g,hasError:l,resizedHeight:i,onResizeHeightChange:u,disabled:a,simple:v,embedded:x,endSlot:c,...f}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=c,n[5]=l,n[6]=u,n[7]=d,n[8]=f,n[9]=g,n[10]=_,n[11]=v,n[12]=y,n[13]=b,n[14]=x);let S=y!==void 0&&y,C=b!==void 0&&b,w=x!==void 0&&x,{t:T}=o(),E=p.useRef(null),D=p.useRef(null),[O,k]=p.useState(null),A=i??O,j;n[15]===u?j=n[16]:(j=e=>{let t=E.current;if(!t)return;D.current={startY:e.clientY,startHeight:t.getBoundingClientRect().height};let n=e.currentTarget;n.setPointerCapture(e.pointerId);let r=e=>{let t=D.current;if(!t)return;let n=t.startHeight+(e.clientY-t.startY),r=Math.max(82,n);u?u(r):k(r)},i=()=>{D.current=null,n.removeEventListener(`pointermove`,r),n.removeEventListener(`pointerup`,i),n.removeEventListener(`pointercancel`,i)};n.addEventListener(`pointermove`,r),n.addEventListener(`pointerup`,i),n.addEventListener(`pointercancel`,i),e.preventDefault()},n[15]=u,n[16]=j);let M=j,N;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{if(e.target.closest(`textarea, button, [role="separator"]`))return;let t=E.current?.querySelector(`textarea`);t&&document.activeElement!==t&&(e.preventDefault(),t.focus())},n[17]=N):N=n[17];let ee=N;if(v){let e=t,i=S?`[field-sizing:fixed]`:`field-sizing-content`,o;n[18]!==r||n[19]!==i?(o=s(`block w-full appearance-none resize-none bg-transparent text-foreground typography-markdown outline-none`,`px-3 py-2 md:typography-ui-label`,`placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,i,r),n[18]=r,n[19]=i,n[20]=o):o=n[20];let c;return n[21]!==a||n[22]!==S||n[23]!==d||n[24]!==f||n[25]!==g||n[26]!==_||n[27]!==e||n[28]!==o||n[29]!==C?(c=(0,h.jsx)(Fe,{as:`textarea`,ref:e,disableHorizontal:!0,fillContainer:S,useScrollShadow:C,scrollShadowSize:g,outerClassName:d,scrollbarClassName:_,className:o,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,disabled:a,...f}),n[21]=a,n[22]=S,n[23]=d,n[24]=f,n[25]=g,n[26]=_,n[27]=e,n[28]=o,n[29]=C,n[30]=c):c=n[30],c}let P;n[31]===A?P=n[32]:(P=A===null?void 0:{height:`${A}px`},n[31]=A,n[32]=P);let F;if(n[33]!==w||n[34]!==l||n[35]!==d){let e;n[37]===l?e=n[38]:(e=l&&[`ring-[var(--status-error)]`,`focus-within:ring-2 focus-within:ring-[var(--status-error)]`],n[37]=l,n[38]=e);let t;n[39]===w?t=n[40]:(t=w&&[`rounded-none bg-transparent ring-0`,`hover:[&:not(:focus-within)]:bg-transparent`,`has-[[disabled]]:bg-transparent`],n[39]=w,n[40]=t),F=s(`group/textarea relative flex w-full flex-col rounded-[var(--radius-xl)] bg-[var(--surface-elevated)] pb-2.5`,`ring-1 ring-inset ring-border/60 transition duration-200 ease-out`,`hover:[&:not(:focus-within)]:bg-[var(--surface-subtle)]`,`has-[[disabled]]:pointer-events-none has-[[disabled]]:bg-[var(--surface-subtle)] has-[[disabled]]:ring-transparent`,!l&&[`hover:[&:not(:focus-within)]:ring-transparent`,`focus-within:ring-2 focus-within:ring-[var(--interactive-focus-ring)]`],e,t,d),n[33]=w,n[34]=l,n[35]=d,n[36]=F}else F=n[36];let I;n[41]!==r||n[42]!==a?(I=s(`block w-full flex-1 min-h-0 appearance-none resize-none bg-transparent text-foreground typography-markdown outline-none`,`min-h-[82px] pl-3 pr-2.5 pt-2.5 md:typography-ui-label`,`focus-visible:outline-none disabled:cursor-not-allowed`,!a&&[`placeholder:select-none placeholder:text-muted-foreground placeholder:transition placeholder:duration-200 placeholder:ease-out`,`group-hover/textarea:placeholder:text-foreground/80`,`focus:placeholder:text-foreground/80`],a&&`text-muted-foreground/60 placeholder:text-muted-foreground/60`,r),n[41]=r,n[42]=a,n[43]=I):I=n[43];let L;n[44]!==a||n[45]!==f||n[46]!==t||n[47]!==I?(L=(0,h.jsx)(`textarea`,{ref:t,className:I,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,disabled:a,...f}),n[44]=a,n[45]=f,n[46]=t,n[47]=I,n[48]=L):L=n[48];let R;n[49]===T?R=n[50]:(R=T(`textarea.resizeHandleAria`),n[49]=T,n[50]=R);let z;n[51]!==M||n[52]!==R?(z=(0,h.jsx)(Ie,{onResizeStart:M,ariaLabel:R}),n[51]=M,n[52]=R,n[53]=z):z=n[53];let B;n[54]!==c||n[55]!==z?(B=(0,h.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5 pl-3 pr-2.5`,children:[c,z]}),n[54]=c,n[55]=z,n[56]=B):B=n[56];let V;n[57]!==B||n[58]!==L?(V=(0,h.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col gap-2`,children:[L,B]}),n[57]=B,n[58]=L,n[59]=V):V=n[59];let H;return n[60]!==V||n[61]!==P||n[62]!==F?(H=(0,h.jsx)(`div`,{ref:E,onPointerDown:ee,style:P,className:F,children:V}),n[60]=V,n[61]=P,n[62]=F,n[63]=H):H=n[63],H});Le.displayName=`Textarea`;export{b as C,D as S,v as T,ne as _,ke as a,I as b,$ as c,ue as d,pe as f,te as g,U as h,Ae as i,de as l,se as m,Fe as n,De as o,oe as p,Me as r,fe as s,Le as t,me as u,W as v,y as w,B as x,V as y};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,H as n,R as r,U as i,V as a,W as o,it as s,rt as c,z as l}from"./vendor-base-ui-CdzJ6My_.js";import{n as u}from"./vendor-react-BP2cRVqX.js";import{r as d}from"./button-BKjGCkH3.js";var f=u(),p=e(s(),1),m=c(),h=600,g=1600,_=10,v=p.createContext(null),y=class extends p.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function b(e){let t=(0,f.c)(12),n,i,a,o,s,c;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({delayDuration:s,skipDelayDuration:o,delay:i,closeDelay:n,timeout:c,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let l=i??(s===void 0?0:s),u=n??o,d;return t[7]!==a||t[8]!==l||t[9]!==u||t[10]!==c?(d=(0,m.jsx)(r,{delay:l,closeDelay:u,timeout:c,...a}),t[7]=a,t[8]=l,t[9]=u,t[10]=c,t[11]=d):d=t[11],d}function x(e){let t=(0,f.c)(35),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({delayDuration:n,open:i,onOpenChange:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let[s,c]=p.useState(!1),l=p.useRef(null),u=p.useRef(null),d=p.useRef(null),y=p.useRef(!1),x=i!==void 0,S=x?i:s,C;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},t[5]=C):C=t[5];let w=C,T;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{u.current!==null&&(window.clearTimeout(u.current),u.current=null)},t[6]=T):T=t[6];let E=T,D;t[7]===x?D=t[8]:(D=e=>{x||c(e)},t[7]=x,t[8]=D);let O=D,k;t[9]!==x||t[10]!==O?(k=e=>{(e.pointerType===`touch`||e.pointerType===`pen`)&&(w(),E(),d.current={x:e.clientX,y:e.clientY},l.current=window.setTimeout(()=>{x||(y.current=!0,O(!0))},h))},t[9]=x,t[10]=O,t[11]=k):k=t[11];let A;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>{let t=d.current;if(!t)return;let n=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y);(n>_||r>_)&&(w(),d.current=null)},t[12]=A):A=t[12];let j;t[13]===O?j=t[14]:(j=()=>{w(),d.current=null,y.current&&(E(),u.current=window.setTimeout(()=>{y.current=!1,O(!1)},g))},t[13]=O,t[14]=j);let M,N;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>{y.current&&(y.current=!1,e.preventDefault(),e.stopPropagation())},N=e=>{y.current&&e.preventDefault()},t[15]=M,t[16]=N):(M=t[15],N=t[16]);let P;t[17]!==k||t[18]!==j?(P={handlePointerDown:k,handlePointerMove:A,handlePointerEnd:j,handleClickCapture:M,handleContextMenu:N},t[17]=k,t[18]=j,t[19]=P):P=t[19];let F=P,I,L;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>()=>{w(),E()},L=[E,w],t[20]=I,t[21]=L):(I=t[20],L=t[21]),p.useEffect(I,L);let R;t[22]!==x||t[23]!==r?(R=(e,t)=>{x||c(e),r?.(e,t)},t[22]=x,t[23]=r,t[24]=R):R=t[24];let z=R,B;t[25]!==z||t[26]!==a||t[27]!==S?(B=(0,m.jsx)(o,{open:S,onOpenChange:z,...a}),t[25]=z,t[26]=a,t[27]=S,t[28]=B):B=t[28];let V;t[29]!==F||t[30]!==B?(V=(0,m.jsx)(v.Provider,{value:F,children:B}),t[29]=F,t[30]=B,t[31]=V):V=t[31];let H=V;if(n===void 0)return H;let U;return t[32]!==n||t[33]!==H?(U=(0,m.jsx)(b,{delayDuration:n,children:H}),t[32]=n,t[33]=H,t[34]=U):U=t[34],U}function S(e){let t=(0,f.c)(43),n,r,a,o,s,c,l,u,d;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9]):({asChild:n,children:r,onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:s,onClickCapture:a,onContextMenu:o,...d}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d);let h=p.useContext(v),g;t[10]!==n||t[11]!==r?(g=n&&p.isValidElement(r)?{render:r}:{children:r},t[10]=n,t[11]=r,t[12]=g):g=t[12];let _=g,b;t[13]!==h||t[14]!==c?(b=e=>{c?.(e),h?.handlePointerDown(e)},t[13]=h,t[14]=c,t[15]=b):b=t[15];let x;t[16]!==h||t[17]!==l?(x=e=>{l?.(e),h?.handlePointerMove(e)},t[16]=h,t[17]=l,t[18]=x):x=t[18];let S;t[19]!==h||t[20]!==u?(S=e=>{u?.(e),h?.handlePointerEnd()},t[19]=h,t[20]=u,t[21]=S):S=t[21];let C;t[22]!==h||t[23]!==s?(C=e=>{s?.(e),h?.handlePointerEnd()},t[22]=h,t[23]=s,t[24]=C):C=t[24];let w;t[25]!==h||t[26]!==a?(w=e=>{h?.handleClickCapture(e),!e.defaultPrevented&&a?.(e)},t[25]=h,t[26]=a,t[27]=w):w=t[27];let T;t[28]!==h||t[29]!==o?(T=e=>{h?.handleContextMenu(e),!e.defaultPrevented&&o?.(e)},t[28]=h,t[29]=o,t[30]=T):T=t[30];let E;t[31]!==d||t[32]!==_||t[33]!==b||t[34]!==x||t[35]!==S||t[36]!==C||t[37]!==w||t[38]!==T?(E=(0,m.jsx)(i,{"data-slot":`tooltip-trigger`,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onClickCapture:w,onContextMenu:T,...d,..._}),t[31]=d,t[32]=_,t[33]=b,t[34]=x,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E):E=t[39];let D;return t[40]!==r||t[41]!==E?(D=(0,m.jsx)(y,{fallback:r,children:E}),t[40]=r,t[41]=E,t[42]=D):D=t[42],D}function C(e){let r=(0,f.c)(23),i,o,s,c,u,p,h;r[0]===e?(i=r[1],o=r[2],s=r[3],c=r[4],u=r[5],p=r[6],h=r[7]):({className:s,sideOffset:h,side:u,align:i,children:o,style:p,...c}=e,r[0]=e,r[1]=i,r[2]=o,r[3]=s,r[4]=c,r[5]=u,r[6]=p,r[7]=h);let g=h===void 0?0:h,_;r[8]===s?_=r[9]:(_=d(`bg-[var(--surface-elevated)] text-[var(--surface-elevated-foreground)] border border-border/60 transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 z-50 w-fit origin-[var(--transform-origin)] rounded-xl px-3 py-1.5 typography-meta text-balance overflow-hidden`,s),r[8]=s,r[9]=_);let v;r[10]===p?v=r[11]:(v={...p},r[10]=p,r[11]=v);let b;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,m.jsx)(l,{className:`fill-[var(--surface-elevated)] z-50 size-2`}),r[12]=b):b=r[12];let x;r[13]!==o||r[14]!==c||r[15]!==_||r[16]!==v?(x=(0,m.jsxs)(t,{"data-slot":`tooltip-content`,className:_,style:v,...c,children:[o,b]}),r[13]=o,r[14]=c,r[15]=_,r[16]=v,r[17]=x):x=r[17];let S;return r[18]!==i||r[19]!==u||r[20]!==g||r[21]!==x?(S=(0,m.jsx)(y,{children:(0,m.jsx)(n,{children:(0,m.jsx)(a,{sideOffset:g,side:u,align:i,className:`z-50`,children:x})})}),r[18]=i,r[19]=u,r[20]=g,r[21]=x,r[22]=S):S=r[22],S}export{S as i,C as n,b as r,x as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,H as n,R as r,U as i,V as a,W as o,it as s,rt as c,z as l}from"./vendor-base-ui-CdzJ6My_.js";import{n as u}from"./vendor-react-BP2cRVqX.js";import{r as d}from"./button-BupmKVUs.js";var f=u(),p=e(s(),1),m=c(),h=600,g=1600,_=10,v=p.createContext(null),y=class extends p.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function b(e){let t=(0,f.c)(12),n,i,a,o,s,c;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({delayDuration:s,skipDelayDuration:o,delay:i,closeDelay:n,timeout:c,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let l=i??(s===void 0?0:s),u=n??o,d;return t[7]!==a||t[8]!==l||t[9]!==u||t[10]!==c?(d=(0,m.jsx)(r,{delay:l,closeDelay:u,timeout:c,...a}),t[7]=a,t[8]=l,t[9]=u,t[10]=c,t[11]=d):d=t[11],d}function x(e){let t=(0,f.c)(35),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({delayDuration:n,open:i,onOpenChange:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let[s,c]=p.useState(!1),l=p.useRef(null),u=p.useRef(null),d=p.useRef(null),y=p.useRef(!1),x=i!==void 0,S=x?i:s,C;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},t[5]=C):C=t[5];let w=C,T;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{u.current!==null&&(window.clearTimeout(u.current),u.current=null)},t[6]=T):T=t[6];let E=T,D;t[7]===x?D=t[8]:(D=e=>{x||c(e)},t[7]=x,t[8]=D);let O=D,k;t[9]!==x||t[10]!==O?(k=e=>{(e.pointerType===`touch`||e.pointerType===`pen`)&&(w(),E(),d.current={x:e.clientX,y:e.clientY},l.current=window.setTimeout(()=>{x||(y.current=!0,O(!0))},h))},t[9]=x,t[10]=O,t[11]=k):k=t[11];let A;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>{let t=d.current;if(!t)return;let n=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y);(n>_||r>_)&&(w(),d.current=null)},t[12]=A):A=t[12];let j;t[13]===O?j=t[14]:(j=()=>{w(),d.current=null,y.current&&(E(),u.current=window.setTimeout(()=>{y.current=!1,O(!1)},g))},t[13]=O,t[14]=j);let M,N;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>{y.current&&(y.current=!1,e.preventDefault(),e.stopPropagation())},N=e=>{y.current&&e.preventDefault()},t[15]=M,t[16]=N):(M=t[15],N=t[16]);let P;t[17]!==k||t[18]!==j?(P={handlePointerDown:k,handlePointerMove:A,handlePointerEnd:j,handleClickCapture:M,handleContextMenu:N},t[17]=k,t[18]=j,t[19]=P):P=t[19];let F=P,I,L;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>()=>{w(),E()},L=[E,w],t[20]=I,t[21]=L):(I=t[20],L=t[21]),p.useEffect(I,L);let R;t[22]!==x||t[23]!==r?(R=(e,t)=>{x||c(e),r?.(e,t)},t[22]=x,t[23]=r,t[24]=R):R=t[24];let z=R,B;t[25]!==z||t[26]!==a||t[27]!==S?(B=(0,m.jsx)(o,{open:S,onOpenChange:z,...a}),t[25]=z,t[26]=a,t[27]=S,t[28]=B):B=t[28];let V;t[29]!==F||t[30]!==B?(V=(0,m.jsx)(v.Provider,{value:F,children:B}),t[29]=F,t[30]=B,t[31]=V):V=t[31];let H=V;if(n===void 0)return H;let U;return t[32]!==n||t[33]!==H?(U=(0,m.jsx)(b,{delayDuration:n,children:H}),t[32]=n,t[33]=H,t[34]=U):U=t[34],U}function S(e){let t=(0,f.c)(43),n,r,a,o,s,c,l,u,d;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9]):({asChild:n,children:r,onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:s,onClickCapture:a,onContextMenu:o,...d}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d);let h=p.useContext(v),g;t[10]!==n||t[11]!==r?(g=n&&p.isValidElement(r)?{render:r}:{children:r},t[10]=n,t[11]=r,t[12]=g):g=t[12];let _=g,b;t[13]!==h||t[14]!==c?(b=e=>{c?.(e),h?.handlePointerDown(e)},t[13]=h,t[14]=c,t[15]=b):b=t[15];let x;t[16]!==h||t[17]!==l?(x=e=>{l?.(e),h?.handlePointerMove(e)},t[16]=h,t[17]=l,t[18]=x):x=t[18];let S;t[19]!==h||t[20]!==u?(S=e=>{u?.(e),h?.handlePointerEnd()},t[19]=h,t[20]=u,t[21]=S):S=t[21];let C;t[22]!==h||t[23]!==s?(C=e=>{s?.(e),h?.handlePointerEnd()},t[22]=h,t[23]=s,t[24]=C):C=t[24];let w;t[25]!==h||t[26]!==a?(w=e=>{h?.handleClickCapture(e),!e.defaultPrevented&&a?.(e)},t[25]=h,t[26]=a,t[27]=w):w=t[27];let T;t[28]!==h||t[29]!==o?(T=e=>{h?.handleContextMenu(e),!e.defaultPrevented&&o?.(e)},t[28]=h,t[29]=o,t[30]=T):T=t[30];let E;t[31]!==d||t[32]!==_||t[33]!==b||t[34]!==x||t[35]!==S||t[36]!==C||t[37]!==w||t[38]!==T?(E=(0,m.jsx)(i,{"data-slot":`tooltip-trigger`,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onClickCapture:w,onContextMenu:T,...d,..._}),t[31]=d,t[32]=_,t[33]=b,t[34]=x,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E):E=t[39];let D;return t[40]!==r||t[41]!==E?(D=(0,m.jsx)(y,{fallback:r,children:E}),t[40]=r,t[41]=E,t[42]=D):D=t[42],D}function C(e){let r=(0,f.c)(23),i,o,s,c,u,p,h;r[0]===e?(i=r[1],o=r[2],s=r[3],c=r[4],u=r[5],p=r[6],h=r[7]):({className:s,sideOffset:h,side:u,align:i,children:o,style:p,...c}=e,r[0]=e,r[1]=i,r[2]=o,r[3]=s,r[4]=c,r[5]=u,r[6]=p,r[7]=h);let g=h===void 0?0:h,_;r[8]===s?_=r[9]:(_=d(`bg-[var(--surface-elevated)] text-[var(--surface-elevated-foreground)] border border-border/60 transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 z-50 w-fit origin-[var(--transform-origin)] rounded-xl px-3 py-1.5 typography-meta text-balance overflow-hidden`,s),r[8]=s,r[9]=_);let v;r[10]===p?v=r[11]:(v={...p},r[10]=p,r[11]=v);let b;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,m.jsx)(l,{className:`fill-[var(--surface-elevated)] z-50 size-2`}),r[12]=b):b=r[12];let x;r[13]!==o||r[14]!==c||r[15]!==_||r[16]!==v?(x=(0,m.jsxs)(t,{"data-slot":`tooltip-content`,className:_,style:v,...c,children:[o,b]}),r[13]=o,r[14]=c,r[15]=_,r[16]=v,r[17]=x):x=r[17];let S;return r[18]!==i||r[19]!==u||r[20]!==g||r[21]!==x?(S=(0,m.jsx)(y,{children:(0,m.jsx)(n,{children:(0,m.jsx)(a,{sideOffset:g,side:u,align:i,className:`z-50`,children:x})})}),r[18]=i,r[19]=u,r[20]=g,r[21]=x,r[22]=S):S=r[22],S}export{S as i,C as n,b as r,x as t};