@open-mercato/cezar 0.19.0 → 0.20.0-pr1372.4752
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contract/index.js +4 -1
- package/dist/contract/repo.d.ts +3 -1
- package/dist/git-worktree.d.ts +2 -1
- package/dist/git-worktree.js +7 -2
- package/dist/git-worktree.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/runs/retention.d.ts +9 -2
- package/dist/runs/retention.js +23 -4
- package/dist/runs/retention.js.map +1 -1
- package/dist/server/server.d.ts +12 -10
- package/dist/server/server.js +27 -2
- package/dist/server/server.js.map +1 -1
- package/dist/worktree-in-use.d.ts +25 -0
- package/dist/worktree-in-use.js +274 -0
- package/dist/worktree-in-use.js.map +1 -0
- package/dist/worktree-lifecycle/coordinator.js +4 -0
- package/dist/worktree-lifecycle/coordinator.js.map +1 -1
- package/package.json +3 -3
- package/web/dist/assets/{agent-task-pickers-C6pdeuHJ.js → agent-task-pickers-C0lbPIio.js} +1 -1
- package/web/dist/assets/{alert-dialog-DsAKVB9U.js → alert-dialog-D7_6EawW.js} +1 -1
- package/web/dist/assets/arrow-left-Ci5OwIMH.js +1 -0
- package/web/dist/assets/{arrow-up-DerG9eQK.js → arrow-up-Pd8kIuRY.js} +1 -1
- package/web/dist/assets/{assets-view-COAZvPqm.js → assets-view-Dig8Ow0W.js} +1 -1
- package/web/dist/assets/{automation-format-DmmN5Z7N.js → automation-format-MLNn8qnY.js} +1 -1
- package/web/dist/assets/{automations-route-C9h3Pe23.js → automations-route-B_hyZJ2Q.js} +1 -1
- package/web/dist/assets/{bot-tf6AC27f.js → bot-TU5OTE8D.js} +1 -1
- package/web/dist/assets/{button-DhBNRPDb.js → button-jcXhXi-5.js} +1 -1
- package/web/dist/assets/{centered-state-DWZ57Ha1.js → centered-state-zjxxQcEb.js} +1 -1
- package/web/dist/assets/check-CNVywZ6B.js +1 -0
- package/web/dist/assets/chevron-left-D94sZNQc.js +1 -0
- package/web/dist/assets/chevron-right-D2EqYt_O.js +1 -0
- package/web/dist/assets/circle-check-C09e7mFj.js +1 -0
- package/web/dist/assets/{collapsible-BXlCnxCU.js → collapsible-BGyXLTVv.js} +1 -1
- package/web/dist/assets/{commit-list-Inz2UHlC.js → commit-list-DxiIebKF.js} +1 -1
- package/web/dist/assets/{compare-variants-B66gT_Lp.js → compare-variants-RfJUgKZi.js} +1 -1
- package/web/dist/assets/{dashboard-DQ2EsruE.js → dashboard-CPnDqmbf.js} +1 -1
- package/web/dist/assets/{diff-NBMGWe9I.js → diff-DpElozOH.js} +2 -2
- package/web/dist/assets/{diff-stat-CgvKmRgV.js → diff-stat-YT7Licr1.js} +1 -1
- package/web/dist/assets/{diff-view-t0WQPrPT.js → diff-view-mNp6Fo84.js} +1 -1
- package/web/dist/assets/{dist-BJiHofth.js → dist-C2IyLYZs.js} +1 -1
- package/web/dist/assets/{download-CEvQNLNA.js → download-Cu9ySzL2.js} +1 -1
- package/web/dist/assets/{dropdown-menu-R7qzKuR5.js → dropdown-menu-Da8iP-nI.js} +1 -1
- package/web/dist/assets/{external-link-OzBGW2PE.js → external-link-CTJbUN9h.js} +1 -1
- package/web/dist/assets/{facet-filter-Qbx1pf2T.js → facet-filter-Be0XFoHu.js} +1 -1
- package/web/dist/assets/{file-fM0ty7CG.js → file-D9jm2sJ3.js} +1 -1
- package/web/dist/assets/{file-preview-vKAohITF.js → file-preview-BIAcYezC.js} +1 -1
- package/web/dist/assets/{file-tree-DZ2eXzpR.js → file-tree-hpaNl9qS.js} +1 -1
- package/web/dist/assets/{folder-DdjIxY7B.js → folder-Ctd1Xvqx.js} +1 -1
- package/web/dist/assets/{follow-up-engine-BSEbPKpI.js → follow-up-engine-WsUFV3Ry.js} +1 -1
- package/web/dist/assets/{git-pull-request-D2gvtstb.js → git-pull-request-BAfSEvVb.js} +1 -1
- package/web/dist/assets/{git-pull-request-draft-CLy0NzfX.js → git-pull-request-draft-BIgZJsu-.js} +1 -1
- package/web/dist/assets/{git-tab-loading-BfHswOkO.js → git-tab-loading-BnU4U-BA.js} +1 -1
- package/web/dist/assets/{github-3riSQ6Lm.js → github-DnDrPPfz.js} +1 -1
- package/web/dist/assets/{host-usage-7ZdPz-XK.js → host-usage-BeX2ZFmV.js} +1 -1
- package/web/dist/assets/{icon-tooltip-DWp0bFCr.js → icon-tooltip-BfI1AC00.js} +1 -1
- package/web/dist/assets/{impact-control-C6qnPF32.js → impact-control-Ba9XW3tV.js} +1 -1
- package/web/dist/assets/{impact-model-BXkk-8LD.js → impact-model-Bo4KSZmi.js} +1 -1
- package/web/dist/assets/{index-BJPVto-W.js → index-Crs_dvXc.js} +5 -5
- package/web/dist/assets/{input-Cv2-g500.js → input-vswZUfsf.js} +1 -1
- package/web/dist/assets/{layout-cards-rvwV0uTN.js → layout-cards-BxB9Sv6Z.js} +1 -1
- package/web/dist/assets/loader-circle-BuBcxAH7.js +1 -0
- package/web/dist/assets/{markdown-DpThfUoB.js → markdown--qN61YgZ.js} +1 -1
- package/web/dist/assets/{markdown-ugFgDUM5.js → markdown-BiRiR9OM.js} +1 -1
- package/web/dist/assets/{message-square-k8K2YFw2.js → message-square-Jt8U2gAH.js} +1 -1
- package/web/dist/assets/{picker-pill-DjKsq5S1.js → picker-pill-BFprBA9h.js} +1 -1
- package/web/dist/assets/plus-nGmv0BVG.js +1 -0
- package/web/dist/assets/{project-router-DXcbRXxc.js → project-router-ByYpf5zi.js} +1 -1
- package/web/dist/assets/{queries-DvnoUOE1.js → queries-DbDUaheq.js} +1 -1
- package/web/dist/assets/{reasoning-effort-pill-BtWN6FBA.js → reasoning-effort-pill-BMAjcAKk.js} +1 -1
- package/web/dist/assets/{repo-git-DQHghYiX.js → repo-git-CpbhUvyL.js} +1 -1
- package/web/dist/assets/{run-diff-CymNF6XN.js → run-diff-DTbhZHQE.js} +1 -1
- package/web/dist/assets/{save-A5Be1rcj.js → save-DGJET0jv.js} +1 -1
- package/web/dist/assets/{scroll-within-DIDO40Ps.js → scroll-within-sbc5xXAl.js} +1 -1
- package/web/dist/assets/search-P545ZVzc.js +1 -0
- package/web/dist/assets/{search-x-DHAJ1hHA.js → search-x-BI_L6x3P.js} +1 -1
- package/web/dist/assets/{settings-2-CT4CHpD0.js → settings-2-CcipoS54.js} +1 -1
- package/web/dist/assets/{sheet-D8vk1p4X.js → sheet-DJ7Q8rRA.js} +1 -1
- package/web/dist/assets/{skills-BAzH59kW.js → skills-DwnXdnzS.js} +1 -1
- package/web/dist/assets/{square-dKpVPAsQ.js → square-CuNOgYBC.js} +1 -1
- package/web/dist/assets/{tabs-B_vUNwk9.js → tabs-BCUQqEYa.js} +1 -1
- package/web/dist/assets/{tag-BWgO0bkB.js → tag-DHjatodA.js} +1 -1
- package/web/dist/assets/{task-commits-rj991QXb.js → task-commits-x21u_XE-.js} +1 -1
- package/web/dist/assets/{task-graph-VKJ_lfXL.js → task-graph-DdCE5G3r.js} +1 -1
- package/web/dist/assets/{task-notes-CyXwM1jJ.js → task-notes-C6RP3maE.js} +1 -1
- package/web/dist/assets/task-workspace-xnZHXFXk.js +29 -0
- package/web/dist/assets/terminal-ZT2Z_ALj.js +1 -0
- package/web/dist/assets/{terminal-drawer-BZItdxn-.js → terminal-drawer-Dm0kyMmF.js} +1 -1
- package/web/dist/assets/{terminal-pane-D4ZoQdKv.js → terminal-pane-CRjYeI78.js} +1 -1
- package/web/dist/assets/{textarea-DGt1COuN.js → textarea-Ckx3d0hV.js} +1 -1
- package/web/dist/assets/{toaster-DkOynrTr.js → toaster-CejrnYvv.js} +1 -1
- package/web/dist/assets/{token-metrics-CH6yTO0m.js → token-metrics-BINGXGrg.js} +1 -1
- package/web/dist/assets/{tooltip-DZFNJfGV.js → tooltip-26XdOGj8.js} +1 -1
- package/web/dist/assets/{tracker-CfV4FaME.js → tracker-BzXE6yLf.js} +1 -1
- package/web/dist/assets/{triangle-alert-DPgo0TAM.js → triangle-alert-CBrg6nYB.js} +1 -1
- package/web/dist/assets/{upload-CyWxzeww.js → upload-Cu6NRABh.js} +1 -1
- package/web/dist/assets/{use-now-p7SRpNs9.js → use-now-CdtIyF-0.js} +1 -1
- package/web/dist/assets/{use-submit-shortcut-DbaZm8p1.js → use-submit-shortcut-B3TJ3HBP.js} +1 -1
- package/web/dist/assets/{utils-DujIMO-J.js → utils-Bl_tQdVw.js} +1 -1
- package/web/dist/assets/{workflow-graph-Bi8UYX1n.js → workflow-graph-CkCPBwhB.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-operation-D7uIWIl_.js → worktree-lifecycle-operation-UpV9MAuk.js} +1 -1
- package/web/dist/assets/x-Qhn_uE86.js +1 -0
- package/web/dist/index.html +50 -50
- package/dist/telemetry-service.json +0 -1
- package/web/dist/assets/arrow-left-D773GDAV.js +0 -1
- package/web/dist/assets/check--JMF5pzG.js +0 -1
- package/web/dist/assets/chevron-left-BiwkBjqr.js +0 -1
- package/web/dist/assets/chevron-right-QEoLhwFQ.js +0 -1
- package/web/dist/assets/circle-check-C7cRTvGo.js +0 -1
- package/web/dist/assets/loader-circle-wWXhd3lT.js +0 -1
- package/web/dist/assets/plus-BCu7YC-w.js +0 -1
- package/web/dist/assets/search-_XntIRWA.js +0 -1
- package/web/dist/assets/task-workspace-BsOvp8_P.js +0 -29
- package/web/dist/assets/terminal-De3oF9fR.js +0 -1
- package/web/dist/assets/x-BzTqCf_Q.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,r as n,t as r}from"./react-runtime-CCIEwYL0.js";import{N as i,S as a,T as o,j as s,v as c,w as l}from"./button-DhBNRPDb.js";var u=i(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),d=e(n(),1),f=r(),p=e(t(),1);function m(e){let[t,n]=p.useState(void 0);return a(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var h=[`top`,`right`,`bottom`,`left`],g=Math.min,_=Math.max,v=Math.round,y=Math.floor,b=e=>({x:e,y:e}),x={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function S(e,t,n){return _(e,g(t,n))}function C(e,t){return typeof e==`function`?e(t):e}function w(e){return e.split(`-`)[0]}function T(e){return e.split(`-`)[1]}function E(e){return e===`x`?`y`:`x`}function D(e){return e===`y`?`height`:`width`}function O(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function k(e){return E(O(e))}function A(e,t,n){n===void 0&&(n=!1);let r=T(e),i=k(e),a=D(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=z(o)),[o,z(o)]}function j(e){let t=z(e);return[M(e),t,M(t)]}function M(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var N=[`left`,`right`],P=[`right`,`left`],F=[`top`,`bottom`],I=[`bottom`,`top`];function L(e,t,n){switch(e){case`top`:case`bottom`:return n?t?P:N:t?N:P;case`left`:case`right`:return t?F:I;default:return[]}}function R(e,t,n,r){let i=T(e),a=L(w(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(M)))),a}function z(e){let t=w(e);return x[t]+e.slice(t.length)}function B(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function V(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:B(e)}function H(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ee(e,t,n){let{reference:r,floating:i}=e,a=O(t),o=k(t),s=D(o),c=w(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=T(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function te(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=C(t,e),p=V(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=H(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=H(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ne=50,re=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:te},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ee(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ne&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ee(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ie=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=C(e,t)||{};if(l==null)return{};let d=V(u),f={x:n,y:r},p=k(i),m=D(p),h=await o.getDimensions(l),_=p===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],w=f[p]-a.reference[p],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),O=E?E[b]:0;(!O||!await(o.isElement==null?void 0:o.isElement(E)))&&(O=s.floating[b]||a.floating[m]);let A=x/2-w/2,j=O/2-h[m]/2-1,M=g(d[v],j),N=g(d[y],j),P=O-h[m]-N,F=O/2-h[m]/2+A,I=S(M,F,P),L=!c.arrow&&T(i)!=null&&F!==I&&a.reference[m]/2-(F<M?M:N)-h[m]/2<0,R=L?F<M?F-M:F-P:0;return{[p]:f[p]+R,data:{[p]:I,centerOffset:F-I-R,...L&&{alignmentOffset:R}},reset:L}}}),ae=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=C(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=w(r),_=O(o),v=w(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[z(o)]:j(o)),x=p!==`none`;!d&&x&&b.push(...R(o,m,p,y));let S=[o,...b],T=await s.detectOverflow(t,h),E=[],D=i.flip?.overflows||[];if(l&&E.push(T[g]),u){let e=A(r,a,y);E.push(T[e[0]],T[e[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==O(t))||D.every(e=>O(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=D.filter(e=>{if(x){let t=O(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function oe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function se(e){return h.some(t=>e[t]>=0)}var ce=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=C(e,t);switch(i){case`referenceHidden`:{let e=oe(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:se(e)}}}case`escaped`:{let e=oe(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:se(e)}}}default:return{}}}}},le=new Set([`left`,`top`]);async function ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=w(n),s=T(n),c=O(n)===`y`,l=le.has(o)?-1:1,u=a&&c?-1:1,d=C(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var de=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ue(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},fe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=C(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=O(i),p=E(f),m=u[p],h=u[f],g=(e,t)=>S(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},pe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=C(e,t),u={x:n,y:r},d=O(i),f=E(d),p=u[f],m=u[d],h=C(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=le.has(w(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},me=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=C(e,t),c=await i.detectOverflow(t,s),l=w(n),u=T(n),d=O(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let v=p-c.top-c.bottom,y=f-c.left-c.right,b=g(p-c[m],v),x=g(f-c[h],y),S=t.middlewareData.shift,E=!S,D=b,k=x;S!=null&&S.enabled.x&&(k=y),S!=null&&S.enabled.y&&(D=v),E&&!u&&(d?k=f-2*_(c.left,c.right):D=p-2*_(c.top,c.bottom)),await o({...t,availableWidth:k,availableHeight:D});let A=await i.getDimensions(a.floating);return f!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function he(){return typeof window<`u`}function U(e){return ge(e)?(e.nodeName||``).toLowerCase():`#document`}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){return((ge(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ge(e){return he()?e instanceof Node||e instanceof W(e).Node:!1}function K(e){return he()?e instanceof Element||e instanceof W(e).Element:!1}function q(e){return he()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function _e(e){return!he()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function ve(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ye(e){return/^(table|td|th)$/.test(U(e))}function be(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xe=/transform|translate|scale|rotate|perspective|filter/,Se=/paint|layout|strict|content/,J=e=>!!e&&e!==`none`,Ce;function we(e){let t=K(e)?X(e):e;return J(t.transform)||J(t.translate)||J(t.scale)||J(t.rotate)||J(t.perspective)||!Ee()&&(J(t.backdropFilter)||J(t.filter))||xe.test(t.willChange||``)||Se.test(t.contain||``)}function Te(e){let t=Z(e);for(;q(t)&&!Y(t);){if(we(t))return t;if(be(t))return null;t=Z(t)}return null}function Ee(){return Ce??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ce}function Y(e){return/^(html|body|#document)$/.test(U(e))}function X(e){return W(e).getComputedStyle(e)}function De(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(U(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_e(e)&&e.host||G(e);return _e(t)?t.host:t}function Oe(e){let t=Z(e);return Y(t)?(e.ownerDocument||e).body:q(t)&&ve(t)?t:Oe(t)}function ke(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Oe(e),i=r===e.ownerDocument?.body,a=W(r);if(i){let e=Ae(a);return t.concat(a,a.visualViewport||[],ve(r)?r:[],e&&n?ke(e):[])}else return t.concat(r,ke(r,[],n))}function Ae(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function je(e){let t=X(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=q(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=v(n)!==a||v(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Me(e){return K(e)?e:e.contextElement}function Q(e){let t=Me(e);if(!q(t))return b(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=je(t),o=(a?v(n.width):n.width)/r,s=(a?v(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ne=b(0);function Pe(e){let t=W(e);return!Ee()||!t.visualViewport?Ne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fe(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===W(e)}function $(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Me(e),o=b(1);t&&(r?K(r)&&(o=Q(r)):o=Q(e));let s=Fe(a,n,r)?Pe(a):b(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=W(a),t=K(r)?W(r):r,n=e,i=Ae(n);for(;i&&t!==n;){let e=Q(i),t=i.getBoundingClientRect(),r=X(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=W(i),i=Ae(n)}}return H({width:u,height:d,x:c,y:l})}function Ie(e,t){let n=De(e).scrollLeft;return t?t.left+n:$(G(e)).left+n}function Le(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ie(e,n),y:n.top+t.scrollTop}}function Re(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=G(r),s=t?be(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=b(1),u=b(0),d=q(r);if((d||!a)&&((U(r)!==`body`||ve(o))&&(c=De(r)),d)){let e=$(r);l=Q(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Le(o,c):b(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ze(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Be(e){let t=De(e),n=e.ownerDocument.body,r=_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ie(e),o=-t.scrollTop;return X(n).direction===`rtl`&&(a+=_(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ve=25;function He(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=W(e),a=G(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ee()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ie(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ve&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ue(e,t){let n=$(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Q(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function We(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=He(e,n,t);else if(t===`document`)r=Be(G(e));else if(K(t))r=Ue(t,n);else{let n=Pe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return H(r)}function Ge(e,t){let n=t.get(e);if(n)return n;let r=ke(e,[],!1).filter(e=>K(e)&&U(e)!==`body`),i=null,a=X(e).position===`fixed`,o=a?Z(e):e;for(;K(o)&&!Y(o);){let e=X(o),t=we(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Z(o)}return t.set(e,r),r}function Ke(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?be(t)?[]:Ge(t,this._c):[].concat(n),r],o=We(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=We(t,a[e],i);s=_(n.top,s),c=g(n.right,c),l=g(n.bottom,l),u=_(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function qe(e){let{width:t,height:n}=je(e);return{width:t,height:n}}function Je(e,t,n){let r=q(t),i=G(t),a=n===`fixed`,o=$(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=b(0);if((r||!a)&&((U(t)!==`body`||ve(i))&&(s=De(t)),r)){let e=$(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ie(i));let l=i&&!r&&!a?Le(i,s):b(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ye(e){return X(e).position===`static`}function Xe(e,t){if(!q(e)||X(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function Ze(e,t){let n=W(e);if(be(e))return n;if(!q(e)){let t=Z(e);for(;t&&!Y(t);){if(K(t)&&!Ye(t))return t;t=Z(t)}return n}let r=Xe(e,t);for(;r&&ye(r)&&Ye(r);)r=Xe(r,t);return r&&Y(r)&&Ye(r)&&!we(r)?n:r||Te(e)||n}var Qe=async function(e){let t=this.getOffsetParent||Ze,n=this.getDimensions,r=await n(e.floating);return{reference:Je(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $e(e){return X(e).direction===`rtl`}var et={convertOffsetParentRelativeRectToViewportRelativeRect:Re,getDocumentElement:G,getClippingRect:Ke,getOffsetParent:Ze,getElementRects:Qe,getClientRects:ze,getDimensions:qe,getScale:Q,isElement:K,isRTL:$e};function tt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nt(e,t,n){let r=null,i,a=G(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=y(d),h=y(a.clientWidth-(u+f)),v=y(a.clientHeight-(d+p)),b=y(u),x={rootMargin:-m+`px `+-h+`px `+-v+`px `+-b+`px`,threshold:_(0,g(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!tt(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=W(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function rt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Me(e),u=i||a?[...l?ke(l):[],...t?ke(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?nt(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?$(e):null;c&&g();function g(){let t=$(e);h&&!tt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var it=de,at=fe,ot=ae,st=me,ct=ce,lt=ie,ut=pe,dt=(e,t,n)=>{let r=new Map,i=n??{},a={...et,...i.platform,_c:r};return re(e,t,{...i,platform:a})},ft=typeof document<`u`?p.useLayoutEffect:function(){};function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!pt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function mt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ht(e,t){let n=mt(e);return Math.round(t*n)/n}function gt(e){let t=p.useRef(e);return ft(()=>{t.current=e}),t}function _t(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=p.useState(r);pt(m,r)||h(r);let[g,_]=p.useState(null),[v,y]=p.useState(null),b=p.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=p.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=p.useRef(null),T=p.useRef(null),E=p.useRef(u),D=c!=null,O=gt(c),k=gt(i),A=gt(l),j=p.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),dt(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!pt(E.current,t)&&(E.current=t,d.flushSync(()=>{f(t)}))})},[m,t,n,k,A]);ft(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let M=p.useRef(!1);ft(()=>(M.current=!0,()=>{M.current=!1}),[]),ft(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=p.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=p.useMemo(()=>({reference:S,floating:C}),[S,C]),F=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=ht(P.floating,u.x),r=ht(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...mt(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:lt({element:r.current,padding:i}).fn(n):r?lt({element:r,padding:i}).fn(n):{}}}},yt=(e,t)=>{let n=it(e);return{name:n.name,fn:n.fn,options:[e,t]}},bt=(e,t)=>{let n=at(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>({fn:ut(e).fn,options:[e,t]}),St=(e,t)=>{let n=ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ct=(e,t)=>{let n=st(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt=(e,t)=>{let n=ct(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tt=(e,t)=>{let n=vt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Et=`Arrow`,Dt=p.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,f.jsx)(o.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,f.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Dt.displayName=Et;var Ot=Dt,kt=`Popper`,[At,jt]=l(kt),[Mt,Nt]=At(kt),Pt=e=>{let{__scopePopper:t,children:n}=e,[r,i]=p.useState(null),[a,o]=p.useState(void 0);return(0,f.jsx)(Mt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Pt.displayName=kt;var Ft=`PopperAnchor`,It=p.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Nt(Ft,n),c=p.useRef(null),l=a.onAnchorChange,u=s(t,p.useCallback(e=>{c.current=e,e&&l(e)},[l])),d=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&l(d.current)});let m=a.placementState&&Kt(a.placementState),h=m?.[0],g=m?.[1];return r?null:(0,f.jsx)(o.div,{"data-radix-popper-side":h,"data-radix-popper-align":g,...i,ref:u})});It.displayName=Ft;var Lt=`PopperContent`,[Rt,zt]=At(Lt),Bt=p.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:l=`center`,alignOffset:u=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:_=0,sticky:v=`partial`,hideWhenDetached:y=!1,updatePositionStrategy:b=`optimized`,onPlaced:x,...S}=e,C=Nt(Lt,n),[w,T]=p.useState(null),E=s(t,T),[D,O]=p.useState(null),k=m(D),A=k?.width??0,j=k?.height??0,M=r+(l===`center`?``:`-`+l),N=typeof _==`number`?_:{top:0,right:0,bottom:0,left:0,..._},P=Array.isArray(g)?g:[g],F=P.length>0,I={padding:N,boundary:P.filter(Wt),altBoundary:F},{refs:L,floatingStyles:R,placement:z,isPositioned:B,middlewareData:V}=_t({strategy:`fixed`,placement:M,whileElementsMounted:(...e)=>rt(...e,{animationFrame:b===`always`}),elements:{reference:C.anchor},middleware:[yt({mainAxis:i+j,alignmentAxis:u}),h&&bt({mainAxis:!0,crossAxis:!1,limiter:v===`partial`?xt():void 0,...I}),h&&St({...I}),Ct({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),D&&Tt({element:D,padding:d}),Gt({arrowWidth:A,arrowHeight:j}),y&&wt({strategy:`referenceHidden`,...I,boundary:F?I.boundary:void 0})]}),H=C.setPlacementState;a(()=>(H(z),()=>{H(void 0)}),[z,H]);let[ee,te]=Kt(z),ne=c(x);a(()=>{B&&ne?.()},[B,ne]);let re=V.arrow?.x,ie=V.arrow?.y,ae=V.arrow?.centerOffset!==0,[oe,se]=p.useState();return a(()=>{w&&se(window.getComputedStyle(w).zIndex)},[w]),(0,f.jsx)(`div`,{ref:L.setFloating,"data-radix-popper-content-wrapper":``,style:{...R,transform:B?R.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(` `),...V.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,f.jsx)(Rt,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:O,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,f.jsx)(o.div,{"data-side":ee,"data-align":te,...S,ref:E,style:{...S.style,animation:B?void 0:`none`}})})})});Bt.displayName=Lt;var Vt=`PopperArrow`,Ht={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ut=p.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=zt(Vt,n),a=Ht[i.placedSide];return(0,f.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,f.jsx)(Ot,{...r,ref:t,style:{...r.style,display:`block`}})})});Ut.displayName=Vt;function Wt(e){return e!==null}var Gt=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Kt(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Kt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var qt=Pt,Jt=It,Yt=Bt,Xt=Ut;export{jt as a,qt as i,Xt as n,m as o,Yt as r,u as s,Jt as t};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,r as n,t as r}from"./react-runtime-CCIEwYL0.js";import{N as i,S as a,T as o,j as s,v as c,w as l}from"./button-jcXhXi-5.js";var u=i(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),d=e(n(),1),f=r(),p=e(t(),1);function m(e){let[t,n]=p.useState(void 0);return a(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var h=[`top`,`right`,`bottom`,`left`],g=Math.min,_=Math.max,v=Math.round,y=Math.floor,b=e=>({x:e,y:e}),x={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function S(e,t,n){return _(e,g(t,n))}function C(e,t){return typeof e==`function`?e(t):e}function w(e){return e.split(`-`)[0]}function T(e){return e.split(`-`)[1]}function E(e){return e===`x`?`y`:`x`}function D(e){return e===`y`?`height`:`width`}function O(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function k(e){return E(O(e))}function A(e,t,n){n===void 0&&(n=!1);let r=T(e),i=k(e),a=D(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=z(o)),[o,z(o)]}function j(e){let t=z(e);return[M(e),t,M(t)]}function M(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var N=[`left`,`right`],P=[`right`,`left`],F=[`top`,`bottom`],I=[`bottom`,`top`];function L(e,t,n){switch(e){case`top`:case`bottom`:return n?t?P:N:t?N:P;case`left`:case`right`:return t?F:I;default:return[]}}function R(e,t,n,r){let i=T(e),a=L(w(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(M)))),a}function z(e){let t=w(e);return x[t]+e.slice(t.length)}function B(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function V(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:B(e)}function H(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ee(e,t,n){let{reference:r,floating:i}=e,a=O(t),o=k(t),s=D(o),c=w(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=T(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function te(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=C(t,e),p=V(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=H(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=H(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ne=50,re=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:te},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ee(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ne&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ee(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ie=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=C(e,t)||{};if(l==null)return{};let d=V(u),f={x:n,y:r},p=k(i),m=D(p),h=await o.getDimensions(l),_=p===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],w=f[p]-a.reference[p],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),O=E?E[b]:0;(!O||!await(o.isElement==null?void 0:o.isElement(E)))&&(O=s.floating[b]||a.floating[m]);let A=x/2-w/2,j=O/2-h[m]/2-1,M=g(d[v],j),N=g(d[y],j),P=O-h[m]-N,F=O/2-h[m]/2+A,I=S(M,F,P),L=!c.arrow&&T(i)!=null&&F!==I&&a.reference[m]/2-(F<M?M:N)-h[m]/2<0,R=L?F<M?F-M:F-P:0;return{[p]:f[p]+R,data:{[p]:I,centerOffset:F-I-R,...L&&{alignmentOffset:R}},reset:L}}}),ae=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=C(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=w(r),_=O(o),v=w(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[z(o)]:j(o)),x=p!==`none`;!d&&x&&b.push(...R(o,m,p,y));let S=[o,...b],T=await s.detectOverflow(t,h),E=[],D=i.flip?.overflows||[];if(l&&E.push(T[g]),u){let e=A(r,a,y);E.push(T[e[0]],T[e[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==O(t))||D.every(e=>O(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=D.filter(e=>{if(x){let t=O(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function oe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function se(e){return h.some(t=>e[t]>=0)}var ce=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=C(e,t);switch(i){case`referenceHidden`:{let e=oe(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:se(e)}}}case`escaped`:{let e=oe(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:se(e)}}}default:return{}}}}},le=new Set([`left`,`top`]);async function ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=w(n),s=T(n),c=O(n)===`y`,l=le.has(o)?-1:1,u=a&&c?-1:1,d=C(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var de=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ue(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},fe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=C(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=O(i),p=E(f),m=u[p],h=u[f],g=(e,t)=>S(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},pe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=C(e,t),u={x:n,y:r},d=O(i),f=E(d),p=u[f],m=u[d],h=C(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=le.has(w(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},me=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=C(e,t),c=await i.detectOverflow(t,s),l=w(n),u=T(n),d=O(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let v=p-c.top-c.bottom,y=f-c.left-c.right,b=g(p-c[m],v),x=g(f-c[h],y),S=t.middlewareData.shift,E=!S,D=b,k=x;S!=null&&S.enabled.x&&(k=y),S!=null&&S.enabled.y&&(D=v),E&&!u&&(d?k=f-2*_(c.left,c.right):D=p-2*_(c.top,c.bottom)),await o({...t,availableWidth:k,availableHeight:D});let A=await i.getDimensions(a.floating);return f!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function he(){return typeof window<`u`}function U(e){return ge(e)?(e.nodeName||``).toLowerCase():`#document`}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){return((ge(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ge(e){return he()?e instanceof Node||e instanceof W(e).Node:!1}function K(e){return he()?e instanceof Element||e instanceof W(e).Element:!1}function q(e){return he()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function _e(e){return!he()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function ve(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ye(e){return/^(table|td|th)$/.test(U(e))}function be(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xe=/transform|translate|scale|rotate|perspective|filter/,Se=/paint|layout|strict|content/,J=e=>!!e&&e!==`none`,Ce;function we(e){let t=K(e)?X(e):e;return J(t.transform)||J(t.translate)||J(t.scale)||J(t.rotate)||J(t.perspective)||!Ee()&&(J(t.backdropFilter)||J(t.filter))||xe.test(t.willChange||``)||Se.test(t.contain||``)}function Te(e){let t=Z(e);for(;q(t)&&!Y(t);){if(we(t))return t;if(be(t))return null;t=Z(t)}return null}function Ee(){return Ce??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ce}function Y(e){return/^(html|body|#document)$/.test(U(e))}function X(e){return W(e).getComputedStyle(e)}function De(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(U(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_e(e)&&e.host||G(e);return _e(t)?t.host:t}function Oe(e){let t=Z(e);return Y(t)?(e.ownerDocument||e).body:q(t)&&ve(t)?t:Oe(t)}function ke(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Oe(e),i=r===e.ownerDocument?.body,a=W(r);if(i){let e=Ae(a);return t.concat(a,a.visualViewport||[],ve(r)?r:[],e&&n?ke(e):[])}else return t.concat(r,ke(r,[],n))}function Ae(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function je(e){let t=X(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=q(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=v(n)!==a||v(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Me(e){return K(e)?e:e.contextElement}function Q(e){let t=Me(e);if(!q(t))return b(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=je(t),o=(a?v(n.width):n.width)/r,s=(a?v(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ne=b(0);function Pe(e){let t=W(e);return!Ee()||!t.visualViewport?Ne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fe(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===W(e)}function $(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Me(e),o=b(1);t&&(r?K(r)&&(o=Q(r)):o=Q(e));let s=Fe(a,n,r)?Pe(a):b(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=W(a),t=K(r)?W(r):r,n=e,i=Ae(n);for(;i&&t!==n;){let e=Q(i),t=i.getBoundingClientRect(),r=X(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=W(i),i=Ae(n)}}return H({width:u,height:d,x:c,y:l})}function Ie(e,t){let n=De(e).scrollLeft;return t?t.left+n:$(G(e)).left+n}function Le(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ie(e,n),y:n.top+t.scrollTop}}function Re(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=G(r),s=t?be(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=b(1),u=b(0),d=q(r);if((d||!a)&&((U(r)!==`body`||ve(o))&&(c=De(r)),d)){let e=$(r);l=Q(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Le(o,c):b(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ze(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Be(e){let t=De(e),n=e.ownerDocument.body,r=_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ie(e),o=-t.scrollTop;return X(n).direction===`rtl`&&(a+=_(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ve=25;function He(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=W(e),a=G(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ee()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ie(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ve&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ue(e,t){let n=$(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Q(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function We(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=He(e,n,t);else if(t===`document`)r=Be(G(e));else if(K(t))r=Ue(t,n);else{let n=Pe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return H(r)}function Ge(e,t){let n=t.get(e);if(n)return n;let r=ke(e,[],!1).filter(e=>K(e)&&U(e)!==`body`),i=null,a=X(e).position===`fixed`,o=a?Z(e):e;for(;K(o)&&!Y(o);){let e=X(o),t=we(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Z(o)}return t.set(e,r),r}function Ke(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?be(t)?[]:Ge(t,this._c):[].concat(n),r],o=We(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=We(t,a[e],i);s=_(n.top,s),c=g(n.right,c),l=g(n.bottom,l),u=_(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function qe(e){let{width:t,height:n}=je(e);return{width:t,height:n}}function Je(e,t,n){let r=q(t),i=G(t),a=n===`fixed`,o=$(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=b(0);if((r||!a)&&((U(t)!==`body`||ve(i))&&(s=De(t)),r)){let e=$(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ie(i));let l=i&&!r&&!a?Le(i,s):b(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ye(e){return X(e).position===`static`}function Xe(e,t){if(!q(e)||X(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function Ze(e,t){let n=W(e);if(be(e))return n;if(!q(e)){let t=Z(e);for(;t&&!Y(t);){if(K(t)&&!Ye(t))return t;t=Z(t)}return n}let r=Xe(e,t);for(;r&&ye(r)&&Ye(r);)r=Xe(r,t);return r&&Y(r)&&Ye(r)&&!we(r)?n:r||Te(e)||n}var Qe=async function(e){let t=this.getOffsetParent||Ze,n=this.getDimensions,r=await n(e.floating);return{reference:Je(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $e(e){return X(e).direction===`rtl`}var et={convertOffsetParentRelativeRectToViewportRelativeRect:Re,getDocumentElement:G,getClippingRect:Ke,getOffsetParent:Ze,getElementRects:Qe,getClientRects:ze,getDimensions:qe,getScale:Q,isElement:K,isRTL:$e};function tt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nt(e,t,n){let r=null,i,a=G(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=y(d),h=y(a.clientWidth-(u+f)),v=y(a.clientHeight-(d+p)),b=y(u),x={rootMargin:-m+`px `+-h+`px `+-v+`px `+-b+`px`,threshold:_(0,g(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!tt(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=W(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function rt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Me(e),u=i||a?[...l?ke(l):[],...t?ke(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?nt(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?$(e):null;c&&g();function g(){let t=$(e);h&&!tt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var it=de,at=fe,ot=ae,st=me,ct=ce,lt=ie,ut=pe,dt=(e,t,n)=>{let r=new Map,i=n??{},a={...et,...i.platform,_c:r};return re(e,t,{...i,platform:a})},ft=typeof document<`u`?p.useLayoutEffect:function(){};function pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!pt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function mt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ht(e,t){let n=mt(e);return Math.round(t*n)/n}function gt(e){let t=p.useRef(e);return ft(()=>{t.current=e}),t}function _t(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=p.useState(r);pt(m,r)||h(r);let[g,_]=p.useState(null),[v,y]=p.useState(null),b=p.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=p.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=p.useRef(null),T=p.useRef(null),E=p.useRef(u),D=c!=null,O=gt(c),k=gt(i),A=gt(l),j=p.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),dt(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!pt(E.current,t)&&(E.current=t,d.flushSync(()=>{f(t)}))})},[m,t,n,k,A]);ft(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let M=p.useRef(!1);ft(()=>(M.current=!0,()=>{M.current=!1}),[]),ft(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=p.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=p.useMemo(()=>({reference:S,floating:C}),[S,C]),F=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=ht(P.floating,u.x),r=ht(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...mt(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:lt({element:r.current,padding:i}).fn(n):r?lt({element:r,padding:i}).fn(n):{}}}},yt=(e,t)=>{let n=it(e);return{name:n.name,fn:n.fn,options:[e,t]}},bt=(e,t)=>{let n=at(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>({fn:ut(e).fn,options:[e,t]}),St=(e,t)=>{let n=ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ct=(e,t)=>{let n=st(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt=(e,t)=>{let n=ct(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tt=(e,t)=>{let n=vt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Et=`Arrow`,Dt=p.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,f.jsx)(o.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,f.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Dt.displayName=Et;var Ot=Dt,kt=`Popper`,[At,jt]=l(kt),[Mt,Nt]=At(kt),Pt=e=>{let{__scopePopper:t,children:n}=e,[r,i]=p.useState(null),[a,o]=p.useState(void 0);return(0,f.jsx)(Mt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Pt.displayName=kt;var Ft=`PopperAnchor`,It=p.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Nt(Ft,n),c=p.useRef(null),l=a.onAnchorChange,u=s(t,p.useCallback(e=>{c.current=e,e&&l(e)},[l])),d=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&l(d.current)});let m=a.placementState&&Kt(a.placementState),h=m?.[0],g=m?.[1];return r?null:(0,f.jsx)(o.div,{"data-radix-popper-side":h,"data-radix-popper-align":g,...i,ref:u})});It.displayName=Ft;var Lt=`PopperContent`,[Rt,zt]=At(Lt),Bt=p.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:l=`center`,alignOffset:u=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:_=0,sticky:v=`partial`,hideWhenDetached:y=!1,updatePositionStrategy:b=`optimized`,onPlaced:x,...S}=e,C=Nt(Lt,n),[w,T]=p.useState(null),E=s(t,T),[D,O]=p.useState(null),k=m(D),A=k?.width??0,j=k?.height??0,M=r+(l===`center`?``:`-`+l),N=typeof _==`number`?_:{top:0,right:0,bottom:0,left:0,..._},P=Array.isArray(g)?g:[g],F=P.length>0,I={padding:N,boundary:P.filter(Wt),altBoundary:F},{refs:L,floatingStyles:R,placement:z,isPositioned:B,middlewareData:V}=_t({strategy:`fixed`,placement:M,whileElementsMounted:(...e)=>rt(...e,{animationFrame:b===`always`}),elements:{reference:C.anchor},middleware:[yt({mainAxis:i+j,alignmentAxis:u}),h&&bt({mainAxis:!0,crossAxis:!1,limiter:v===`partial`?xt():void 0,...I}),h&&St({...I}),Ct({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),D&&Tt({element:D,padding:d}),Gt({arrowWidth:A,arrowHeight:j}),y&&wt({strategy:`referenceHidden`,...I,boundary:F?I.boundary:void 0})]}),H=C.setPlacementState;a(()=>(H(z),()=>{H(void 0)}),[z,H]);let[ee,te]=Kt(z),ne=c(x);a(()=>{B&&ne?.()},[B,ne]);let re=V.arrow?.x,ie=V.arrow?.y,ae=V.arrow?.centerOffset!==0,[oe,se]=p.useState();return a(()=>{w&&se(window.getComputedStyle(w).zIndex)},[w]),(0,f.jsx)(`div`,{ref:L.setFloating,"data-radix-popper-content-wrapper":``,style:{...R,transform:B?R.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(` `),...V.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,f.jsx)(Rt,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:O,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,f.jsx)(o.div,{"data-side":ee,"data-align":te,...S,ref:E,style:{...S.style,animation:B?void 0:`none`}})})})});Bt.displayName=Lt;var Vt=`PopperArrow`,Ht={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ut=p.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=zt(Vt,n),a=Ht[i.placedSide];return(0,f.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,f.jsx)(Ot,{...r,ref:t,style:{...r.style,display:`block`}})})});Ut.displayName=Vt;function Wt(e){return e!==null}var Gt=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Kt(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Kt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var qt=Pt,Jt=It,Yt=Bt,Xt=Ut;export{jt as a,qt as i,Xt as n,m as o,Yt as r,u as s,Jt as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./button-
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-DujIMO-J.js";import{C as i,E as a,N as o,O as s,S as c,T as l,_ as u,b as d,f,g as p,h as m,j as h,m as g,p as _,v,w as y,x as b,y as x}from"./button-DhBNRPDb.js";import{a as S,i as C,n as w,r as ee,t as T}from"./dist-BJiHofth.js";var E=o(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),D=e(t(),1),O=n();function k(e){let t=e+`CollectionProvider`,[n,r]=y(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=D.useRef(null),a=D.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let c=e+`CollectionSlot`,l=s(c),u=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=h(t,a(c,n).collectionRef);return(0,O.jsx)(l,{ref:i,children:r})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=s(d),m=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),s=h(t,o),c=a(d,n);return D.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,O.jsx)(p,{[f]:``,ref:s,children:r})});m.displayName=d;function g(t){let n=a(e+`CollectionConsumer`,t);return D.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},g,r]}var te=D.createContext(void 0);function A(e){let t=D.useContext(te);return e||t||`ltr`}var j=!1;function M(){let[e,t]=D.useState(j);return D.useEffect(()=>{j||(j=!0,t(!0))},[]),e}var N=D.useSyncExternalStore;function ne(){return()=>{}}function P(){return N(ne,()=>!0,()=>!1)}var re=typeof N==`function`?P:M,F=`rovingFocusGroup.onEntryFocus`,ie={bubbles:!1,cancelable:!0},I=`RovingFocusGroup`,[L,R,ae]=k(I),[oe,z]=y(I,[ae]),[se,ce]=oe(I),le=D.forwardRef((e,t)=>(0,O.jsx)(L.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(L.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(ue,{...e,ref:t})})}));le.displayName=I;var ue=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=D.useRef(null),g=h(t,m),_=A(o),[y,x]=b({prop:s,defaultProp:c??null,onChange:u,caller:I}),[S,C]=D.useState(!1),w=v(d),ee=R(n),T=D.useRef(!1),[E,k]=D.useState(0);return D.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(F,w),()=>e.removeEventListener(F,w)},[w]),(0,O.jsx)(se,{scope:n,orientation:r,dir:_,loop:a,currentTabStopId:y,onItemFocus:D.useCallback(e=>x(e),[x]),onItemShiftTab:D.useCallback(()=>C(!0),[]),onFocusableItemAdd:D.useCallback(()=>k(e=>e+1),[]),onFocusableItemRemove:D.useCallback(()=>k(e=>e-1),[]),children:(0,O.jsx)(l.div,{tabIndex:S||E===0?-1:0,"data-orientation":r,...p,ref:g,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{T.current=!0}),onFocus:i(e.onFocus,e=>{let t=!T.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(F,ie);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=ee().filter(e=>e.focusable);ge([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),f)}}T.current=!1}),onBlur:i(e.onBlur,()=>C(!1))})})}),de=`RovingFocusGroupItem`,fe=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:s,...u}=e,d=x(),f=o||d,p=ce(de,n),m=p.currentTabStopId===f,h=R(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p,y=re();return c(()=>{if(!(!y||!r))return g(),()=>_()},[y,r,g,_]),D.useEffect(()=>{if(!(y||!r))return g(),()=>_()},[y,r,g,_]),(0,O.jsx)(L.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:(0,O.jsx)(l.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:i(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:i(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=he(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?_e(n,r+1):n.slice(r+1)}setTimeout(()=>ge(n))}}),children:typeof s==`function`?s({isCurrentTabStop:m,hasTabStop:v!=null}):s})})});fe.displayName=de;var pe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function me(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function he(e,t,n){let r=me(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return pe[r]}function ge(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function _e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ve=le,ye=fe,be=[`Enter`,` `],xe=[`ArrowDown`,`PageUp`,`Home`],Se=[`ArrowUp`,`PageDown`,`End`],Ce=[...xe,...Se],we={ltr:[...be,`ArrowRight`],rtl:[...be,`ArrowLeft`]},Te={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},B=`Menu`,[V,Ee,De]=k(B),[H,Oe]=y(B,[De,S,z]),U=S(),ke=z(),[Ae,W]=H(B),[je,G]=H(B),Me=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=U(t),[c,l]=D.useState(null),u=D.useRef(!1),d=v(a),f=A(i);return D.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),D.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,O.jsx)(C,{...s,children:(0,O.jsx)(Ae,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,O.jsx)(je,{scope:t,onClose:D.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Me.displayName=B;var Ne=`MenuAnchor`,Pe=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,O.jsx)(T,{...i,...r,ref:t})});Pe.displayName=Ne;var Fe=`MenuPortal`,[Ie,Le]=H(Fe,{forceMount:void 0}),Re=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=W(Fe,t);return(0,O.jsx)(Ie,{scope:t,forceMount:n,children:(0,O.jsx)(d,{present:n||a.open,children:(0,O.jsx)(m,{asChild:!0,container:i,children:r})})})};Re.displayName=Fe;var K=`MenuContent`,[ze,Be]=H(K),Ve=D.forwardRef((e,t)=>{let n=Le(K,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=W(K,e.__scopeMenu),o=G(K,e.__scopeMenu);return(0,O.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(d,{present:r||a.open,children:(0,O.jsx)(V.Slot,{scope:e.__scopeMenu,children:o.modal?(0,O.jsx)(He,{...i,ref:t}):(0,O.jsx)(Ue,{...i,ref:t})})})})}),He=D.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu),r=D.useRef(null),a=h(t,r);return D.useEffect(()=>{let e=r.current;if(e)return f(e)},[]),(0,O.jsx)(Ge,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ue=D.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu);return(0,O.jsx)(Ge,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),We=s(`MenuContent.ScrollLock`),Ge=D.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:v,onDismiss:y,disableOutsideScroll:b,...x}=e,S=W(K,n),C=G(K,n),w=U(n),T=ke(n),E=Ee(n),[k,te]=D.useState(null),A=D.useRef(null),j=h(t,A,S.onContentChange),M=D.useRef(0),N=D.useRef(``),ne=D.useRef(0),P=D.useRef(null),re=D.useRef(`right`),F=D.useRef(0),ie=b?_:D.Fragment,I=b?{as:We,allowPinchZoom:!0}:void 0,L=e=>{let t=N.current+e,n=E().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Tt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){N.current=t,window.clearTimeout(M.current),t!==``&&(M.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};D.useEffect(()=>()=>window.clearTimeout(M.current),[]),g();let R=D.useCallback(e=>re.current===P.current?.side&&Dt(e,P.current?.area),[]);return(0,O.jsx)(ze,{scope:n,searchRef:N,onItemEnter:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:D.useCallback(e=>{R(e)||(A.current?.focus(),te(null))},[R]),onTriggerLeave:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:D.useCallback(e=>{P.current=e},[]),children:(0,O.jsx)(ie,{...I,children:(0,O.jsx)(p,{asChild:!0,trapped:a,onMountAutoFocus:i(o,e=>{e.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,O.jsx)(u,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:v,onDismiss:y,children:(0,O.jsx)(ve,{asChild:!0,...T,dir:C.dir,orientation:`vertical`,loop:r,currentTabStopId:k,onCurrentTabStopIdChange:te,onEntryFocus:i(l,e=>{C.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,O.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":xt(S.open),"data-radix-menu-content":``,dir:C.dir,...w,...x,ref:j,style:{outline:`none`,...x.style},onKeyDown:i(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=A.current;if(e.target!==i||!Ce.includes(e.key))return;e.preventDefault();let a=E().filter(e=>!e.disabled).map(e=>e.ref.current);Se.includes(e.key)&&a.reverse(),Ct(a)}),onBlur:i(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(M.current),N.current=``)}),onPointerMove:i(e.onPointerMove,Z(e=>{let t=e.target,n=F.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>F.current?`right`:`left`;re.current=t,F.current=e.clientX}}))})})})})})})});Ve.displayName=K;var Ke=`MenuGroup`,qe=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(l.div,{role:`group`,...r,ref:t})});qe.displayName=Ke;var Je=`MenuLabel`,Ye=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(l.div,{...r,ref:t})});Ye.displayName=Je;var q=`MenuItem`,Xe=`menu.itemSelect`,J=D.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...o}=e,s=D.useRef(null),c=G(q,e.__scopeMenu),l=Be(q,e.__scopeMenu),u=h(t,s),d=D.useRef(!1),f=()=>{let e=s.current;if(!n&&e){let t=new CustomEvent(Xe,{bubbles:!0,cancelable:!0});e.addEventListener(Xe,e=>r?.(e),{once:!0}),a(e,t),t.defaultPrevented?d.current=!1:c.onClose()}};return(0,O.jsx)(Ze,{...o,ref:u,disabled:n,onClick:i(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:i(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:i(e.onKeyDown,e=>{n||e.target!==e.currentTarget||l.searchRef.current!==``&&e.key===` `||be.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});J.displayName=q;var Ze=D.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,s=Be(q,n),c=ke(n),u=D.useRef(null),d=h(t,u),[f,p]=D.useState(!1),[m,g]=D.useState(``);return D.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[o.children]),(0,O.jsx)(V.ItemSlot,{scope:n,disabled:r,textValue:a??m,children:(0,O.jsx)(ye,{asChild:!0,...c,focusable:!r,children:(0,O.jsx)(l.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...o,ref:d,onPointerMove:i(e.onPointerMove,Z(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:i(e.onPointerLeave,Z(e=>s.onItemLeave(e))),onFocus:i(e.onFocus,()=>p(!0)),onBlur:i(e.onBlur,()=>p(!1))})})})}),Qe=`MenuCheckboxItem`,$e=D.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,O.jsx)(st,{scope:e.__scopeMenu,checked:n,children:(0,O.jsx)(J,{role:`menuitemcheckbox`,"aria-checked":X(n)?`mixed`:n,...a,ref:t,"data-state":St(n),onSelect:i(a.onSelect,()=>r?.(X(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$e.displayName=Qe;var et=`MenuRadioGroup`,[tt,nt]=H(et,{value:void 0,onValueChange:()=>{}}),rt=D.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=v(r);return(0,O.jsx)(tt,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,O.jsx)(qe,{...i,ref:t})})});rt.displayName=et;var it=`MenuRadioItem`,at=D.forwardRef((e,t)=>{let{value:n,...r}=e,a=nt(it,e.__scopeMenu),o=n===a.value;return(0,O.jsx)(st,{scope:e.__scopeMenu,checked:o,children:(0,O.jsx)(J,{role:`menuitemradio`,"aria-checked":o,...r,ref:t,"data-state":St(o),onSelect:i(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});at.displayName=it;var ot=`MenuItemIndicator`,[st,ct]=H(ot,{checked:!1}),lt=D.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=ct(ot,n);return(0,O.jsx)(d,{present:r||X(a.checked)||a.checked===!0,children:(0,O.jsx)(l.span,{...i,ref:t,"data-state":St(a.checked)})})});lt.displayName=ot;var ut=`MenuSeparator`,dt=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(l.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});dt.displayName=ut;var ft=`MenuArrow`,pt=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,O.jsx)(w,{...i,...r,ref:t})});pt.displayName=ft;var mt=`MenuSub`,[ht,gt]=H(mt),_t=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=W(mt,t),o=U(t),[s,c]=D.useState(null),[l,u]=D.useState(null),d=v(i);return D.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,O.jsx)(C,{...o,children:(0,O.jsx)(Ae,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,O.jsx)(ht,{scope:t,contentId:x(),triggerId:x(),trigger:s,onTriggerChange:c,children:n})})})};_t.displayName=mt;var Y=`MenuSubTrigger`,vt=D.forwardRef((e,t)=>{let n=W(Y,e.__scopeMenu),r=G(Y,e.__scopeMenu),a=gt(Y,e.__scopeMenu),o=Be(Y,e.__scopeMenu),s=D.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=D.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);D.useEffect(()=>d,[d]),D.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]);let f=h(t,a.onTriggerChange);return(0,O.jsx)(Pe,{asChild:!0,...u,children:(0,O.jsx)(Ze,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?a.contentId:void 0,"data-state":xt(n.open),...e,ref:f,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:i(e.onPointerMove,Z(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:i(e.onPointerLeave,Z(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:i(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||o.searchRef.current!==``&&t.key===` `||we[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});vt.displayName=Y;var yt=`MenuSubContent`,bt=D.forwardRef((e,t)=>{let n=Le(K,e.__scopeMenu),{forceMount:r=n.forceMount,align:a=`start`,...o}=e,s=W(K,e.__scopeMenu),c=G(K,e.__scopeMenu),l=gt(yt,e.__scopeMenu),u=D.useRef(null),f=h(t,u);return(0,O.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(d,{present:r||s.open,children:(0,O.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,O.jsx)(Ge,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:f,align:a,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:i(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:i(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Te[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});bt.displayName=yt;function xt(e){return e?`open`:`closed`}function X(e){return e===`indeterminate`}function St(e){return X(e)?`indeterminate`:e?`checked`:`unchecked`}function Ct(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Tt(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=wt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Et(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Dt(e,t){return t?Et({x:e.clientX,y:e.clientY},t):!1}function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Ot=Me,kt=Pe,At=Re,jt=Ve,Mt=qe,Nt=Ye,Pt=J,Ft=$e,It=rt,Lt=at,Rt=lt,zt=dt,Bt=pt,Vt=vt,Ht=bt,Q=`DropdownMenu`,[Ut,Wt]=y(Q,[Oe]),$=Oe(),[Gt,Kt]=Ut(Q),qt=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$(t),l=D.useRef(null),[u,d]=b({prop:i,defaultProp:a??!1,onChange:o,caller:Q});return(0,O.jsx)(Gt,{scope:t,triggerId:x(),triggerRef:l,contentId:x(),open:u,onOpenChange:d,onOpenToggle:D.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,O.jsx)(Ot,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};qt.displayName=Q;var Jt=`DropdownMenuTrigger`,Yt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=Kt(Jt,n),s=$(n),c=h(t,o.triggerRef);return(0,O.jsx)(kt,{asChild:!0,...s,children:(0,O.jsx)(l.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...a,ref:c,onPointerDown:i(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:i(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Yt.displayName=Jt;var Xt=`DropdownMenuPortal`,Zt=e=>{let{__scopeDropdownMenu:t,...n}=e,r=$(t);return(0,O.jsx)(At,{...r,...n})};Zt.displayName=Xt;var Qt=`DropdownMenuContent`,$t=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Kt(Qt,n),o=$(n),s=D.useRef(!1);return(0,O.jsx)(jt,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:i(e.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:i(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!a.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});$t.displayName=Qt;var en=`DropdownMenuGroup`,tn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Mt,{...i,...r,ref:t})});tn.displayName=en;var nn=`DropdownMenuLabel`,rn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Nt,{...i,...r,ref:t})});rn.displayName=nn;var an=`DropdownMenuItem`,on=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Pt,{...i,...r,ref:t})});on.displayName=an;var sn=`DropdownMenuCheckboxItem`,cn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Ft,{...i,...r,ref:t})});cn.displayName=sn;var ln=`DropdownMenuRadioGroup`,un=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(It,{...i,...r,ref:t})});un.displayName=ln;var dn=`DropdownMenuRadioItem`,fn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Lt,{...i,...r,ref:t})});fn.displayName=dn;var pn=`DropdownMenuItemIndicator`,mn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Rt,{...i,...r,ref:t})});mn.displayName=pn;var hn=`DropdownMenuSeparator`,gn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(zt,{...i,...r,ref:t})});gn.displayName=hn;var _n=`DropdownMenuArrow`,vn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Bt,{...i,...r,ref:t})});vn.displayName=_n;var yn=`DropdownMenuSubTrigger`,bn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Vt,{...i,...r,ref:t})});bn.displayName=yn;var xn=`DropdownMenuSubContent`,Sn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Ht,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Sn.displayName=xn;var Cn=qt,wn=Yt,Tn=Zt,En=$t,Dn=rn,On=on,kn=un,An=fn,jn=mn,Mn=gn;function Nn({...e}){return(0,O.jsx)(Cn,{"data-slot":`dropdown-menu`,...e})}function Pn({...e}){return(0,O.jsx)(wn,{"data-slot":`dropdown-menu-trigger`,...e})}function Fn({className:e,sideOffset:t=4,...n}){return(0,O.jsx)(Tn,{children:(0,O.jsx)(En,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:r(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function In({className:e,inset:t,variant:n=`default`,...i}){return(0,O.jsx)(On,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:r(`relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...i})}function Ln({...e}){return(0,O.jsx)(kn,{"data-slot":`dropdown-menu-radio-group`,...e})}function Rn({className:e,children:t,...n}){return(0,O.jsxs)(An,{"data-slot":`dropdown-menu-radio-item`,className:r(`relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,O.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,O.jsx)(jn,{children:(0,O.jsx)(E,{className:`size-2 fill-current`})})}),t]})}function zn({className:e,inset:t,...n}){return(0,O.jsx)(Dn,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:r(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function Bn({className:e,...t}){return(0,O.jsx)(Mn,{"data-slot":`dropdown-menu-separator`,className:r(`-mx-1 my-1 h-px bg-border`,e),...t})}function Vn({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:r(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}export{Ln as a,Vn as c,ve as d,z as f,E as h,zn as i,Pn as l,k as m,Fn as n,Rn as o,A as p,In as r,Bn as s,Nn as t,ye as u};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Bl_tQdVw.js";import{C as i,E as a,N as o,O as s,S as c,T as l,_ as u,b as d,f,g as p,h as m,j as h,m as g,p as _,v,w as y,x as b,y as x}from"./button-jcXhXi-5.js";import{a as S,i as C,n as w,r as ee,t as T}from"./dist-C2IyLYZs.js";var E=o(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),D=e(t(),1),O=n();function k(e){let t=e+`CollectionProvider`,[n,r]=y(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=D.useRef(null),a=D.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let c=e+`CollectionSlot`,l=s(c),u=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=h(t,a(c,n).collectionRef);return(0,O.jsx)(l,{ref:i,children:r})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=s(d),m=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),s=h(t,o),c=a(d,n);return D.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,O.jsx)(p,{[f]:``,ref:s,children:r})});m.displayName=d;function g(t){let n=a(e+`CollectionConsumer`,t);return D.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},g,r]}var te=D.createContext(void 0);function A(e){let t=D.useContext(te);return e||t||`ltr`}var j=!1;function M(){let[e,t]=D.useState(j);return D.useEffect(()=>{j||(j=!0,t(!0))},[]),e}var N=D.useSyncExternalStore;function ne(){return()=>{}}function P(){return N(ne,()=>!0,()=>!1)}var re=typeof N==`function`?P:M,F=`rovingFocusGroup.onEntryFocus`,ie={bubbles:!1,cancelable:!0},I=`RovingFocusGroup`,[L,R,ae]=k(I),[oe,z]=y(I,[ae]),[se,ce]=oe(I),le=D.forwardRef((e,t)=>(0,O.jsx)(L.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(L.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(ue,{...e,ref:t})})}));le.displayName=I;var ue=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=D.useRef(null),g=h(t,m),_=A(o),[y,x]=b({prop:s,defaultProp:c??null,onChange:u,caller:I}),[S,C]=D.useState(!1),w=v(d),ee=R(n),T=D.useRef(!1),[E,k]=D.useState(0);return D.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(F,w),()=>e.removeEventListener(F,w)},[w]),(0,O.jsx)(se,{scope:n,orientation:r,dir:_,loop:a,currentTabStopId:y,onItemFocus:D.useCallback(e=>x(e),[x]),onItemShiftTab:D.useCallback(()=>C(!0),[]),onFocusableItemAdd:D.useCallback(()=>k(e=>e+1),[]),onFocusableItemRemove:D.useCallback(()=>k(e=>e-1),[]),children:(0,O.jsx)(l.div,{tabIndex:S||E===0?-1:0,"data-orientation":r,...p,ref:g,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{T.current=!0}),onFocus:i(e.onFocus,e=>{let t=!T.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(F,ie);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=ee().filter(e=>e.focusable);ge([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),f)}}T.current=!1}),onBlur:i(e.onBlur,()=>C(!1))})})}),de=`RovingFocusGroupItem`,fe=D.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:s,...u}=e,d=x(),f=o||d,p=ce(de,n),m=p.currentTabStopId===f,h=R(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p,y=re();return c(()=>{if(!(!y||!r))return g(),()=>_()},[y,r,g,_]),D.useEffect(()=>{if(!(y||!r))return g(),()=>_()},[y,r,g,_]),(0,O.jsx)(L.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:(0,O.jsx)(l.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:i(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:i(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=he(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?_e(n,r+1):n.slice(r+1)}setTimeout(()=>ge(n))}}),children:typeof s==`function`?s({isCurrentTabStop:m,hasTabStop:v!=null}):s})})});fe.displayName=de;var pe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function me(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function he(e,t,n){let r=me(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return pe[r]}function ge(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function _e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ve=le,ye=fe,be=[`Enter`,` `],xe=[`ArrowDown`,`PageUp`,`Home`],Se=[`ArrowUp`,`PageDown`,`End`],Ce=[...xe,...Se],we={ltr:[...be,`ArrowRight`],rtl:[...be,`ArrowLeft`]},Te={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},B=`Menu`,[V,Ee,De]=k(B),[H,Oe]=y(B,[De,S,z]),U=S(),ke=z(),[Ae,W]=H(B),[je,G]=H(B),Me=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=U(t),[c,l]=D.useState(null),u=D.useRef(!1),d=v(a),f=A(i);return D.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),D.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,O.jsx)(C,{...s,children:(0,O.jsx)(Ae,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,O.jsx)(je,{scope:t,onClose:D.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Me.displayName=B;var Ne=`MenuAnchor`,Pe=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,O.jsx)(T,{...i,...r,ref:t})});Pe.displayName=Ne;var Fe=`MenuPortal`,[Ie,Le]=H(Fe,{forceMount:void 0}),Re=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=W(Fe,t);return(0,O.jsx)(Ie,{scope:t,forceMount:n,children:(0,O.jsx)(d,{present:n||a.open,children:(0,O.jsx)(m,{asChild:!0,container:i,children:r})})})};Re.displayName=Fe;var K=`MenuContent`,[ze,Be]=H(K),Ve=D.forwardRef((e,t)=>{let n=Le(K,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=W(K,e.__scopeMenu),o=G(K,e.__scopeMenu);return(0,O.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(d,{present:r||a.open,children:(0,O.jsx)(V.Slot,{scope:e.__scopeMenu,children:o.modal?(0,O.jsx)(He,{...i,ref:t}):(0,O.jsx)(Ue,{...i,ref:t})})})})}),He=D.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu),r=D.useRef(null),a=h(t,r);return D.useEffect(()=>{let e=r.current;if(e)return f(e)},[]),(0,O.jsx)(Ge,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ue=D.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu);return(0,O.jsx)(Ge,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),We=s(`MenuContent.ScrollLock`),Ge=D.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:v,onDismiss:y,disableOutsideScroll:b,...x}=e,S=W(K,n),C=G(K,n),w=U(n),T=ke(n),E=Ee(n),[k,te]=D.useState(null),A=D.useRef(null),j=h(t,A,S.onContentChange),M=D.useRef(0),N=D.useRef(``),ne=D.useRef(0),P=D.useRef(null),re=D.useRef(`right`),F=D.useRef(0),ie=b?_:D.Fragment,I=b?{as:We,allowPinchZoom:!0}:void 0,L=e=>{let t=N.current+e,n=E().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Tt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){N.current=t,window.clearTimeout(M.current),t!==``&&(M.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};D.useEffect(()=>()=>window.clearTimeout(M.current),[]),g();let R=D.useCallback(e=>re.current===P.current?.side&&Dt(e,P.current?.area),[]);return(0,O.jsx)(ze,{scope:n,searchRef:N,onItemEnter:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:D.useCallback(e=>{R(e)||(A.current?.focus(),te(null))},[R]),onTriggerLeave:D.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:D.useCallback(e=>{P.current=e},[]),children:(0,O.jsx)(ie,{...I,children:(0,O.jsx)(p,{asChild:!0,trapped:a,onMountAutoFocus:i(o,e=>{e.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,O.jsx)(u,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:v,onDismiss:y,children:(0,O.jsx)(ve,{asChild:!0,...T,dir:C.dir,orientation:`vertical`,loop:r,currentTabStopId:k,onCurrentTabStopIdChange:te,onEntryFocus:i(l,e=>{C.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,O.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":xt(S.open),"data-radix-menu-content":``,dir:C.dir,...w,...x,ref:j,style:{outline:`none`,...x.style},onKeyDown:i(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=A.current;if(e.target!==i||!Ce.includes(e.key))return;e.preventDefault();let a=E().filter(e=>!e.disabled).map(e=>e.ref.current);Se.includes(e.key)&&a.reverse(),Ct(a)}),onBlur:i(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(M.current),N.current=``)}),onPointerMove:i(e.onPointerMove,Z(e=>{let t=e.target,n=F.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>F.current?`right`:`left`;re.current=t,F.current=e.clientX}}))})})})})})})});Ve.displayName=K;var Ke=`MenuGroup`,qe=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(l.div,{role:`group`,...r,ref:t})});qe.displayName=Ke;var Je=`MenuLabel`,Ye=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(l.div,{...r,ref:t})});Ye.displayName=Je;var q=`MenuItem`,Xe=`menu.itemSelect`,J=D.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...o}=e,s=D.useRef(null),c=G(q,e.__scopeMenu),l=Be(q,e.__scopeMenu),u=h(t,s),d=D.useRef(!1),f=()=>{let e=s.current;if(!n&&e){let t=new CustomEvent(Xe,{bubbles:!0,cancelable:!0});e.addEventListener(Xe,e=>r?.(e),{once:!0}),a(e,t),t.defaultPrevented?d.current=!1:c.onClose()}};return(0,O.jsx)(Ze,{...o,ref:u,disabled:n,onClick:i(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:i(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:i(e.onKeyDown,e=>{n||e.target!==e.currentTarget||l.searchRef.current!==``&&e.key===` `||be.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});J.displayName=q;var Ze=D.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,s=Be(q,n),c=ke(n),u=D.useRef(null),d=h(t,u),[f,p]=D.useState(!1),[m,g]=D.useState(``);return D.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[o.children]),(0,O.jsx)(V.ItemSlot,{scope:n,disabled:r,textValue:a??m,children:(0,O.jsx)(ye,{asChild:!0,...c,focusable:!r,children:(0,O.jsx)(l.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...o,ref:d,onPointerMove:i(e.onPointerMove,Z(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:i(e.onPointerLeave,Z(e=>s.onItemLeave(e))),onFocus:i(e.onFocus,()=>p(!0)),onBlur:i(e.onBlur,()=>p(!1))})})})}),Qe=`MenuCheckboxItem`,$e=D.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,O.jsx)(st,{scope:e.__scopeMenu,checked:n,children:(0,O.jsx)(J,{role:`menuitemcheckbox`,"aria-checked":X(n)?`mixed`:n,...a,ref:t,"data-state":St(n),onSelect:i(a.onSelect,()=>r?.(X(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$e.displayName=Qe;var et=`MenuRadioGroup`,[tt,nt]=H(et,{value:void 0,onValueChange:()=>{}}),rt=D.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=v(r);return(0,O.jsx)(tt,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,O.jsx)(qe,{...i,ref:t})})});rt.displayName=et;var it=`MenuRadioItem`,at=D.forwardRef((e,t)=>{let{value:n,...r}=e,a=nt(it,e.__scopeMenu),o=n===a.value;return(0,O.jsx)(st,{scope:e.__scopeMenu,checked:o,children:(0,O.jsx)(J,{role:`menuitemradio`,"aria-checked":o,...r,ref:t,"data-state":St(o),onSelect:i(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});at.displayName=it;var ot=`MenuItemIndicator`,[st,ct]=H(ot,{checked:!1}),lt=D.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=ct(ot,n);return(0,O.jsx)(d,{present:r||X(a.checked)||a.checked===!0,children:(0,O.jsx)(l.span,{...i,ref:t,"data-state":St(a.checked)})})});lt.displayName=ot;var ut=`MenuSeparator`,dt=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,O.jsx)(l.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});dt.displayName=ut;var ft=`MenuArrow`,pt=D.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,O.jsx)(w,{...i,...r,ref:t})});pt.displayName=ft;var mt=`MenuSub`,[ht,gt]=H(mt),_t=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=W(mt,t),o=U(t),[s,c]=D.useState(null),[l,u]=D.useState(null),d=v(i);return D.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,O.jsx)(C,{...o,children:(0,O.jsx)(Ae,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,O.jsx)(ht,{scope:t,contentId:x(),triggerId:x(),trigger:s,onTriggerChange:c,children:n})})})};_t.displayName=mt;var Y=`MenuSubTrigger`,vt=D.forwardRef((e,t)=>{let n=W(Y,e.__scopeMenu),r=G(Y,e.__scopeMenu),a=gt(Y,e.__scopeMenu),o=Be(Y,e.__scopeMenu),s=D.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=D.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);D.useEffect(()=>d,[d]),D.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]);let f=h(t,a.onTriggerChange);return(0,O.jsx)(Pe,{asChild:!0,...u,children:(0,O.jsx)(Ze,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?a.contentId:void 0,"data-state":xt(n.open),...e,ref:f,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:i(e.onPointerMove,Z(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:i(e.onPointerLeave,Z(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:i(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||o.searchRef.current!==``&&t.key===` `||we[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});vt.displayName=Y;var yt=`MenuSubContent`,bt=D.forwardRef((e,t)=>{let n=Le(K,e.__scopeMenu),{forceMount:r=n.forceMount,align:a=`start`,...o}=e,s=W(K,e.__scopeMenu),c=G(K,e.__scopeMenu),l=gt(yt,e.__scopeMenu),u=D.useRef(null),f=h(t,u);return(0,O.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(d,{present:r||s.open,children:(0,O.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,O.jsx)(Ge,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:f,align:a,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:i(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:i(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Te[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});bt.displayName=yt;function xt(e){return e?`open`:`closed`}function X(e){return e===`indeterminate`}function St(e){return X(e)?`indeterminate`:e?`checked`:`unchecked`}function Ct(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Tt(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=wt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Et(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Dt(e,t){return t?Et({x:e.clientX,y:e.clientY},t):!1}function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Ot=Me,kt=Pe,At=Re,jt=Ve,Mt=qe,Nt=Ye,Pt=J,Ft=$e,It=rt,Lt=at,Rt=lt,zt=dt,Bt=pt,Vt=vt,Ht=bt,Q=`DropdownMenu`,[Ut,Wt]=y(Q,[Oe]),$=Oe(),[Gt,Kt]=Ut(Q),qt=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$(t),l=D.useRef(null),[u,d]=b({prop:i,defaultProp:a??!1,onChange:o,caller:Q});return(0,O.jsx)(Gt,{scope:t,triggerId:x(),triggerRef:l,contentId:x(),open:u,onOpenChange:d,onOpenToggle:D.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,O.jsx)(Ot,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};qt.displayName=Q;var Jt=`DropdownMenuTrigger`,Yt=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=Kt(Jt,n),s=$(n),c=h(t,o.triggerRef);return(0,O.jsx)(kt,{asChild:!0,...s,children:(0,O.jsx)(l.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...a,ref:c,onPointerDown:i(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:i(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Yt.displayName=Jt;var Xt=`DropdownMenuPortal`,Zt=e=>{let{__scopeDropdownMenu:t,...n}=e,r=$(t);return(0,O.jsx)(At,{...r,...n})};Zt.displayName=Xt;var Qt=`DropdownMenuContent`,$t=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Kt(Qt,n),o=$(n),s=D.useRef(!1);return(0,O.jsx)(jt,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:i(e.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:i(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!a.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});$t.displayName=Qt;var en=`DropdownMenuGroup`,tn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Mt,{...i,...r,ref:t})});tn.displayName=en;var nn=`DropdownMenuLabel`,rn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Nt,{...i,...r,ref:t})});rn.displayName=nn;var an=`DropdownMenuItem`,on=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Pt,{...i,...r,ref:t})});on.displayName=an;var sn=`DropdownMenuCheckboxItem`,cn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Ft,{...i,...r,ref:t})});cn.displayName=sn;var ln=`DropdownMenuRadioGroup`,un=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(It,{...i,...r,ref:t})});un.displayName=ln;var dn=`DropdownMenuRadioItem`,fn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Lt,{...i,...r,ref:t})});fn.displayName=dn;var pn=`DropdownMenuItemIndicator`,mn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Rt,{...i,...r,ref:t})});mn.displayName=pn;var hn=`DropdownMenuSeparator`,gn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(zt,{...i,...r,ref:t})});gn.displayName=hn;var _n=`DropdownMenuArrow`,vn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Bt,{...i,...r,ref:t})});vn.displayName=_n;var yn=`DropdownMenuSubTrigger`,bn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Vt,{...i,...r,ref:t})});bn.displayName=yn;var xn=`DropdownMenuSubContent`,Sn=D.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Ht,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Sn.displayName=xn;var Cn=qt,wn=Yt,Tn=Zt,En=$t,Dn=rn,On=on,kn=un,An=fn,jn=mn,Mn=gn;function Nn({...e}){return(0,O.jsx)(Cn,{"data-slot":`dropdown-menu`,...e})}function Pn({...e}){return(0,O.jsx)(wn,{"data-slot":`dropdown-menu-trigger`,...e})}function Fn({className:e,sideOffset:t=4,...n}){return(0,O.jsx)(Tn,{children:(0,O.jsx)(En,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:r(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function In({className:e,inset:t,variant:n=`default`,...i}){return(0,O.jsx)(On,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:r(`relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...i})}function Ln({...e}){return(0,O.jsx)(kn,{"data-slot":`dropdown-menu-radio-group`,...e})}function Rn({className:e,children:t,...n}){return(0,O.jsxs)(An,{"data-slot":`dropdown-menu-radio-item`,className:r(`relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,O.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,O.jsx)(jn,{children:(0,O.jsx)(E,{className:`size-2 fill-current`})})}),t]})}function zn({className:e,inset:t,...n}){return(0,O.jsx)(Dn,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:r(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function Bn({className:e,...t}){return(0,O.jsx)(Mn,{"data-slot":`dropdown-menu-separator`,className:r(`-mx-1 my-1 h-px bg-border`,e),...t})}function Vn({className:e,...t}){return(0,O.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:r(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}export{Ln as a,Vn as c,ve as d,z as f,E as h,zn as i,Pn as l,k as m,Fn as n,Rn as o,A as p,In as r,Bn as s,Nn as t,ye as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./button-
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,r as n,t as r}from"./react-runtime-CCIEwYL0.js";import{$a as i,$n as a,Cr as o,Er as s,F as c,I as l,Mr as u,Oa as d,Qa as f,Qr as p,Zr as m,co as h,cr as g,dr as _,fr as v,lr as y,or as b,pn as x,pr as ee,r as S,rr as C,so as w,sr as T,ui as E,uo as te,ur as D,xa as ne,zr as O}from"./queries-DvnoUOE1.js";import{L as k,M as A,R as j,V as re,a as M,c as ie,gt as ae,s as oe,t as N,vt as se,xt as P}from"./utils-DujIMO-J.js";import{s as ce}from"./project-router-DXcbRXxc.js";import{C as F,i as I,o as L,s as R}from"./use-now-p7SRpNs9.js";import{_ as le,c as ue,d as z,f as de,m as fe,p as pe,u as me}from"./sheet-D8vk1p4X.js";import{N as he}from"./button-DhBNRPDb.js";import{t as ge}from"./check--JMF5pzG.js";import{s as _e}from"./dist-BJiHofth.js";import{r as B}from"./toaster-DkOynrTr.js";import{t as ve}from"./clipboard-DvCUPLwM.js";var ye=e(n()),V=e(t(),1),H=new Map,U=e=>({status:e.status,archived:e.archived,awaitingAnswerSince:e.awaitingAnswerSince,idleClosedAt:e.idleClosedAt}),be=new Map,xe=new Set,W=0;function Se(e,t){t?be.set(e,W+1):be.delete(e),W++,xe.forEach(e=>e())}function Ce(e,t){let n=`${e}:${typeof t==`string`?t:t.id}`;H.delete(n),H.set(n,{value:typeof t==`string`?null:U(t),revision:W+1}),H.size>2e3&&H.delete(H.keys().next().value),W++,xe.forEach(e=>e())}function we(e){return(0,V.useSyncExternalStore)(e=>(xe.add(e),()=>{xe.delete(e)}),()=>W),Ee(e.projectId,e.id)}var Te=()=>W,Ee=(e,t)=>be.has(e)?null:H.get(`${e}:${t}`)?.value;function De(e,t=[]){let n=new Map(t.map(e=>[`${e.projectId}:${e.id}`,e])),r=!1;for(let n of t){let t=be.get(n.projectId);t!==void 0&&t<=e&&(be.delete(n.projectId),r=!0)}for(let[t,i]of H){let a=n.get(t);i.revision>e||!a||(a.status!==void 0&&a.archived!==void 0?(H.set(t,{value:U({status:a.status,archived:a.archived,awaitingAnswerSince:a.awaitingAnswerSince,idleClosedAt:a.idleClosedAt}),revision:W+1}),r=!0):i.value===null&&(H.delete(t),r=!0))}r&&(W++,xe.forEach(e=>e()))}function Oe(e=()=>performance.now()){let t=new Map,n=new Set,r,i={connected:!1,samples:[]},a=()=>{i={...i,samples:[...t.values()].map(e=>e.sample)},n.forEach(e=>e())},o=()=>{let n=!1;for(let[r,i]of t)i.deadline<=e()&&(t.delete(r),n=!0);n&&a()};return{getSnapshot:()=>i,subscribe(e){return n.add(e),r||=setInterval(o,1e3),o(),()=>{n.delete(e),n.size||(clearInterval(r),r=void 0)}},expire:o,connected(e){i.connected!==e&&(i={...i,connected:e},a())},replace(n,r,i){for(let[e,r]of t)r.sample.projectId===n&&t.delete(e);let o=i?Date.parse(i):NaN;for(let i of r){let r=Math.max(0,o-Date.parse(i.sampledAt));Number.isFinite(r)&&r<1e4&&i.projectId===n&&t.set(`${n}:${i.runId}`,{sample:i,deadline:e()+1e4-r})}a()},seed(n,r){for(let[e,n]of t)Date.parse(n.sample.sampledAt)<=Date.parse(r)&&t.delete(e);for(let i of n){let n=Math.max(0,Date.parse(r)-Date.parse(i.sampledAt));Number.isFinite(n)&&n<1e4&&!t.has(`${i.projectId}:${i.runId}`)&&t.set(`${i.projectId}:${i.runId}`,{sample:i,deadline:e()+1e4-n})}a()},remove(e,n){for(let[r,i]of t)i.sample.projectId===e&&(!n||i.sample.runId===n)&&t.delete(r);a()}}}var G=Oe(),ke=()=>(0,V.useSyncExternalStore)(G.subscribe,G.getSnapshot);function Ae(e){return{enabled:(e&&typeof e==`object`?e:{}).enabled===!0}}function je(){let e=globalThis.Notification;if(typeof e!=`function`)return`unsupported`;let t=e.permission;return t===`granted`||t===`denied`?t:`default`}function Me(e,t){let n=new Map,r=[];for(let i of t??[]){n.set(i.id,i.status);let t=e.get(i.id);t===void 0||t===i.status||C(i)&&r.push(i)}return{entering:r,statuses:n}}function Ne(e){return e.enabled&&e.hidden&&e.permission===`granted`}function Pe(e){let t=a(e).label;return{title:e.titleSummary??e.title,body:`Task ${t}`,tag:`cezar-run-${e.id}`}}function Fe(e){return je()===`granted`&&Ie(e)?!0:Ae(e.getQueryData(x.uiState)?.notifications).enabled&&je()===`granted`}function Ie(e){return je()===`granted`&&e.getQueryData(x.uiState)===void 0}var K=r(),Le=`${M(`/workspace/events`)}?slim=1`,Re=2,ze=3e3,Be=[`run`,`run-deleted`,`todos`,`usage`,`ping`],Ve=[`project-added`,`project-removed`,`checkout-progress`,`automation-change`,`tracker-changed`],He=new Set;function Ue(e){return He.add(e),()=>{He.delete(e)}}var We=400,Ge=15e3;function Ke(e){let t;return{onEvent(n){n.type!==`run`&&n.type!==`run-deleted`||t===void 0&&(t=setTimeout(()=>{t=void 0,e.invalidateQueries({queryKey:x.runsIndex})},We))},cancel(){clearTimeout(t),t=void 0}}}var qe=[500,1500];function Je(e){let t=new Set,n=new Map,r=new Set,i=!1,a=e=>{t.delete(e),n.delete(e)},o=(t,r,i)=>{let o=n.get(t);if(a(t),o?.kind===`deleted`){e.setQueryData(r,e=>T(e,i.id));return}e.setQueryData(r,e=>{let t=e!==void 0&&e.some(e=>e.id===i.id)?e:g(e,i);return o?.kind===`run`?g(t,o.frame):t})},s=(t,n,c,l,u)=>{E(c,l).then(e=>{i||o(t,n,e)}).catch(o=>{if(i)return;let d=qe[u],f=o instanceof ee&&o.status>=400&&o.status<500;if(d===void 0||f){a(t),d===void 0&&e.invalidateQueries({queryKey:n,refetchType:`active`});return}let p=setTimeout(()=>{r.delete(p),i||s(t,n,c,l,u+1)},d);r.add(p)})};return{run(e,r){if(i)return;let a=ie(),o=`${a}\0${e}`;if(t.has(o)){n.set(o,{kind:`run`,frame:r});return}t.add(o),s(o,[a,`runs`,`list`],a,e,0)},deleted(e){if(i)return;let r=`${ie()}\0${e}`;t.has(r)&&n.set(r,{kind:`deleted`})},cancel(){i=!0;for(let e of r)clearTimeout(e);r.clear(),t.clear(),n.clear()}}}function Ye(e,t){let n;for(let t of e.getQueryCache().getAll()){if(t.queryKey[1]!==`health`)continue;let e=t.state.data?.bootProject;if(typeof e==`string`){n=e;break}}let r=new Set([t]);return n===t&&r.add(`default`),[...r]}function Xe(e){return[[`run-history`,e],[`run-history-context`,e],[`run-history-tail`,e]]}function Ze(e){return[[e,`runs`],[e,`todos`],[e,`worktrees`],...Xe(e)]}function Qe(e){if(e[0]!==`workspace`)return e[0]===`run-history`||e[0]===`run-history-context`||e[0]===`run-history-tail`?typeof e[1]==`string`?e[1]:void 0:typeof e[0]==`string`?e[0]:void 0}function $e(e){return[...new Set(e.getQueryCache().getAll().map(({queryKey:e})=>Qe(e)).filter(e=>e!==void 0))]}function et(e){let t,n=new Set;return{onEvent(r){if(!(t!==void 0&&n.has(r))){for(let t of Ye(e,r))n.add(t);t===void 0&&(t=setTimeout(()=>{t=void 0;let r=n;n=new Set;let i=ie();for(let t of r)for(let n of Ze(t))e.invalidateQueries({queryKey:n,refetchType:t===i?`active`:`none`})},We))}},cancel(){clearTimeout(t),t=void 0,n.clear()}}}function tt(e,t,n,r){let i=new Map,a,o=0,s=()=>{if(clearTimeout(a),a=void 0,o>0)return;let s=rt(e),c=i;i=new Map;for(let i of c.values())i.project===s?it(e,t,i.event,r):n(i.project)},c=()=>{a===void 0&&(a=setTimeout(s,50))};return{onEvent(e,t){let n=e.type===`run`?e.run.id:e.id;i.set(`${t}:${n}`,{event:e,project:t}),c()},beginReconcile(){s(),o+=1},endReconcile(){o!==0&&(--o,o===0&&s())},cancel(){clearTimeout(a),a=void 0,i.clear(),o=0}}}async function nt(e){let t=ie(),n=[S.runs.all,x.runsIndex,x.dashboard,S.todos,S.health,S.worktrees,F.all(),x.providerStatus,x.hostUsage,x.skillsUpdateAll,[`run-history`,t],[`run-history-context`,t]],r=Promise.allSettled([Promise.all([e.cancelQueries({queryKey:[`tracker`],predicate:e=>e.queryKey[2]!==`items`||e.getObserversCount()===0}),e.cancelQueries({queryKey:x.projects})]).then(()=>Promise.all([e.invalidateQueries({queryKey:[`tracker`],predicate:e=>e.queryKey[2]!==`items`||e.getObserversCount()===0}),e.invalidateQueries({queryKey:x.projects})])),e.invalidateQueries({queryKey:[`worktree-lifecycle`],refetchType:`none`}),...$e(e).filter(e=>e!==t).flatMap(t=>Ze(t).map(t=>e.invalidateQueries({queryKey:t,refetchType:`none`}))),...n.map(t=>e.invalidateQueries({queryKey:t}))]),i=!1,a;try{await Promise.race([r.then(()=>{i=!0}),new Promise(e=>{a=setTimeout(e,Ge)})])}finally{clearTimeout(a)}i||await Promise.allSettled(n.map(t=>e.cancelQueries({queryKey:t})))}function rt(e){return oe()??e.getQueryData(S.health)?.bootProject}function it(e,t,n,r){switch(n.type){case`run`:{let t=S.runs.list(),i=e.getQueryData(t);i&&!D(n.run)&&!i.some(e=>e.id===n.run.id)?r.run(n.run.id,n.run):e.setQueryData(t,e=>g(e,n.run));let a=S.runs.detail(n.run.id);e.getQueryData(a)!==void 0&&e.setQueryData(a,e=>e===void 0?e:_(e,n.run));let o=S.runs.changes(n.run.id);e.getQueryData(o)!==void 0&&e.invalidateQueries({queryKey:o}),e.invalidateQueries({queryKey:S.worktrees});return}case`run-deleted`:r.deleted(n.id),e.setQueryData(S.runs.list(),e=>T(e,n.id)),e.removeQueries({queryKey:S.runs.detail(n.id)}),e.removeQueries({queryKey:S.runs.diff(n.id)}),e.invalidateQueries({queryKey:S.worktrees});return;case`todos`:e.setQueryData(S.todos,n.items);return;case`usage`:t.set(n.usage);return;case`ping`:return}}function at(e,t=Le){let n=te();(0,V.useEffect)(()=>{let r=globalThis.EventSource;if(typeof r!=`function`)return;let a=null,o,s,c=new Set,l=()=>{clearTimeout(o),clearTimeout(s),o=void 0,s=void 0;let e=rt(n);for(let t of c){let r=t===e?ie():t;n.invalidateQueries({queryKey:F.all(r),refetchType:t===e?`active`:`none`}),t===e&&n.invalidateQueries({queryKey:S.worktrees})}c.clear()},u,d,p=()=>{clearTimeout(u),clearTimeout(d),u=void 0,d=void 0,n.invalidateQueries({queryKey:x.dashboard,refetchType:document.visibilityState===`hidden`?`none`:`active`,predicate:e=>e.queryKey[2]!==`telemetry`&&e.queryKey[2]!==`automations`&&!(e.queryKey[2]===`feed`&&e.queryKey[3]===`github`)})},m=()=>{clearTimeout(u),u=setTimeout(p,250),d??=setTimeout(p,1e3)},h=Ke(n),g=Je(n),_=et(n),y=tt(n,e,_.onEvent,g),b,ee=!1,C=!1,w,T=!1,E=Date.now(),te,D=!1,ne=!1,O=0,k=new Set,j=[],re=()=>{D=!0,ne=!1;let e=x.providerStatus;n.cancelQueries({queryKey:e,exact:!0}).then(()=>n.invalidateQueries({queryKey:e,exact:!0,refetchType:`active`})).finally(()=>{if(T||!ne){D=!1;return}re()})},M=e=>{let t=x.providerStatus,r=f(n.getQueryData(t),e);if(r!==void 0){n.setQueryData(t,r);return}if(D){ne=!0;return}re()},oe=()=>{O+=1,y.beginReconcile(),nt(n).finally(()=>{--O,O===0&&(T?(k.clear(),j=[]):N()),y.endReconcile()})},N=()=>{let e=k,t=j;k=new Set,j=[];let r=rt(n);for(let t of e)t===r?n.invalidateQueries({queryKey:S.todos}):_.onEvent(t);for(let e of t)M(e)},ce=()=>{T||b!==void 0||(b=setTimeout(()=>{b=void 0,T||I()},ze))},I=()=>{G.connected(!1),a?.close(),E=Date.now();let u=new r(t,{withCredentials:!0});a=u,u.addEventListener(`open`,()=>{T||a!==u||(E=Date.now(),clearTimeout(w),w=void 0,(ee||C)&&oe(),G.connected(!0),ee=!0,C=!1)});for(let t of Be)u.addEventListener(t,r=>{if(T||a!==u)return;E=Date.now();let i=v(t,r.data);if(i){if(h.onEvent(i.event),(i.event.type===`run`||i.event.type===`run-deleted`)&&(m(),i.project&&Ce(i.project,i.event.type===`run-deleted`?i.event.id:i.event.run),i.project&&(i.event.type===`run-deleted`||i.event.run.status!==`running`)&&G.remove(i.project,i.event.type===`run-deleted`?i.event.id:i.event.run.id)),t===`usage`)try{let e=A.safeParse(JSON.parse(r.data));e.success&&G.replace(e.data.project,e.data.samples??[],e.data.sentAt)}catch{}if(i.project!==null&&i.project!==rt(n)){_.onEvent(i.project);return}i.event.type===`run`||i.event.type===`run-deleted`?i.project!==null&&y.onEvent(i.event,i.project):i.event.type===`todos`&&O>0?i.project!==null&&k.add(i.project):it(n,e,i.event,g)}});u.addEventListener(`worktree-lifecycle`,e=>{if(T||a!==u)return;E=Date.now();let t;try{t=JSON.parse(e.data)}catch{return}let n=se.safeParse(t);n.success&&(c.add(n.data.projectId),clearTimeout(o),o=setTimeout(l,100),s??=setTimeout(l,1e3))}),u.addEventListener(`artifacts`,e=>{if(T||a!==u)return;E=Date.now();let t;try{t=JSON.parse(e.data)}catch{return}let r=ae.safeParse(t);if(!r.success)return;let{project:i,runId:o,artifacts:s,truncated:c,versions:l}=r.data;if(i!==void 0&&i!==rt(n)){_.onEvent(i);return}let d={artifacts:s,truncated:c,...l?{versions:l}:{}},f=S.runs.artifacts(o);n.getQueryData(f)!==void 0&&n.setQueryData(f,d),n.setQueriesData({queryKey:S.runs.impactSubjects},e=>e?.run?.id===o?dt(e,d):e),n.invalidateQueries({queryKey:S.runs.projectAssets})});for(let e of Ve)u.addEventListener(e,t=>{if(T||a!==u)return;E=Date.now();let r;try{r=JSON.parse(t.data)}catch{return}if(e===`tracker-changed`){if(!P.safeParse(r).success)return;Promise.all([n.cancelQueries({queryKey:[`tracker`]}),n.cancelQueries({queryKey:x.projects})]).then(()=>Promise.all([n.invalidateQueries({queryKey:[`tracker`]}),n.invalidateQueries({queryKey:x.projects})]))}e!==`checkout-progress`&&e!==`automation-change`&&e!==`tracker-changed`&&(r&&typeof r==`object`&&(e===`project-removed`&&`id`in r&&typeof r.id==`string`?(Se(r.id,!0),G.remove(r.id)):e===`project-added`&&`project`in r&&r.project&&typeof r.project==`object`&&`id`in r.project&&typeof r.project.id==`string`&&Se(r.project.id,!1)),n.invalidateQueries({queryKey:x.projects}),n.invalidateQueries({queryKey:x.dashboard,refetchType:document.visibilityState===`hidden`?`none`:`active`}));for(let t of[...He])t(e,r)});u.addEventListener(`provider-status`,e=>{if(T||a!==u)return;E=Date.now();let t;try{t=JSON.parse(e.data)}catch{return}let n=i(t);if(n){if(O>0){j.push(n);return}M(n)}}),u.addEventListener(`error`,()=>{T||a!==u||(G.connected(!1),u.readyState===Re&&ce())})},L=()=>{C=!0,clearTimeout(w),w=setTimeout(()=>{w=void 0,!(T||!C)&&(C=!1,oe())},Ge)},R,ue=()=>{if(R=void 0,T||document.visibilityState!==`hidden`)return;if(Fe(n)){Ie(n)&&(R=setTimeout(ue,le));return}clearTimeout(b),b=void 0;let e=a;a=null,G.connected(!1),e?.close()},z=()=>{document.visibilityState===`hidden`&&(R??=setTimeout(ue,le))},de=()=>{if(document.visibilityState===`hidden`){z();return}if(clearTimeout(R),R=void 0,!a||a.readyState===Re){clearTimeout(b),b=void 0,L(),I();return}oe()},fe=()=>{clearTimeout(b),b=void 0;let e=a;a=null,G.connected(!1),e?.close()},pe=e=>{e.persisted&&(L(),I(),z())};return te=setInterval(()=>{T||document.visibilityState!==`visible`||Date.now()-E<=4e4||(clearTimeout(b),b=void 0,I())},1e4),document.addEventListener(`visibilitychange`,de),window.addEventListener(`pagehide`,fe),window.addEventListener(`pageshow`,pe),I(),z(),()=>{T=!0,clearTimeout(b),clearTimeout(w),clearInterval(te),clearTimeout(R),G.connected(!1),clearTimeout(u),clearTimeout(d),clearTimeout(o),clearTimeout(s),c.clear(),h.cancel(),g.cancel(),_.cancel(),y.cancel(),k.clear(),j=[],document.removeEventListener(`visibilitychange`,de),window.removeEventListener(`pagehide`,fe),window.removeEventListener(`pageshow`,pe);let e=a;a=null,G.connected(!1),e?.close()}},[n,e,t])}var ot=(0,V.createContext)(null);function st({children:e}){let[t]=(0,V.useState)(y);return at(t),l(),(0,K.jsx)(ot.Provider,{value:t,children:e})}function ct(e){let t=(0,V.useContext)(ot),n=t?t.get:ut;return(0,V.useSyncExternalStore)(t?t.subscribe:lt,()=>e?n()[e]:void 0,()=>void 0)}var lt=()=>()=>void 0,ut=()=>b;function dt(e,t){if(e.run===null)return e;let{versions:n,...r}=e;return{...r,artifacts:t.artifacts,truncated:t.truncated,...t.versions?{versions:t.versions}:{}}}var ft=he(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),pt=he(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),mt=he(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ht=he(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]);function gt(){var e=[...arguments];return(0,V.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var _t=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function vt(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function yt(e){return`nodeType`in e}function q(e){return e?vt(e)?e:yt(e)?e.ownerDocument?.defaultView??window:window:window}function bt(e){let{Document:t}=q(e);return e instanceof t}function xt(e){return!vt(e)&&e instanceof q(e).HTMLElement}function St(e){return e instanceof q(e).SVGElement}function Ct(e){return e?vt(e)?e.document:yt(e)?bt(e)?e:xt(e)||St(e)?e.ownerDocument:document:document:document}var J=_t?V.useLayoutEffect:V.useEffect;function wt(e){let t=(0,V.useRef)(e);return J(()=>{t.current=e}),(0,V.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Tt(){let e=(0,V.useRef)(null);return[(0,V.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,V.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Et(e,t){t===void 0&&(t=[e]);let n=(0,V.useRef)(e);return J(()=>{n.current!==e&&(n.current=e)},t),n}function Dt(e,t){let n=(0,V.useRef)();return(0,V.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Ot(e){let t=wt(e),n=(0,V.useRef)(null);return[n,(0,V.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function kt(e){let t=(0,V.useRef)();return(0,V.useEffect)(()=>{t.current=e},[e]),t.current}var At={};function jt(e,t){return(0,V.useMemo)(()=>{if(t)return t;let n=At[e]==null?0:At[e]+1;return At[e]=n,e+`-`+n},[e,t])}function Mt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Nt=Mt(1),Pt=Mt(-1);function Ft(e){return`clientX`in e&&`clientY`in e}function It(e){if(!e)return!1;let{KeyboardEvent:t}=q(e.target);return t&&e instanceof t}function Lt(e){if(!e)return!1;let{TouchEvent:t}=q(e.target);return t&&e instanceof t}function Rt(e){if(Lt(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Ft(e)?{x:e.clientX,y:e.clientY}:null}var zt=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[zt.Translate.toString(e),zt.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Bt=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Vt(e){return e.matches(Bt)?e:e.querySelector(Bt)}var Ht={display:`none`};function Ut(e){let{id:t,value:n}=e;return V.createElement(`div`,{id:t,style:Ht},n)}function Wt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return V.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Gt(){let[e,t]=(0,V.useState)(``);return{announce:(0,V.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Kt=(0,V.createContext)(null);function qt(e){let t=(0,V.useContext)(Kt);(0,V.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Jt(){let[e]=(0,V.useState)(()=>new Set),t=(0,V.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,V.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Yt={draggable:`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,r as n,t as r}from"./react-runtime-CCIEwYL0.js";import{$a as i,$n as a,Cr as o,Er as s,F as c,I as l,Mr as u,Oa as d,Qa as f,Qr as p,Zr as m,co as h,cr as g,dr as _,fr as v,lr as y,or as b,pn as x,pr as ee,r as S,rr as C,so as w,sr as T,ui as E,uo as te,ur as D,xa as ne,zr as O}from"./queries-DbDUaheq.js";import{L as k,M as A,R as j,V as re,a as M,c as ie,gt as ae,s as oe,t as N,vt as se,xt as P}from"./utils-Bl_tQdVw.js";import{s as ce}from"./project-router-ByYpf5zi.js";import{C as F,i as I,o as L,s as R}from"./use-now-CdtIyF-0.js";import{_ as le,c as ue,d as z,f as de,m as fe,p as pe,u as me}from"./sheet-DJ7Q8rRA.js";import{N as he}from"./button-jcXhXi-5.js";import{t as ge}from"./check-CNVywZ6B.js";import{s as _e}from"./dist-C2IyLYZs.js";import{r as B}from"./toaster-CejrnYvv.js";import{t as ve}from"./clipboard-DvCUPLwM.js";var ye=e(n()),V=e(t(),1),H=new Map,U=e=>({status:e.status,archived:e.archived,awaitingAnswerSince:e.awaitingAnswerSince,idleClosedAt:e.idleClosedAt}),be=new Map,xe=new Set,W=0;function Se(e,t){t?be.set(e,W+1):be.delete(e),W++,xe.forEach(e=>e())}function Ce(e,t){let n=`${e}:${typeof t==`string`?t:t.id}`;H.delete(n),H.set(n,{value:typeof t==`string`?null:U(t),revision:W+1}),H.size>2e3&&H.delete(H.keys().next().value),W++,xe.forEach(e=>e())}function we(e){return(0,V.useSyncExternalStore)(e=>(xe.add(e),()=>{xe.delete(e)}),()=>W),Ee(e.projectId,e.id)}var Te=()=>W,Ee=(e,t)=>be.has(e)?null:H.get(`${e}:${t}`)?.value;function De(e,t=[]){let n=new Map(t.map(e=>[`${e.projectId}:${e.id}`,e])),r=!1;for(let n of t){let t=be.get(n.projectId);t!==void 0&&t<=e&&(be.delete(n.projectId),r=!0)}for(let[t,i]of H){let a=n.get(t);i.revision>e||!a||(a.status!==void 0&&a.archived!==void 0?(H.set(t,{value:U({status:a.status,archived:a.archived,awaitingAnswerSince:a.awaitingAnswerSince,idleClosedAt:a.idleClosedAt}),revision:W+1}),r=!0):i.value===null&&(H.delete(t),r=!0))}r&&(W++,xe.forEach(e=>e()))}function Oe(e=()=>performance.now()){let t=new Map,n=new Set,r,i={connected:!1,samples:[]},a=()=>{i={...i,samples:[...t.values()].map(e=>e.sample)},n.forEach(e=>e())},o=()=>{let n=!1;for(let[r,i]of t)i.deadline<=e()&&(t.delete(r),n=!0);n&&a()};return{getSnapshot:()=>i,subscribe(e){return n.add(e),r||=setInterval(o,1e3),o(),()=>{n.delete(e),n.size||(clearInterval(r),r=void 0)}},expire:o,connected(e){i.connected!==e&&(i={...i,connected:e},a())},replace(n,r,i){for(let[e,r]of t)r.sample.projectId===n&&t.delete(e);let o=i?Date.parse(i):NaN;for(let i of r){let r=Math.max(0,o-Date.parse(i.sampledAt));Number.isFinite(r)&&r<1e4&&i.projectId===n&&t.set(`${n}:${i.runId}`,{sample:i,deadline:e()+1e4-r})}a()},seed(n,r){for(let[e,n]of t)Date.parse(n.sample.sampledAt)<=Date.parse(r)&&t.delete(e);for(let i of n){let n=Math.max(0,Date.parse(r)-Date.parse(i.sampledAt));Number.isFinite(n)&&n<1e4&&!t.has(`${i.projectId}:${i.runId}`)&&t.set(`${i.projectId}:${i.runId}`,{sample:i,deadline:e()+1e4-n})}a()},remove(e,n){for(let[r,i]of t)i.sample.projectId===e&&(!n||i.sample.runId===n)&&t.delete(r);a()}}}var G=Oe(),ke=()=>(0,V.useSyncExternalStore)(G.subscribe,G.getSnapshot);function Ae(e){return{enabled:(e&&typeof e==`object`?e:{}).enabled===!0}}function je(){let e=globalThis.Notification;if(typeof e!=`function`)return`unsupported`;let t=e.permission;return t===`granted`||t===`denied`?t:`default`}function Me(e,t){let n=new Map,r=[];for(let i of t??[]){n.set(i.id,i.status);let t=e.get(i.id);t===void 0||t===i.status||C(i)&&r.push(i)}return{entering:r,statuses:n}}function Ne(e){return e.enabled&&e.hidden&&e.permission===`granted`}function Pe(e){let t=a(e).label;return{title:e.titleSummary??e.title,body:`Task ${t}`,tag:`cezar-run-${e.id}`}}function Fe(e){return je()===`granted`&&Ie(e)?!0:Ae(e.getQueryData(x.uiState)?.notifications).enabled&&je()===`granted`}function Ie(e){return je()===`granted`&&e.getQueryData(x.uiState)===void 0}var K=r(),Le=`${M(`/workspace/events`)}?slim=1`,Re=2,ze=3e3,Be=[`run`,`run-deleted`,`todos`,`usage`,`ping`],Ve=[`project-added`,`project-removed`,`checkout-progress`,`automation-change`,`tracker-changed`],He=new Set;function Ue(e){return He.add(e),()=>{He.delete(e)}}var We=400,Ge=15e3;function Ke(e){let t;return{onEvent(n){n.type!==`run`&&n.type!==`run-deleted`||t===void 0&&(t=setTimeout(()=>{t=void 0,e.invalidateQueries({queryKey:x.runsIndex})},We))},cancel(){clearTimeout(t),t=void 0}}}var qe=[500,1500];function Je(e){let t=new Set,n=new Map,r=new Set,i=!1,a=e=>{t.delete(e),n.delete(e)},o=(t,r,i)=>{let o=n.get(t);if(a(t),o?.kind===`deleted`){e.setQueryData(r,e=>T(e,i.id));return}e.setQueryData(r,e=>{let t=e!==void 0&&e.some(e=>e.id===i.id)?e:g(e,i);return o?.kind===`run`?g(t,o.frame):t})},s=(t,n,c,l,u)=>{E(c,l).then(e=>{i||o(t,n,e)}).catch(o=>{if(i)return;let d=qe[u],f=o instanceof ee&&o.status>=400&&o.status<500;if(d===void 0||f){a(t),d===void 0&&e.invalidateQueries({queryKey:n,refetchType:`active`});return}let p=setTimeout(()=>{r.delete(p),i||s(t,n,c,l,u+1)},d);r.add(p)})};return{run(e,r){if(i)return;let a=ie(),o=`${a}\0${e}`;if(t.has(o)){n.set(o,{kind:`run`,frame:r});return}t.add(o),s(o,[a,`runs`,`list`],a,e,0)},deleted(e){if(i)return;let r=`${ie()}\0${e}`;t.has(r)&&n.set(r,{kind:`deleted`})},cancel(){i=!0;for(let e of r)clearTimeout(e);r.clear(),t.clear(),n.clear()}}}function Ye(e,t){let n;for(let t of e.getQueryCache().getAll()){if(t.queryKey[1]!==`health`)continue;let e=t.state.data?.bootProject;if(typeof e==`string`){n=e;break}}let r=new Set([t]);return n===t&&r.add(`default`),[...r]}function Xe(e){return[[`run-history`,e],[`run-history-context`,e],[`run-history-tail`,e]]}function Ze(e){return[[e,`runs`],[e,`todos`],[e,`worktrees`],...Xe(e)]}function Qe(e){if(e[0]!==`workspace`)return e[0]===`run-history`||e[0]===`run-history-context`||e[0]===`run-history-tail`?typeof e[1]==`string`?e[1]:void 0:typeof e[0]==`string`?e[0]:void 0}function $e(e){return[...new Set(e.getQueryCache().getAll().map(({queryKey:e})=>Qe(e)).filter(e=>e!==void 0))]}function et(e){let t,n=new Set;return{onEvent(r){if(!(t!==void 0&&n.has(r))){for(let t of Ye(e,r))n.add(t);t===void 0&&(t=setTimeout(()=>{t=void 0;let r=n;n=new Set;let i=ie();for(let t of r)for(let n of Ze(t))e.invalidateQueries({queryKey:n,refetchType:t===i?`active`:`none`})},We))}},cancel(){clearTimeout(t),t=void 0,n.clear()}}}function tt(e,t,n,r){let i=new Map,a,o=0,s=()=>{if(clearTimeout(a),a=void 0,o>0)return;let s=rt(e),c=i;i=new Map;for(let i of c.values())i.project===s?it(e,t,i.event,r):n(i.project)},c=()=>{a===void 0&&(a=setTimeout(s,50))};return{onEvent(e,t){let n=e.type===`run`?e.run.id:e.id;i.set(`${t}:${n}`,{event:e,project:t}),c()},beginReconcile(){s(),o+=1},endReconcile(){o!==0&&(--o,o===0&&s())},cancel(){clearTimeout(a),a=void 0,i.clear(),o=0}}}async function nt(e){let t=ie(),n=[S.runs.all,x.runsIndex,x.dashboard,S.todos,S.health,S.worktrees,F.all(),x.providerStatus,x.hostUsage,x.skillsUpdateAll,[`run-history`,t],[`run-history-context`,t]],r=Promise.allSettled([Promise.all([e.cancelQueries({queryKey:[`tracker`],predicate:e=>e.queryKey[2]!==`items`||e.getObserversCount()===0}),e.cancelQueries({queryKey:x.projects})]).then(()=>Promise.all([e.invalidateQueries({queryKey:[`tracker`],predicate:e=>e.queryKey[2]!==`items`||e.getObserversCount()===0}),e.invalidateQueries({queryKey:x.projects})])),e.invalidateQueries({queryKey:[`worktree-lifecycle`],refetchType:`none`}),...$e(e).filter(e=>e!==t).flatMap(t=>Ze(t).map(t=>e.invalidateQueries({queryKey:t,refetchType:`none`}))),...n.map(t=>e.invalidateQueries({queryKey:t}))]),i=!1,a;try{await Promise.race([r.then(()=>{i=!0}),new Promise(e=>{a=setTimeout(e,Ge)})])}finally{clearTimeout(a)}i||await Promise.allSettled(n.map(t=>e.cancelQueries({queryKey:t})))}function rt(e){return oe()??e.getQueryData(S.health)?.bootProject}function it(e,t,n,r){switch(n.type){case`run`:{let t=S.runs.list(),i=e.getQueryData(t);i&&!D(n.run)&&!i.some(e=>e.id===n.run.id)?r.run(n.run.id,n.run):e.setQueryData(t,e=>g(e,n.run));let a=S.runs.detail(n.run.id);e.getQueryData(a)!==void 0&&e.setQueryData(a,e=>e===void 0?e:_(e,n.run));let o=S.runs.changes(n.run.id);e.getQueryData(o)!==void 0&&e.invalidateQueries({queryKey:o}),e.invalidateQueries({queryKey:S.worktrees});return}case`run-deleted`:r.deleted(n.id),e.setQueryData(S.runs.list(),e=>T(e,n.id)),e.removeQueries({queryKey:S.runs.detail(n.id)}),e.removeQueries({queryKey:S.runs.diff(n.id)}),e.invalidateQueries({queryKey:S.worktrees});return;case`todos`:e.setQueryData(S.todos,n.items);return;case`usage`:t.set(n.usage);return;case`ping`:return}}function at(e,t=Le){let n=te();(0,V.useEffect)(()=>{let r=globalThis.EventSource;if(typeof r!=`function`)return;let a=null,o,s,c=new Set,l=()=>{clearTimeout(o),clearTimeout(s),o=void 0,s=void 0;let e=rt(n);for(let t of c){let r=t===e?ie():t;n.invalidateQueries({queryKey:F.all(r),refetchType:t===e?`active`:`none`}),t===e&&n.invalidateQueries({queryKey:S.worktrees})}c.clear()},u,d,p=()=>{clearTimeout(u),clearTimeout(d),u=void 0,d=void 0,n.invalidateQueries({queryKey:x.dashboard,refetchType:document.visibilityState===`hidden`?`none`:`active`,predicate:e=>e.queryKey[2]!==`telemetry`&&e.queryKey[2]!==`automations`&&!(e.queryKey[2]===`feed`&&e.queryKey[3]===`github`)})},m=()=>{clearTimeout(u),u=setTimeout(p,250),d??=setTimeout(p,1e3)},h=Ke(n),g=Je(n),_=et(n),y=tt(n,e,_.onEvent,g),b,ee=!1,C=!1,w,T=!1,E=Date.now(),te,D=!1,ne=!1,O=0,k=new Set,j=[],re=()=>{D=!0,ne=!1;let e=x.providerStatus;n.cancelQueries({queryKey:e,exact:!0}).then(()=>n.invalidateQueries({queryKey:e,exact:!0,refetchType:`active`})).finally(()=>{if(T||!ne){D=!1;return}re()})},M=e=>{let t=x.providerStatus,r=f(n.getQueryData(t),e);if(r!==void 0){n.setQueryData(t,r);return}if(D){ne=!0;return}re()},oe=()=>{O+=1,y.beginReconcile(),nt(n).finally(()=>{--O,O===0&&(T?(k.clear(),j=[]):N()),y.endReconcile()})},N=()=>{let e=k,t=j;k=new Set,j=[];let r=rt(n);for(let t of e)t===r?n.invalidateQueries({queryKey:S.todos}):_.onEvent(t);for(let e of t)M(e)},ce=()=>{T||b!==void 0||(b=setTimeout(()=>{b=void 0,T||I()},ze))},I=()=>{G.connected(!1),a?.close(),E=Date.now();let u=new r(t,{withCredentials:!0});a=u,u.addEventListener(`open`,()=>{T||a!==u||(E=Date.now(),clearTimeout(w),w=void 0,(ee||C)&&oe(),G.connected(!0),ee=!0,C=!1)});for(let t of Be)u.addEventListener(t,r=>{if(T||a!==u)return;E=Date.now();let i=v(t,r.data);if(i){if(h.onEvent(i.event),(i.event.type===`run`||i.event.type===`run-deleted`)&&(m(),i.project&&Ce(i.project,i.event.type===`run-deleted`?i.event.id:i.event.run),i.project&&(i.event.type===`run-deleted`||i.event.run.status!==`running`)&&G.remove(i.project,i.event.type===`run-deleted`?i.event.id:i.event.run.id)),t===`usage`)try{let e=A.safeParse(JSON.parse(r.data));e.success&&G.replace(e.data.project,e.data.samples??[],e.data.sentAt)}catch{}if(i.project!==null&&i.project!==rt(n)){_.onEvent(i.project);return}i.event.type===`run`||i.event.type===`run-deleted`?i.project!==null&&y.onEvent(i.event,i.project):i.event.type===`todos`&&O>0?i.project!==null&&k.add(i.project):it(n,e,i.event,g)}});u.addEventListener(`worktree-lifecycle`,e=>{if(T||a!==u)return;E=Date.now();let t;try{t=JSON.parse(e.data)}catch{return}let n=se.safeParse(t);n.success&&(c.add(n.data.projectId),clearTimeout(o),o=setTimeout(l,100),s??=setTimeout(l,1e3))}),u.addEventListener(`artifacts`,e=>{if(T||a!==u)return;E=Date.now();let t;try{t=JSON.parse(e.data)}catch{return}let r=ae.safeParse(t);if(!r.success)return;let{project:i,runId:o,artifacts:s,truncated:c,versions:l}=r.data;if(i!==void 0&&i!==rt(n)){_.onEvent(i);return}let d={artifacts:s,truncated:c,...l?{versions:l}:{}},f=S.runs.artifacts(o);n.getQueryData(f)!==void 0&&n.setQueryData(f,d),n.setQueriesData({queryKey:S.runs.impactSubjects},e=>e?.run?.id===o?dt(e,d):e),n.invalidateQueries({queryKey:S.runs.projectAssets})});for(let e of Ve)u.addEventListener(e,t=>{if(T||a!==u)return;E=Date.now();let r;try{r=JSON.parse(t.data)}catch{return}if(e===`tracker-changed`){if(!P.safeParse(r).success)return;Promise.all([n.cancelQueries({queryKey:[`tracker`]}),n.cancelQueries({queryKey:x.projects})]).then(()=>Promise.all([n.invalidateQueries({queryKey:[`tracker`]}),n.invalidateQueries({queryKey:x.projects})]))}e!==`checkout-progress`&&e!==`automation-change`&&e!==`tracker-changed`&&(r&&typeof r==`object`&&(e===`project-removed`&&`id`in r&&typeof r.id==`string`?(Se(r.id,!0),G.remove(r.id)):e===`project-added`&&`project`in r&&r.project&&typeof r.project==`object`&&`id`in r.project&&typeof r.project.id==`string`&&Se(r.project.id,!1)),n.invalidateQueries({queryKey:x.projects}),n.invalidateQueries({queryKey:x.dashboard,refetchType:document.visibilityState===`hidden`?`none`:`active`}));for(let t of[...He])t(e,r)});u.addEventListener(`provider-status`,e=>{if(T||a!==u)return;E=Date.now();let t;try{t=JSON.parse(e.data)}catch{return}let n=i(t);if(n){if(O>0){j.push(n);return}M(n)}}),u.addEventListener(`error`,()=>{T||a!==u||(G.connected(!1),u.readyState===Re&&ce())})},L=()=>{C=!0,clearTimeout(w),w=setTimeout(()=>{w=void 0,!(T||!C)&&(C=!1,oe())},Ge)},R,ue=()=>{if(R=void 0,T||document.visibilityState!==`hidden`)return;if(Fe(n)){Ie(n)&&(R=setTimeout(ue,le));return}clearTimeout(b),b=void 0;let e=a;a=null,G.connected(!1),e?.close()},z=()=>{document.visibilityState===`hidden`&&(R??=setTimeout(ue,le))},de=()=>{if(document.visibilityState===`hidden`){z();return}if(clearTimeout(R),R=void 0,!a||a.readyState===Re){clearTimeout(b),b=void 0,L(),I();return}oe()},fe=()=>{clearTimeout(b),b=void 0;let e=a;a=null,G.connected(!1),e?.close()},pe=e=>{e.persisted&&(L(),I(),z())};return te=setInterval(()=>{T||document.visibilityState!==`visible`||Date.now()-E<=4e4||(clearTimeout(b),b=void 0,I())},1e4),document.addEventListener(`visibilitychange`,de),window.addEventListener(`pagehide`,fe),window.addEventListener(`pageshow`,pe),I(),z(),()=>{T=!0,clearTimeout(b),clearTimeout(w),clearInterval(te),clearTimeout(R),G.connected(!1),clearTimeout(u),clearTimeout(d),clearTimeout(o),clearTimeout(s),c.clear(),h.cancel(),g.cancel(),_.cancel(),y.cancel(),k.clear(),j=[],document.removeEventListener(`visibilitychange`,de),window.removeEventListener(`pagehide`,fe),window.removeEventListener(`pageshow`,pe);let e=a;a=null,G.connected(!1),e?.close()}},[n,e,t])}var ot=(0,V.createContext)(null);function st({children:e}){let[t]=(0,V.useState)(y);return at(t),l(),(0,K.jsx)(ot.Provider,{value:t,children:e})}function ct(e){let t=(0,V.useContext)(ot),n=t?t.get:ut;return(0,V.useSyncExternalStore)(t?t.subscribe:lt,()=>e?n()[e]:void 0,()=>void 0)}var lt=()=>()=>void 0,ut=()=>b;function dt(e,t){if(e.run===null)return e;let{versions:n,...r}=e;return{...r,artifacts:t.artifacts,truncated:t.truncated,...t.versions?{versions:t.versions}:{}}}var ft=he(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),pt=he(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),mt=he(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ht=he(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]);function gt(){var e=[...arguments];return(0,V.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var _t=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function vt(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function yt(e){return`nodeType`in e}function q(e){return e?vt(e)?e:yt(e)?e.ownerDocument?.defaultView??window:window:window}function bt(e){let{Document:t}=q(e);return e instanceof t}function xt(e){return!vt(e)&&e instanceof q(e).HTMLElement}function St(e){return e instanceof q(e).SVGElement}function Ct(e){return e?vt(e)?e.document:yt(e)?bt(e)?e:xt(e)||St(e)?e.ownerDocument:document:document:document}var J=_t?V.useLayoutEffect:V.useEffect;function wt(e){let t=(0,V.useRef)(e);return J(()=>{t.current=e}),(0,V.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Tt(){let e=(0,V.useRef)(null);return[(0,V.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,V.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Et(e,t){t===void 0&&(t=[e]);let n=(0,V.useRef)(e);return J(()=>{n.current!==e&&(n.current=e)},t),n}function Dt(e,t){let n=(0,V.useRef)();return(0,V.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Ot(e){let t=wt(e),n=(0,V.useRef)(null);return[n,(0,V.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function kt(e){let t=(0,V.useRef)();return(0,V.useEffect)(()=>{t.current=e},[e]),t.current}var At={};function jt(e,t){return(0,V.useMemo)(()=>{if(t)return t;let n=At[e]==null?0:At[e]+1;return At[e]=n,e+`-`+n},[e,t])}function Mt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Nt=Mt(1),Pt=Mt(-1);function Ft(e){return`clientX`in e&&`clientY`in e}function It(e){if(!e)return!1;let{KeyboardEvent:t}=q(e.target);return t&&e instanceof t}function Lt(e){if(!e)return!1;let{TouchEvent:t}=q(e.target);return t&&e instanceof t}function Rt(e){if(Lt(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Ft(e)?{x:e.clientX,y:e.clientY}:null}var zt=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[zt.Translate.toString(e),zt.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Bt=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Vt(e){return e.matches(Bt)?e:e.querySelector(Bt)}var Ht={display:`none`};function Ut(e){let{id:t,value:n}=e;return V.createElement(`div`,{id:t,style:Ht},n)}function Wt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return V.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Gt(){let[e,t]=(0,V.useState)(``);return{announce:(0,V.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Kt=(0,V.createContext)(null);function qt(e){let t=(0,V.useContext)(Kt);(0,V.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Jt(){let[e]=(0,V.useState)(()=>new Set),t=(0,V.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,V.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Yt={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./button-
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]);export{t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{At as r,Sa as i,ga as a,gt as o,pr as s}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{At as r,Sa as i,ga as a,gt as o,pr as s}from"./queries-DbDUaheq.js";import{t as c}from"./utils-Bl_tQdVw.js";import{N as l}from"./button-jcXhXi-5.js";import{t as u}from"./triangle-alert-CBrg6nYB.js";import{t as d}from"./centered-state-zjxxQcEb.js";import{a as f,i as p,o as m,t as h}from"./markdown--qN61YgZ.js";var g=l(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),_=l(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),v=l(`file-x`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m14.5 12.5-5 5`,key:`b62r18`}],[`path`,{d:`m9.5 12.5 5 5`,key:`1rk7el`}]]),y=l(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),b=e(t(),1),x=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`bmp`,`ico`,`avif`]);function S(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:x.has(t.slice(n+1).toLowerCase())}function C(e){return e.tooLarge?`too-large`:S(e.path)?`image`:e.binary?`binary`:`text`}function w(e){return e>=1024**2?`${(e/1024**2).toFixed(1)} MB`:e>=1024?`${(e/1024).toFixed(1)} kB`:`${e} B`}var T=n();function E(e,t){let n=r(e.kind===`run`?e.runId:void 0,e.kind===`run`?t:void 0),i=o(e.kind===`repo`?t:void 0);return e.kind===`run`?n:i}function D(e,t){return e.kind===`run`?i(e.runId,t):a(t)}function O({source:e,path:t,className:n,headerActions:r}){let i=E(e,t??void 0);if(t===null)return(0,T.jsx)(M,{className:n,children:(0,T.jsx)(d,{icon:(0,T.jsx)(y,{}),tone:`neutral`,heading:`h2`,title:`Select a file`,subtitle:`Pick a file from the tree to preview it here.`})});if(i.isPending)return(0,T.jsx)(M,{className:n,children:(0,T.jsxs)(`p`,{"data-slot":`file-preview-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground`,children:[`Loading `,t,`…`]})});if(i.isError){let e=i.error instanceof s&&i.error.status===409;return(0,T.jsx)(M,{className:n,children:(0,T.jsx)(d,{icon:e?(0,T.jsx)(v,{}):(0,T.jsx)(u,{}),tone:e?`neutral`:`danger`,heading:`h2`,title:e?`Cannot preview this file`:`Could not load this file`,subtitle:i.error.message})})}return i.data.type===`file`?(0,T.jsx)(j,{source:e,entry:i.data,className:n,headerActions:r}):null}function k(e){return/\.(md|markdown|mdx)$/i.test(e)}var A=`rendered`;function j({source:e,entry:t,className:n,headerActions:r}){let i=C(t),a=i===`text`&&k(t.path),[o,s]=(0,b.useState)(A),l=e=>{A=e,s(e)};return(0,T.jsxs)(M,{className:n,children:[(0,T.jsxs)(`header`,{"data-slot":`file-preview-head`,className:`sticky top-0 z-10 flex items-center gap-2 border-b border-border bg-[color-mix(in_oklab,var(--muted)_40%,var(--card))] px-4 py-2 text-xs shadow-[0_-1px_0_color-mix(in_oklab,var(--muted)_40%,var(--card))]`,children:[(0,T.jsx)(`span`,{className:`min-w-0 truncate font-mono font-medium`,children:t.path}),a?(0,T.jsx)(`div`,{"data-slot":`markdown-view-toggle`,className:`ml-auto flex shrink-0 overflow-hidden rounded-sm border border-border`,children:[`rendered`,`source`].map(e=>(0,T.jsx)(`button`,{type:`button`,"data-mode":e,"aria-pressed":o===e,onClick:()=>l(e),className:c(`px-2 py-0.5 capitalize`,o===e?`bg-muted font-medium text-foreground`:`text-soft-foreground hover:bg-muted`),children:e},e))}):null,(0,T.jsx)(`span`,{className:c(`shrink-0 tabular-nums text-soft-foreground`,a?`pl-2`:`ml-auto`),children:w(t.size)})]}),r?(0,T.jsx)(`div`,{"data-slot":`file-preview-actions`,className:`border-b border-border px-4 py-2`,children:r}):null,i===`image`?(0,T.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,T.jsx)(`img`,{"data-slot":`file-preview-image`,src:D(e,t.path),alt:t.path,className:`max-h-[70vh] max-w-full rounded-sm`})}):i===`too-large`?(0,T.jsx)(d,{icon:(0,T.jsx)(g,{}),tone:`neutral`,heading:`h2`,title:`Too large to preview`,subtitle:`${w(t.size)} — past the preview cap. Open it in your editor instead.`}):i===`binary`?(0,T.jsx)(d,{icon:(0,T.jsx)(_,{}),tone:`neutral`,heading:`h2`,title:`Binary file`,subtitle:`${w(t.size)} of binary data — no text preview.`}):a&&o===`rendered`?(0,T.jsx)(`div`,{"data-slot":`file-preview-markdown`,className:`px-4 py-3`,children:(0,T.jsx)(h,{children:t.content??``})}):(0,T.jsx)(F,{path:t.path,text:t.content??``})]})}function M({className:e,children:t}){return(0,T.jsx)(`section`,{"data-slot":`file-preview`,className:c(`overflow-clip rounded-lg border border-border bg-card`,e),children:t})}var N=1500;function P(e,t){let n=(0,b.useMemo)(()=>t.split(`
|
|
2
2
|
`).map(e=>[{content:e}]),[t]),r=(0,b.useMemo)(()=>m(e),[e]),i=n.length>N,[a,o]=(0,b.useState)(null);return(0,b.useEffect)(()=>{if(r===null||i)return;let n=!1;return p(t,r).then(r=>{n||o({key:`${e}\0${t}`,tokens:r.tokens})}),()=>{n=!0}},[e,t,r,i]),r===null||i?n:a?.key===`${e}\0${t}`?a.tokens:f(t,r)?.tokens??n}function F({path:e,text:t}){let n=P(e,t);return(0,T.jsx)(`div`,{"data-slot":`file-preview-code`,"data-lang":m(e)??`plaintext`,className:`overflow-x-auto py-2 font-mono text-xs leading-[1.7]`,children:n.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex px-4`,children:[(0,T.jsx)(`span`,{className:`w-10 shrink-0 select-none pr-3 text-right tabular-nums text-soft-foreground`,children:t+1}),(0,T.jsx)(`span`,{className:`min-w-0 flex-1 whitespace-pre pr-4`,children:e.map((e,t)=>(0,T.jsx)(`span`,{style:e.color===void 0?void 0:{color:e.color},children:e.content},t))})]},t))})}export{y as a,S as i,O as n,w as r,F as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Bl_tQdVw.js";import{N as i}from"./button-jcXhXi-5.js";import{t as a}from"./chevron-right-D2EqYt_O.js";import{t as o}from"./file-D9jm2sJ3.js";import{t as s}from"./folder-Ctd1Xvqx.js";import{n as c}from"./markdown-BiRiR9OM.js";var l=i(`folder-tree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),u=i(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),d=e(t(),1),f=n();function p({root:e,selected:t,onSelect:n,commentCounts:r=m}){return(0,f.jsx)(h.Provider,{value:r,children:(0,f.jsx)(`nav`,{"data-slot":`changes-tree`,"aria-label":`Changed files`,className:`min-w-0 text-ui`,children:(0,f.jsxs)(`ul`,{className:`flex flex-col gap-px`,children:[e.dirs.map(e=>(0,f.jsx)(v,{dir:e,depth:0,selected:t,onSelect:n},e.path)),e.files.map(e=>(0,f.jsx)(b,{file:e,depth:0,selected:t,onSelect:n},e.path))]})})})}var m=new Map,h=(0,d.createContext)(m);function g(e,t){let n=0;for(let r of e.files)n+=t.get(r.path)??0;for(let r of e.dirs)n+=g(r,t);return n}function _({adds:e,dels:t}){return(0,f.jsxs)(`span`,{className:`shrink-0 font-mono text-meta font-medium tabular-nums`,children:[e>0?(0,f.jsxs)(`span`,{className:`text-success`,children:[`+`,e]}):null,e>0&&t>0?` `:null,t>0?(0,f.jsxs)(`span`,{className:`text-danger`,children:[`−`,t]}):null]})}function v({dir:e,depth:t,selected:n,onSelect:i}){let[o,l]=(0,d.useState)(!0),u=(0,d.useContext)(h),p=o?0:g(e,u);return(0,f.jsxs)(`li`,{children:[(0,f.jsxs)(`button`,{type:`button`,"data-slot":`tree-dir`,"data-path":e.path,"data-state":o?`open`:`closed`,"aria-expanded":o,onClick:()=>l(e=>!e),className:`flex w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left text-muted-foreground hover:bg-muted hover:text-foreground`,style:{paddingLeft:`${6+t*14}px`},children:[(0,f.jsx)(a,{"aria-hidden":`true`,className:r(`size-3.5 shrink-0 transition-transform`,o&&`rotate-90`)}),(0,f.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,f.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:e.name}),(0,f.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-2`,children:[(0,f.jsx)(c,{count:p}),(0,f.jsx)(_,{adds:e.adds,dels:e.dels})]})]}),o?(0,f.jsxs)(`ul`,{className:`flex flex-col gap-px`,children:[e.dirs.map(e=>(0,f.jsx)(v,{dir:e,depth:t+1,selected:n,onSelect:i},e.path)),e.files.map(e=>(0,f.jsx)(b,{file:e,depth:t+1,selected:n,onSelect:i},e.path))]}):null]})}var y={added:`text-success`,deleted:`text-danger`};function b({file:e,depth:t,selected:n,onSelect:i}){let a=n===e.path,s=(0,d.useContext)(h).get(e.path)??0;return(0,f.jsx)(`li`,{children:(0,f.jsxs)(`button`,{type:`button`,"data-slot":`tree-file`,"data-path":e.path,"aria-current":a?`true`:void 0,onClick:()=>i(e.path),className:r(`flex w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left hover:bg-muted`,a?`bg-muted font-medium text-foreground`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${24+t*14}px`},children:[(0,f.jsx)(o,{"aria-hidden":`true`,className:r(`size-3.5 shrink-0`,y[e.status])}),(0,f.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name}),(0,f.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-2`,children:[(0,f.jsx)(c,{count:s}),(0,f.jsx)(_,{adds:e.adds,dels:e.dels})]})]})})}var x=`cez-tree-pane-width`,S=.6;function C(e,t=1/0){if(e==null||e===``)return null;let n=typeof e==`number`?e:Number(e);if(!Number.isFinite(n))return null;let r=Math.max(160,Math.min(720,t*S));return Math.min(r,Math.max(160,Math.round(n)))}function w(){try{return C(localStorage.getItem(x))}catch{return null}}function T(e){try{let t=C(e);t===null?localStorage.removeItem(x):localStorage.setItem(x,String(t))}catch{}}var E=new Set,D;function O(e){E.add(e);let t=t=>{t.key!==null&&t.key!==`cez-tree-pane-width`||(D=void 0,e())};return window.addEventListener(`storage`,t),()=>{E.delete(e),window.removeEventListener(`storage`,t)}}function k(){return D===void 0?w():D}function A(e){T(e),D=w()===e?void 0:e;for(let e of E)e()}function j(){return[d.useSyncExternalStore(O,k,k),A]}function M(e){return e===null?{}:{style:{"--tree-pane-width":`${e}px`},className:`md:w-(--tree-pane-width)!`}}function N({paneRef:e,width:t,onWidthChange:n,className:i}){let a=d.useRef(null),o=()=>t??Math.round(e.current?.getBoundingClientRect().width??0),s=t=>C(t,e.current?.parentElement?.clientWidth||1/0),c=e=>{e.button===0&&(a.current={x:e.clientX,width:o()},e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault(),e.currentTarget.focus())},l=e=>{let t=a.current;t&&n(s(t.width+(e.clientX-t.x)))},u=e=>{a.current&&(a.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,f.jsx)(`div`,{"data-slot":`tree-pane-resize`,className:r(`relative -mr-5 w-0 shrink-0`,i),children:(0,f.jsx)(`div`,{"data-slot":`tree-pane-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the file tree`,"aria-valuenow":t??void 0,"aria-valuemin":160,"aria-valuemax":720,tabIndex:0,onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:u,onKeyDown:e=>{let t=e.key===`ArrowLeft`?o()-16:e.key===`ArrowRight`?o()+16:e.key===`Home`?160:e.key===`End`?720:null;t!==null&&(e.preventDefault(),n(s(t)))},onDoubleClick:()=>n(null),title:`Drag to resize the file tree — double-click to reset`,className:`absolute inset-y-0 -left-[14px] z-10 w-2 cursor-col-resize touch-none rounded-full bg-transparent transition-colors hover:bg-violet/40 focus-visible:bg-violet/60 focus-visible:outline-none`})})}var P=(e,t)=>e.name.localeCompare(t.name);function F(e){let t=e;for(;t.files.length===0&&t.dirs.length===1;){let e=t.dirs[0];t={...e,name:`${t.name}/${e.name}`}}return{...t,dirs:t.dirs.map(F)}}function I(e,t){let n=(e,t)=>({kind:`dir`,name:e,path:t,dirs:[],files:[]}),r=n(``,``),i=new Map([[``,r]]),a=e=>{let t=i.get(e);if(t)return t;let r=e.lastIndexOf(`/`),o=a(r===-1?``:e.slice(0,r)),s=n(r===-1?e:e.slice(r+1),e);return o.dirs.push(s),i.set(e,s),s};for(let n of e){let e=n.lastIndexOf(`/`);a(e===-1?``:n.slice(0,e)).files.push(t(n,e===-1?n:n.slice(e+1)))}let o=e=>{e.dirs.forEach(o),e.dirs.sort(P),e.files.sort(P)};return o(r),{...r,dirs:r.dirs.map(F)}}function L(e){let t=new Map(e.map(e=>[e.path,e])),n=I(e.map(e=>e.path),(e,n)=>{let r=t.get(e);return{kind:`file`,name:n,path:e,status:r.status,adds:r.adds,dels:r.dels,binary:r.binary}}),r=e=>{let t=e.dirs.map(r);return{...e,dirs:t,adds:e.files.reduce((e,t)=>e+t.adds,0)+t.reduce((e,t)=>e+t.adds,0),dels:e.files.reduce((e,t)=>e+t.dels,0)+t.reduce((e,t)=>e+t.dels,0),fileCount:e.files.length+t.reduce((e,t)=>e+t.fileCount,0)}};return r(n)}export{j as a,l as c,M as i,I as n,p as o,N as r,u as s,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./button-
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ft as r,Wt as i,Xa as a,a as o,et as s,jr as c,mr as l,pr as u,r as d,ro as f,so as p,uo as m,v as h}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ft as r,Wt as i,Xa as a,a as o,et as s,jr as c,mr as l,pr as u,r as d,ro as f,so as p,uo as m,v as h}from"./queries-DbDUaheq.js";import{Dt as g}from"./utils-Bl_tQdVw.js";import{N as _}from"./button-jcXhXi-5.js";import{B as v,G as y,T as b,_ as x,d as S,g as C,gt as w,n as T,p as E,t as D,v as O,w as k,y as A}from"./picker-pill-BFprBA9h.js";import{t as ee}from"./reasoning-effort-pill-BMAjcAKk.js";var j=_(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),M=_(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]);function N(e){return[...e].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)||e.name.localeCompare(t.name))}function P(e){let t=e.find(e=>e.name===`impact.html`);if(t)return t;let n=N(e);return n.find(e=>e.kind===`html`)??n[0]}function F(e,t){return(t===void 0?void 0:e.find(e=>e.name===t))??P(e)}function I(e){return e.title?.trim()||e.name}var L={html:`HTML`,markdown:`Markdown`,image:`Image`,json:`JSON`,other:`File`},R=`allow-scripts allow-popups allow-popups-to-escape-sandbox`,z=`cez-view-focus`;function B(e){try{let t=localStorage.getItem(z),n=t===null?null:JSON.parse(t);return typeof n==`object`&&!!n&&n[e]===!0}catch{return!1}}function V(e,t){try{let n=localStorage.getItem(z),r=n===null?{}:JSON.parse(n),i=typeof r==`object`&&r?{...r}:{};i[e]=t,localStorage.setItem(z,JSON.stringify(i))}catch{}}var H=e(t(),1);function U(e){return e===`running`||e===`waiting`||e===`queued`?`live`:`continue`}var W=[250,500,1e3,1e3,2e3,2e3,3e3],G=e=>new Promise(t=>setTimeout(t,e));function K(e){return e instanceof u&&e.status===409&&e.message===`session closed`}var q=`the agent is not taking messages right now — your message is back in the composer; send it again once the task settles`;function J(e){return K(e)?new u(409,q,{cause:e}):e}function Y(e){return e instanceof u&&e.status===409&&e.message===`run is still active`}function X(e,t){return e===`live`?K(t):Y(t)}var Z=e=>e.steps.filter(e=>e.id.startsWith(`continue-`)).length;function te(e,t,n={}){let{wait:r=G,surface:s=`existing_session`}=n,c=m(),{mutateAsync:d}=i(e.id),f=Z(e);return(0,H.useCallback)(async(n,i)=>{let p=a(),m=async e=>{let r=await(e===`live`?d({text:n,images:i}):t(n,i,p));return s&&w(s),r},h=()=>c.fetchQuery({...o(e.id),staleTime:0}),g=U(e.status),_;try{return await m(g)}catch(e){_=e}for(let e=0;g===`continue`&&_ instanceof u&&_.status===0;e+=1){let t=l[e];if(t===void 0)throw _;await r(t);let n=await h().catch(()=>void 0);if(!n||U(n.status)!==`continue`||Z(n)!==f)throw _;try{return await m(`continue`)}catch(e){_=e}}if(!(_ instanceof u)||_.status!==409)throw _;let y=_;for(let e=0;;e+=1){let t;try{t=await h()}catch{throw J(y)}let a=U(t.status);if(a===g){let t=X(g,y)?W[e]:void 0;if(t===void 0)throw J(y);await r(t);try{return await m(g)}catch(e){if(!X(g,e))throw e;y=e;continue}}if(a===`live`&&n.trim()===``&&i.length===0)return;if(a===`continue`&&v(t)===void 0)throw J(y);return await m(a)}},[t,f,c,e.id,e.status,d,s,r])}function Q(e,t=null){let n=s(),r=f(n.data),i=e.runner??`claude`,a=A(t,r,i),o=r.includes(i),c=n.isPending||n.isSuccess&&r.length>0,l=n.isError?`Provider authentication could not be verified.`:c?void 0:`Connect an agent provider to continue.`;return{runners:r,currentRunner:i,runner:a,currentRunnerConnected:o,canContinue:c,providerPending:n.isPending,providerError:n.isError,reason:l,runnerOverride:!n.isPending&&(t!==null||!o)?a:void 0}}var $=n();function ne(e){let t=m(),n=y(e).continueRun,i=h(),[a,o]=(0,H.useState)(null),[s,l]=(0,H.useState)(null),[u,f]=(0,H.useState)(null),[_,v]=(0,H.useState)(null),w=Q(e,a),{runners:A,canContinue:j,currentRunner:M,runner:N}=w,P=r(N,n),F=i.data?.modelsLocked===!0,I=N!==M,L=!F&&!I&&e.model?{...i.data?.defaultModels,[N]:e.model}:i.data?.defaultModels,R=F?null:s,z=E(N,P.data,[R,L?.[N]]),B=x(R,N,L,P.data),V=I?void 0:[...e.steps].reverse().find(e=>e.sessionId)?.reasoningEffort??e.reasoningEffort,U=C(N,B,P.data),W=O(u??V??null,N,B,P.data),{accounts:G,repoAccount:K}=b(),q=[...e.steps].reverse().find(e=>e.profileId)?.profileId??e.agentProfile??`default`,J=I?K:{...K,[M]:q},Y=G.some(e=>e.provider===N&&e.id===_)?_:null,X=p({mutationFn:({text:t,images:n,idempotencyKey:r})=>j?c(e.id,{text:t.trim()?t:void 0,images:n.length?n:void 0,runner:w.runnerOverride,model:!F&&s!==null?B:void 0,reasoningEffort:!F&&g(N)&&u!==null?W:void 0,agentProfile:Y??void 0,idempotencyKey:r}):Promise.reject(Error(w.reason??`Connect an agent provider to continue.`)),onSuccess:()=>t.invalidateQueries({queryKey:d.runs.all})});return{available:n,canContinue:j,reason:w.reason,providerPending:w.providerPending,pills:(0,$.jsxs)(`div`,{"data-slot":`follow-up-engine`,className:`flex flex-wrap items-center gap-1.5`,children:[A.length>1||A.some(e=>k(G,e))?(0,$.jsx)(T,{runners:A,value:N,accounts:G,account:Y,repoAccount:J,onPick:(e,t)=>{v(t),e!==N&&(o(e),l(null),f(null))}}):null,(0,$.jsx)(D,{slot:`follow-up-model-pill`,ariaLabel:`Model`,label:z.find(e=>e.id===B)?.label??`auto`,value:B,readOnly:F,disabledHint:`Model selection is locked to native coding-agent settings.`,onPick:e=>{l(e),f(``)},options:z.map(e=>({value:e.id,label:e.label,desc:e.desc})),status:S(N,P.data,P.isError)}),(0,$.jsx)(ee,{runner:N,model:B,value:W,options:U,modelsLocked:F,onPick:f})]}),continueWith:(e,t,n)=>X.mutateAsync({text:e,images:t,idempotencyKey:n})}}export{L as a,F as c,M as d,j as f,R as i,B as l,Q as n,I as o,te as r,N as s,ne as t,V as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./button-
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),n=e(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]);export{t as n,n as t};
|
package/web/dist/assets/{git-pull-request-draft-CLy0NzfX.js → git-pull-request-draft-BIgZJsu-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./button-
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`git-pull-request-draft`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M18 6V5`,key:`1oao2s`}],[`path`,{d:`M18 11v-1`,key:`11c8tz`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]);export{t};
|