(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,784195,e=>{"use strict";let t=(0,e.i(433721).default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);e.s(["default",0,t])},60293,e=>{"use strict";var t=e.i(816709),i=e.i(566531);let s=(0,t.create)((e,t)=>({favorites:[],loadedWorkspaceId:null,pendingFavorite:null,load:async s=>{let{loadedWorkspaceId:a}=t();if(a!==s)try{let t=await i.sdk.codeFavorites.list(s);e({favorites:t,loadedWorkspaceId:s})}catch{e({favorites:[],loadedWorkspaceId:s})}},addFavorite:async s=>{let{loadedWorkspaceId:a}=t();if(a)try{let t=await i.sdk.codeFavorites.create(a,s);e(e=>({favorites:[t,...e.favorites]}))}catch{}},removeFavorite:async s=>{let{loadedWorkspaceId:a}=t();if(a)try{await i.sdk.codeFavorites.delete_(a,s),e(e=>({favorites:e.favorites.filter(e=>e.id!==s)}))}catch{}},clearFavorites:async t=>{try{await i.sdk.http.delete(`/api/workspaces/${t}/code-favorites`),e({favorites:[],loadedWorkspaceId:t})}catch{}},setPendingFavorite:t=>e({pendingFavorite:t})}));e.s(["useCodeFavoritesStore",0,s])},822619,e=>{"use strict";var t=e.i(738776),i=e.i(482560),s=e.i(60293),a=e.i(691223),o=e.i(381253),r=e.i(137340),n=e.i(784195),n=n,l=e.i(159619),c=e.i(260218),d=e.i(191118),p=e.i(360112),u=e.i(106486);function m({favorite:e,workspaceId:s,onJump:a,onRemove:d}){let x=(0,u.useTranslations)("editor"),h=(0,i.useCallback)(t=>{t.stopPropagation();let i=`${e.path}:${e.line}:${e.endLine}`;navigator.clipboard.writeText(i).then(()=>{p.toast.success(x("copiedPosition",{pos:i}))})},[e,x]);return(0,t.jsxs)("div",{className:"group border rounded-lg p-3 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>{a(s,e.path,e.line,e.column,e.endLine,e.endColumn)},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(o.FileCode,{size:14,className:"shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-sm font-medium truncate",children:e.label||e.path})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,t.jsxs)("span",{className:"flex items-center gap-0.5 text-[10px] text-muted-foreground mr-0.5",children:[(0,t.jsx)(n.default,{size:10}),e.endLine>e.line?`${e.line}-${e.endLine}`:e.line]}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity",onClick:h,title:x("copyPosition"),children:(0,t.jsx)(l.Copy,{size:12})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>{t.stopPropagation(),d(e.id)},children:(0,t.jsx)(r.Trash2,{size:12})})]})]}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground truncate mt-1",children:e.path}),e.snippet&&(0,t.jsx)("pre",{className:"text-[11px] text-muted-foreground bg-muted/50 rounded px-2 py-1 mt-1.5 max-h-16 overflow-auto whitespace-pre break-all font-mono",children:e.snippet})]})}e.s(["CodeFavoritesPanel",0,function({workspaceId:e}){let{favorites:r,load:n,removeFavorite:l}=(0,s.useCodeFavoritesStore)(),c=(0,a.useEditorStore)(e=>e.jumpToPosition),p=(0,u.useTranslations)("editor");return((0,i.useEffect)(()=>{n(e)},[e,n]),0===r.length)?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground text-sm gap-2",children:[(0,t.jsx)(o.FileCode,{size:32,className:"opacity-30"}),(0,t.jsx)("span",{children:p("noFavorites")}),(0,t.jsx)("span",{className:"text-xs",children:p("noFavoritesHint")})]}):(0,t.jsx)(d.ScrollArea,{className:"h-full",children:(0,t.jsx)("div",{className:"grid gap-2 p-2",style:{gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))"},children:r.map(i=>(0,t.jsx)(m,{favorite:i,workspaceId:e,onJump:c,onRemove:l},i.id))})})}],822619)},306649,e=>{e.n(e.i(822619))}]);