@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"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{t as n}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{t as n}from"./utils-Bl_tQdVw.js";e();var r=t();function i({className:e,type:t,...i}){return(0,r.jsx)(`input`,{type:t,"data-slot":`input`,className:n(`h-9 w-full min-w-0 rounded-md border border-input bg-card px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-soft-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20`,e),...i})}export{i 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-DujIMO-J.js";import{t as i}from"./project-router-DXcbRXxc.js";import{_ as a,g as o,h as s,m as c,p as l,v as u}from"./use-now-p7SRpNs9.js";import{t as d}from"./button-DhBNRPDb.js";import{At as f,C as p,D as m,I as h,J as g,M as _,Pt as v,Z as y,lt as b}from"./git-tab-loading-BfHswOkO.js";import{t as x}from"./check--JMF5pzG.js";import{s as S}from"./dist-BJiHofth.js";import{c as C,i as w,l as T,n as E,r as D,s as O,t as k}from"./dropdown-menu-R7qzKuR5.js";import{t as A}from"./save-A5Be1rcj.js";import{t as j}from"./x-BzTqCf_Q.js";import{t as M}from"./input-Cv2-g500.js";var N=e(t(),1);function P(e){let t=(0,N.useRef)(0),[n,r]=(0,N.useState)(!1);return{over:n,reset:()=>{t.current=0,r(!1)},handlers:{onDragEnter:n=>{e(n)&&(t.current+=1,r(!0))},onDragLeave:n=>{e(n)&&(t.current=Math.max(0,t.current-1),t.current===0&&r(!1))}}}}var F=n(),I=2,ee=new Map,te=[],ne=[],re=30,L=`text/cez-view`,R=`text/cez-column`;function z({layouts:e,active:t,onSelect:n,onClose:a,saved:o=ne,onApplySaved:s,onSaveCurrent:c,onDeleteSaved:l,fixedViews:u=[],fixedActive:h=null,onViews:g=te,onSelectFixed:_,notesHref:y,notesActive:x=!1,showLayouts:S=!0,onViewDragStart:w,onViewDragEnd:O,onOpenBeside:A,onColumnDropClose:j,keyHints:M=ee,showKeyHints:z=!1,badges:V}){let U=y?m(u):[...u],W=e=>e===`notes`?x:h===e,G=(0,N.useRef)(null),[ae,oe]=(0,N.useState)(0),[K,q]=(0,N.useState)(null),se=`${U.join(`|`)}#${S&&h===null?t:``}#${JSON.stringify(V??{})}`;(0,N.useEffect)(()=>{let e=G.current;if(!e)return;let t=()=>oe(e.clientWidth),n=typeof ResizeObserver>`u`?null:new ResizeObserver(t);return n?.observe(e),window.addEventListener(`resize`,t),()=>{n?.disconnect(),window.removeEventListener(`resize`,t)}},[]);let[ce,le]=(0,N.useState)(0);(0,N.useEffect)(()=>{let e=typeof document>`u`?void 0:document.fonts;if(!e)return;let t=()=>le(e=>e+1);return e.ready.then(t),e.addEventListener?.(`loadingdone`,t),()=>e.removeEventListener?.(`loadingdone`,t)},[]),(0,N.useLayoutEffect)(()=>q(null),[se,ae,ce]),(0,N.useLayoutEffect)(()=>{let e=G.current;K===null||K===0||!e||e.scrollWidth>e.clientWidth+1&&q(K-1)}),(0,N.useLayoutEffect)(()=>{let e=G.current;if(K!==null||!e)return;let t=[...e.querySelectorAll(`[data-strip-item]`)].map(e=>e.offsetWidth+I),n=[...e.querySelectorAll(`[data-strip-chrome]`)].reduce((e,t)=>e+t.offsetWidth+I,0),r=e.clientWidth-n;if(t.reduce((e,t)=>e+t,0)<=r){q(U.length);return}let i=U.findIndex(W),a=re,o=0;for(let[e,n]of t.entries()){let s=i>e?t[i]??0:0;if(a+n+s>r)break;a+=n,o+=1}q(o)});let J=K??U.length,Y=U.slice(0,J),X=U.findIndex(W);X>=J&&(Y=[...Y,U[X]]);let Z=U.filter(e=>!Y.includes(e)),Q=e=>j!==void 0&&e.dataTransfer.types.includes(R),{over:$,reset:ue,handlers:de}=P(Q);return(0,F.jsxs)(`div`,{ref:G,"data-slot":`layout-cards`,"data-drop-close":$?``:void 0,className:r(`relative flex min-w-0 flex-1 items-end gap-0.5 overflow-x-clip rounded-md`,$&&`bg-muted outline-1 outline-dashed outline-border`),onDragOver:e=>{Q(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`)},...de,onDrop:e=>{if(ue(),!Q(e))return;let t=e.dataTransfer.getData(R),n=Number(t);t===``||!Number.isInteger(n)||(e.preventDefault(),j?.(n))},children:[Y.map(e=>{if(e===`notes`)return(0,F.jsxs)(i,{to:y,"data-strip-item":``,"aria-current":x?`page`:void 0,className:r(`relative -mb-px flex h-9 shrink-0 items-center gap-1.5 border-b-2 px-2.5 text-ui font-medium`,x?`border-foreground text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`),children:[(0,F.jsx)(B,{hint:z?M.get(`view:notes`):void 0,children:(0,F.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})}),`Notes`]},`notes`);let t=U.indexOf(e)+1,n=p[e],a=W(e),o=g.includes(e),s=b(e),c=M.get(`view:${e}`);return(0,F.jsxs)(d,{type:`button`,variant:`ghost`,"data-slot":`layout-card`,"data-strip-item":``,"data-fixed":e,"data-active":a?`true`:void 0,"data-on":o?``:void 0,"aria-pressed":a||o,draggable:w!==void 0,title:w?`${s}${t<=9?` (${t})`:``} — drag onto the workspace to split, ⌥-click to open beside`:s,onClick:t=>{t.altKey&&A?A(e):_?.(e)},onDragStart:t=>{t.dataTransfer.setData(L,e),t.dataTransfer.effectAllowed=`copyMove`,w?.(e)},onDragEnd:()=>O?.(),className:r(`relative -mb-px h-9 shrink-0 gap-1.5 rounded-none border-b-2 border-transparent px-2.5 text-ui font-medium text-muted-foreground hover:bg-transparent hover:text-foreground active:translate-y-0`,(a||o)&&`text-foreground`,a&&`border-foreground`),children:[(0,F.jsx)(B,{hint:z?c:void 0,children:(0,F.jsx)(n,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})}),s,V?.[e]?(0,F.jsx)(`span`,{"data-slot":`tab-badge`,"aria-label":`${V[e]} ${s.toLowerCase()}`,className:`rounded-full bg-muted px-1.5 py-px text-micro font-semibold tabular-nums text-muted-foreground`,children:V[e]}):null,o&&!a?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-2 right-1 size-1.5 rounded-full bg-primary`}):null]},e)}),Z.length>0?(0,F.jsxs)(k,{children:[(0,F.jsx)(T,{asChild:!0,children:(0,F.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`more-views`,"aria-label":`${Z.length} more views`,title:`More views`,className:`mb-1 size-7 shrink-0 text-muted-foreground`,children:(0,F.jsx)(v,{"aria-hidden":`true`})})}),(0,F.jsx)(E,{align:`start`,className:`max-h-72 w-56 overflow-y-auto`,children:Z.map(e=>{if(e===`notes`)return(0,F.jsx)(D,{asChild:!0,children:(0,F.jsxs)(i,{to:y,children:[(0,F.jsx)(f,{"aria-hidden":`true`}),(0,F.jsx)(`span`,{className:`truncate`,children:`Notes`}),M.get(`view:notes`)?(0,F.jsx)(C,{children:M.get(`view:notes`)}):null]})},`notes`);let t=p[e],n=M.get(`view:${e}`);return(0,F.jsxs)(D,{"data-view":e,onSelect:()=>_?.(e),children:[(0,F.jsx)(t,{"aria-hidden":`true`}),(0,F.jsx)(`span`,{className:`truncate`,children:b(e)}),n?(0,F.jsx)(C,{children:n}):null]},e)})})]}):null,$?(0,F.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 rounded bg-background px-2 py-0.5 text-xs font-medium text-foreground shadow-sm`,children:`Drop to close this column`}):null,S?(0,F.jsx)(`div`,{"data-strip-chrome":``,className:`ml-auto flex shrink-0 items-center pb-1 pl-2`,children:(0,F.jsx)(ie,{layouts:e,active:h===null?t:null,saved:o,onSelect:n,onClose:a,onApplySaved:s,onSaveCurrent:c,onDeleteSaved:l,suggestedName:H(e,h===null?t:null,h)})}):null]})}function B({hint:e,children:t}){let n=`pointer-events-none flex shrink-0 items-center justify-center rounded-[4px] bg-foreground font-mono text-micro leading-none font-semibold text-background`;return e?e.length===1?(0,F.jsx)(`kbd`,{"data-slot":`tab-key-hint`,"aria-hidden":`true`,className:r(n,`size-3.5`),children:e}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`invisible flex shrink-0`,children:t}),(0,F.jsx)(`kbd`,{"data-slot":`tab-key-hint`,"aria-hidden":`true`,className:r(n,`absolute -top-1 right-0 z-10 h-4 px-1`),children:e})]}):t}function V({count:e,className:t}){let n=Math.max(1,Math.min(e,3)),i=2.5,a=1.5,o=(20-i*2-a*(n-1))/n;return(0,F.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 20 14`,className:r(`h-3.5 w-5 shrink-0`,t),fill:`none`,children:[(0,F.jsx)(`rect`,{x:`0.6`,y:`0.6`,width:18.8,height:12.8,rx:`2`,stroke:`currentColor`,strokeWidth:`1.2`}),Array.from({length:n},(e,t)=>(0,F.jsx)(`rect`,{x:i+t*(o+a),y:i,width:o,height:14-i*2,rx:`0.75`,fill:`currentColor`,opacity:.55},t))]})}function H(e,t,n){let r=t===null?void 0:e.find(e=>e.name===t);return r&&r.name!==`Custom`?y(r.name):r?r.columns.map(e=>b(e.view)).join(` + `):n?`${b(n)} layout`:``}function ie({layouts:e,active:t,saved:n,onSelect:i,onClose:a,onApplySaved:o,onSaveCurrent:s,onDeleteSaved:c,suggestedName:l}){let u=t===null?void 0:e.find(e=>e.name===t),f=new Set(n.map(e=>e.name)),p=e.filter(e=>!f.has(e.name)),[m,h]=(0,N.useState)(!1),g=(0,N.useRef)(!1),_=(0,N.useRef)(null);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(k,{children:[(0,F.jsx)(T,{asChild:!0,children:(0,F.jsxs)(d,{type:`button`,variant:`outline`,size:`sm`,ref:_,"data-action":`layouts`,"data-active-layout":u?u.name:void 0,"aria-label":u?`Layout: ${y(u.name)}`:`Layouts`,title:`Layouts — open a saved one, or save what is on screen`,className:r(`h-7 max-w-48 shrink-0 gap-1.5 px-2 text-label`,u?`text-foreground`:`text-muted-foreground`),children:[(0,F.jsx)(V,{count:u?.columns.length??2}),(0,F.jsx)(`span`,{className:`truncate max-md:hidden`,children:u?y(u.name):`Layout`}),(0,F.jsx)(S,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,F.jsxs)(E,{align:`end`,className:`max-h-96 w-64 overflow-y-auto`,onCloseAutoFocus:e=>{g.current&&(g.current=!1,e.preventDefault())},children:[(0,F.jsx)(w,{children:`Saved layouts`}),n.length===0?(0,F.jsx)(`p`,{className:`px-2 pb-1.5 text-xs text-muted-foreground`,children:`None yet — arrange the view (drag a tab onto it), then save it here. Saved layouts are offered in every task.`}):null,n.map(e=>(0,F.jsx)(U,{name:e.name,count:e.columns.length,selected:e.name===t,kind:`saved`,onPick:()=>o?.(e),remove:c?{label:`Delete saved layout ${e.name}`,run:()=>c(e.name)}:void 0},`saved:${e.name}`)),p.length>0?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(O,{}),(0,F.jsx)(w,{children:`This task`}),p.map(e=>(0,F.jsx)(U,{name:y(e.name),count:e.columns.length,selected:e.name===t,kind:`task`,onPick:()=>i(e.name),remove:{label:`Close layout ${y(e.name)}`,run:()=>a(e.name)}},`task:${e.name}`))]}):null,s?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(O,{}),(0,F.jsxs)(D,{"data-action":`save-layout`,onSelect:()=>{g.current=!0,h(!0)},children:[(0,F.jsx)(A,{"aria-hidden":`true`}),`Save current view as layout…`]})]}):null]})]}),(0,F.jsx)(W,{open:m,suggested:l,taken:f,onCommit:e=>{h(!1),s?.(e)},onCancel:()=>h(!1),returnFocus:()=>_.current?.focus()})]})}function U({name:e,count:t,selected:n,kind:r,onPick:i,remove:a}){return(0,F.jsxs)(D,{"data-layout":e,"data-layout-kind":r,"data-active":n?``:void 0,onSelect:i,"aria-keyshortcuts":a?`Delete`:void 0,onKeyDown:e=>{!a||e.key!==`Delete`&&e.key!==`Backspace`||(e.preventDefault(),a.run())},className:`group/layout pr-1`,children:[(0,F.jsx)(V,{count:t}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),n?(0,F.jsx)(x,{"aria-hidden":`true`,className:`size-3.5`}):null,a?(0,F.jsx)(`button`,{type:`button`,"aria-label":a.label,title:`${a.label} (Delete)`,className:`flex size-5 items-center justify-center rounded-sm text-muted-foreground opacity-0 group-hover/layout:opacity-100 group-focus/layout:opacity-100 hover:bg-background hover:text-foreground`,onPointerUp:e=>e.stopPropagation(),onClick:e=>{e.preventDefault(),e.stopPropagation(),a.run()},children:(0,F.jsx)(j,{"aria-hidden":`true`,className:`size-3.5`})}):null]})}function W({open:e,suggested:t,taken:n,onCommit:r,onCancel:i,returnFocus:f}){let[p,m]=(0,N.useState)(``);(0,N.useEffect)(()=>{e&&m(t)},[e,t]);let v=p.trim(),y=v!==``&&g(v);return(0,F.jsx)(l,{open:e,onOpenChange:e=>!e&&i(),children:(0,F.jsx)(c,{className:`sm:max-w-sm`,onCloseAutoFocus:e=>{e.preventDefault(),f()},children:(0,F.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),v!==``&&!y&&r(v)},children:[(0,F.jsxs)(a,{children:[(0,F.jsx)(u,{children:`Save layout`}),(0,F.jsx)(s,{children:`Saved layouts are offered in every task, in every project.`})]}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsx)(M,{autoFocus:!0,"aria-label":`Layout name`,maxLength:_,value:p,onChange:e=>m(e.target.value),onFocus:e=>e.currentTarget.select()}),y?(0,F.jsx)(`p`,{className:`text-xs text-danger`,children:v===`Custom`?`“${h}” is the task's unsaved arrangement — pick another.`:`That name belongs to a view tab — pick another.`}):n.has(v)?(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Replaces the saved layout “`,v,`”.`]}):null]}),(0,F.jsxs)(o,{children:[(0,F.jsx)(d,{type:`button`,variant:`outline`,onClick:i,children:`Cancel`}),(0,F.jsx)(d,{type:`submit`,disabled:v===``||y,children:`Save`})]})]})})})}export{L as n,P as r,z as t};
|
|
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{t as i}from"./project-router-ByYpf5zi.js";import{_ as a,g as o,h as s,m as c,p as l,v as u}from"./use-now-CdtIyF-0.js";import{t as d}from"./button-jcXhXi-5.js";import{At as f,C as p,D as m,I as h,J as g,M as _,Pt as v,Z as y,lt as b}from"./git-tab-loading-BnU4U-BA.js";import{t as x}from"./check-CNVywZ6B.js";import{s as S}from"./dist-C2IyLYZs.js";import{c as C,i as w,l as T,n as E,r as D,s as O,t as k}from"./dropdown-menu-Da8iP-nI.js";import{t as A}from"./save-DGJET0jv.js";import{t as j}from"./x-Qhn_uE86.js";import{t as M}from"./input-vswZUfsf.js";var N=e(t(),1);function P(e){let t=(0,N.useRef)(0),[n,r]=(0,N.useState)(!1);return{over:n,reset:()=>{t.current=0,r(!1)},handlers:{onDragEnter:n=>{e(n)&&(t.current+=1,r(!0))},onDragLeave:n=>{e(n)&&(t.current=Math.max(0,t.current-1),t.current===0&&r(!1))}}}}var F=n(),I=2,ee=new Map,te=[],ne=[],re=30,L=`text/cez-view`,R=`text/cez-column`;function z({layouts:e,active:t,onSelect:n,onClose:a,saved:o=ne,onApplySaved:s,onSaveCurrent:c,onDeleteSaved:l,fixedViews:u=[],fixedActive:h=null,onViews:g=te,onSelectFixed:_,notesHref:y,notesActive:x=!1,showLayouts:S=!0,onViewDragStart:w,onViewDragEnd:O,onOpenBeside:A,onColumnDropClose:j,keyHints:M=ee,showKeyHints:z=!1,badges:V}){let U=y?m(u):[...u],W=e=>e===`notes`?x:h===e,G=(0,N.useRef)(null),[ae,oe]=(0,N.useState)(0),[K,q]=(0,N.useState)(null),se=`${U.join(`|`)}#${S&&h===null?t:``}#${JSON.stringify(V??{})}`;(0,N.useEffect)(()=>{let e=G.current;if(!e)return;let t=()=>oe(e.clientWidth),n=typeof ResizeObserver>`u`?null:new ResizeObserver(t);return n?.observe(e),window.addEventListener(`resize`,t),()=>{n?.disconnect(),window.removeEventListener(`resize`,t)}},[]);let[ce,le]=(0,N.useState)(0);(0,N.useEffect)(()=>{let e=typeof document>`u`?void 0:document.fonts;if(!e)return;let t=()=>le(e=>e+1);return e.ready.then(t),e.addEventListener?.(`loadingdone`,t),()=>e.removeEventListener?.(`loadingdone`,t)},[]),(0,N.useLayoutEffect)(()=>q(null),[se,ae,ce]),(0,N.useLayoutEffect)(()=>{let e=G.current;K===null||K===0||!e||e.scrollWidth>e.clientWidth+1&&q(K-1)}),(0,N.useLayoutEffect)(()=>{let e=G.current;if(K!==null||!e)return;let t=[...e.querySelectorAll(`[data-strip-item]`)].map(e=>e.offsetWidth+I),n=[...e.querySelectorAll(`[data-strip-chrome]`)].reduce((e,t)=>e+t.offsetWidth+I,0),r=e.clientWidth-n;if(t.reduce((e,t)=>e+t,0)<=r){q(U.length);return}let i=U.findIndex(W),a=re,o=0;for(let[e,n]of t.entries()){let s=i>e?t[i]??0:0;if(a+n+s>r)break;a+=n,o+=1}q(o)});let J=K??U.length,Y=U.slice(0,J),X=U.findIndex(W);X>=J&&(Y=[...Y,U[X]]);let Z=U.filter(e=>!Y.includes(e)),Q=e=>j!==void 0&&e.dataTransfer.types.includes(R),{over:$,reset:ue,handlers:de}=P(Q);return(0,F.jsxs)(`div`,{ref:G,"data-slot":`layout-cards`,"data-drop-close":$?``:void 0,className:r(`relative flex min-w-0 flex-1 items-end gap-0.5 overflow-x-clip rounded-md`,$&&`bg-muted outline-1 outline-dashed outline-border`),onDragOver:e=>{Q(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`)},...de,onDrop:e=>{if(ue(),!Q(e))return;let t=e.dataTransfer.getData(R),n=Number(t);t===``||!Number.isInteger(n)||(e.preventDefault(),j?.(n))},children:[Y.map(e=>{if(e===`notes`)return(0,F.jsxs)(i,{to:y,"data-strip-item":``,"aria-current":x?`page`:void 0,className:r(`relative -mb-px flex h-9 shrink-0 items-center gap-1.5 border-b-2 px-2.5 text-ui font-medium`,x?`border-foreground text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`),children:[(0,F.jsx)(B,{hint:z?M.get(`view:notes`):void 0,children:(0,F.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})}),`Notes`]},`notes`);let t=U.indexOf(e)+1,n=p[e],a=W(e),o=g.includes(e),s=b(e),c=M.get(`view:${e}`);return(0,F.jsxs)(d,{type:`button`,variant:`ghost`,"data-slot":`layout-card`,"data-strip-item":``,"data-fixed":e,"data-active":a?`true`:void 0,"data-on":o?``:void 0,"aria-pressed":a||o,draggable:w!==void 0,title:w?`${s}${t<=9?` (${t})`:``} — drag onto the workspace to split, ⌥-click to open beside`:s,onClick:t=>{t.altKey&&A?A(e):_?.(e)},onDragStart:t=>{t.dataTransfer.setData(L,e),t.dataTransfer.effectAllowed=`copyMove`,w?.(e)},onDragEnd:()=>O?.(),className:r(`relative -mb-px h-9 shrink-0 gap-1.5 rounded-none border-b-2 border-transparent px-2.5 text-ui font-medium text-muted-foreground hover:bg-transparent hover:text-foreground active:translate-y-0`,(a||o)&&`text-foreground`,a&&`border-foreground`),children:[(0,F.jsx)(B,{hint:z?c:void 0,children:(0,F.jsx)(n,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})}),s,V?.[e]?(0,F.jsx)(`span`,{"data-slot":`tab-badge`,"aria-label":`${V[e]} ${s.toLowerCase()}`,className:`rounded-full bg-muted px-1.5 py-px text-micro font-semibold tabular-nums text-muted-foreground`,children:V[e]}):null,o&&!a?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-2 right-1 size-1.5 rounded-full bg-primary`}):null]},e)}),Z.length>0?(0,F.jsxs)(k,{children:[(0,F.jsx)(T,{asChild:!0,children:(0,F.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`more-views`,"aria-label":`${Z.length} more views`,title:`More views`,className:`mb-1 size-7 shrink-0 text-muted-foreground`,children:(0,F.jsx)(v,{"aria-hidden":`true`})})}),(0,F.jsx)(E,{align:`start`,className:`max-h-72 w-56 overflow-y-auto`,children:Z.map(e=>{if(e===`notes`)return(0,F.jsx)(D,{asChild:!0,children:(0,F.jsxs)(i,{to:y,children:[(0,F.jsx)(f,{"aria-hidden":`true`}),(0,F.jsx)(`span`,{className:`truncate`,children:`Notes`}),M.get(`view:notes`)?(0,F.jsx)(C,{children:M.get(`view:notes`)}):null]})},`notes`);let t=p[e],n=M.get(`view:${e}`);return(0,F.jsxs)(D,{"data-view":e,onSelect:()=>_?.(e),children:[(0,F.jsx)(t,{"aria-hidden":`true`}),(0,F.jsx)(`span`,{className:`truncate`,children:b(e)}),n?(0,F.jsx)(C,{children:n}):null]},e)})})]}):null,$?(0,F.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 rounded bg-background px-2 py-0.5 text-xs font-medium text-foreground shadow-sm`,children:`Drop to close this column`}):null,S?(0,F.jsx)(`div`,{"data-strip-chrome":``,className:`ml-auto flex shrink-0 items-center pb-1 pl-2`,children:(0,F.jsx)(ie,{layouts:e,active:h===null?t:null,saved:o,onSelect:n,onClose:a,onApplySaved:s,onSaveCurrent:c,onDeleteSaved:l,suggestedName:H(e,h===null?t:null,h)})}):null]})}function B({hint:e,children:t}){let n=`pointer-events-none flex shrink-0 items-center justify-center rounded-[4px] bg-foreground font-mono text-micro leading-none font-semibold text-background`;return e?e.length===1?(0,F.jsx)(`kbd`,{"data-slot":`tab-key-hint`,"aria-hidden":`true`,className:r(n,`size-3.5`),children:e}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`invisible flex shrink-0`,children:t}),(0,F.jsx)(`kbd`,{"data-slot":`tab-key-hint`,"aria-hidden":`true`,className:r(n,`absolute -top-1 right-0 z-10 h-4 px-1`),children:e})]}):t}function V({count:e,className:t}){let n=Math.max(1,Math.min(e,3)),i=2.5,a=1.5,o=(20-i*2-a*(n-1))/n;return(0,F.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 20 14`,className:r(`h-3.5 w-5 shrink-0`,t),fill:`none`,children:[(0,F.jsx)(`rect`,{x:`0.6`,y:`0.6`,width:18.8,height:12.8,rx:`2`,stroke:`currentColor`,strokeWidth:`1.2`}),Array.from({length:n},(e,t)=>(0,F.jsx)(`rect`,{x:i+t*(o+a),y:i,width:o,height:14-i*2,rx:`0.75`,fill:`currentColor`,opacity:.55},t))]})}function H(e,t,n){let r=t===null?void 0:e.find(e=>e.name===t);return r&&r.name!==`Custom`?y(r.name):r?r.columns.map(e=>b(e.view)).join(` + `):n?`${b(n)} layout`:``}function ie({layouts:e,active:t,saved:n,onSelect:i,onClose:a,onApplySaved:o,onSaveCurrent:s,onDeleteSaved:c,suggestedName:l}){let u=t===null?void 0:e.find(e=>e.name===t),f=new Set(n.map(e=>e.name)),p=e.filter(e=>!f.has(e.name)),[m,h]=(0,N.useState)(!1),g=(0,N.useRef)(!1),_=(0,N.useRef)(null);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(k,{children:[(0,F.jsx)(T,{asChild:!0,children:(0,F.jsxs)(d,{type:`button`,variant:`outline`,size:`sm`,ref:_,"data-action":`layouts`,"data-active-layout":u?u.name:void 0,"aria-label":u?`Layout: ${y(u.name)}`:`Layouts`,title:`Layouts — open a saved one, or save what is on screen`,className:r(`h-7 max-w-48 shrink-0 gap-1.5 px-2 text-label`,u?`text-foreground`:`text-muted-foreground`),children:[(0,F.jsx)(V,{count:u?.columns.length??2}),(0,F.jsx)(`span`,{className:`truncate max-md:hidden`,children:u?y(u.name):`Layout`}),(0,F.jsx)(S,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,F.jsxs)(E,{align:`end`,className:`max-h-96 w-64 overflow-y-auto`,onCloseAutoFocus:e=>{g.current&&(g.current=!1,e.preventDefault())},children:[(0,F.jsx)(w,{children:`Saved layouts`}),n.length===0?(0,F.jsx)(`p`,{className:`px-2 pb-1.5 text-xs text-muted-foreground`,children:`None yet — arrange the view (drag a tab onto it), then save it here. Saved layouts are offered in every task.`}):null,n.map(e=>(0,F.jsx)(U,{name:e.name,count:e.columns.length,selected:e.name===t,kind:`saved`,onPick:()=>o?.(e),remove:c?{label:`Delete saved layout ${e.name}`,run:()=>c(e.name)}:void 0},`saved:${e.name}`)),p.length>0?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(O,{}),(0,F.jsx)(w,{children:`This task`}),p.map(e=>(0,F.jsx)(U,{name:y(e.name),count:e.columns.length,selected:e.name===t,kind:`task`,onPick:()=>i(e.name),remove:{label:`Close layout ${y(e.name)}`,run:()=>a(e.name)}},`task:${e.name}`))]}):null,s?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(O,{}),(0,F.jsxs)(D,{"data-action":`save-layout`,onSelect:()=>{g.current=!0,h(!0)},children:[(0,F.jsx)(A,{"aria-hidden":`true`}),`Save current view as layout…`]})]}):null]})]}),(0,F.jsx)(W,{open:m,suggested:l,taken:f,onCommit:e=>{h(!1),s?.(e)},onCancel:()=>h(!1),returnFocus:()=>_.current?.focus()})]})}function U({name:e,count:t,selected:n,kind:r,onPick:i,remove:a}){return(0,F.jsxs)(D,{"data-layout":e,"data-layout-kind":r,"data-active":n?``:void 0,onSelect:i,"aria-keyshortcuts":a?`Delete`:void 0,onKeyDown:e=>{!a||e.key!==`Delete`&&e.key!==`Backspace`||(e.preventDefault(),a.run())},className:`group/layout pr-1`,children:[(0,F.jsx)(V,{count:t}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),n?(0,F.jsx)(x,{"aria-hidden":`true`,className:`size-3.5`}):null,a?(0,F.jsx)(`button`,{type:`button`,"aria-label":a.label,title:`${a.label} (Delete)`,className:`flex size-5 items-center justify-center rounded-sm text-muted-foreground opacity-0 group-hover/layout:opacity-100 group-focus/layout:opacity-100 hover:bg-background hover:text-foreground`,onPointerUp:e=>e.stopPropagation(),onClick:e=>{e.preventDefault(),e.stopPropagation(),a.run()},children:(0,F.jsx)(j,{"aria-hidden":`true`,className:`size-3.5`})}):null]})}function W({open:e,suggested:t,taken:n,onCommit:r,onCancel:i,returnFocus:f}){let[p,m]=(0,N.useState)(``);(0,N.useEffect)(()=>{e&&m(t)},[e,t]);let v=p.trim(),y=v!==``&&g(v);return(0,F.jsx)(l,{open:e,onOpenChange:e=>!e&&i(),children:(0,F.jsx)(c,{className:`sm:max-w-sm`,onCloseAutoFocus:e=>{e.preventDefault(),f()},children:(0,F.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),v!==``&&!y&&r(v)},children:[(0,F.jsxs)(a,{children:[(0,F.jsx)(u,{children:`Save layout`}),(0,F.jsx)(s,{children:`Saved layouts are offered in every task, in every project.`})]}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsx)(M,{autoFocus:!0,"aria-label":`Layout name`,maxLength:_,value:p,onChange:e=>m(e.target.value),onFocus:e=>e.currentTarget.select()}),y?(0,F.jsx)(`p`,{className:`text-xs text-danger`,children:v===`Custom`?`“${h}” is the task's unsaved arrangement — pick another.`:`That name belongs to a view tab — pick another.`}):n.has(v)?(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Replaces the saved layout “`,v,`”.`]}):null]}),(0,F.jsxs)(o,{children:[(0,F.jsx)(d,{type:`button`,variant:`outline`,onClick:i,children:`Cancel`}),(0,F.jsx)(d,{type:`submit`,disabled:v===``||y,children:`Save`})]})]})})})}export{L as n,P as r,z as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-BY76lXLH.js","assets/css-BsVw1vtW.js","assets/javascript-BgS3c2Ky.js","assets/core-BCsw8oQw.js","assets/lib-BxQXEXDF.js","assets/rolldown-runtime-QTnfLwEv.js","assets/lazy-DaFjwB-q.js","assets/preload-helper-Czpn1I53.js","assets/GUJTEFZK-DPEFMf5Q.js","assets/IHVFDU4A-pP0Mb5Iu.js","assets/7OAKGN26-t-mlpHkx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
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"./preload-helper-Czpn1I53.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./alert-dialog-
|
|
2
|
+
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"./preload-helper-Czpn1I53.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./alert-dialog-D7_6EawW.js";import{c as f,i as p,n as m}from"./chunk-BO2N2NFS-Bde6epwZ.js";var h=e(t(),1),g={name:`cezar-syn`,type:`dark`,fg:`var(--syn-var)`,bg:`transparent`,settings:[{scope:[`keyword`,`storage`,`constant.language`,`variable.language`,`entity.other.attribute-name`,`support.type.property-name`],settings:{foreground:`var(--syn-key)`}},{scope:[`string`,`punctuation.definition.string`],settings:{foreground:`var(--syn-str)`}},{scope:[`entity.name.function`,`support.function`,`entity.name.tag`,`entity.name.type`,`entity.name.class`,`support.class`,`support.type`],settings:{foreground:`var(--syn-fn)`}},{scope:[`comment`,`punctuation.definition.comment`],settings:{foreground:`var(--syn-com)`}},{scope:[`constant.numeric`,`constant.character`,`constant.other`,`support.constant`,`keyword.other.unit`],settings:{foreground:`var(--syn-num)`}},{scope:[`punctuation`,`keyword.operator`,`meta.brace`,`punctuation.separator`,`punctuation.terminator`],settings:{foreground:`var(--syn-punc)`}},{scope:[`variable`,`entity.name.variable`],settings:{foreground:`var(--syn-var)`}}]},_={typescript:()=>r(()=>import(`./typescript-bsJCZSQ-.js`),[]),tsx:()=>r(()=>import(`./tsx-udAQXfEw.js`),[]),javascript:()=>r(()=>import(`./javascript-BgS3c2Ky.js`),[]),jsx:()=>r(()=>import(`./jsx-Bz0zcwM4.js`),[]),json:()=>r(()=>import(`./json-qhed-kSA.js`),[]),jsonc:()=>r(()=>import(`./jsonc-CYpm1nAK.js`),[]),shellscript:()=>r(()=>import(`./shellscript-CLZ0U2zV.js`),[]),python:()=>r(()=>import(`./python-gzcpVVnB.js`),[]),markdown:()=>r(()=>import(`./markdown-BYOwaDjH.js`),[]),css:()=>r(()=>import(`./css-BsVw1vtW.js`),[]),html:()=>r(()=>import(`./html-BY76lXLH.js`),__vite__mapDeps([0,1,2])),diff:()=>r(()=>import(`./diff-woXpYk--.js`),[]),yaml:()=>r(()=>import(`./yaml-rwi0_p6S.js`),[]),toml:()=>r(()=>import(`./toml-CcmNWLt0.js`),[]),go:()=>r(()=>import(`./go-rLFTqkRN.js`),[]),rust:()=>r(()=>import(`./rust-Cfkwpbl8.js`),[]),sql:()=>r(()=>import(`./sql-BsFa4tDR.js`),[])},v={ts:`typescript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,bash:`shellscript`,sh:`shellscript`,shell:`shellscript`,zsh:`shellscript`,console:`shellscript`,py:`python`,md:`markdown`,yml:`yaml`,golang:`go`,rs:`rust`,vue:`html`,xml:`html`},y=new Set([``,`plaintext`,`text`,`txt`,`plain`]);function b(e){let t=e.trim().toLowerCase();return t in _?t:v[t]??null}function x(e){return y.has(e.trim().toLowerCase())}function S(){return[...Object.keys(_),...Object.keys(v),...y].filter(e=>e!==``)}function C(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);if(n<=0)return null;let r=t.slice(n+1).toLowerCase();return b({mts:`typescript`,cts:`typescript`,htm:`html`}[r]??r)}var w=null,T=null,E=new Set,D=new Map;function O(){return T??=Promise.all([r(()=>import(`./core-BCsw8oQw.js`),__vite__mapDeps([3,4,5])),r(()=>import(`./engine-javascript-FQvzRocB.js`),[])]).then(async([{createHighlighterCore:e},{createJavaScriptRegexEngine:t}])=>(w=await e({themes:[g],langs:[],engine:t({forgiving:!0})}),w)),T}function k(e){let t=b(e);if(t===null||E.has(t))return Promise.resolve();let n=D.get(t);return n||(n=O().then(async e=>{await e.loadLanguage(await _[t]()),E.add(t)}).catch(()=>{D.delete(t)}),D.set(t,n)),n}function A(e){return{tokens:e.split(`
|
|
3
3
|
`).map(e=>[{content:e}]),fg:`var(--syn-var)`,bg:`transparent`}}function j(e,t,n={}){if(x(t))return A(e);let r=b(t);if(r===null)return A(e);if(!w||!E.has(r))return null;try{let t=w.codeToTokens(e,{lang:r,theme:g.name,tokenizeTimeLimit:n.tokenizeTimeLimit});return{tokens:t.tokens.map(e=>e.map(({content:e,color:t})=>({content:e,color:t}))),fg:t.fg??`var(--syn-var)`,bg:`transparent`}}catch{return A(e)}}async function M(e,t,n={}){return j(e,t,n)||(await k(t),j(e,t,n)??A(e))}var N=n();function P({isOpen:e,onClose:t,onConfirm:n,url:r}){return(0,N.jsx)(d,{open:e,onOpenChange:e=>{e||t()},children:(0,N.jsxs)(o,{"data-slot":`link-safety-dialog`,children:[(0,N.jsxs)(u,{children:[(0,N.jsx)(a,{children:`Open this link?`}),(0,N.jsxs)(i,{children:[`It leaves cezar in a new tab. The words of a link in a transcript are the agent's — the address below is where it actually goes.`,(0,N.jsx)(`span`,{"data-slot":`link-safety-url`,className:`mt-3 block wrap-anywhere rounded-md border border-border bg-muted px-3 py-2 font-mono text-xs text-foreground`,children:r})]})]}),(0,N.jsxs)(c,{children:[(0,N.jsx)(l,{children:`Cancel`}),(0,N.jsx)(s,{onClick:n,children:`Open link`})]})]})})}var F={name:`shiki`,type:`code-highlighter`,getThemes:()=>[g,g],getSupportedLanguages:()=>S(),supportsLanguage:e=>S().includes(String(e).toLowerCase()),highlight:({code:e,language:t},n)=>j(e,String(t))||(M(e,String(t)).then(e=>n?.(e)),null)},I={name:`mermaid`,type:`diagram`,language:`mermaid`,getMermaid:()=>({initialize:()=>{},render:async(e,t)=>{let{renderAsync:n}=await r(async()=>{let{renderAsync:e}=await import(`./lazy-DaFjwB-q.js`);return{renderAsync:e}},__vite__mapDeps([6,7,8,9,10]));return n(t,{idPrefix:e,links:!1,images:!1})}})};function L(){let e=t=>{if(!t.children)return;let n=[];for(let r of t.children)if(r.type===`text`&&r.value?.includes(`
|
|
4
4
|
`)){let e=r.value.split(/\r?\n/);e.forEach((t,r)=>{r>0&&!(t===``&&r===e.length-1)&&n.push({type:`break`}),t&&n.push({type:`text`,value:t})})}else e(r),n.push(r);t.children=n};return e}var R=[...Object.values(m),L],z=[`p`,`strong`,`em`,`del`,`code`,`a`],B={p:`span`,a:`span`},V=`cezar-local-only:`;function H(e){let t=e.trim();return t.startsWith(V)||/^file:/i.test(t)||/^[A-Za-z]:[\\/]/.test(t)||/^\\\\/.test(t)?!0:/^\/(?:tmp|Users|home|var|etc|opt|root|mnt|Volumes|private|bin|boot|dev|lib|proc|run|sbin|sys|usr)(?:\/|$)/i.test(t)}function U(){let e=t=>{let n=t.properties?.href;t.tagName===`a`&&typeof n==`string`&&n.length>0&&!/^(?:[a-z][a-z\d+.-]*:|[/#?])/i.test(n)&&(t.tagName=`span`,t.properties={"data-local-only-link":``,title:`Local file: ${n}. Open it from the task's Files tab.`}),t.children?.forEach(e)};return e}var W=Object.entries(f).flatMap(([e,t])=>e===`harden`?[U,t]:[t]);function G({href:e,children:t,className:n,...r}){let[i,a]=(0,h.useState)(!1);return!e||H(e)?(0,N.jsx)(`span`,{...r,"data-local-only-link":H(e??``)?``:void 0,title:H(e??``)?`This is a local filesystem path and cannot be opened here.`:void 0,className:n,children:t}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`a`,{...r,href:e,className:n,"data-streamdown":`link`,onClick:e=>{e.preventDefault(),a(!0)},children:t}),(0,N.jsx)(P,{isOpen:i,onClose:()=>a(!1),onConfirm:()=>window.open(e,`_blank`,`noreferrer`),url:e})]})}var K={a:G},q=e=>H(e)?`${V}${e}`:e,J={enabled:!0,renderModal:e=>(0,N.jsx)(P,{...e})},Y=(0,h.memo)(function({children:e,breaks:t=!1,inline:n=!1,variant:r=`chat`,urlTransform:i,imageComponent:a}){return(0,N.jsx)(p,{className:n?`thread-markdown thread-markdown-inline`:r===`document`?`thread-markdown markdown-document`:`thread-markdown`,plugins:{code:F,...n?{}:{mermaid:I}},shikiTheme:[g,g],remarkPlugins:t?R:void 0,rehypePlugins:i?void 0:W,allowedElements:n?z:void 0,unwrapDisallowed:n||void 0,components:n?B:a?{...K,img:a}:K,urlTransform:q,linkSafety:J,...i?{urlTransform:i}:{},controls:{code:{copy:!0,download:!1},table:!1,mermaid:{copy:!0,download:!1,fullscreen:!1,panZoom:!0}},lineNumbers:!1,children:e})});export{j as a,M as i,b as n,C as o,k as r,Y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-runtime-CCIEwYL0.js";import{t}from"./utils-
|
|
1
|
+
import{t as e}from"./react-runtime-CCIEwYL0.js";import{t}from"./utils-Bl_tQdVw.js";import{t as n}from"./message-square-Jt8U2gAH.js";var r=e();function i({count:e,className:i}){if(e===0)return null;let a=`${e} ${e===1?`comment`:`comments`}`;return(0,r.jsxs)(`span`,{"data-slot":`comment-count`,title:`${a} for the agent`,"aria-label":a,className:t(`flex shrink-0 items-center gap-1 text-meta font-medium text-primary tabular-nums`,i),children:[(0,r.jsx)(n,{"aria-hidden":`true`,className:`size-3`}),e]})}var a=new Set([`md`,`markdown`,`mdx`,`mdown`,`mkd`]);function o(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n>0&&a.has(t.slice(n+1).toLowerCase())}function s(e){return o(e.path)&&e.status!==`deleted`&&!e.binary}export{i as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"./button-
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]);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{$ as r,F as i,Hn as a,Jr as o,Ka as s,Ya as c,co as l,d as u,et as d,no as f,pn as p,pt as m,qa as h,qr as g,s as _,to as v,uo as y}from"./queries-DvnoUOE1.js";import{C as b,Dt as x,J as S,Ot as ee,Q as C,S as te,kt as ne,t as re,x as ie}from"./utils-DujIMO-J.js";import{v as ae}from"./project-router-DXcbRXxc.js";import{o as oe}from"./host-usage-7ZdPz-XK.js";import{N as w,t as se}from"./button-DhBNRPDb.js";import{t as T}from"./bot-tf6AC27f.js";import{s as ce}from"./dist-BJiHofth.js";import{a as le,l as ue,n as de,o as fe,r as pe,s as me,t as he}from"./dropdown-menu-R7qzKuR5.js";import{t as E}from"./external-link-OzBGW2PE.js";import{t as ge}from"./folder-DdjIxY7B.js";import{t as _e}from"./search-_XntIRWA.js";import{n as ve}from"./toaster-DkOynrTr.js";import{t as ye}from"./lib-BQXq3kEf.js";var be=w(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),xe=w(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Se=w(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ce=w(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),we=w(`diamond`,[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]),Te=w(`feather`,[[`path`,{d:`M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z`,key:`18jl4k`}],[`path`,{d:`M16 8 2 22`,key:`vp34q`}],[`path`,{d:`M17.5 15H9`,key:`1oz8nu`}]]),Ee=w(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),De=w(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Oe=w(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),ke=w(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),Ae=w(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),je=w(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),Me=w(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),Ne=w(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),Pe=w(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Fe=w(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Ie=w(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),Le=w(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]),Re=w(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),D=e(t(),1),ze=`cez:stale-build-reload-at`,Be=6e4,Ve=!1;function He(e=Ue(),t=()=>window.location.reload(),n=Date.now()){if(Ve)return!0;if(!e)return!1;try{let t=Number(e.getItem(ze));if(Number.isFinite(t)&&t>0&&n-t<Be)return!1;e.setItem(ze,String(n))}catch{return!1}return Ve=!0,t(),!0}function Ue(){try{return window.sessionStorage}catch{return null}}function O(e,t){try{fetch(e,{method:`POST`,headers:{"content-type":`application/json`,[h]:c()},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function We(e){O(`/api/v1/telemetry/event`,{event:`message_sent`,label:e})}function Ge(e){O(`/api/v1/telemetry/event`,{event:`design_mode_enabled`,label:e})}function Ke(){O(`/api/v1/telemetry/event`,{event:`schedule_menu_opened`,label:`new_task`})}function qe(e){O(`/api/v1/telemetry/event`,{event:`start_option_picked`,label:e})}function Je(e){O(`/api/v1/telemetry/event`,{event:`task_scheduled`,label:e})}function Ye(e){O(`/api/v1/telemetry/event`,{event:`diff_comment_added`,label:e})}function Xe(e){e<1||O(`/api/v1/telemetry/event`,{event:`attachments_sent`,label:te(e)})}function Ze(e){O(`/api/v1/telemetry/event`,{event:`attachments_restaged`,label:e})}function Qe(e){O(`/api/v1/telemetry/event`,{event:`add_project_opened`,label:e})}function $e(e){O(`/api/v1/telemetry/event`,{event:`skills_update_apply_dropped`,label:e})}function et(e){O(`/api/v1/telemetry/event`,{event:`palette_opened`,label:e})}function tt(e){O(`/api/v1/telemetry/event`,{event:`task_switched`,label:e})}function nt(e){for(let t of e)O(`/api/v1/telemetry/event`,{event:`palette_mode_used`,label:t})}function rt(e){O(`/api/v1/telemetry/event`,{event:`palette_dismissed`,label:e})}function it(e){let t=b(e);t&&O(`/api/v1/telemetry/event`,{event:`shortcut_rebound`,label:t})}function at(e,t){let n=e.trim().toLowerCase();if(n===``)return[];let r=t?[t]:[];return t===`files`?r:(/^(?:(?:pr|issue)\s*)?#?\d{1,7}$/.test(n)&&r.push(`pr_number`),/\bauto/.test(n)&&r.push(`automation`),r)}function ot(e,t=6e4){let n=new Map,r,i=()=>{clearTimeout(r),r=void 0;for(let[t,r]of n){let[n,i]=t.split(`\0`);for(let t=r;t>0;t-=1e3)e(n,i,Math.min(t,1e3))}n.clear()};return{add:(e,a)=>{let o=`${e}\u0000${a}`;n.set(o,(n.get(o)??0)+1),r??=setTimeout(i,t)},flush:i}}var k=ot((e,t,n)=>O(`/api/v1/telemetry/event`,{event:e,label:t,value:n}));typeof window<`u`&&(window.addEventListener(`pagehide`,k.flush),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&k.flush()}));function st(e,t){let n=b(e);n&&k.add(t===`palette`?`task_command_run`:`task_shortcut_used`,n)}function ct(e){return e.startsWith(`/p/`)||e===`/tasks`||e===`/dashboard`||e.startsWith(`/settings/global/`)}function lt(e){O(`/api/v1/telemetry/page`,{route:e})}var ut=new Set(ie);function dt(e){return`/${e.split(`/`).filter(Boolean).map(e=>ut.has(e)?e:`:param`).join(`/`)}`}function ft(e){return/Firefox\//.test(e)?`gecko`:/Chrom(e|ium)\/|Edg\//.test(e)?`chromium`:/AppleWebKit\//.test(e)?`webkit`:`other`}function pt(e){return/iPhone|iPad|iPod/.test(e)?`ios`:/Android/.test(e)?`android`:/Mac OS X|Macintosh/.test(e)?`macos`:/Windows/.test(e)?`windows`:/Linux/.test(e)?`linux`:`other`}function mt(){try{let e=new URL(import.meta.url).pathname.split(`/`).pop()??``;return/^[\w.-]+\.js$/.test(e)?e:null}catch{return null}}var A={route:dt(typeof window>`u`?`/`:window.location.pathname),previousRoute:null,routeEnteredAt:0,navigations:0,errors:0,serverVersion:null,latestVersion:null};function ht(){return`__CEZ_DESKTOP__`in window||document.documentElement.dataset.cezDesktop||`__TAURI_INTERNALS__`in window?`desktop`:`browser`}function gt(e={}){let t=navigator.userAgent,n=performance.now();return{...e,"page.route":A.route,"page.previous_route":A.previousRoute,"page.time_on_route_s":Math.round((n-A.routeEnteredAt)/1e3),"session.age_s":Math.round(n/1e3),"session.navigations":A.navigations,"session.errors":A.errors,"client.surface":ht(),"client.engine":ft(t),"client.os":pt(t),"client.online":navigator.onLine,"client.visibility":document.visibilityState,"client.viewport_w":window.innerWidth,"build.entry":mt(),"build.server_version_at_load":A.serverVersion,"build.update_available":A.latestVersion!==null&&A.latestVersion!==A.serverVersion}}var _t=[/^ResizeObserver loop (limit exceeded|completed with undelivered notifications)/];function vt(e){return _t.some(t=>t.test(e))}function yt(e,t=document.documentElement){let n=e.message??``;if(n===`Script error.`&&!e.filename&&!e.error||j(e.error))return!0;let r=e.error instanceof Error?`${e.error.name}: ${e.error.message}`:n;return/\bwindow\.ethereum\b/.test(r)?!0:/\btranslated-(ltr|rtl)\b/.test(t.className)&&/NotFoundError: (Failed to execute '(removeChild|insertBefore)' on 'Node'|Node\.(removeChild|insertBefore):)/.test(r)}var bt=/\b(?:chrome|moz|safari-web)-extension:\/\//,xt=/^\s+at\s|^[^\s@]*@\S+:\d+:\d+$/;function j(e){let t=e instanceof Error?e.stack:void 0;if(!t)return!1;let n=t.split(`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$ as r,F as i,Hn as a,Jr as o,Ka as s,Ya as c,co as l,d as u,et as d,no as f,pn as p,pt as m,qa as h,qr as g,s as _,to as v,uo as y}from"./queries-DbDUaheq.js";import{C as b,Dt as x,J as S,Ot as ee,Q as C,S as te,kt as ne,t as re,x as ie}from"./utils-Bl_tQdVw.js";import{v as ae}from"./project-router-ByYpf5zi.js";import{o as oe}from"./host-usage-BeX2ZFmV.js";import{N as w,t as se}from"./button-jcXhXi-5.js";import{t as T}from"./bot-TU5OTE8D.js";import{s as ce}from"./dist-C2IyLYZs.js";import{a as le,l as ue,n as de,o as fe,r as pe,s as me,t as he}from"./dropdown-menu-Da8iP-nI.js";import{t as E}from"./external-link-CTJbUN9h.js";import{t as ge}from"./folder-Ctd1Xvqx.js";import{t as _e}from"./search-P545ZVzc.js";import{n as ve}from"./toaster-CejrnYvv.js";import{t as ye}from"./lib-BQXq3kEf.js";var be=w(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),xe=w(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Se=w(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ce=w(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),we=w(`diamond`,[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]),Te=w(`feather`,[[`path`,{d:`M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z`,key:`18jl4k`}],[`path`,{d:`M16 8 2 22`,key:`vp34q`}],[`path`,{d:`M17.5 15H9`,key:`1oz8nu`}]]),Ee=w(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),De=w(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Oe=w(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),ke=w(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),Ae=w(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),je=w(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),Me=w(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),Ne=w(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),Pe=w(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Fe=w(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Ie=w(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),Le=w(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]),Re=w(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),D=e(t(),1),ze=`cez:stale-build-reload-at`,Be=6e4,Ve=!1;function He(e=Ue(),t=()=>window.location.reload(),n=Date.now()){if(Ve)return!0;if(!e)return!1;try{let t=Number(e.getItem(ze));if(Number.isFinite(t)&&t>0&&n-t<Be)return!1;e.setItem(ze,String(n))}catch{return!1}return Ve=!0,t(),!0}function Ue(){try{return window.sessionStorage}catch{return null}}function O(e,t){try{fetch(e,{method:`POST`,headers:{"content-type":`application/json`,[h]:c()},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function We(e){O(`/api/v1/telemetry/event`,{event:`message_sent`,label:e})}function Ge(e){O(`/api/v1/telemetry/event`,{event:`design_mode_enabled`,label:e})}function Ke(){O(`/api/v1/telemetry/event`,{event:`schedule_menu_opened`,label:`new_task`})}function qe(e){O(`/api/v1/telemetry/event`,{event:`start_option_picked`,label:e})}function Je(e){O(`/api/v1/telemetry/event`,{event:`task_scheduled`,label:e})}function Ye(e){O(`/api/v1/telemetry/event`,{event:`diff_comment_added`,label:e})}function Xe(e){e<1||O(`/api/v1/telemetry/event`,{event:`attachments_sent`,label:te(e)})}function Ze(e){O(`/api/v1/telemetry/event`,{event:`attachments_restaged`,label:e})}function Qe(e){O(`/api/v1/telemetry/event`,{event:`add_project_opened`,label:e})}function $e(e){O(`/api/v1/telemetry/event`,{event:`skills_update_apply_dropped`,label:e})}function et(e){O(`/api/v1/telemetry/event`,{event:`palette_opened`,label:e})}function tt(e){O(`/api/v1/telemetry/event`,{event:`task_switched`,label:e})}function nt(e){for(let t of e)O(`/api/v1/telemetry/event`,{event:`palette_mode_used`,label:t})}function rt(e){O(`/api/v1/telemetry/event`,{event:`palette_dismissed`,label:e})}function it(e){let t=b(e);t&&O(`/api/v1/telemetry/event`,{event:`shortcut_rebound`,label:t})}function at(e,t){let n=e.trim().toLowerCase();if(n===``)return[];let r=t?[t]:[];return t===`files`?r:(/^(?:(?:pr|issue)\s*)?#?\d{1,7}$/.test(n)&&r.push(`pr_number`),/\bauto/.test(n)&&r.push(`automation`),r)}function ot(e,t=6e4){let n=new Map,r,i=()=>{clearTimeout(r),r=void 0;for(let[t,r]of n){let[n,i]=t.split(`\0`);for(let t=r;t>0;t-=1e3)e(n,i,Math.min(t,1e3))}n.clear()};return{add:(e,a)=>{let o=`${e}\u0000${a}`;n.set(o,(n.get(o)??0)+1),r??=setTimeout(i,t)},flush:i}}var k=ot((e,t,n)=>O(`/api/v1/telemetry/event`,{event:e,label:t,value:n}));typeof window<`u`&&(window.addEventListener(`pagehide`,k.flush),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&k.flush()}));function st(e,t){let n=b(e);n&&k.add(t===`palette`?`task_command_run`:`task_shortcut_used`,n)}function ct(e){return e.startsWith(`/p/`)||e===`/tasks`||e===`/dashboard`||e.startsWith(`/settings/global/`)}function lt(e){O(`/api/v1/telemetry/page`,{route:e})}var ut=new Set(ie);function dt(e){return`/${e.split(`/`).filter(Boolean).map(e=>ut.has(e)?e:`:param`).join(`/`)}`}function ft(e){return/Firefox\//.test(e)?`gecko`:/Chrom(e|ium)\/|Edg\//.test(e)?`chromium`:/AppleWebKit\//.test(e)?`webkit`:`other`}function pt(e){return/iPhone|iPad|iPod/.test(e)?`ios`:/Android/.test(e)?`android`:/Mac OS X|Macintosh/.test(e)?`macos`:/Windows/.test(e)?`windows`:/Linux/.test(e)?`linux`:`other`}function mt(){try{let e=new URL(import.meta.url).pathname.split(`/`).pop()??``;return/^[\w.-]+\.js$/.test(e)?e:null}catch{return null}}var A={route:dt(typeof window>`u`?`/`:window.location.pathname),previousRoute:null,routeEnteredAt:0,navigations:0,errors:0,serverVersion:null,latestVersion:null};function ht(){return`__CEZ_DESKTOP__`in window||document.documentElement.dataset.cezDesktop||`__TAURI_INTERNALS__`in window?`desktop`:`browser`}function gt(e={}){let t=navigator.userAgent,n=performance.now();return{...e,"page.route":A.route,"page.previous_route":A.previousRoute,"page.time_on_route_s":Math.round((n-A.routeEnteredAt)/1e3),"session.age_s":Math.round(n/1e3),"session.navigations":A.navigations,"session.errors":A.errors,"client.surface":ht(),"client.engine":ft(t),"client.os":pt(t),"client.online":navigator.onLine,"client.visibility":document.visibilityState,"client.viewport_w":window.innerWidth,"build.entry":mt(),"build.server_version_at_load":A.serverVersion,"build.update_available":A.latestVersion!==null&&A.latestVersion!==A.serverVersion}}var _t=[/^ResizeObserver loop (limit exceeded|completed with undelivered notifications)/];function vt(e){return _t.some(t=>t.test(e))}function yt(e,t=document.documentElement){let n=e.message??``;if(n===`Script error.`&&!e.filename&&!e.error||j(e.error))return!0;let r=e.error instanceof Error?`${e.error.name}: ${e.error.message}`:n;return/\bwindow\.ethereum\b/.test(r)?!0:/\btranslated-(ltr|rtl)\b/.test(t.className)&&/NotFoundError: (Failed to execute '(removeChild|insertBefore)' on 'Node'|Node\.(removeChild|insertBefore):)/.test(r)}var bt=/\b(?:chrome|moz|safari-web)-extension:\/\//,xt=/^\s+at\s|^[^\s@]*@\S+:\d+:\d+$/;function j(e){let t=e instanceof Error?e.stack:void 0;if(!t)return!1;let n=t.split(`
|
|
2
2
|
`).filter(e=>xt.test(e));return n.length>0&&n.every(e=>bt.test(e))}function St(){try{return typeof window.fetch!=`function`||!/\{\s*\[native code\]\s*\}\s*$/.test(Function.prototype.toString.call(window.fetch))}catch{return!0}}function Ct(e,t=St){return j(e)?!0:(typeof e==`object`&&e?e.name:void 0)===`AbortError`&&t()}function wt(e){return e&&(e.split(/[?#]/)[0]?.split(`/`).pop()??``)||null}var M=new WeakSet,N={error:0,toast:0,staging:0};function Tt(e){return e.name===`ApiError`&&e.status===0?I(e.cause):{}}function P(e,t,n={}){if(typeof e==`object`&&e){if(M.has(e))return;M.add(e)}A.errors+=1;let r=Date.now(),i=t===`toast`?`toast`:t===`attachment-staging`?`staging`:`error`;if(r-N[i]<1e4)return;N[i]=r;let a=e instanceof Error,o=a?e:Error(String(e));O(`/api/v1/telemetry/error`,{type:(n.type??(o.name||`Error`)).slice(0,128),message:(o.message||`unknown error`).slice(0,2048),stack:a?o.stack?.split(window.location.origin).join(``).slice(0,16384):void 0,handler:t,code:n.code,fingerprint:n.fingerprint,context:gt({...Tt(o),...n.context})})}var Et=new Set(`api.v1.agent-profiles.apply.archive.archive-finished.association.auto-resume.automation-checks.automation-log.automation-options.automation-templates.branch.branding-logo.cancel.candidates.channel.check.checkout.checks.comments.commit.config.connect.connection.consent.continue.details.diff.dispatch.drafts.enable.events.feed.finish.groups.handoff.health.host-usage.images.importable.launch-key.merge-state.messages.models.nodes.open.open-in.open-in-cli.open-targets.parse.pause.pick.pin.plan.pr.providers.push.queued-messages.read.read-all.reclaim.refresh.remove-worktree.repo.report.retry.run.runs.runs-index.search.self-update.setup.skills-update.star-count.status.telemetry.todos.tree.ui-state.unread.validate.watch.workspace.ws`.split(`.`));function F(e){let t=e.split(`/`).filter(Boolean);return`/${t.map((e,n)=>t[n-1]===`p`||!(Et.has(e)||ut.has(e))?`:param`:e).join(`/`)}`.slice(0,256)}function Dt(e,t=Date.now()){return e?{type:`ApiError`,context:{"request.method":e.method,"request.route":F(e.path),"request.status":e.status,"request.age_ms":t-e.at,...e.provider?{"request.provider":e.provider}:{},...I(e.cause)}}:{type:`ErrorToast`,context:{}}}function I(e){if(typeof e!=`object`||!e)return{};let{name:t,message:n}=e;return{"request.cause_name":typeof t==`string`&&/^[A-Za-z]\w{0,63}$/.test(t)?t:`other`,"request.cause_message":typeof n==`string`?R(n).slice(0,256):``}}var L=[],Ot=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),kt=/(?<![\w./-])[\w-][\w.-]*\.(?:png|jpe?g|gif|webp|bmp|heic|avif|tiff?|ico|svg|pdf|txt|md|markdown|log|html?|csv|tsv|json|ya?ml|xml|rtf|docx?|xlsx?|pptx?|od[tsp]|zip|tar|t?gz|bz2|xz|7z|rar|mp[34]|mov|wav|webm|bin)(?![\w.-])/gi;function R(e,t=L){let n=e.replace(/“[^”]*”|‘[^’]*’|"[^"]*"|`[^`]*`|(?<!\w)'[^'\n]+'(?!\w)/g,`<value>`).replace(/[^\s()[\]{}<>,;]+@[^\s()[\]{}<>,;]+\.\w+/g,`<email>`).replace(kt,`<file>`).replace(/[^\s()[\]{}<>,;]*\/[^\s()[\]{}<>,;]*/g,e=>{if(!/^(https?:\/\/[^/\s]+)?\/api\//.test(e))return`<path>`;try{return F(new URL(e,`http://localhost`).pathname)}catch{return`<path>`}});for(let e of[...new Set(t)].filter(e=>e.length>=3).sort((e,t)=>t.length-e.length))n=n.replace(RegExp(`(?<![\\w-])${Ot(e)}(?![\\w-])`,`gi`),`<project>`);return n.replace(/:\s+\S.*$/s,`: <detail>`)}function At(e){let{type:t,context:n}=Dt(s());P(R(e),`toast`,{type:t,context:n})}function jt(e){let t=e?.status;P(e,`attachment-staging`,{code:`attachment_stage_failed`,context:{"request.route":`/api/v1/workspace/uploads`,...typeof t==`number`?{"request.status":t}:{}}})}function Mt(e){P(Error(`Dictation failed`),`toast`,{type:`DictationError`,code:`dictation_failed`,fingerprint:`cockpit:dictation_failed`,context:{"dictation.error":/^[a-z][a-z-]{0,63}$/.test(e)?e:`other`,"dictation.secure_context":window.isSecureContext!==!1}})}function Nt(e,t){return(0,D.lazy)(()=>t().catch(t=>{if(He())return new Promise(()=>{});throw P(t,`lazy-route`,{code:`chunk_load_failed`,fingerprint:`cockpit:chunk_load_failed`,context:{"chunk.route":e}}),t}))}var z=!1;function Pt(){let{pathname:e}=ae(),t=i(),n=r();return(0,D.useEffect)(()=>{L=(n.data?.projects??[]).flatMap(e=>[e.name,e.id])},[n.data]),(0,D.useEffect)(()=>{t.data&&A.serverVersion===null&&(A.serverVersion=t.data.version),A.latestVersion=t.data?.latestVersion??A.latestVersion},[t.data]),(0,D.useEffect)(()=>{z||(z=!0,window.addEventListener(`error`,e=>{vt(e.message??``)||yt(e)||P(e.error??e.message,`window.error`,{context:{"error.source_file":wt(e.filename),"error.line":e.lineno||null,"error.col":e.colno||null}})}),window.addEventListener(`unhandledrejection`,e=>{Ct(e.reason)||P(e.reason,`unhandledrejection`)}),window.addEventListener(`vite:preloadError`,e=>{He()||P(e.payload,`vite:preloadError`,{code:`chunk_load_failed`,fingerprint:`cockpit:chunk_load_failed`})}),ve(At))},[]),(0,D.useEffect)(()=>{if(!ct(e))return;let t=dt(e);(t!==A.route||A.navigations===0)&&(A.navigations>0&&(A.previousRoute=A.route),A.route=t,A.routeEnteredAt=performance.now(),A.navigations+=1,lt(t))},[e]),null}var B={claude:`Claude Code`,codex:`Codex`,junie:`Junie`,opencode:`OpenCode`,cursor:`Cursor`,pi:`pi`,copilot:`GitHub Copilot CLI`,omp:`OMP`,antigravity:`Antigravity`,gemini:`Gemini CLI`,kimi:`Kimi Code`};function Ft(e){let t=e.currentStepId?e.steps.find(t=>t.id===e.currentStepId):void 0;if(t?.backend)return t.backend;if(e.runner)return e.runner;for(let t=e.steps.length-1;t>=0;--t){let n=e.steps[t]?.backend;if(n)return n}return`claude`}function It(e){return e.runner??`claude`}function Lt(e,t){let n=f(t,e);return n?.enabled===!1?{provider:e,usable:!1,reason:`${B[e]} is disabled. Enable it in Settings → Agents → Providers.`}:!n||!v(n)?{provider:e,usable:!1,reason:`${B[e]} credentials are unavailable. Authorize it in Settings → Agents → Providers.`}:{provider:e,usable:!0}}function Rt(e,t){return Lt(Ft(e),t)}function zt(e,t){return Lt(It(e),t)}function Bt(e){let t=d(),n=Ft(e);return t.isSuccess&&t.data?Rt(e,t.data):{provider:n,usable:!0}}function Vt(e){let t=d(),n=It(e);return t.isSuccess&&t.data?zt(e,t.data):t.isError?{provider:n,usable:!1,reason:`Provider authentication could not be verified.`}:{provider:n,usable:!0}}var V=n(),Ht={folder:ge,terminal:Ie,vscode:Se,cursor:je,zed:Re,windsurf:Le,sublime:Te,idea:we,pycharm:ke,webstorm:De,goland:Ne,rubymine:Ee,phpstorm:xe,clion:Ce,rider:be,"android-studio":Pe,xcode:Oe,warp:Me,claude:T,codex:Fe,junie:T,opencode:T,pi:T,copilot:T,omp:T,antigravity:T,gemini:T,kimi:T};function Ut(e){return e.icon&&Ht[e.icon]||E}var Wt=RegExp(`^cli:(${ne.options.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})$`);function Gt(e){let t=Wt.exec(e);return t?t[1]:void 0}function Kt({choices:e,onPick:t,label:n=`Open in…`,title:r,triggerVariant:i=`ghost`,disabled:a=!1,leading:o,trailing:s,slot:c}){return(0,V.jsxs)(he,{children:[(0,V.jsx)(ue,{asChild:!0,children:(0,V.jsxs)(se,{variant:i,size:`sm`,title:r,disabled:a,"data-slot":c,children:[(0,V.jsx)(E,{"aria-hidden":`true`}),n]})}),(0,V.jsxs)(de,{align:`end`,children:[o,o&&e.length>0?(0,V.jsx)(me,{}):null,e.map(({target:e,suffix:n,title:r})=>{let i=Ut(e);return(0,V.jsxs)(pe,{"data-target":e.id,title:r,onSelect:()=>t(e.id),children:[(0,V.jsx)(i,{"aria-hidden":`true`}),e.label,n??``]},e.id)}),s]})]})}var qt=[`done`,`failed`,`cancelled`],Jt=[`done`,`failed`];function Yt(e){return e.status===`failed`&&e.autoResumeAt!==void 0}function Xt(e){return e.status===`failed`&&e.awaitingAnswerSince!==void 0}function Zt(e){return qt.includes(e)}function H(e){return e.archived||Yt(e)||Xt(e)||!Jt.includes(e.status)?!1:e.finishedAt!==void 0}function U(e){let t=e.finishedAt;return t===void 0||!H(e)?!1:e.seenAt===void 0||e.seenAt<t}function Qt(e){return Yt(e)||Xt(e)?!1:Zt(e.status)&&!U(e)}function $t(e){return e.reduce((e,t)=>U(t)?e+1:e,0)}function W(e){return e===`running`||e===`queued`||e===`waiting`}function en(e){return!W(e.status)&&e.worktree!==!1&&!!e.worktreePath&&!e.worktreeReclaimedAt&&!e.worktreeLifecycle?.activeOperationId}function G(e){return[...e.steps].reverse().find(e=>e.sessionId)?.sessionId}var tn=/^[A-Za-z0-9._][A-Za-z0-9._-]{0,199}$/,nn={claude:`claude --resume`,codex:`codex resume`,opencode:`opencode --session`,cursor:`agent --resume`,junie:`junie --resume`,pi:`pi --session`,copilot:`copilot --resume`,omp:`omp --resume`,antigravity:`agy --conversation`,gemini:`gemini --resume`,kimi:`kimi --session`};function rn(e,t){if(tn.test(t))return e===`junie`?`${nn.junie} --session-id=${t}`:`${nn[e??`claude`]} ${t}`}function an(e){if(W(e.status)||e.worktreeLifecycle?.activeOperationId)return;let t=G(e);if(t===void 0)return;let n=rn(e.runner,t);if(n!==void 0)return e.worktreePath?`cd ${e.worktreePath} && ${n}`:n}function on(e,t){let n=Gt(t);return!n||W(e.status)||e.worktreeLifecycle?.activeOperationId?!1:n===(e.runner??`claude`)&&G(e)!==void 0}function sn(e){let t=W(e.status),n=G(e)!==void 0,r=!!e.worktreeLifecycle?.activeOperationId;return{finish:!r&&(e.status===`waiting`||e.status===`review`),continueRun:!r&&!t&&n,terminal:!r&&!t&&n,notes:!0,archive:!t,pin:!e.archived,markUnread:H(e)&&!U(e),markRead:H(e)&&U(e),promote:e.status===`queued`&&!e.archived,cancel:!r&&t,deleteRun:!r&&!t}}function cn(e){return e?`Resolve conflicts in PR ${e}`:`Resolve conflicts`}function ln(e){return e?`Fix failing checks in PR ${e}`:`Fix failing checks`}function un(e){return e?`Commit and push`:`Commit`}function dn(){return`Push`}function fn(e){let t=e?.replace(/^origin\//,``);return t&&!/^[0-9a-f]{7,40}$/i.test(t)?t:void 0}function pn(e,t){let n=fn(t);return`${e?`Create draft PR`:`Create PR`}${n?` against ${n}`:``}`}function mn(e){let t=fn(e);return t?`Update branch from ${t}`:`Update branch`}function hn(e,t){return`${e?`Create draft PR`:`Create PR`} against ${t} instead of landing: move these changes to a new branch, commit and push it, open the PR, then switch the checkout back to ${t}`}function gn(e){return`Update branch: pull the latest ${e} into the checkout (rebase, keeping these uncommitted changes)`}function _n(e){return e===`review`?`Accept the changes without a PR`:`Close the session`}function vn(e,t){return a(e).get(t)}var yn=ee,K={claude:`Claude Code`,codex:`Codex`,opencode:`OpenCode`,cursor:`Cursor`,pi:`pi`,junie:`Junie`,copilot:`GitHub Copilot CLI`,omp:`OMP`,antigravity:`Antigravity`,gemini:`Gemini CLI`,kimi:`Kimi Code`};function bn(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};let t=e,n={};for(let e of yn){let r=t[e];typeof r==`string`&&r.length>0&&r.length<=128&&(n[e]=r)}return n}function xn(e,t){if(!e)return[];let n=new Map(e.providers.map(e=>[e.provider,e]));return yn.flatMap(e=>{let r=n.get(e);return r?.status!==`disconnected`||!r.authFailureId||t[e]===r.authFailureId?[]:[{provider:e,label:K[e],authFailureId:r.authFailureId}]})}function Sn(e,t){return{...e,...Object.fromEntries(t.map(({provider:e,authFailureId:t})=>[e,t]))}}function Cn(){let e=u(),t=m(),n=(e.data?.profiles??[]).map(e=>({provider:e.provider,id:e.id,label:e.label,configDir:e.configDir})),r=t.data?.info?.root;return{accounts:n,repoAccount:wn(r?e.data?.selections?.[r]:void 0,e.data?.defaults)}}function wn(e,t){let n={};for(let r of[t,e])for(let[e,t]of Object.entries(r??{}))t&&(n[e]=t);return Object.keys(n).length>0?n:void 0}function Tn(e,t){return`${K[e]} account "${t.replace(/"/g,``)}" is not signed in. Sign it in under Settings → Agent accounts, or choose another account for this task.`}function En(e,t){let n=y(),r=u().data?.profiles.find(n=>n.provider===e&&n.id===t&&!n.isDefault),i=r?S(r):``,a=r?.status,s=_(i,r!==void 0&&a?.status!==`connected`).data?.status??(a?.status===`connected`?a:void 0),c=t=>r&&t!==void 0&&t!==`connected`?Tn(e,r.label||r.id):null;return{blocked:c(s?.status),verify:async()=>{if(!r)return null;try{let e=await o(i,{refresh:!0});return n.setQueryData(p.agentAccountStatus(i),e),c(e.status.status)}catch{return null}}}}function Dn(e,t){return e.filter(e=>e.provider===t).length>1}function On(e,t){let n=u(),{repoAccount:r}=Cn(),i=oe()===`local`,a=((e.runner??`claude`)===`claude`?e.agentProfile:void 0)??r?.claude,o=n.data?.profiles.find(e=>e.provider===`claude`&&(a?e.id===a:e.isDefault)),s=o?S(o):``;return l({queryKey:p.agentAccountDetails(s),queryFn:({signal:e})=>g(s,{signal:e}),enabled:t&&i&&s!==``,staleTime:5*6e4,retry:!1}).data}var kn=`quick-task`;function An(e,t,n=24){return[t,...(e??[]).filter(e=>!(e.source===t.source&&e.ref===t.ref))].slice(0,n)}var q=[{id:`claude`,label:`claude`,desc:`Claude Code CLI`},{id:`codex`,label:`codex`,desc:`OpenAI Codex (app-server)`},{id:`junie`,label:`junie`,desc:`JetBrains Junie CLI`},{id:`opencode`,label:`opencode`,desc:`OpenCode (serve)`},{id:`cursor`,label:`cursor`,desc:`Cursor Agent CLI`},{id:`pi`,label:`pi`,desc:`pi CLI (provider/model)`},{id:`copilot`,label:`copilot`,desc:`GitHub Copilot CLI (ACP)`},{id:`omp`,label:`omp`,desc:`OMP (RPC)`},{id:`antigravity`,label:`antigravity`,desc:`Google Antigravity CLI (agy)`},{id:`gemini`,label:`gemini`,desc:`Gemini CLI (ACP)`},{id:`kimi`,label:`kimi`,desc:`Kimi Code (ACP)`}],J={claude:[{id:``,label:`auto`,desc:`Pick the best model per step`},{id:`fable`,label:`fable`,desc:`Most capable, for the hardest tasks`},{id:`opus`,label:`opus`,desc:`Deep reasoning for hard tasks`},{id:`sonnet`,label:`sonnet`,desc:`Fast and cheap`},{id:`haiku`,label:`haiku`,desc:`Fastest — simple, scoped tasks`}],codex:[{id:``,label:`auto`,desc:`Use your Codex default model`}],opencode:[{id:``,label:`auto`,desc:`Use your OpenCode default model`}],junie:[{id:``,label:`auto`,desc:`Use your Junie default model`}],cursor:[{id:``,label:`auto`,desc:`Use your Cursor default model`}],pi:[{id:``,label:`auto`,desc:`Use your pi default model`},{id:`anthropic/claude-opus-4-8`,label:`claude-opus-4.8`,desc:`via Anthropic`},{id:`anthropic/claude-sonnet-5`,label:`claude-sonnet-5`,desc:`via Anthropic`},{id:`openai/gpt-5.1`,label:`gpt-5.1`,desc:`via OpenAI`}],copilot:[{id:``,label:`auto`,desc:`Let Copilot pick the model`}],omp:[{id:``,label:`auto`,desc:`Use your omp default model`}],antigravity:[{id:``,label:`auto`,desc:`Use your Antigravity default model`}],gemini:[{id:``,label:`auto`,desc:`Use your Gemini CLI default model`},{id:`gemini-3.5-flash`,label:`gemini-3.5-flash`,desc:`Fast; available on a free API key`},{id:`gemini-3-flash-preview`,label:`gemini-3-flash-preview`,desc:`Preview Flash model`},{id:`gemini-3.1-flash-lite`,label:`gemini-3.1-flash-lite`,desc:`Fastest, cheapest`},{id:`gemini-2.5-pro`,label:`gemini-2.5-pro`,desc:`Deeper reasoning (paid tiers)`}],kimi:[{id:``,label:`auto`,desc:`Use your Kimi default model`}]},Y={claude:/^claude[-.]/,codex:/^gpt[-.]/,gemini:/^gemini[-.]/},jn=[`opencode`,`pi`],Mn=[`copilot`,`cursor`];function Nn(e,t){return!e||J[t].some(t=>t.id===e)||Y[t]?.test(e)||Mn.includes(t)&&Object.values(Y).some(t=>t.test(e))?!1:Object.entries(J).some(([n,r])=>n!==t&&!jn.includes(n)&&r.some(t=>t.id!==``&&t.id===e))||Object.entries(Y).some(([n,r])=>n!==t&&r.test(e))}function X(e,t,n=[]){let r=J[e]??J.claude,i=C(e)?t?.models??[]:[],a=i.length>0?[Pn(r)]:[...r],o=new Set(a.map(e=>e.id));for(let e of i)!e.id||o.has(e.id)||(o.add(e.id),a.push({id:e.id,label:e.label||e.id,desc:e.description}));for(let t of n)!t||o.has(t)||Nn(t,e)||(o.add(t),a.push({id:t,label:t,desc:`Custom or legacy model`}));return a}function Pn(e){return e.find(e=>e.id===``)??{id:``,label:`auto`,desc:``}}var Fn={claude:`Claude`,codex:`Codex`,opencode:`OpenCode`,junie:`Junie`,cursor:`Cursor`,antigravity:`Antigravity`,kimi:`Kimi`};function In(e){return C(e)?Fn[e]:e}function Ln(e,t,n=!1){if(!C(e))return;let r=Fn[e];if(t?.stale)return`Using cached ${r} model list`;if(n||t?.source===`unavailable`)return`Latest ${r} models unavailable`}function Rn(e,t,n){return!x(e)||t===``||n?.runner!==e?[]:n.models.find(e=>e.id===t)?.reasoningEfforts??[]}function zn(e,t,n,r){let i=Rn(t,n,r);return e!==null&&i.some(t=>t.id===e)?e:``}function Bn(e){let t=q.map(e=>e.id).filter(t=>e.some(e=>e.name===t&&e.available));return t.length>0?t:[`claude`]}function Vn(e,t,n){return e!==null&&t.includes(e)?e:t.includes(n)?n:t[0]??`claude`}function Hn(e,t,n=!1){return!n&&e===t?void 0:e}function Un(e,t,n,r){let i=X(t,r,[e,n?.[t]]);if(e!==null&&i.some(t=>t.id===e))return e;let a=n?.[t];return a!==void 0&&i.some(e=>e.id===a)?a:``}function Wn(e,t,n){return e.source===`skill`?t.some(t=>t.name===e.ref):n.some(t=>t.name===e.ref)}function Gn(e,t,n){return e&&Wn(e,t,n)?e:null}function Kn(e){let{task:t,source:n,model:r,reasoningEffort:i,modelsLocked:a,runner:o,runnerExplicit:s,defaultRunner:c,agentProfile:l,variants:u,images:d,worktree:f,newBranch:p,branch:m,autonomous:h,generateFollowups:g,todoId:_,dispatch:v,readOnly:y,inPlaceByDefault:b}=e,x=y===!0&&u<=1&&!v,S=f===!1&&u<=1&&!v&&!x;return{task:t,...n?.source===`skill`?{steps:[{id:`task`,name:n.ref,skill:n.ref,prompt:`{{task}}`}]}:{workflow:n?.ref??`quick-task`},model:a?void 0:r||void 0,...a||!i?{}:{reasoningEffort:i},runner:Hn(o,c,s),agentProfile:l||void 0,variants:u>1?u:void 0,images:d.length>0?[...d]:void 0,worktree:x?void 0:f===!1&&u<=1?!1:b&&f!==!1&&u<=1?!0:void 0,...x?{readOnly:!0}:{},...S&&p?{newBranch:!0,...m?.trim()?{branch:m.trim()}:{}}:{},autonomous:h===!0||void 0,generateFollowups:g!==!1&&void 0,todoId:_||void 0,dispatch:v??void 0}}function qn(e,t,n){let r=(t?e?.askSkill:e?.defaultSkill)??null;return r&&(n===null||n.some(e=>e.name===r))?{source:`skill`,ref:r}:null}function Jn(e){return/\?\s*$/.test(e.trim())}function Yn(e){let t=`runs`in e?e.runs[0]:e;return t?`/tasks/${t.id}`:`/`}var Z=`inline-flex h-[26px] items-center gap-1.5 rounded-full border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-55`,Q=(0,V.jsx)(ce,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`});function Xn({active:e=!1,skill:t=!1,dashed:n=!1,chevron:r=!1,icon:i,className:a,children:o,type:s=`button`,...c}){return(0,V.jsxs)(`button`,{type:s,"data-slot":`chip`,"data-active":e?`true`:void 0,"data-skill":t?`true`:void 0,className:re(Z,e&&`border-foreground font-semibold text-foreground`,t&&`border-violet text-foreground`,n&&`border-dashed`,a),...c,children:[i,o,r?Q:null]})}function Zn({slot:e,ariaLabel:t,label:n,value:r,options:i,onPick:a,disabled:o=!1,readOnly:s=!1,hint:c,disabledHint:l,status:u,searchPlaceholder:d}){let[f,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)(``),g=(0,D.useRef)(null),_=(0,D.useRef)(null),v=(0,D.useRef)(null),y=(0,D.useMemo)(()=>{let e=m.trim().toLowerCase();return d&&e?i.filter(t=>t.label.toLowerCase().includes(e)):i},[i,m,d]);if((0,D.useEffect)(()=>{if(!f||!d)return;let e=window.setTimeout(()=>g.current?.focus());return()=>window.clearTimeout(e)},[f,d]),s)return(0,V.jsx)(`span`,{"data-slot":e,"aria-label":t,title:l??c,className:`${Z} cursor-default hover:bg-card hover:text-muted-foreground`,children:n});let b=e=>(0,V.jsx)(fe,{value:e.value,className:`gap-2.5`,children:(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,V.jsx)(`span`,{className:`text-label font-medium`,children:e.label}),e.desc?(0,V.jsx)(`span`,{className:`max-w-[calc(100vw-3rem)] whitespace-normal break-words text-meta text-muted-foreground md:max-w-96`,children:e.desc}):null]})},e.value),x=(0,V.jsxs)(`button`,{type:`button`,"data-slot":e,"aria-label":t,disabled:o,title:o?l:c,className:Z,children:[n,Q]});return o?(0,V.jsx)(`span`,{title:l,className:`inline-flex`,children:x}):(0,V.jsxs)(he,{open:f,onOpenChange:e=>{p(e),e||h(``)},children:[(0,V.jsx)(ue,{asChild:!0,children:x}),(0,V.jsxs)(de,{ref:_,align:`start`,"data-testid":`${e}-menu`,children:[d?(0,V.jsxs)(`div`,{className:`mb-1 flex h-9 items-center gap-2 border-b border-border px-2`,children:[(0,V.jsx)(_e,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,V.jsx)(`input`,{ref:g,type:`search`,"aria-label":d,placeholder:d,value:m,onChange:e=>h(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=_.current?.querySelectorAll(`[role="menuitemradio"]:not([data-disabled])`);(e.key===`ArrowDown`?t?.[0]:t?.[t.length-1])?.focus()}else e.key!==`Escape`&&e.stopPropagation()},className:`h-full min-w-48 bg-transparent text-sm outline-none placeholder:text-muted-foreground`})]}):null,(0,V.jsx)(le,{value:r,onValueChange:a,children:d?(0,V.jsx)(`div`,{ref:v,className:`max-h-[min(20rem,calc(var(--radix-dropdown-menu-content-available-height)-3.5rem))] overflow-y-auto overscroll-contain`,children:y.length>100?(0,V.jsx)(ye,{scrollRef:v,itemSize:30,data:y,children:b}):y.map(b)}):y.map(b)}),d&&y.length===0?(0,V.jsx)(`p`,{className:`px-2 py-5 text-center text-xs text-muted-foreground`,children:`No branches found.`}):null,u?(0,V.jsx)(pe,{disabled:!0,className:`border-t border-border text-meta text-muted-foreground`,children:u}):null]})]})}var $=(e,t)=>t===null?e:`${e}:${t}`;function Qn({runners:e,value:t,onPick:n,disabled:r=!1,accounts:i=[],account:a=null,repoAccount:o}){let s=q.filter(t=>e.includes(t.id)).flatMap(e=>{let t=i.filter(t=>t.provider===e.id);return t.length<2?[{value:$(e.id,null),label:e.id,desc:e.desc}]:t.map(t=>({value:$(e.id,t.id),label:`${e.id} · ${t.label}`,desc:t.configDir}))}),c=a??o?.[t]??`default`,l=s.some(e=>e.value===$(t,c))?$(t,c):$(t,null);return(0,V.jsx)(Zn,{slot:`runner-pill`,ariaLabel:`Runner`,label:s.find(e=>e.value===l)?.label??t,value:l,disabled:r,onPick:e=>{let[t,r]=e.split(`:`);n(t,r??null)},options:s})}export{Kt as $,bn as A,De as At,G as B,kn as C,qe as Ct,En as D,Ie as Dt,On as E,Re as Et,pn as F,sn as G,vn as H,_n as I,H as J,mn as K,ln as L,en as M,on as N,K as O,Fe as Ot,un as P,$t as Q,hn as R,Yn as S,$e as St,Cn as T,tt as Tt,cn as U,dn as V,an as W,Qt as X,Zt as Y,U as Z,Un as _,rt as _t,Z as a,ht as at,Gn as b,Ke as bt,Kn as c,jt as ct,Ln as d,Qe as dt,Gt as et,Nn as f,Ze as ft,Rn as g,We as gt,An as h,Ye as ht,Q as i,Pt as it,xn as j,Ce as jt,Sn as k,Ae as kt,In as l,Mt as lt,qn as m,Ge as mt,Qn as n,Bt as nt,q as o,st as ot,X as p,Xe as pt,W as q,Xn as r,Vt as rt,Bn as s,Nt as st,Zn as t,Ut as tt,Jn as u,at as ut,zn as v,nt as vt,Dn as w,Je as wt,Hn as x,it as xt,Vn as y,et as yt,gn as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as e}from"./button-jcXhXi-5.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{ao as r}from"./queries-DvnoUOE1.js";import{t as i}from"./preload-helper-Czpn1I53.js";var a=e(t(),1),o=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,s=/^[\\/]{2}/;function c(e,t){return t+e.replace(/\\/g,`/`)}var l=`popstate`;function u(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function d(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return g(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:_(t)}return y(t,n,null,e)}function f(e,t){if(e===!1||e==null)throw Error(t)}function p(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function m(){return Math.random().toString(36).substring(2,10)}function h(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function g(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?v(t):t,state:n,key:t&&t.key||r||m(),mask:i}}function _({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function v(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function y(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function p(){s=`POP`;let e=f(),t=e==null?null:e-d;d=e,c&&c({action:s,location:y.location,delta:t})}function m(e,t){s=`PUSH`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f()+1;let l=h(r,d),p=y.createHref(r.mask||r);try{o.pushState(l,``,p)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(p)}a&&c&&c({action:s,location:y.location,delta:1})}function _(e,t){s=`REPLACE`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f();let i=h(r,d),l=y.createHref(r.mask||r);o.replaceState(i,``,l),a&&c&&c({action:s,location:y.location,delta:0})}function v(e){return b(i,e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(l,p),c=e,()=>{i.removeEventListener(l,p),c=null}},createHref(e){return t(i,e)},createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:m,replace:_,go(e){return o.go(e)}};return y}function b(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),f(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:_(t);return i=i.replace(/ $/,`%20`),!n&&s.test(i)&&(i=r+i),new URL(i,r)}function x(e,t,n=`/`){return S(e,t,n,!1)}function S(e,t,n,r,i){let a=O((typeof t==`string`?v(t):t).pathname||`/`,n);if(a==null)return null;let o=i??w(e),s=null,c=pe(a);for(let e=0;s==null&&e<o.length;++e)s=ue(o[e],c,r);return s}function C(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function w(e){let t=T(e);return ee(t),t}function T(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;f(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=A([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(f(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),T(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ce(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=fe(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of E(e.path))a(e,t,!0,n)}),t}function E(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=E(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ee(e){e.sort((e,t)=>e.score===t.score?le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var te=/^:[\w-]+$/,ne=3,re=2,ie=1,ae=10,oe=-2,se=e=>e===`*`;function ce(e,t){let n=e.split(`/`),r=n.length;return n.some(se)&&(r+=oe),t&&(r+=re),n.filter(e=>!se(e)).reduce((e,t)=>e+(te.test(t)?ne:t===``?ie:ae),r)}function le(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ue(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?de(u,l,s.matcher,s.compiledParams):D(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=D({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:A([a,d.pathname]),pathnameBase:be(A([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=A([a,d.pathnameBase]))}return o}function D(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=fe(e.path,e.caseSensitive,e.end);return de(e,t,n,r)}function de(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function fe(e,t=!1,n=!0){p(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function pe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return p(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function O(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function me(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?v(e):e,a;return n?(n=ye(n),a=n.startsWith(`/`)?he(n.substring(1),`/`):he(n,t)):a=t,{pathname:a,search:xe(r),hash:Se(i)}}function he(e,t){let n=j(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ge(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _e(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ve(e){let t=_e(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function k(e,t,n,r=!1){let i;typeof e==`string`?i=v(e):(i={...e},f(!i.pathname||!i.pathname.includes(`?`),ge(`?`,`pathname`,`search`,i)),f(!i.pathname||!i.pathname.includes(`#`),ge(`#`,`pathname`,`hash`,i)),f(!i.search||!i.search.includes(`#`),ge(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=me(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ye=e=>e.replace(/[\\/]{2,}/g,`/`),A=e=>ye(e.join(`/`)),j=e=>e.replace(/\/+$/,``),be=e=>j(e).replace(/^\/*/,`/`),xe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Se=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ce=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function we(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Te(e){return A(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ee=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function De(e,t){let n=e;if(typeof n!=`string`||!o.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ee)try{let e=new URL(window.location.href),r=s.test(n)?new URL(c(n,e.protocol)):new URL(n),a=O(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{p(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Oe=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Oe);var ke=[`GET`,...Oe];new Set(ke);var Ae=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function je(e){try{return Ae.includes(new URL(e).protocol)}catch{return!1}}var M=a.createContext(null);M.displayName=`DataRouter`;var N=a.createContext(null);N.displayName=`DataRouterState`;var Me=a.createContext(!1);function Ne(){return a.useContext(Me)}var Pe=a.createContext({isTransitioning:!1});Pe.displayName=`ViewTransition`;var Fe=a.createContext(new Map);Fe.displayName=`Fetchers`;var Ie=a.createContext(null);Ie.displayName=`Await`;var P=a.createContext(null);P.displayName=`Navigation`;var F=a.createContext(null);F.displayName=`Location`;var I=a.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var L=a.createContext(null);L.displayName=`RouteError`;var Le=`REACT_ROUTER_ERROR`,Re=`REDIRECT`,ze=`ROUTE_ERROR_RESPONSE`;function Be(e){if(e.startsWith(`${Le}:${Re}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ve(e){if(e.startsWith(`${Le}:${ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ce(t.status,t.statusText,t.data)}catch{}}function He(e,{relative:t}={}){f(R(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=a.useContext(P),{hash:i,pathname:o,search:s}=V(e,{relative:t}),c=o;return n!==`/`&&(c=o===`/`?n:A([n,o])),r.createHref({pathname:c,search:s,hash:i})}function R(){return a.useContext(F)!=null}function z(){return f(R(),`useLocation() may be used only in the context of a <Router> component.`),a.useContext(F).location}function Ue(){return a.useContext(F).navigationType}var We=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ge(e){a.useContext(P).static||a.useLayoutEffect(e)}function B(){let{isDataRoute:e}=a.useContext(I);return e?mt():Ke()}function Ke(){f(R(),`useNavigate() may be used only in the context of a <Router> component.`);let e=a.useContext(M),{basename:t,navigator:n}=a.useContext(P),{matches:r}=a.useContext(I),{pathname:i}=z(),o=JSON.stringify(ve(r)),s=a.useRef(!1);return Ge(()=>{s.current=!0}),a.useCallback((r,a={})=>{if(p(s.current,We),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=k(r,JSON.parse(o),i,a.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:A([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)},[t,n,o,i,e])}var qe=a.createContext(null);function Je(e){let t=a.useContext(I).outlet;return a.useMemo(()=>t&&a.createElement(qe.Provider,{value:e},t),[t,e])}function Ye(){let{matches:e}=a.useContext(I);return e[e.length-1]?.params??{}}function V(e,{relative:t}={}){let{matches:n}=a.useContext(I),{pathname:r}=z(),i=JSON.stringify(ve(n));return a.useMemo(()=>k(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Xe(e,t){return Ze(e,t)}function Ze(e,t,n){f(R(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=a.useContext(P),{matches:i}=a.useContext(I),o=i[i.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,u=o&&o.route;{let e=u&&u.path||``;gt(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{ao as r}from"./queries-DbDUaheq.js";import{t as i}from"./preload-helper-Czpn1I53.js";var a=e(t(),1),o=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,s=/^[\\/]{2}/;function c(e,t){return t+e.replace(/\\/g,`/`)}var l=`popstate`;function u(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function d(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return g(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:_(t)}return y(t,n,null,e)}function f(e,t){if(e===!1||e==null)throw Error(t)}function p(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function m(){return Math.random().toString(36).substring(2,10)}function h(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function g(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?v(t):t,state:n,key:t&&t.key||r||m(),mask:i}}function _({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function v(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function y(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function p(){s=`POP`;let e=f(),t=e==null?null:e-d;d=e,c&&c({action:s,location:y.location,delta:t})}function m(e,t){s=`PUSH`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f()+1;let l=h(r,d),p=y.createHref(r.mask||r);try{o.pushState(l,``,p)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(p)}a&&c&&c({action:s,location:y.location,delta:1})}function _(e,t){s=`REPLACE`;let r=u(e)?e:g(y.location,e,t);n&&n(r,e),d=f();let i=h(r,d),l=y.createHref(r.mask||r);o.replaceState(i,``,l),a&&c&&c({action:s,location:y.location,delta:0})}function v(e){return b(i,e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(l,p),c=e,()=>{i.removeEventListener(l,p),c=null}},createHref(e){return t(i,e)},createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:m,replace:_,go(e){return o.go(e)}};return y}function b(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),f(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:_(t);return i=i.replace(/ $/,`%20`),!n&&s.test(i)&&(i=r+i),new URL(i,r)}function x(e,t,n=`/`){return S(e,t,n,!1)}function S(e,t,n,r,i){let a=O((typeof t==`string`?v(t):t).pathname||`/`,n);if(a==null)return null;let o=i??w(e),s=null,c=pe(a);for(let e=0;s==null&&e<o.length;++e)s=ue(o[e],c,r);return s}function C(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function w(e){let t=T(e);return ee(t),t}function T(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;f(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=A([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(f(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),T(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ce(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=fe(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of E(e.path))a(e,t,!0,n)}),t}function E(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=E(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ee(e){e.sort((e,t)=>e.score===t.score?le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var te=/^:[\w-]+$/,ne=3,re=2,ie=1,ae=10,oe=-2,se=e=>e===`*`;function ce(e,t){let n=e.split(`/`),r=n.length;return n.some(se)&&(r+=oe),t&&(r+=re),n.filter(e=>!se(e)).reduce((e,t)=>e+(te.test(t)?ne:t===``?ie:ae),r)}function le(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ue(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?de(u,l,s.matcher,s.compiledParams):D(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=D({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:A([a,d.pathname]),pathnameBase:be(A([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=A([a,d.pathnameBase]))}return o}function D(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=fe(e.path,e.caseSensitive,e.end);return de(e,t,n,r)}function de(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function fe(e,t=!1,n=!0){p(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function pe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return p(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function O(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function me(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?v(e):e,a;return n?(n=ye(n),a=n.startsWith(`/`)?he(n.substring(1),`/`):he(n,t)):a=t,{pathname:a,search:xe(r),hash:Se(i)}}function he(e,t){let n=j(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ge(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _e(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ve(e){let t=_e(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function k(e,t,n,r=!1){let i;typeof e==`string`?i=v(e):(i={...e},f(!i.pathname||!i.pathname.includes(`?`),ge(`?`,`pathname`,`search`,i)),f(!i.pathname||!i.pathname.includes(`#`),ge(`#`,`pathname`,`hash`,i)),f(!i.search||!i.search.includes(`#`),ge(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=me(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ye=e=>e.replace(/[\\/]{2,}/g,`/`),A=e=>ye(e.join(`/`)),j=e=>e.replace(/\/+$/,``),be=e=>j(e).replace(/^\/*/,`/`),xe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Se=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ce=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function we(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Te(e){return A(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ee=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function De(e,t){let n=e;if(typeof n!=`string`||!o.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ee)try{let e=new URL(window.location.href),r=s.test(n)?new URL(c(n,e.protocol)):new URL(n),a=O(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{p(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Oe=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Oe);var ke=[`GET`,...Oe];new Set(ke);var Ae=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function je(e){try{return Ae.includes(new URL(e).protocol)}catch{return!1}}var M=a.createContext(null);M.displayName=`DataRouter`;var N=a.createContext(null);N.displayName=`DataRouterState`;var Me=a.createContext(!1);function Ne(){return a.useContext(Me)}var Pe=a.createContext({isTransitioning:!1});Pe.displayName=`ViewTransition`;var Fe=a.createContext(new Map);Fe.displayName=`Fetchers`;var Ie=a.createContext(null);Ie.displayName=`Await`;var P=a.createContext(null);P.displayName=`Navigation`;var F=a.createContext(null);F.displayName=`Location`;var I=a.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var L=a.createContext(null);L.displayName=`RouteError`;var Le=`REACT_ROUTER_ERROR`,Re=`REDIRECT`,ze=`ROUTE_ERROR_RESPONSE`;function Be(e){if(e.startsWith(`${Le}:${Re}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ve(e){if(e.startsWith(`${Le}:${ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ce(t.status,t.statusText,t.data)}catch{}}function He(e,{relative:t}={}){f(R(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=a.useContext(P),{hash:i,pathname:o,search:s}=V(e,{relative:t}),c=o;return n!==`/`&&(c=o===`/`?n:A([n,o])),r.createHref({pathname:c,search:s,hash:i})}function R(){return a.useContext(F)!=null}function z(){return f(R(),`useLocation() may be used only in the context of a <Router> component.`),a.useContext(F).location}function Ue(){return a.useContext(F).navigationType}var We=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ge(e){a.useContext(P).static||a.useLayoutEffect(e)}function B(){let{isDataRoute:e}=a.useContext(I);return e?mt():Ke()}function Ke(){f(R(),`useNavigate() may be used only in the context of a <Router> component.`);let e=a.useContext(M),{basename:t,navigator:n}=a.useContext(P),{matches:r}=a.useContext(I),{pathname:i}=z(),o=JSON.stringify(ve(r)),s=a.useRef(!1);return Ge(()=>{s.current=!0}),a.useCallback((r,a={})=>{if(p(s.current,We),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=k(r,JSON.parse(o),i,a.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:A([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)},[t,n,o,i,e])}var qe=a.createContext(null);function Je(e){let t=a.useContext(I).outlet;return a.useMemo(()=>t&&a.createElement(qe.Provider,{value:e},t),[t,e])}function Ye(){let{matches:e}=a.useContext(I);return e[e.length-1]?.params??{}}function V(e,{relative:t}={}){let{matches:n}=a.useContext(I),{pathname:r}=z(),i=JSON.stringify(ve(n));return a.useMemo(()=>k(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Xe(e,t){return Ze(e,t)}function Ze(e,t,n){f(R(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=a.useContext(P),{matches:i}=a.useContext(I),o=i[i.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,u=o&&o.route;{let e=u&&u.path||``;gt(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
2
|
|
|
3
3
|
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=z(),m;if(t){let e=typeof t==`string`?v(t):t;f(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),m=e}else m=d;let h=m.pathname||`/`,g=h;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);g=`/`+h.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let _=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):x(e,{pathname:g});p(u||_!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),p(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=it(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:A([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:A([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&y?a.createElement(F.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...m},navigationType:`POP`}},y):y}function Qe(){let e=pt(),t=we(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},o={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=a.createElement(a.Fragment,null,a.createElement(`p`,null,`💿 Hey developer 👋`),a.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,a.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,a.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),a.createElement(a.Fragment,null,a.createElement(`h2`,null,`Unexpected Application Error!`),a.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?a.createElement(`pre`,{style:i},n):null,s)}var $e=a.createElement(Qe,null),et=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ve(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:a.createElement(I.Provider,{value:this.props.routeContext},a.createElement(L.Provider,{value:e,children:this.props.component}));return this.context?a.createElement(nt,{error:e},t):t}};et.contextType=Me;var tt=new WeakMap;function nt({children:e,error:t}){let{basename:n}=a.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Be(t.digest);if(e){let r=tt.get(t);if(r)throw r;let i=De(e.location,n),o=i.absoluteURL||i.to;if(je(o))throw Error(`Invalid redirect location`);if(Ee&&!tt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw tt.set(t,n),n}return a.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function rt({routeContext:e,match:t,children:n}){let r=a.useContext(M);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(I.Provider,{value:e},n)}function it(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,o=r?.errors;if(o!=null){let e=i.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);f(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:a}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Te(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=o&&n.route.id?o[n.route.id]:void 0,p=n.route.errorElement||$e,s&&(c<0&&l===0?(gt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(rt,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?a.createElement(et,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function at(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ot(e){let t=a.useContext(M);return f(t,at(e)),t}function st(e){let t=a.useContext(N);return f(t,at(e)),t}function ct(e){let t=a.useContext(I);return f(t,at(e)),t}function lt(e){let t=ct(e),n=t.matches[t.matches.length-1];return f(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ut(){return lt(`useRouteId`)}function dt(){let e=st(`useNavigation`);return a.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function ft(){let{matches:e,loaderData:t}=st(`useMatches`);return a.useMemo(()=>e.map(e=>C(e,t)),[e,t])}function pt(){let e=a.useContext(L),t=st(`useRouteError`),n=lt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function mt(){let{router:e}=ot(`useNavigate`),t=lt(`useNavigate`),n=a.useRef(!1);return Ge(()=>{n.current=!0}),a.useCallback(async(r,i={})=>{p(n.current,We),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ht={};function gt(e,t,n){!t&&!ht[e]&&(ht[e]=!0,p(!1,n))}a.memo(_t);function _t({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ze(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function vt({to:e,replace:t,state:n,relative:r}){f(R(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=a.useContext(P);p(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=a.useContext(I),{pathname:s}=z(),c=B(),l=k(e,ve(o),s,r===`path`),u=JSON.stringify(l);return a.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function yt(e){return Je(e.context)}function bt(e){f(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function xt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:o=!1,useTransitions:s}){f(!R(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=a.useMemo(()=>({basename:c,navigator:i,static:o,useTransitions:s,future:{}}),[c,i,o,s]);typeof n==`string`&&(n=v(n));let{pathname:u=`/`,search:d=``,hash:m=``,state:h=null,key:g=`default`,mask:_}=n,y=a.useMemo(()=>{let e=O(u,c);return e==null?null:{location:{pathname:e,search:d,hash:m,state:h,key:g,mask:_},navigationType:r}},[c,u,d,m,h,g,r,_]);return p(y!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${m}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:a.createElement(P.Provider,{value:l},a.createElement(F.Provider,{children:t,value:y}))}function St({children:e,location:t}){return Xe(Ct(e),t)}a.Component;function Ct(e,t=[]){let n=[];return a.Children.forEach(e,(e,r)=>{if(!a.isValidElement(e))return;let i=[...t,r];if(e.type===a.Fragment){n.push.apply(n,Ct(e.props.children,i));return}f(e.type===bt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),f(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let o={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Ct(e.props.children,i)),n.push(o)}),n}var H=`get`,U=`application/x-www-form-urlencoded`;function W(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function wt(e){return W(e)&&e.tagName.toLowerCase()===`button`}function Tt(e){return W(e)&&e.tagName.toLowerCase()===`form`}function Et(e){return W(e)&&e.tagName.toLowerCase()===`input`}function Dt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ot(e,t){return e.button===0&&(!t||t===`_self`)&&!Dt(e)}function kt(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function At(e,t){let n=kt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var G=null;function jt(){if(G===null)try{new FormData(document.createElement(`form`),0),G=!1}catch{G=!0}return G}var Mt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Nt(e){return e!=null&&!Mt.has(e)?(p(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${U}"`),null):e}function Pt(e,t){let n,r,i,a,o;if(Tt(e)){let o=e.getAttribute(`action`);r=o?O(o,t):null,n=e.getAttribute(`method`)||H,i=Nt(e.getAttribute(`enctype`))||U,a=new FormData(e)}else if(wt(e)||Et(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?O(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||H,i=Nt(e.getAttribute(`formenctype`))||Nt(o.getAttribute(`enctype`))||U,a=new FormData(o,e),!jt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(W(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=H,r=null,i=U,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ft={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},It=/[&><\u2028\u2029]/g;function Lt(e){return e.replace(It,e=>Ft[e])}function Rt(e,t){if(e===!1||e==null)throw Error(t)}function zt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&O(i.pathname,t)===`/`?i.pathname=`${j(t)}/_root.${r}`:i.pathname=`${j(i.pathname)}.${r}`,i}async function Bt(e,t){if(e.id in t)return t[e.id];try{let n=await i(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vt(e){return e!=null&&typeof e.page==`string`}function Ht(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Ut(e,t,n){return Jt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Bt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ht).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Wt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Gt(e,t,{includeHydrateFallback:n}={}){return Kt(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Kt(e){return[...new Set(e)]}function qt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Jt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Vt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(qt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Yt(){let e=a.useContext(M);return Rt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Xt(){let e=a.useContext(N);return Rt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var K=a.createContext(void 0);K.displayName=`FrameworkContext`;function q(){let e=a.useContext(K);return Rt(e,`You must render this element inside a <HydratedRouter> element`),e}function Zt(e,t){let n=a.useContext(K),[r,i]=a.useState(!1),[o,s]=a.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=a.useRef(null);a.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[o,p,{onFocus:J(c,m),onBlur:J(l,h),onMouseEnter:J(u,m),onMouseLeave:J(d,h),onTouchStart:J(f,m)}]:[o,p,{}]:[!1,p,{}]}function J(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Qt({page:e,...t}){let n=Ne(),{nonce:r}=q(),{router:i}=Yt(),o=a.useMemo(()=>x(i.routes,e,i.basename),[i.routes,e,i.basename]);return o?(t.nonce==null&&r&&(t={...t,nonce:r}),n?a.createElement(en,{page:e,matches:o,...t}):a.createElement(tn,{page:e,matches:o,...t})):null}function $t(e){let{manifest:t,routeModules:n}=q(),[r,i]=a.useState([]);return a.useEffect(()=>{let r=!1;return Ut(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function en({page:e,matches:t,...n}){let r=z(),{future:i}=q(),{basename:o}=Yt(),s=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=zt(e,o,i.v8_trailingSlashAwareDataRequests,`rsc`),a=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?a=!0:s.push(e.route.id);return a&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,i.v8_trailingSlashAwareDataRequests,e,r,t]);return a.createElement(a.Fragment,null,s.map(e=>a.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function tn({page:e,matches:t,...n}){let r=z(),{future:i,manifest:o,routeModules:s}=q(),{basename:c}=Yt(),{loaderData:l,matches:u}=Xt(),d=a.useMemo(()=>Wt(e,t,u,o,r,`data`),[e,t,u,o,r]),f=a.useMemo(()=>Wt(e,t,u,o,r,`assets`),[e,t,u,o,r]),p=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,a=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:n.add(e.route.id))}),n.size===0)return[];let u=zt(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return a&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,o,d,t,e,s]),m=a.useMemo(()=>Gt(f,o),[f,o]),h=$t(f);return a.createElement(a.Fragment,null,p.map(e=>a.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>a.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>a.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function nn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}a.Component;var rn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{rn&&(window.__reactRouterVersion=`7.18.1`)}catch{}function an({basename:e,children:t,useTransitions:n,window:r}){let i=a.useRef();i.current??=d({window:r,v5Compat:!0});let o=i.current,[s,c]=a.useState({action:o.action,location:o.location}),l=a.useCallback(e=>{n===!1?c(e):a.startTransition(()=>c(e))},[n]);return a.useLayoutEffect(()=>o.listen(l),[o,l]),a.createElement(xt,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,useTransitions:n})}function on({basename:e,children:t,history:n,useTransitions:r}){let[i,o]=a.useState({action:n.action,location:n.location}),s=a.useCallback(e=>{r===!1?o(e):a.startTransition(()=>o(e))},[r]);return a.useLayoutEffect(()=>n.listen(s),[n,s]),a.createElement(xt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}on.displayName=`unstable_HistoryRouter`;var Y=a.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:s,mask:c,state:l,target:u,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g){let{basename:_,navigator:v,useTransitions:y}=a.useContext(P),b=typeof d==`string`&&o.test(d),x=De(d,_);d=x.to;let S=He(d,{relative:r}),C=z(),w=null;if(c){let e=k(c,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:A([_,e.pathname])),w=v.createHref(e)}let[T,E,ee]=Zt(n,h),te=fn(d,{replace:s,mask:c,state:l,target:u,preventScrollReset:f,relative:r,viewTransition:p,defaultShouldRevalidate:m,useTransitions:y});function ne(t){e&&e(t),t.defaultPrevented||te(t)}let re=!(x.isExternal||i),ie=a.createElement(`a`,{...h,...ee,href:(re?w:void 0)||x.absoluteURL||S,onClick:re?ne:e,ref:nn(g,E),target:u,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?a.createElement(a.Fragment,null,ie,a.createElement(Qt,{page:S})):ie});Y.displayName=`Link`;var sn=a.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:o,viewTransition:s,children:c,...l},u){let d=V(o,{relative:l.relative}),f=z(),p=a.useContext(N),{navigator:m,basename:h}=a.useContext(P),g=p!=null&&Sn(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=O(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return a.createElement(Y,{...l,"aria-current":w,className:T,ref:u,style:E,to:o,viewTransition:s},typeof c==`function`?c(C):c)});sn.displayName=`NavLink`;var cn=a.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:c=H,action:l,onSubmit:u,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g)=>{let{useTransitions:_}=a.useContext(P),v=gn(),y=_n(l,{relative:d}),b=c.toLowerCase()===`get`?`get`:`post`,x=typeof l==`string`&&o.test(l);return a.createElement(`form`,{ref:g,method:b,action:y,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,o=r?.getAttribute(`formmethod`)||c,l=()=>v(r||e.currentTarget,{fetcherKey:t,method:o,navigate:n,replace:i,state:s,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m});_&&n!==!1?a.startTransition(()=>l()):l()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});cn.displayName=`Form`;function ln({getKey:e,storageKey:t,...n}){let r=a.useContext(K),{basename:i}=a.useContext(P),o=z(),s=ft();bn({getKey:e,storageKey:t});let c=a.useMemo(()=>{if(!r||!e)return null;let t=yn(o,s,i,e);return t===o.key?null:t},[]);if(!r||r.isSpaMode)return null;let l=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),a.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${Lt(JSON.stringify(t||vn))}, ${Lt(JSON.stringify(c))})`}})}ln.displayName=`ScrollRestoration`;function un(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function X(e){let t=a.useContext(M);return f(t,un(e)),t}function dn(e){let t=a.useContext(N);return f(t,un(e)),t}function fn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=B(),f=z(),p=V(e,{relative:s});return a.useCallback(m=>{if(Ot(m,t)){m.preventDefault();let t=n===void 0?_(f)===_(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?a.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,o,s,c,l,u])}function pn(e){p(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=a.useRef(kt(e)),n=a.useRef(!1),r=z(),i=a.useMemo(()=>At(r.search,n.current?null:t.current),[r.search]),o=B();return[i,a.useCallback((e,t)=>{let r=kt(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,o(`?`+r,t)},[o,i])]}var mn=0,hn=()=>`__${String(++mn)}__`;function gn(){let{router:e}=X(`useSubmit`),{basename:t}=a.useContext(P),n=ut(),r=e.fetch,i=e.navigate;return a.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Pt(e,t);if(a.navigate===!1){let e=a.fetcherKey||hn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function _n(e,{relative:t}={}){let{basename:n}=a.useContext(P),r=a.useContext(I);f(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),o={...V(e||`.`,{relative:t})},s=z();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:A([n,o.pathname])),_(o)}var vn=`react-router-scroll-positions`,Z={};function yn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:O(e.pathname,n)||e.pathname},t)),i??=e.key,i}function bn({getKey:e,storageKey:t}={}){let{router:n}=X(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=dn(`useScrollRestoration`),{basename:o}=a.useContext(P),s=z(),c=ft(),l=dt();a.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),xn(a.useCallback(()=>{if(l.state===`idle`){let t=yn(s,c,o,e);Z[t]=window.scrollY}try{sessionStorage.setItem(t||vn,JSON.stringify(Z))}catch(e){p(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,o,s,c,t])),typeof document<`u`&&(a.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||vn);e&&(Z=JSON.parse(e))}catch{}},[t]),a.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Z,()=>window.scrollY,e?(t,n)=>yn(t,n,o,e):void 0);return()=>t&&t()},[n,o,e]),a.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{p(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[s,r,i]))}function xn(e,t){let{capture:n}=t||{};a.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Sn(e,{relative:t}={}){let n=a.useContext(Pe);f(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=X(`useViewTransitionState`),i=V(e,{relative:t});if(!n.isTransitioning)return!1;let o=O(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=O(n.nextLocation.pathname,r)||n.nextLocation.pathname;return D(i.pathname,s)!=null||D(i.pathname,o)!=null}var Q=n(),Cn=/^\/p\/([^/]+)(?=\/|$)/;function wn(e){let t=Cn.exec(e)?.[1];return t===void 0?null:decodeURIComponent(t)}function Tn(e){let t=Cn.exec(e);if(!t)return e;let n=e.slice(t[0].length);return n===``?`/`:n}function En(e,t){return!t.startsWith(`/`)||t===`/p`||t.startsWith(`/p/`)?t:`/p/${encodeURIComponent(e)}${t}`}function Dn(e,t){return e===null?t:typeof t==`string`?En(e,t):t.pathname===void 0?t:{...t,pathname:En(e,t.pathname)}}function On(){let{projectId:e}=r(),{pathname:t}=z();return e??wn(t)}function $(){let e=On();return(0,a.useCallback)(t=>Dn(e,t),[e])}function kn(e){let{pathname:t}=z();return(0,a.useMemo)(()=>D(e,Tn(t)),[e,t])}function An({to:e,...t}){let n=$();return(0,Q.jsx)(Y,{...t,to:n(e)})}function jn({to:e,...t}){let n=$();return(0,Q.jsx)(sn,{...t,to:n(e)})}function Mn({to:e,...t}){let n=$();return(0,Q.jsx)(vt,{...t,to:n(e)})}function Nn(){let e=B(),t=$();return(0,a.useMemo)(()=>((n,r)=>typeof n==`number`?e(n):e(t(n),r)),[e,t])}export{pn as S,D as _,Dn as a,Ue as b,Nn as c,Y as d,sn as f,St as g,bt as h,wn as i,kn as l,yt as m,jn as n,Tn as o,vt as p,Mn as r,On as s,An as t,an as u,z as v,Ye as x,B as y};
|