@shumai-one/shumai 0.3.9 → 0.3.10
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/bin/{chunk-q3y6kdkh.js → chunk-02tqxzgz.js} +2 -2
- package/bin/chunk-09c03qdg.js +2 -0
- package/bin/{chunk-p65avrcv.js → chunk-0fpgfrv8.js} +2 -2
- package/bin/{chunk-fbqr4v70.js → chunk-0hbqkcsd.js} +1 -1
- package/bin/{chunk-zafjhkkk.js → chunk-0qcp4v52.js} +1 -1
- package/bin/chunk-0te5kcy3.js +2 -0
- package/bin/chunk-15zbprbe.js +1 -0
- package/bin/{chunk-ptmxkptc.js → chunk-1ev668rp.js} +2 -2
- package/bin/{chunk-z7m6sa7g.js → chunk-1qd83phd.js} +1 -1
- package/bin/{chunk-mwrheqe3.js → chunk-1whn0v5n.js} +1 -1
- package/bin/{chunk-s78r8f5v.js → chunk-28axgckk.js} +1 -1
- package/bin/{chunk-r0c9vmfm.js → chunk-2mxqjx3x.js} +1 -1
- package/bin/{chunk-x6ta6e2v.js → chunk-2sk6e4q0.js} +1 -1
- package/bin/{chunk-awaf0g5z.js → chunk-2sp0gkaw.js} +2 -2
- package/bin/{chunk-fhd9yadg.js → chunk-2t2wjzme.js} +2 -2
- package/bin/chunk-301pewt3.js +1 -0
- package/bin/chunk-33hax7fe.js +66 -0
- package/bin/{chunk-9fc118ea.js → chunk-34f4hk54.js} +2 -2
- package/bin/{chunk-331s5eb9.js → chunk-39s0cxq1.js} +2 -2
- package/bin/{chunk-c32x8x6z.js → chunk-41de755j.js} +1 -1
- package/bin/{chunk-naaa5ejw.js → chunk-42et2rqa.js} +2 -2
- package/bin/{chunk-pfwt5734.js → chunk-42f9r1sg.js} +2 -2
- package/bin/chunk-484yr1a7.js +1 -0
- package/bin/{chunk-jx9tqjh9.js → chunk-4shqnfq1.js} +1 -1
- package/bin/{chunk-h7jb1xb4.js → chunk-60xawsa6.js} +2 -2
- package/bin/chunk-62ag2nfa.js +2 -0
- package/bin/chunk-63emv4q3.js +1 -0
- package/bin/chunk-6529sh41.js +2 -0
- package/bin/{chunk-4yp5add5.js → chunk-661mcdxj.js} +2 -2
- package/bin/{chunk-n3997tqa.js → chunk-69sf7kb1.js} +1 -1
- package/bin/{chunk-0kfcfd0x.js → chunk-6gx6gdnk.js} +2 -2
- package/bin/chunk-6w395tfy.js +2 -0
- package/bin/chunk-7735r8d7.js +1 -0
- package/bin/{chunk-tx42kfdh.js → chunk-7m07t899.js} +1 -1
- package/bin/{chunk-dt9wfyf2.js → chunk-7r6h3fta.js} +2 -2
- package/bin/{chunk-5657zj59.js → chunk-7xwmj4ew.js} +1 -1
- package/bin/{chunk-vf6mpxrd.js → chunk-8r2agmv2.js} +2 -2
- package/bin/{chunk-dntwxkyf.js → chunk-8zmk029n.js} +1 -1
- package/bin/{chunk-hx2y4d75.js → chunk-90jcmarf.js} +2 -2
- package/bin/{chunk-7wh2mr72.js → chunk-94fyesf6.js} +1 -1
- package/bin/chunk-94yxj3yy.js +2 -0
- package/bin/{chunk-zwny8t7c.js → chunk-9rhckjgf.js} +1 -1
- package/bin/chunk-9ykcjdsv.js +3 -0
- package/bin/chunk-9yn5r2hh.js +2 -0
- package/bin/chunk-a80aab0f.js +2 -0
- package/bin/{chunk-rq6bvf0t.js → chunk-ag0pavv1.js} +1 -1
- package/bin/{chunk-6ja68bbj.js → chunk-at5ksmqs.js} +1 -1
- package/bin/{chunk-11j7ejan.js → chunk-bv5mh0e0.js} +3 -3
- package/bin/{chunk-7w01v7bw.js → chunk-bxexm2hd.js} +3 -3
- package/bin/{chunk-5ex69zt3.js → chunk-cc9fftnv.js} +2 -2
- package/bin/{chunk-r7crhkhn.js → chunk-ch25gq27.js} +2 -2
- package/bin/chunk-csky7q56.js +2 -0
- package/bin/{chunk-z71h48pj.js → chunk-d4ktgq49.js} +1 -1
- package/bin/{chunk-jvn0xnj8.js → chunk-day61cfg.js} +2 -2
- package/bin/{chunk-03ec6p4p.js → chunk-dgvcraag.js} +2 -2
- package/bin/{chunk-va9hwggw.js → chunk-e26p9vrv.js} +1 -1
- package/bin/{chunk-f37ywvvp.js → chunk-emyax05s.js} +1 -1
- package/bin/{chunk-3h4t28zz.js → chunk-enq1hf8g.js} +2 -2
- package/bin/{chunk-mffjg6zb.js → chunk-f03whbny.js} +2 -2
- package/bin/{chunk-vtm39m0n.js → chunk-fk9pd7ra.js} +1 -1
- package/bin/{chunk-8hex1hjk.js → chunk-fscyvjzb.js} +2 -2
- package/bin/{chunk-nw1ch5d8.js → chunk-g2bkj92r.js} +2 -2
- package/bin/chunk-g5qfxnz1.js +2 -0
- package/bin/{chunk-5efr8prc.js → chunk-g6aq2cyq.js} +1 -1
- package/bin/chunk-gh6j1nsm.js +1 -0
- package/bin/{chunk-wjk0f9fq.js → chunk-gra1fhdp.js} +2 -2
- package/bin/{chunk-79wjyt2p.js → chunk-gtenq4kq.js} +1 -1
- package/bin/chunk-h5jre78a.js +2 -0
- package/bin/{chunk-wth2f791.js → chunk-hcaw54dj.js} +2 -2
- package/bin/{chunk-8qryr65z.js → chunk-hsemzjvr.js} +2 -2
- package/bin/chunk-hte6gd36.js +1 -0
- package/bin/{chunk-vwayy6dy.js → chunk-j6dea33m.js} +3 -3
- package/bin/{chunk-bdwtaj3w.js → chunk-j99cr9mz.js} +2 -2
- package/bin/chunk-jn805ccq.js +1 -0
- package/bin/{chunk-tfwtxwth.js → chunk-k2w676wz.js} +2 -2
- package/bin/{chunk-ej18j83b.js → chunk-k33qdrdp.js} +1 -1
- package/bin/chunk-kmhkhcy6.js +68 -0
- package/bin/chunk-kp4kn4b4.js +2 -0
- package/bin/{chunk-9s1fdecm.js → chunk-m3ghgqc2.js} +1 -1
- package/bin/chunk-m84qgdyj.js +2 -0
- package/bin/{chunk-jt7fdhke.js → chunk-mk5hqjjd.js} +1 -1
- package/bin/{chunk-p2wyyvfa.js → chunk-mnhg12fm.js} +2 -2
- package/bin/{chunk-nc9hbzad.js → chunk-n3vzdzdw.js} +2 -2
- package/bin/{chunk-a6s80m0k.js → chunk-nw03w9pa.js} +1 -1
- package/bin/{chunk-7a4347xe.js → chunk-p31qe5mc.js} +2 -2
- package/bin/chunk-p48npmbh.js +2 -0
- package/bin/{chunk-6ts9djn2.js → chunk-p9w4ar11.js} +1 -1
- package/bin/chunk-pbztc6kv.js +1 -0
- package/bin/{chunk-v2dksv7p.js → chunk-pg55qp08.js} +2 -2
- package/bin/{chunk-agvb6bpw.js → chunk-pv4scagf.js} +1 -1
- package/bin/chunk-q0hrd0yw.js +2 -0
- package/bin/{chunk-wy82m4nq.js → chunk-qev7trtm.js} +2 -2
- package/bin/chunk-qk9npww4.js +2 -0
- package/bin/{chunk-zq665ybs.js → chunk-qphebjbv.js} +1 -1
- package/bin/{chunk-qp1hkx9k.js → chunk-rakz3pe6.js} +2 -2
- package/bin/chunk-rjga1vn2.js +2 -0
- package/bin/chunk-rt8yqz51.js +1 -0
- package/bin/chunk-s542e1y0.js +1 -0
- package/bin/{chunk-0rydta2q.js → chunk-s6e91ky2.js} +1 -1
- package/bin/{chunk-w4e52ade.js → chunk-s9s9hhet.js} +1 -1
- package/bin/{chunk-39j992fb.js → chunk-s9yzt7s3.js} +2 -2
- package/bin/chunk-sjsn35mp.js +1 -0
- package/bin/{chunk-0x6zt5yg.js → chunk-stggq92k.js} +1 -1
- package/bin/{chunk-zvq0btde.js → chunk-t16qt2ka.js} +3 -3
- package/bin/chunk-tc5evq8x.js +2 -0
- package/bin/chunk-tjrdsmdw.js +1 -0
- package/bin/{chunk-tk362keq.js → chunk-tkh0s7hg.js} +2 -2
- package/bin/{chunk-nn753fbs.js → chunk-tsym31yb.js} +2 -2
- package/bin/{chunk-a2m63585.js → chunk-v1ybpqrz.js} +1 -1
- package/bin/chunk-vbkwteh4.js +1 -0
- package/bin/chunk-vevscfh2.js +2 -0
- package/bin/chunk-vg33qt6z.js +11 -0
- package/bin/{chunk-wzw7rrfy.js → chunk-vgwjg37a.js} +2 -2
- package/bin/chunk-vwz2pa54.js +2 -0
- package/bin/chunk-we3vdyhb.js +1 -0
- package/bin/chunk-whn6dvak.js +1 -0
- package/bin/{chunk-j4byth37.js → chunk-wwjqqqr4.js} +1 -1
- package/bin/{chunk-mv4v52ah.js → chunk-xext4yvc.js} +1 -1
- package/bin/chunk-xr1wr22v.css +1 -0
- package/bin/chunk-xvpttxen.js +7 -0
- package/bin/chunk-y45tzhdn.js +2 -0
- package/bin/{chunk-c4yr75hy.js → chunk-y5ptk39s.js} +2 -2
- package/bin/{chunk-ytgtf0ak.js → chunk-y7b5gy17.js} +1 -1
- package/bin/{chunk-zcxajg6j.js → chunk-y8ffp5zj.js} +2 -2
- package/bin/chunk-yfgwknpa.js +78 -0
- package/bin/{chunk-yvknqnkb.js → chunk-z7b132c0.js} +2 -2
- package/bin/{chunk-v5c6t1w3.js → chunk-zdmcc6ps.js} +2 -2
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +485 -291
- package/package.json +7 -7
- package/prisma/migrations/20260819091331_add_kanban_schema/migration.sql +164 -0
- package/prisma/migrations/20260821102514_add_kanban_notifications/migration.sql +26 -0
- package/prisma/migrations/20260821133500_add_c_collation_to_kanban_sort_index/migration.sql +10 -0
- package/prisma/migrations/20260822020609_add_kanban_task_assets/migration.sql +17 -0
- package/prisma/migrations/20260822071734_remove_kanban_task_cancelled_status/migration.sql +28 -0
- package/prisma/schema.prisma +187 -0
- package/bin/chunk-0h1yw3eq.js +0 -1
- package/bin/chunk-1eqdvehm.js +0 -2
- package/bin/chunk-2ckj039r.js +0 -2
- package/bin/chunk-2wcfw38x.js +0 -1
- package/bin/chunk-4st1t79p.js +0 -2
- package/bin/chunk-5ctpz542.js +0 -78
- package/bin/chunk-7t9c532y.js +0 -1
- package/bin/chunk-7zvv37z0.js +0 -7
- package/bin/chunk-9vjkb4vh.js +0 -1
- package/bin/chunk-ar79dg9g.js +0 -2
- package/bin/chunk-b0kh9jpt.js +0 -1
- package/bin/chunk-d5v9nz51.js +0 -1
- package/bin/chunk-ddt5224b.js +0 -2
- package/bin/chunk-eekmnfn4.js +0 -2
- package/bin/chunk-ff8zrme6.js +0 -1
- package/bin/chunk-g2qeb32y.js +0 -2
- package/bin/chunk-gtqchcj0.js +0 -2
- package/bin/chunk-hdx9q31r.js +0 -1
- package/bin/chunk-hk5pwxhf.js +0 -2
- package/bin/chunk-jkpxykx9.css +0 -1
- package/bin/chunk-jq28ge97.js +0 -1
- package/bin/chunk-n3e4agsa.js +0 -2
- package/bin/chunk-ppwy5dja.js +0 -1
- package/bin/chunk-px660tvj.js +0 -2
- package/bin/chunk-qbs0nvbn.js +0 -3
- package/bin/chunk-qt6j0fm6.js +0 -65
- package/bin/chunk-t6gqzden.js +0 -1
- package/bin/chunk-tn24as5d.js +0 -2
- package/bin/chunk-v2n1hwt3.js +0 -1
- package/bin/chunk-vhcsdnzv.js +0 -2
- package/bin/chunk-wk153p7c.js +0 -1
- package/bin/chunk-y8wj6g7y.js +0 -11
- package/bin/chunk-ympx92ct.js +0 -1
- package/bin/chunk-yx6mahz0.js +0 -1
- package/bin/chunk-z8s40zfa.js +0 -68
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{t as
|
|
1
|
+
import{eg as R}from"./chunk-1ev668rp.js";import{fg as b}from"./chunk-mnhg12fm.js";import{_g as Z}from"./chunk-6w395tfy.js";import{ih as I}from"./chunk-qk9npww4.js";import{$h as G,Ai as M,Al as A,Bl as C,Dl as O,El as S,Jk as D,Yh as l,_h as z,di as B,xl as K,yl as v}from"./chunk-yfgwknpa.js";import{Mm as g}from"./chunk-wwjqqqr4.js";var u=g(l(),1);var T=(_)=>{return _.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:")};function t({sessionId:_,open:E,onOpenChange:k}){let{data:h,isLoading:y}=B({queryKey:["agent-sessions",_,"entries"],queryFn:async()=>{if(!_)return[];let X=await M.api["agent-sessions"][":sessionId"].entries.$get({param:{sessionId:_}});if(!X.ok)throw Error("Failed to fetch session logs");return await X.json()},enabled:E&&!!_});return z(v,{open:E,onOpenChange:k,children:G(A,{className:"sm:max-w-2xl max-h-[80vh] flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-md border border-foreground/15 shadow-2xl",children:[G(C,{className:"pb-4 border-b border-foreground/15",children:[G(O,{className:"flex items-center gap-2 text-xl font-bold",children:[z(D,{className:"w-5 h-5 text-violet-500"}),K.agent_session_logs()]}),z(S,{children:K.agent_logs_description()})]}),z("div",{className:"flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text",children:y?G("div",{className:"space-y-4",children:[G("div",{className:"flex gap-4",children:[z(Z,{className:"h-5 w-5 rounded-full shrink-0"}),G("div",{className:"flex-1 space-y-2",children:[z(Z,{className:"h-4 w-1/4"}),z(Z,{className:"h-20 w-full"})]})]}),G("div",{className:"flex gap-4",children:[z(Z,{className:"h-5 w-5 rounded-full shrink-0"}),G("div",{className:"flex-1 space-y-2",children:[z(Z,{className:"h-4 w-1/4"}),z(Z,{className:"h-12 w-full"})]})]})]}):h&&h.length>0?z("div",{className:"flex flex-col",children:h.map((X)=>{let $=X.entry,L=$?.timestamp||X.timestamp,f="";if(typeof L==="string"||typeof L==="number"){let J=new Date(L);if(!isNaN(J.getTime()))f=I(J.toISOString())}if($&&typeof $==="object"){if($.type==="message"&&$.message){let J=$.message,q="bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200",F=String(J.role||"");if(J.role==="user")q="bg-slate-100 text-slate-800 dark:bg-slate-900/30 dark:text-slate-300",F=K.role_user();else if(J.role==="assistant")q="bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300",F=K.role_agent();else if(J.role==="toolResult")q=J.isError?"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300":"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300",F=K.tool_result_with_name({name:String(J.toolName||K.unknown())});else if(J.role==="thought")q="bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",F=K.role_thinking();let c=(U)=>{let P=U;if(typeof U==="string")try{P=JSON.parse(U)}catch{}if(P&&typeof P==="object"&&!Array.isArray(P))return z("div",{className:"mt-1 space-y-1.5 pt-3",children:Object.entries(P).map(([V,W])=>{let H=W&&typeof W==="object"?JSON.stringify(W,null,2):String(W);return G("div",{className:"text-xs leading-relaxed break-words",children:[G("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:[V,":"]})," ",z("span",{className:"text-foreground/90 font-mono whitespace-pre-wrap",children:H})]},V)})});return z("div",{className:"text-xs font-mono whitespace-pre-wrap",children:String(U)})},p=()=>{let U=J.content;if(!U)return null;if(typeof U==="string"){if(!U.trim())return null;return z("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:z(R,{children:T(U)})})}if(Array.isArray(U)){let P=[];if(U.forEach((Y,V)=>{if(!Y)return;if(typeof Y==="string"){if(!Y.trim())return;P.push(z("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:z(R,{children:T(Y)})},`str-${V}`));return}if(typeof Y==="object"){let W=Y,H=W.type;if(H==="text"){let Q=W.text;if(typeof Q!=="string"||!Q.trim())return;P.push(z("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:z(R,{children:T(Q)})},`txt-${V}`));return}if(H==="toolCall"){let Q=String(W.name||W.toolName||K.unknown()),w=W.arguments||W.args;P.push(G("div",{className:"text-xs space-y-2 py-1",children:[G("div",{className:"font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5",children:[K.calling_tool()," ",z("span",{className:"font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]",children:Q})]}),!!w&&G("div",{className:"space-y-1 pt-3",children:[z("div",{className:"text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider",children:K.tool_arguments()}),c(w)]})]},`tool-${V}`));return}if(H==="image"){P.push(z("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:K.image_object()},`img-${V}`));return}let N=JSON.stringify(Y,null,2);if(N==="{}")return;P.push(z("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:N},`other-${V}`))}}),P.length===0)return null;return z("div",{className:"space-y-3 w-full",children:P.map((Y,V)=>G(u.default.Fragment,{children:[V>0&&z(b,{className:"my-3 opacity-50"}),Y]},V))})}return null};return G("div",{className:"relative pl-6 pb-6 last:pb-0",children:[z("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),z("div",{className:`absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center ${J.role==="user"?"bg-slate-500":J.role==="assistant"?"bg-violet-500":J.role==="toolResult"?J.isError?"bg-red-500":"bg-emerald-500":"bg-amber-500"}`}),G("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[G("div",{className:"flex items-center justify-between gap-2",children:[G("div",{className:"flex items-center gap-2 flex-wrap",children:[z("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider ${q}`,children:F}),G("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",X.id]})]}),z("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:f})]}),p()]})]},X.id)}}return G("div",{className:"relative pl-6 pb-6 last:pb-0",children:[z("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),z("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background bg-gray-400"}),G("div",{className:"bg-muted/30 p-3 rounded-lg border border-foreground/5",children:[G("div",{className:"flex items-center justify-between gap-2 mb-1.5 flex-wrap",children:[G("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",X.id]}),z("div",{className:"text-[10px] text-muted-foreground/60",children:f})]}),z("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words",children:JSON.stringify(X.entry,null,2)})]})]},X.id)})}):G("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[z(D,{className:"w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse"}),z("p",{className:"text-sm font-medium",children:K.no_logs_found()}),z("p",{className:"text-xs text-muted-foreground/60 mt-1",children:K.session_no_entries_yet()})]})})]})})}
|
|
2
|
+
export{t as S};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$h as K,Yh as Y,_h as q}from"./chunk-yfgwknpa.js";import{Mm as W}from"./chunk-wwjqqqr4.js";var k=W(Y(),1);var Z=({onResize:C,className:L=""})=>{let[y,F]=k.useState(!1),B=k.useRef(0);k.useEffect(()=>{if(!y)return;let b=(J)=>{let V=J.clientX-B.current;B.current=J.clientX,C(V)},G=()=>{F(!1),document.body.style.cursor=""};return document.addEventListener("mousemove",b),document.addEventListener("mouseup",G),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",G),document.body.style.cursor=""}},[y,C]);let O=(b)=>{b.preventDefault(),b.stopPropagation(),F(!0),B.current=b.clientX},Q=()=>q("div",{className:"absolute inset-y-0 -left-4 -right-4 z-20 cursor-col-resize touch-none"});return K("div",{className:`group relative z-20 flex h-full w-[2px] cursor-col-resize items-center justify-center bg-border transition-all hover:bg-transparent ${L}`,onMouseDown:O,children:[q(Q,{}),q("div",{className:`absolute inset-y-0 w-[2px] transition-all duration-300 ease-out
|
|
2
2
|
${y?"bg-blue-600 shadow-[0_0_15px_rgba(37,99,235,0.6)] opacity-100":"bg-blue-400 opacity-0 group-hover:opacity-100 group-hover:shadow-[0_0_8px_rgba(96,165,250,0.5)]"}
|
|
3
3
|
`}),q("div",{className:`absolute top-1/2 left-1/2 h-10 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-blue-600 transition-all duration-300 ease-out
|
|
4
4
|
${y?"opacity-100 scale-100 shadow-[0_0_10px_rgba(37,99,235,0.5)]":"opacity-0 scale-75 group-hover:opacity-100 group-hover:scale-100"}`})]})};
|
|
5
|
-
export{Z as
|
|
5
|
+
export{Z as V};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ce as a0,ue as _0,we as f0,xe as r0,ye as o0}from"./chunk-q0hrd0yw.js";import{df as N1,ef as R1,ff as Q1,gf as F1,hf as B1,kf as E1}from"./chunk-kp4kn4b4.js";import{qf as g0,rf as p0}from"./chunk-f03whbny.js";import{Df as H1}from"./chunk-enq1hf8g.js";import{Ff as u0,Gf as i0,Hf as d0,Mf as I}from"./chunk-33hax7fe.js";import{Zf as q1,_f as h1}from"./chunk-n3vzdzdw.js";import{gg as L1}from"./chunk-a80aab0f.js";import{Hg as S0,Ig as T0,Jg as D0,Sg as b0}from"./chunk-kmhkhcy6.js";import{Yg as r}from"./chunk-y8ffp5zj.js";import{ah as Z1,bh as $1,ch as X1,dh as _1}from"./chunk-dgvcraag.js";import{hh as y0}from"./chunk-qk9npww4.js";import{Dh as A0}from"./chunk-y45tzhdn.js";import{Fh as I0,Gh as l0,Hh as x0}from"./chunk-42et2rqa.js";import{Ih as J0,Jh as q0,Kh as U0,Lh as W0,Mh as b,Ph as G1,Qh as n,Rh as E0,Sh as L0,Th as h0,Vh as K1}from"./chunk-hsemzjvr.js";import{$h as J,Ai as O,Aj as z0,Al as Z0,Bl as $0,Dl as X0,Fl as m,Hl as j0,Ii as s0,Ij as w0,Ji as V0,Lk as M0,Mi as K0,Nj as U1,Ri as a,Tj as W1,Yh as B0,Yk as c0,Zh as k,Zj as Y1,_h as z,ai as s,di as x,ej as G0,fi as u,jj as z1,kj as J1,li as t0,ni as e0,ok as k0,sl as D,ul as c,xk as m0,xl as $,yl as Y0}from"./chunk-yfgwknpa.js";import{Mm as F0}from"./chunk-wwjqqqr4.js";var P0=F0(B0(),1);var o=F0(B0(),1);function A1(Y){if(!Y)return null;try{let W=y0(Y);if(isNaN(W.getTime()))return null;return A0(W,"MMM d, yyyy")}catch{return null}}function y1({version:Y,displayVersionNumber:W,index:F,canEdit:E,onRemove:_}){let[Q,K]=o.useState(!1),{ref:f,handleRef:L}=p0({id:Y.id,index:F,disabled:!E}),q=A1(Y.createdAt);return J("div",{ref:f,className:"group flex items-center gap-3 p-2.5 rounded-lg border border-border bg-card hover:bg-accent/40 transition-colors",children:[J("div",{className:"flex-shrink-0 flex items-center justify-center bg-muted text-muted-foreground rounded-full px-2.5 py-0.5 text-xs font-semibold select-none min-w-[2.25rem]",children:["v",W]}),E?z("div",{ref:L,className:"cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground p-1 -m-1 rounded touch-none flex items-center justify-center",children:z(w0,{className:"h-4 w-4"})}):z("div",{className:"w-4"}),z("div",{className:"h-12 w-20 flex-shrink-0 overflow-hidden rounded-md border border-border bg-muted flex items-center justify-center",children:Y.previewUrl?z("img",{src:Y.previewUrl,alt:Y.name||"",className:"h-full w-full object-cover"}):z(z0,{className:"h-5 w-5 text-muted-foreground"})}),J("div",{className:"flex flex-col flex-1 min-w-0 text-left",children:[z("span",{className:"truncate text-sm font-medium text-foreground",title:Y.name||"",children:Y.name||"Untitled"}),J("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground truncate",children:[z("span",{children:Y.creator?.name||$.unknown()}),q&&J(k,{children:[z("span",{children:"•"}),z("span",{children:q})]})]})]}),E&&J(J0,{modal:!1,open:Q,onOpenChange:K,children:[z(U0,{asChild:!0,children:z(c,{variant:"ghost",size:"icon","aria-label":"More options",className:D("h-8 w-8 text-muted-foreground hover:text-foreground transition-opacity flex-shrink-0",Q?"opacity-100":"opacity-0 group-hover:opacity-100 focus:opacity-100"),children:z(V0,{className:"h-4 w-4"})})}),z(W0,{align:"end",children:J(b,{onClick:()=>_(Y.id),className:"text-destructive focus:text-destructive cursor-pointer",children:[z(M0,{className:"h-4 w-4 mr-2"}),z("span",{children:$.remove_from_stack()})]})})]})]})}function v0({open:Y,onOpenChange:W,stackId:F,canEdit:E=!0,onVersionRemoved:_,onStackDissolved:Q}){let K=s(),[f,L]=o.useState([]),{data:q,isLoading:M}=x({queryKey:["version_stacks",F,"versions"],queryFn:async()=>{let X=await O.api.version_stacks[":stackId"].versions.$get({param:{stackId:F}});if(!X.ok)throw Error("Failed to fetch versions");return await X.json()},enabled:Y&&!!F});o.useEffect(()=>{if(q)L(q)},[q]);let{mutate:S}=u({mutationFn:async({fileId:X,beforeId:G})=>{if(!(await O.api.version_stacks[":stackId"].order.$post({param:{stackId:F},json:{fileId:X,beforeId:G}})).ok)throw Error("Failed to reorder versions")},onSuccess:()=>{K.invalidateQueries({queryKey:["version_stacks"]}),K.invalidateQueries({queryKey:["files"]}),K.invalidateQueries({queryKey:["projects"]}),m.success($.version_reordered_successfully())},onError:()=>{if(m.error($.failed_to_reorder_versions()),q)L(q)}}),{mutate:g,isPending:A}=u({mutationFn:async(X)=>{if(!(await O.api.version_stacks[":stackId"].versions[":versionId"].$delete({param:{stackId:F,versionId:X}})).ok)throw Error("Failed to remove version from stack");return X},onSuccess:(X)=>{m.success($.version_removed_successfully());let G=f.filter((P)=>P.id!==X);if(L(G),K.invalidateQueries({queryKey:["version_stacks"]}),K.invalidateQueries({queryKey:["files"]}),K.invalidateQueries({queryKey:["projects"]}),G.length<=1){let P=G[0];if(W(!1),P)Q?.(P.id)}else _?.(X,G)},onError:()=>{m.error($.failed_to_remove_version())}}),h=(X)=>{if(X.canceled)return;let{source:G}=X.operation;if(!g0(G))return;let{initialIndex:P,index:H}=G;if(P===H)return;let C=[...f],[p]=C.splice(P,1);C.splice(H,0,p),L(C);let w=H===C.length-1?"-1":C[H+1].id;S({fileId:p.id,beforeId:w})},V=(X)=>{if(A)return;g(X)};return z(Y0,{open:Y,onOpenChange:W,children:J(Z0,{className:"max-w-lg p-0 gap-0 overflow-hidden",children:[z($0,{className:"p-4 pb-3 border-b border-border",children:z(X0,{className:"text-base font-semibold",children:$.manage_versions_title()})}),z(r,{className:"max-h-[60vh] p-4",children:M?z("div",{className:"py-8 text-center text-sm text-muted-foreground",children:$.loading?.()||"Loading..."}):f.length===0?z("div",{className:"py-8 text-center text-sm text-muted-foreground",children:$.no_versions_found()}):z("div",{className:"space-y-2",children:z(b0,{sensors:[D0.configure({activationConstraints:[new T0.Distance({value:6})]}),S0],onDragEnd:h,children:f.map((X,G)=>z(y1,{version:X,displayVersionNumber:f.length-G,index:G,canEdit:E,onRemove:V},X.id))})})})]})})}var l=F0(B0(),1);var S1=[I.TODO,I.READY,I.IN_PROGRESS,I.IN_REVIEW,I.DONE,I.BLOCKED];function n0({teamId:Y,assetId:W,assetName:F,isOpen:E,onClose:_}){let Q=s(),[K,f]=l.useState(null),[L,q]=l.useState(!1),[M,S]=l.useState(I.TODO),[g,A]=l.useState(""),{data:h,isLoading:V}=x({queryKey:["teams",Y,"kanban","assets",W,"tasks"],queryFn:async()=>{let U=await O.api.teams[":teamId"].kanban.assets[":assetId"].tasks.$get({param:{teamId:Y,assetId:W}});if(!U.ok)throw Error("Failed to fetch linked tasks");return await U.json()},enabled:!!Y&&!!W&&E}),X=h?.data||[],G=l.useMemo(()=>new Set(X.map((U)=>U.id)),[X]),{data:P,isLoading:H}=x({queryKey:["teams",Y,"kanban","tasks","status",M],queryFn:async()=>{let U=await O.api.teams[":teamId"].kanban.tasks.$get({param:{teamId:Y},query:{status:M,first:"100"}});if(!U.ok)return{data:[]};return await U.json()},enabled:!!Y&&L&&E}),C=P?.data||[],p=l.useMemo(()=>{let U=g.trim().toLowerCase();return C.filter((N)=>{if(G.has(N.id))return!1;if(!U)return!0;return N.title.toLowerCase().includes(U)})},[C,G,g]),w=u({mutationFn:async(U)=>{let N=await O.api.teams[":teamId"].kanban.assets[":assetId"].tasks.$post({param:{teamId:Y,assetId:W},json:{taskId:U}});if(!N.ok)throw Error("Failed to link task");return await N.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["teams",Y,"kanban","assets",W,"tasks"]}),Q.invalidateQueries({queryKey:["teams",Y,"kanban"]}),m.success($.asset_linked())}}),B=u({mutationFn:async(U)=>{let N=await O.api.teams[":teamId"].kanban.assets[":assetId"].tasks[":taskId"].$delete({param:{teamId:Y,assetId:W,taskId:U}});if(!N.ok)throw Error("Failed to unlink task");return await N.json()},onSuccess:()=>{Q.invalidateQueries({queryKey:["teams",Y,"kanban","assets",W,"tasks"]}),Q.invalidateQueries({queryKey:["teams",Y,"kanban"]}),m.success($.asset_unlinked())}});return J(k,{children:[z(Y0,{open:E,onOpenChange:(U)=>!U&&_(),children:J(Z0,{className:"sm:max-w-2xl flex flex-col h-[520px] p-0 overflow-hidden",children:[z($0,{className:"p-4 border-b flex flex-row items-center justify-between space-y-0 shrink-0",children:J("div",{className:"flex items-center gap-2 min-w-0 pr-4",children:[z(a,{className:"w-5 h-5 text-primary shrink-0"}),J("div",{className:"min-w-0",children:[z(X0,{className:"text-sm font-semibold truncate",children:$.linked_tasks()}),F&&z("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:F})]})]})}),z("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden bg-background",children:z(r,{className:"flex-1 min-h-0 p-4 [&>div>div]:block!",children:V?z("div",{className:"flex items-center justify-center p-12",children:z(K0,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):X.length===0?J("div",{className:"flex flex-col items-center justify-center p-12 text-center text-xs text-muted-foreground gap-2",children:[z(a,{className:"w-8 h-8 opacity-30"}),z("p",{children:$.no_linked_tasks()})]}):z("div",{className:"space-y-2",children:X.map((U)=>J("div",{onClick:()=>f(U.id),className:"flex items-center justify-between gap-3 p-2.5 rounded-lg border border-border/60 bg-muted/20 hover:bg-muted/50 cursor-pointer transition-all hover:border-border",children:[J("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[U.isAgentTask&&z("span",{className:"p-1 rounded bg-orange-500/15 text-orange-600 dark:text-orange-400 shrink-0",children:z(G0,{className:"w-3.5 h-3.5"})}),z("span",{className:D("text-[10px] px-1.5 py-0.5 rounded border uppercase font-medium shrink-0",f0(U.status)),children:_0(U.status)}),z("span",{className:D("text-[10px] px-1.5 py-0.5 rounded border uppercase font-medium shrink-0",o0(U.priority)),children:r0(U.priority)}),z("span",{className:"text-xs font-medium text-foreground truncate flex-1",children:U.title})]}),J("div",{className:"flex items-center gap-2 shrink-0",children:[U.assignee&&J("div",{className:"flex items-center gap-1 text-[11px] text-muted-foreground",title:U.assignee.name,children:[J(I0,{className:"w-4 h-4 text-[9px]",children:[z(l0,{src:U.assignee.image||void 0}),z(x0,{children:U.assignee.name.slice(0,1).toUpperCase()})]}),z("span",{className:"hidden sm:inline text-[11px] max-w-[70px] truncate",children:U.assignee.name})]}),z(c,{type:"button",variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:(N)=>{N.stopPropagation(),B.mutate(U.id)},title:$.unlink_task(),children:z(c0,{className:"w-3.5 h-3.5"})})]})]},U.id))})})}),J("div",{className:"p-3 px-4 border-t bg-muted/10 flex items-center justify-between shrink-0",children:[J(u0,{open:L,onOpenChange:q,children:[z(i0,{asChild:!0,children:J(c,{variant:"outline",size:"sm",className:"gap-1.5 text-xs h-8",children:[z(k0,{className:"w-3.5 h-3.5"}),z("span",{children:$.link_to_task()})]})}),J(d0,{className:"w-80 sm:w-96 p-0",align:"start",children:[z("div",{className:"p-2 border-b",children:J("div",{className:"relative",children:[z(m0,{className:"w-3.5 h-3.5 absolute left-2.5 top-2.5 text-muted-foreground"}),z(j0,{placeholder:$.search_tasks(),value:g,onChange:(U)=>A(U.target.value),className:"pl-8 h-8 text-xs bg-muted/30",autoFocus:!0})]})}),z("div",{className:"flex border-b overflow-x-auto p-1 gap-1 bg-muted/20",children:S1.map((U)=>z("button",{type:"button",onClick:()=>S(U),className:D("px-2 py-1 text-[11px] font-medium rounded transition-colors whitespace-nowrap",M===U?"bg-background shadow-xs text-foreground font-semibold":"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:_0(U)},U))}),z(r,{className:"h-56",children:H?J("div",{className:"flex items-center justify-center p-6 text-xs text-muted-foreground",children:[z(K0,{className:"w-4 h-4 animate-spin mr-1.5"}),z("span",{children:$.loading()})]}):p.length===0?z("div",{className:"p-6 text-center text-xs text-muted-foreground",children:$.no_matching_tasks()}):z("div",{className:"p-1 space-y-0.5",children:p.map((U)=>J("button",{type:"button",onClick:()=>{w.mutate(U.id),q(!1)},className:"w-full text-left p-2 rounded hover:bg-muted/60 transition-colors flex items-center justify-between gap-2 text-xs group",children:[z("span",{className:"truncate flex-1 font-medium text-foreground",children:U.title}),z("span",{className:D("text-[10px] px-1.5 py-0.5 rounded border uppercase shrink-0",f0(U.status)),children:_0(U.status)})]},U.id))})})]})]}),z(c,{variant:"ghost",size:"sm",onClick:_,className:"text-xs h-8",children:$.close()})]})]})}),K&&z(a0,{teamId:Y,taskId:K,isOpen:!0,onClose:()=>f(null)})]})}function f1({teamId:Y,projectId:W,projectName:F,ancestorFolders:E,currentAsset:_,isRootFolder:Q,customTerminalBreadcrumb:K,displayStyle:f,onDisplayStyleChange:L,isLeftSidebarCollapsed:q,onLeftSidebarToggle:M,isRightSidebarCollapsed:S,onRightSidebarToggle:g,isChatbotOpen:A=!1,onChatbotToggle:h,isPublic:V=!1,onFolderClick:X,onRename:G,onDelete:P,fileId:H,shareId:C,allowDownload:p=!0,downloadInfo:w,versions:B,compareMode:U=!1,canCompareVersions:N=!1,onCompareVersions:t}){let j=t0(),{canEdit:i}=K1(W),[H0,d]=P0.useState(!1),[e,N0]=P0.useState(!1),v=H||_.id,P1=_.name==="Recently Deleted",C1=_.name==="All Collections",R0=!V&&!Q&&!P1&&!C1&&!U&&!!v,{data:C0}=x({queryKey:["teams",Y,"kanban","assets",v,"tasks"],queryFn:async()=>{if(!Y||!v)return{data:[],total:0};let Z=await O.api.teams[":teamId"].kanban.assets[":assetId"].tasks.$get({param:{teamId:Y,assetId:v}});if(!Z.ok)return{data:[],total:0};return await Z.json()},enabled:!!Y&&!!v&&R0}),O0=C0?.total??C0?.data?.length??0,D1=!1,O1=(Z)=>{if(!H)return;if(V&&C){j({to:"/share/$shareId/files/$fileId",params:{shareId:C,fileId:H},search:(R)=>({...R,version:Z})});return}if(!W)return;j({to:"/projects/$projectId/files/$fileId",params:{projectId:W,fileId:H},search:(R)=>({...R,version:Z})})},Q0=async(Z)=>{if(!H)return;try{let R=C?await O.api.shares[":shareId"].files[":fileId"]["download-url"].$post({param:{shareId:C,fileId:H},json:{key:Z}}):await O.api.files["download-url"].$post({json:{key:Z,assetId:H}});if(!R.ok)return;let{url:y}=await R.json(),T=document.createElement("a");T.href=y,T.download="",document.body.appendChild(T),T.click(),document.body.removeChild(T)}catch{}},V1=_.proxyType!=="audio"&&(w?.videoTranscodes?.length??0)>0,w1=V?[{name:F,id:"root"},...E.slice().reverse().map((Z)=>({name:Z.name||"",id:Z.id}))]:[{name:$.all_projects(),path:`/teams/${Y}`,isMuted:!0},{name:F,path:`/projects/${W}`},...E.slice().reverse().map((Z)=>({name:Z.name||"",path:`/projects/${W}/folders/${Z.id}`}))];return J("div",{className:"flex h-14 flex-wrap items-center justify-between gap-2 border-b border-border bg-card px-4 py-2",children:[J("div",{className:"flex min-w-0 flex-shrink items-center gap-1",children:[w1.map((Z,R)=>J("div",{className:"flex items-center gap-1",children:[R>0&&z("span",{className:"text-muted-foreground",children:"/"}),Z.path?z(e0,{to:Z.path,className:D("truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground",Z.isMuted?"text-muted-foreground":"text-foreground"),children:Z.name}):z("button",{onClick:()=>Z.id&&X?.(Z.id),className:"truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground text-foreground",children:Z.name})]},R)),K?J("div",{className:"flex items-center gap-1",children:[z("span",{className:"text-muted-foreground",children:"/"}),z("span",{className:"truncate rounded px-2 py-1 text-sm font-medium text-foreground",children:K})]}):!Q&&!U?J("div",{className:"flex items-center gap-1",children:[z("span",{className:"text-muted-foreground",children:"/"}),_.type==="folder"?z("span",{className:"truncate rounded px-2 py-1 text-sm font-medium text-foreground",children:_.name}):J(J0,{modal:!1,children:[J(U0,{className:"flex items-center gap-1 truncate rounded px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:[z("span",{children:_.name}),_.version!==void 0&&J(H1,{variant:"outline",className:"px-1 py-0 text-xs",children:["v",_.version]}),z(J1,{className:"h-4 w-4"})]}),J(W0,{className:"w-56",children:[p&&(V1?J(E0,{children:[z(L0,{className:"flex items-center gap-2",children:z("span",{children:$.download()})}),z(q0,{children:J(h0,{className:"w-48",children:[z(G1,{children:$.download()}),w?.videoTranscodes?.map((Z)=>{let R=Math.max(Z.width,Z.height),y=`${Z.height}p`;if(R>=3840)y="2160p";else if(R>=1920)y="1080p";else if(R>=1280)y="720p";else if(R>=960)y="540p";else if(R>=640)y="360p";else if(R>=320)y="180p";return J(b,{onClick:()=>Q0(Z.key),className:"flex items-center justify-between",children:[z("span",{children:y}),z("span",{className:"text-xs text-muted-foreground",children:"MP4"})]},y)}),w?.originalKey&&J(k,{children:[z(n,{}),J(b,{onClick:()=>Q0(w.originalKey),className:"flex items-center justify-between",children:[z("span",{children:"Original"}),z("span",{className:"text-xs text-muted-foreground",children:_.name?.split(".").pop()?.toUpperCase()||"RAW"})]})]})]})})]}):z(b,{onClick:()=>w?.originalKey&&Q0(w.originalKey),disabled:!w?.originalKey,children:$.download()})),i&&G&&z(b,{onClick:G,children:$.rename()}),i&&P&&z(b,{onClick:P,className:"text-destructive focus:text-destructive",children:$.delete()}),N&&t&&J(k,{children:[z(n,{}),J(b,{onClick:()=>t(),children:[z(s0,{className:"h-4 w-4"}),z("span",{children:$.compare_versions()})]})]}),B&&B.length>0&&J(k,{children:[z(n,{}),J(E0,{children:[J(L0,{className:"flex items-center gap-2",children:[z(U1,{className:"h-4 w-4"}),z("span",{children:"Versions"})]}),z(q0,{children:J(h0,{className:"w-80 p-1",children:[z("div",{className:"flex flex-col gap-1 max-h-96 overflow-y-auto",children:B.map((Z)=>{let R=_.version===Z.version;return J(b,{onClick:()=>O1(Z.id),className:"flex items-center gap-3 py-2 px-3 rounded-md cursor-pointer focus:bg-accent focus:text-accent-foreground",children:[J("div",{className:"flex-shrink-0 flex items-center justify-center bg-muted dark:bg-muted-foreground/20 text-muted-foreground dark:text-muted-foreground rounded-full px-2 py-0.5 text-xs font-semibold select-none min-w-[2rem]",children:["v",Z.version]}),z("div",{className:"h-10 w-16 flex-shrink-0 overflow-hidden rounded-md border border-border bg-muted flex items-center justify-center",children:Z.previewUrl?z("img",{src:Z.previewUrl,alt:Z.name||void 0,className:"h-full w-full object-cover"}):z(z0,{className:"h-4 w-4 text-muted-foreground"})}),J("div",{className:"flex flex-col flex-1 min-w-0 text-left",children:[z("span",{className:"truncate text-sm font-semibold text-foreground",children:Z.name}),z("span",{className:"truncate text-xs text-muted-foreground",children:Z.creator?.name||"Unknown"})]}),R&&z(z1,{className:"h-4 w-4 text-primary ml-auto flex-shrink-0"})]},Z.id)})}),z(n,{}),z("div",{className:"p-1",children:z("button",{className:"w-full text-center text-xs font-medium py-2 px-3 rounded-md bg-muted/80 hover:bg-muted text-foreground transition-colors cursor-pointer",onClick:()=>d(!0),children:$.manage_versions()})})]})})]})]})]})]})]}):null,R0&&J(c,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1.5 text-muted-foreground hover:text-foreground hover:bg-muted ml-1 cursor-pointer",onClick:()=>N0(!0),title:$.linked_tasks(),children:[z(a,{className:"w-4 h-4"}),O0>0&&z("span",{className:"inline-flex items-center justify-center px-1.5 py-0.2 text-[10px] font-semibold rounded-full bg-muted-foreground/15 text-foreground",children:O0})]}),R0&&e&&v&&z(n0,{teamId:Y,assetId:v,assetName:_.name,isOpen:e,onClose:()=>N0(!1)}),H&&B&&B.length>0&&z(v0,{open:H0,onOpenChange:d,stackId:H,canEdit:i,onStackDissolved:(Z)=>{d(!1),j({to:"/projects/$projectId/files/$fileId",params:{projectId:W,fileId:Z}})},onVersionRemoved:(Z,R)=>{if((_.version?B.find((T)=>T.version===_.version)?.id:void 0)===Z){let T=R[0];if(T)j({to:"/projects/$projectId/files/$fileId",params:{projectId:W,fileId:H},search:(M1)=>({...M1,version:T.id})})}}})]}),J("div",{className:"flex items-center gap-2",children:[J("div",{className:"flex flex-shrink-0 items-center gap-1 rounded-md border border-border bg-background p-1",children:[!H&&!V&&M&&z("button",{onClick:M,className:"rounded p-1.5 text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",title:q?"Show Left Sidebar":"Hide Left Sidebar",children:q?z(N1,{className:"h-4 w-4"}):z(Q1,{className:"h-4 w-4 fill-primary stroke-0"})}),!H&&!V&&f&&L&&J(k,{children:[z("button",{onClick:()=>L("card"),className:`rounded p-1.5 transition-colors ${f==="card"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"Card View",children:z(W1,{className:"h-4 w-4"})}),z("button",{onClick:()=>L("list"),className:`rounded p-1.5 transition-colors ${f==="list"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"List View",children:z(Y1,{className:"h-4 w-4"})})]}),z("button",{onClick:g,className:`rounded p-1.5 transition-colors ${!S&&!A?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:S?"Show Right Sidebar":"Hide Right Sidebar",children:!S&&!A?z(F1,{className:"h-4 w-4 fill-primary stroke-0"}):z(R1,{className:"h-4 w-4"})})]}),!V&&h&&z(Z1,{children:J($1,{children:[z(X1,{asChild:!0,children:z("span",{children:z("button",{disabled:!1,onClick:h,className:D("h-9 w-9 flex items-center justify-center rounded-full border border-border bg-background transition-colors",A?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground",!1),children:A?z(B1,{className:"h-6 w-6 text-primary transition-colors"}):z(G0,{className:"h-6 w-6 text-muted-foreground transition-colors"})})})}),z(_1,{children:z("p",{children:A?$.hide_chatbot():$.show_chatbot()})})]})})]})]})}function g2(){let{projectState:Y}=q1(),W=L1(),{isChatbotOpen:F,setIsChatbotOpen:E}=h1();if(!Y)return z(T1,{});let{teamId:_,projectId:Q,projectName:K,ancestorFolders:f,currentAsset:L,isRootFolder:q,customTerminalBreadcrumb:M,fileId:S,downloadInfo:g,versions:A,isPublic:h,shareId:V,allowDownload:X,onFolderClick:G,onRename:P,onDelete:H,compareMode:C,canCompareVersions:p,onCompareVersions:w}=Y,B=!!S,U=!!M,N=!!V&&!B,t=B?W.fileViewLeftSidebarCollapsed:N?W.shareConfigLeftSidebarCollapsed:W.fileListLeftSidebarCollapsed,j=h?void 0:()=>B?W.setFileViewLeftSidebarCollapsed(!W.fileViewLeftSidebarCollapsed):N?W.setShareConfigLeftSidebarCollapsed(!W.shareConfigLeftSidebarCollapsed):W.setFileListLeftSidebarCollapsed(!W.fileListLeftSidebarCollapsed),i=h&&Y.isRightSidebarCollapsed!==void 0?Y.isRightSidebarCollapsed:B?W.fileViewRightSidebarCollapsed:N?W.shareConfigRightSidebarCollapsed:W.fileListRightSidebarCollapsed,H0=h&&Y.onRightSidebarToggle?Y.onRightSidebarToggle:()=>{if(!h&&F)if(E(!1),B)W.setFileViewRightSidebarCollapsed(!1);else if(N)W.setShareConfigRightSidebarCollapsed(!1);else W.setFileListRightSidebarCollapsed(!1);else if(B)W.setFileViewRightSidebarCollapsed(!W.fileViewRightSidebarCollapsed);else if(N)W.setShareConfigRightSidebarCollapsed(!W.shareConfigRightSidebarCollapsed);else W.setFileListRightSidebarCollapsed(!W.fileListRightSidebarCollapsed)},d=h?void 0:()=>{E(!F)},e=Q?W.viewModes[Q]??"card":"card";return z(f1,{teamId:_,projectId:Q,projectName:K,ancestorFolders:f,currentAsset:L,isRootFolder:q,customTerminalBreadcrumb:M,displayStyle:B||N||U?void 0:e,onDisplayStyleChange:B||N||U?void 0:h?void 0:(v)=>{if(Q)W.setViewMode(Q,v)},isLeftSidebarCollapsed:t,onLeftSidebarToggle:j,isRightSidebarCollapsed:i,onRightSidebarToggle:H0,isChatbotOpen:!h&&F,onChatbotToggle:d,isPublic:h,shareId:V,allowDownload:X,fileId:S,downloadInfo:g,versions:A,onFolderClick:G,onRename:P,onDelete:H,compareMode:C,canCompareVersions:p,onCompareVersions:w})}function T1(){return z("div",{className:"flex h-14 flex-wrap items-center justify-center gap-2 border-b border-border bg-card px-4 py-2 flex-shrink-0",children:z(E1,{className:"w-10 h-10 text-orange-600"})})}
|
|
2
|
+
export{g2 as se};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{B as
|
|
1
|
+
import{Ne as A}from"./chunk-tsym31yb.js";import{Ai as z,_h as v,pi as w}from"./chunk-yfgwknpa.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/shares/")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
|
|
2
|
+
export{B as oe,H as pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{m as
|
|
1
|
+
import{$h as r,_h as i,rl as o,sl as a}from"./chunk-yfgwknpa.js";function m({delayDuration:t=0,...e}){return i(o.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function f({...t}){return i(o.Root,{"data-slot":"tooltip",...t})}function s({...t}){return i(o.Trigger,{"data-slot":"tooltip-trigger",...t})}function c({className:t,sideOffset:e=0,children:n,...d}){return i(o.Portal,{children:r(o.Content,{"data-slot":"tooltip-content",sideOffset:e,className:a("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",t),...d,children:[n,i(o.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}
|
|
2
|
+
export{m as ah,f as bh,s as ch,c as dh};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{cm as C,dm as E,em as I,fm as b,gm as h,hm as B,im as x}from"./chunk-42f9r1sg.js";import{nm as M}from"./chunk-t16qt2ka.js";import{om as G,pm as K}from"./chunk-7m07t899.js";import{wm as T}from"./chunk-g6aq2cyq.js";import{zm as S}from"./chunk-d4ktgq49.js";import{Bm as O}from"./chunk-1whn0v5n.js";import{Gm as v,Hm as y}from"./chunk-34f4hk54.js";import{Im as P}from"./chunk-k33qdrdp.js";import"./chunk-wwjqqqr4.js";var k=0,D=(q,N,w)=>{let J=new P;return(async()=>{let j={role:"assistant",content:[],api:"google-generative-ai",provider:q.provider,model:q.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let X=w?.apiKey;if(!X)throw Error(`No API key for provider: ${q.provider}`);let V=a(q,X,w?.headers),Y=m(q,N,w),$=await w?.onPayload?.(Y,q);if($!==void 0)Y=$;let g=await V.models.generateContentStream(Y);J.push({type:"start",partial:j});let Q=null,H=j.content,W=()=>H.length-1;for await(let Z of g){j.responseId||=Z.responseId;let z=Z.candidates?.[0];if(z?.content?.parts)for(let U of z.content.parts){if(U.text!==void 0){let _=C(U);if(!Q||_&&Q.type!=="thinking"||!_&&Q.type!=="text"){if(Q)if(Q.type==="text")J.push({type:"text_end",contentIndex:H.length-1,content:Q.text,partial:j});else J.push({type:"thinking_end",contentIndex:W(),content:Q.thinking,partial:j});if(_)Q={type:"thinking",thinking:"",thinkingSignature:void 0},j.content.push(Q),J.push({type:"thinking_start",contentIndex:W(),partial:j});else Q={type:"text",text:""},j.content.push(Q),J.push({type:"text_start",contentIndex:W(),partial:j})}if(Q.type==="thinking")Q.thinking+=U.text,Q.thinkingSignature=E(Q.thinkingSignature,U.thoughtSignature),J.push({type:"thinking_delta",contentIndex:W(),delta:U.text,partial:j});else Q.text+=U.text,Q.textSignature=E(Q.textSignature,U.thoughtSignature),J.push({type:"text_delta",contentIndex:W(),delta:U.text,partial:j})}if(U.functionCall){if(Q){if(Q.type==="text")J.push({type:"text_end",contentIndex:W(),content:Q.text,partial:j});else J.push({type:"thinking_end",contentIndex:W(),content:Q.thinking,partial:j});Q=null}let _=U.functionCall.id,A={type:"toolCall",id:!_||j.content.some((R)=>R.type==="toolCall"&&R.id===_)?`${U.functionCall.name}_${Date.now()}_${++k}`:_,name:U.functionCall.name||"",arguments:U.functionCall.args??{},...U.thoughtSignature&&{thoughtSignature:U.thoughtSignature}};j.content.push(A),J.push({type:"toolcall_start",contentIndex:W(),partial:j}),J.push({type:"toolcall_delta",contentIndex:W(),delta:JSON.stringify(A.arguments),partial:j}),J.push({type:"toolcall_end",contentIndex:W(),toolCall:A,partial:j})}}if(z?.finishReason){if(j.stopReason=x(z.finishReason),j.content.some((U)=>U.type==="toolCall"))j.stopReason="toolUse"}if(Z.usageMetadata)j.usage={input:(Z.usageMetadata.promptTokenCount||0)-(Z.usageMetadata.cachedContentTokenCount||0),output:(Z.usageMetadata.candidatesTokenCount||0)+(Z.usageMetadata.thoughtsTokenCount||0),cacheRead:Z.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:Z.usageMetadata.thoughtsTokenCount||0,totalTokens:Z.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},v(q,j.usage)}if(Q)if(Q.type==="text")J.push({type:"text_end",contentIndex:W(),content:Q.text,partial:j});else J.push({type:"thinking_end",contentIndex:W(),content:Q.thinking,partial:j});if(w?.signal?.aborted)throw Error("Request was aborted");if(j.stopReason==="aborted"||j.stopReason==="error")throw Error("An unknown error occurred");J.push({type:"done",reason:j.stopReason,message:j}),J.end()}catch(X){for(let V of j.content)if("index"in V)delete V.index;j.stopReason=w?.signal?.aborted?"aborted":"error",j.errorMessage=K(G(X)),J.push({type:"error",reason:j.stopReason,error:j}),J.end()}})(),J},qj=(q,N,w)=>{let J=w?.apiKey;if(!J)throw Error(`No API key for provider: ${q.provider}`);let j=T(q,N,w,J);if(!w?.reasoning)return D(q,N,{...j,thinking:{enabled:!1}});let X=y(q,w.reasoning),V=X==="off"?"high":X,Y=q;if(F(Y)||f(Y)||L(Y))return D(q,N,{...j,thinking:{enabled:!0,level:d(V,Y)}});return D(q,N,{...j,thinking:{enabled:!0,budgetTokens:c(Y,V,w.thinkingBudgets)}})};function a(q,N,w){let J={};if(q.baseUrl)J.baseUrl=q.baseUrl,J.apiVersion="";let j=O({...q.headers,...w});if(j)J.headers=j;return new M({apiKey:N,httpOptions:Object.keys(J).length>0?J:void 0})}function m(q,N,w={}){let J=I(q,N),j={};if(w.temperature!==void 0)j.temperature=w.temperature;if(w.maxTokens!==void 0)j.maxOutputTokens=w.maxTokens;let X=N.tools?.length?B(N.tools,w.toolChoice,h(q.id)):void 0,V={...Object.keys(j).length>0&&j,...N.systemPrompt&&{systemInstruction:S(N.systemPrompt)},...N.tools&&N.tools.length>0&&{tools:b(N.tools)},...X!==void 0&&{toolConfig:{functionCallingConfig:{mode:X}}}};if(w.thinking?.enabled&&q.reasoning){let $={includeThoughts:!0};if(w.thinking.level!==void 0)$.thinkingLevel=w.thinking.level;else if(w.thinking.budgetTokens!==void 0)$.thinkingBudget=w.thinking.budgetTokens;V.thinkingConfig=$}else if(q.reasoning&&w.thinking&&!w.thinking.enabled)V.thinkingConfig=u(q);if(w.signal){if(w.signal.aborted)throw Error("Request aborted");V.abortSignal=w.signal}return{model:q.id,contents:J,config:V}}function L(q){return/gemma-?4/.test(q.id.toLowerCase())}function F(q){return/gemini-3(?:\.\d+)?-pro/.test(q.id.toLowerCase())}function f(q){let N=q.id.toLowerCase();return/gemini-3(?:\.\d+)?-flash/.test(N)||N==="gemini-flash-latest"||N==="gemini-flash-lite-latest"}function u(q){if(F(q))return{thinkingLevel:"LOW"};if(f(q))return{thinkingLevel:"MINIMAL"};if(L(q))return{thinkingLevel:"MINIMAL"};return{thinkingBudget:0}}function d(q,N){if(F(N))switch(q){case"minimal":case"low":return"LOW";case"medium":case"high":return"HIGH"}if(L(N))switch(q){case"minimal":case"low":return"MINIMAL";case"medium":case"high":return"HIGH"}switch(q){case"minimal":return"MINIMAL";case"low":return"LOW";case"medium":return"MEDIUM";case"high":return"HIGH"}}function c(q,N,w){if(w?.[N]!==void 0)return w[N];if(q.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[N];if(q.id.includes("2.5-flash-lite"))return{minimal:512,low:2048,medium:8192,high:24576}[N];if(q.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[N];return-1}export{qj as streamSimple,D as stream};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Nm as q,Rm as M}from"./chunk-wwjqqqr4.js";var GG=q((xK,e)=>{var y=1000,f=y*60,x=f*60,I=x*24,CG=I*7,IG=I*365.25;e.exports=function(G,Q){Q=Q||{};var K=typeof G;if(K==="string"&&G.length>0)return _G(G);else if(K==="number"&&isFinite(G))return Q.long?yG(G):DG(G);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(G))};function _G(G){if(G=String(G),G.length>100)return;var Q=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(G);if(!Q)return;var K=parseFloat(Q[1]),V=(Q[2]||"ms").toLowerCase();switch(V){case"years":case"year":case"yrs":case"yr":case"y":return K*IG;case"weeks":case"week":case"w":return K*CG;case"days":case"day":case"d":return K*I;case"hours":case"hour":case"hrs":case"hr":case"h":return K*x;case"minutes":case"minute":case"mins":case"min":case"m":return K*f;case"seconds":case"second":case"secs":case"sec":case"s":return K*y;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return K;default:return}}function DG(G){var Q=Math.abs(G);if(Q>=I)return Math.round(G/I)+"d";if(Q>=x)return Math.round(G/x)+"h";if(Q>=f)return Math.round(G/f)+"m";if(Q>=y)return Math.round(G/y)+"s";return G+"ms"}function yG(G){var Q=Math.abs(G);if(Q>=I)return u(G,Q,I,"day");if(Q>=x)return u(G,Q,x,"hour");if(Q>=f)return u(G,Q,f,"minute");if(Q>=y)return u(G,Q,y,"second");return G+" ms"}function u(G,Q,K,V){var Z=Q>=K*1.5;return Math.round(G/K)+" "+V+(Z?"s":"")}});var m=q((hK,KG)=>{function fG(G){K.debug=K,K.default=K,K.coerce=L,K.disable=J,K.enable=Z,K.enabled=N,K.humanize=GG(),K.destroy=v,Object.keys(G).forEach(($)=>{K[$]=G[$]}),K.names=[],K.skips=[],K.formatters={};function Q($){let w=0;for(let W=0;W<$.length;W++)w=(w<<5)-w+$.charCodeAt(W),w|=0;return K.colors[Math.abs(w)%K.colors.length]}K.selectColor=Q;function K($){let w,W=null,Y,R;function B(...X){if(!B.enabled)return;let T=B,j=Number(new Date),A=j-(w||j);if(T.diff=A,T.prev=w,T.curr=j,w=j,X[0]=K.coerce(X[0]),typeof X[0]!=="string")X.unshift("%O");let F=0;X[0]=X[0].replace(/%([a-zA-Z%])/g,(C,D)=>{if(C==="%%")return"%";F++;let s=K.formatters[D];if(typeof s==="function"){let AG=X[F];C=s.call(T,AG),X.splice(F,1),F--}return C}),K.formatArgs.call(T,X),(T.log||K.log).apply(T,X)}if(B.namespace=$,B.useColors=K.useColors(),B.color=K.selectColor($),B.extend=V,B.destroy=K.destroy,Object.defineProperty(B,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(W!==null)return W;if(Y!==K.namespaces)Y=K.namespaces,R=K.enabled($);return R},set:(X)=>{W=X}}),typeof K.init==="function")K.init(B);return B}function V($,w){let W=K(this.namespace+(typeof w>"u"?":":w)+$);return W.log=this.log,W}function Z($){K.save($),K.namespaces=$,K.names=[],K.skips=[];let w=(typeof $==="string"?$:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let W of w)if(W[0]==="-")K.skips.push(W.slice(1));else K.names.push(W)}function z($,w){let W=0,Y=0,R=-1,B=0;while(W<$.length)if(Y<w.length&&(w[Y]===$[W]||w[Y]==="*"))if(w[Y]==="*")R=Y,B=W,Y++;else W++,Y++;else if(R!==-1)Y=R+1,B++,W=B;else return!1;while(Y<w.length&&w[Y]==="*")Y++;return Y===w.length}function J(){let $=[...K.names,...K.skips.map((w)=>"-"+w)].join(",");return K.enable(""),$}function N($){for(let w of K.skips)if(z($,w))return!1;for(let w of K.names)if(z($,w))return!0;return!1}function L($){if($ instanceof Error)return $.stack||$.message;return $}function v(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return K.enable(K.load()),K}KG.exports=fG});var VG=q((QG,g)=>{QG.formatArgs=hG;QG.save=vG;QG.load=bG;QG.useColors=xG;QG.storage=iG();QG.destroy=(()=>{let G=!1;return()=>{if(!G)G=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();QG.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function xG(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let G;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(G=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(G[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function hG(G){if(G[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+G[0]+(this.useColors?"%c ":" ")+"+"+g.exports.humanize(this.diff),!this.useColors)return;let Q="color: "+this.color;G.splice(1,0,Q,"color: inherit");let K=0,V=0;G[0].replace(/%[a-zA-Z%]/g,(Z)=>{if(Z==="%%")return;if(K++,Z==="%c")V=K}),G.splice(V,0,Q)}QG.log=console.debug||console.log||(()=>{});function vG(G){try{if(G)QG.storage.setItem("debug",G);else QG.storage.removeItem("debug")}catch(Q){}}function bG(){let G;try{G=QG.storage.getItem("debug")||QG.storage.getItem("DEBUG")}catch(Q){}if(!G&&typeof process<"u"&&"env"in process)G=process.env.DEBUG;return G}function iG(){try{return localStorage}catch(G){}}g.exports=m()(QG);var{formatters:kG}=g.exports;kG.j=function(G){try{return JSON.stringify(G)}catch(Q){return"[UnexpectedJSONParseError]: "+Q.message}}});var $G=q((bK,ZG)=>{ZG.exports=(G,Q=process.argv)=>{let K=G.startsWith("-")?"":G.length===1?"-":"--",V=Q.indexOf(K+G),Z=Q.indexOf("--");return V!==-1&&(Z===-1||V<Z)}});var JG=q((iK,zG)=>{var mG=M("os"),wG=M("tty"),O=$G(),{env:U}=process,d;if(O("no-color")||O("no-colors")||O("color=false")||O("color=never"))d=0;else if(O("color")||O("colors")||O("color=true")||O("color=always"))d=1;function rG(){if("FORCE_COLOR"in U){if(U.FORCE_COLOR==="true")return 1;if(U.FORCE_COLOR==="false")return 0;return U.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(U.FORCE_COLOR,10),3)}}function aG(G){if(G===0)return!1;return{level:G,hasBasic:!0,has256:G>=2,has16m:G>=3}}function oG(G,{streamIsTTY:Q,sniffFlags:K=!0}={}){let V=rG();if(V!==void 0)d=V;let Z=K?d:V;if(Z===0)return 0;if(K){if(O("color=16m")||O("color=full")||O("color=truecolor"))return 3;if(O("color=256"))return 2}if(G&&!Q&&Z===void 0)return 0;let z=Z||0;if(U.TERM==="dumb")return z;if(process.platform==="win32"){let J=mG.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in U){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((J)=>(J in U))||U.CI_NAME==="codeship")return 1;return z}if("TEAMCITY_VERSION"in U)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(U.TEAMCITY_VERSION)?1:0;if(U.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in U){let J=Number.parseInt((U.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(U.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(U.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(U.TERM))return 1;if("COLORTERM"in U)return 1;return z}function r(G,Q={}){let K=oG(G,{streamIsTTY:G&&G.isTTY,...Q});return aG(K)}zG.exports={supportsColor:r,stdout:r({isTTY:wG.isatty(1)}),stderr:r({isTTY:wG.isatty(2)})}});var BG=q((YG,l)=>{var tG=M("tty"),c=M("util");YG.init=ZK;YG.log=KK;YG.formatArgs=eG;YG.save=QK;YG.load=VK;YG.useColors=sG;YG.destroy=c.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");YG.colors=[6,2,3,4,5,1];try{let G=JG();if(G&&(G.stderr||G).level>=2)YG.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(G){}YG.inspectOpts=Object.keys(process.env).filter((G)=>{return/^debug_/i.test(G)}).reduce((G,Q)=>{let K=Q.substring(6).toLowerCase().replace(/_([a-z])/g,(Z,z)=>{return z.toUpperCase()}),V=process.env[Q];if(/^(yes|on|true|enabled)$/i.test(V))V=!0;else if(/^(no|off|false|disabled)$/i.test(V))V=!1;else if(V==="null")V=null;else V=Number(V);return G[K]=V,G},{});function sG(){return"colors"in YG.inspectOpts?Boolean(YG.inspectOpts.colors):tG.isatty(process.stderr.fd)}function eG(G){let{namespace:Q,useColors:K}=this;if(K){let V=this.color,Z="\x1B[3"+(V<8?V:"8;5;"+V),z=` ${Z};1m${Q} \x1B[0m`;G[0]=z+G[0].split(`
|
|
3
3
|
`).join(`
|
|
4
4
|
`+z),G.push(Z+"m+"+l.exports.humanize(this.diff)+"\x1B[0m")}else G[0]=GK()+Q+" "+G[0]}function GK(){if(YG.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function KK(...G){return process.stderr.write(c.formatWithOptions(YG.inspectOpts,...G)+`
|
|
5
5
|
`)}function QK(G){if(G)process.env.DEBUG=G;else delete process.env.DEBUG}function VK(){return process.env.DEBUG}function ZK(G){G.inspectOpts={};let Q=Object.keys(YG.inspectOpts);for(let K=0;K<Q.length;K++)G.inspectOpts[Q[K]]=YG.inspectOpts[Q[K]]}l.exports=m()(YG);var{formatters:WG}=l.exports;WG.o=function(G){return this.inspectOpts.colors=this.useColors,c.inspect(G,this.inspectOpts).split(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{f as
|
|
1
|
+
import{_h as r,al as t,bl as a,sl as o}from"./chunk-yfgwknpa.js";var c=t("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function f({className:i,variant:e="default",asChild:n=!1,...s}){let d=n?a.Root:"span";return r(d,{"data-slot":"badge","data-variant":e,className:o(c({variant:e}),i),...s})}
|
|
2
|
+
export{f as Df};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$f as h1,Ag as m1,Bg as Q1,Cg as $Q,Dg as HQ,Eg as JQ,Fg as C,Gg as $1,Ig as XQ,Zf as V,_f as J1,ag as l,bg as X1,cg as f1,dg as Y1,fg as U1,hg as Z1,ig as y1,jg as S1,kg as I1,lg as P1,mg as x1,ng as v1,og as g1,pg as q1,qg as B1,rg as W1,sg as _1,tg as b1,ug as d1,vg as c1,zg as p1}from"./chunk-z8s40zfa.js";import{Lh as R1,Sh as D1,hi as T1,pi as w1}from"./chunk-5ctpz542.js";import{nm as N1}from"./chunk-j4byth37.js";var s=N1(R1(),1);function YQ(Q){let $=Q.match(/teams\/([^/]+)/);if($)return{teamId:$[1]};let H=Q.match(/projects\/([^/]+)/);if(H)return{projectId:H[1]};return{}}function gQ(){let[Q,$]=s.useState(),H=T1({select:(J)=>J.location.pathname}),{teamId:X,projectId:Y}=YQ(H),{data:U}=D1({queryKey:["projects",Y,"team"],queryFn:async()=>{let J=await w1.api.projects[":projectId"].team.$get({param:{projectId:Y}});if(!J.ok)throw Error("failed to fetch project team");return await J.json()},enabled:!!Y});return s.useEffect(()=>{if(X)$(X);else if(U?.teamId)$(U.teamId)},[X,U]),Q}var{create:ZQ,defineProperty:u1,defineProperties:qQ,getOwnPropertyDescriptor:BQ,getOwnPropertyDescriptors:WQ,getOwnPropertySymbols:e}=Object,l1=Object.prototype.hasOwnProperty,i1=Object.prototype.propertyIsEnumerable,KQ=(Q,$)=>($=Symbol[Q])?$:Symbol.for("Symbol."+Q),m=(Q)=>{throw TypeError(Q)},K1=(Q,$,H)=>($ in Q)?u1(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:H}):Q[$]=H,G1=(Q,$)=>{for(var H in $||($={}))if(l1.call($,H))K1(Q,H,$[H]);if(e){for(var H of e($))if(i1.call($,H))K1(Q,H,$[H])}return Q},j1=(Q,$)=>qQ(Q,WQ($)),UQ=(Q,$)=>{var H={};for(var X in Q)if(l1.call(Q,X)&&$.indexOf(X)<0)H[X]=Q[X];if(Q!=null&&e){for(var X of e(Q))if($.indexOf(X)<0&&i1.call(Q,X))H[X]=Q[X]}return H},FQ=(Q)=>{var $;return[,,,ZQ(($=void 0)!=null?$:null)]},o1=["class","method","getter","setter","accessor","field","value","get","set"],b=(Q)=>Q!==void 0&&typeof Q!=="function"?m("Function expected"):Q,MQ=(Q,$,H,X,Y)=>({kind:o1[Q],name:$,metadata:X,addInitializer:(U)=>H._?m("Already initialized"):Y.push(b(U||null))}),zQ=(Q,$)=>K1($,KQ("metadata"),Q[3]),n=(Q,$,H,X)=>{for(var Y=0,U=Q[$>>1],J=U&&U.length;Y<J;Y++)$&1?U[Y].call(H):X=U[Y].call(H,X);return X},s1=(Q,$,H,X,Y,U)=>{var J,Z,w,R,N,z=$&7,q=!1,F=!1,A=Q.length+1,D=o1[z+5],T=Q[A-1]=[],K=Q[A]||(Q[A]=[]),G=(Y=Y.prototype,BQ({get[H](){return d(this,U)},set[H](W){return y(this,U,W)}},H));for(var L=X.length-1;L>=0;L--)if(R=MQ(z,H,w={},Q[3],K),R.static=q,R.private=F,N=R.access={has:(W)=>(H in W)},N.get=(W)=>W[H],N.set=(W,B)=>W[H]=B,Z=(0,X[L])({get:G.get,set:G.set},R),w._=1,Z===void 0)b(Z)&&(G[D]=Z);else if(typeof Z!=="object"||Z===null)m("Object expected");else b(J=Z.get)&&(G.get=J),b(J=Z.set)&&(G.set=J),b(J=Z.init)&&T.unshift(J);return G&&u1(Y,H,G),Y},n1=(Q,$,H)=>$.has(Q)||m("Cannot "+H),d=(Q,$,H)=>(n1(Q,$,"read from private field"),$.get(Q)),_=(Q,$,H)=>$.has(Q)?m("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(Q):$.set(Q,H),y=(Q,$,H,X)=>(n1(Q,$,"write to private field"),$.set(Q,H),H);function h(Q){return Q instanceof L1||Q instanceof t1}var r=10,LQ=class extends U1{constructor(Q){super(Q);let $=h1(()=>{let{dragOperation:X}=Q;if(!W1(X.activatorEvent))return;if(!h(X.source))return;if(X.status.initialized){let Y=Q.registry.plugins.get(c1);if(Y)return Y.disable(),()=>Y.enable()}}),H=Q.monitor.addEventListener("dragmove",(X,Y)=>{queueMicrotask(()=>{if(this.disabled||X.defaultPrevented||!X.nativeEvent)return;let{dragOperation:U}=Y;if(!W1(X.nativeEvent))return;if(!h(U.source))return;if(!U.shape)return;let{actions:J,collisionObserver:Z,registry:w}=Y,{by:R}=X;if(!R)return;let N=AQ(R),{source:z,target:q}=U,{center:F}=U.shape.current,A=[],D=[];V(()=>{for(let B of w.droppables){let{id:M}=B;if(!B.accepts(z)||M===(q==null?void 0:q.id)&&h(B)||!B.element)continue;let j=B.shape,E=new B1(B.element,{getBoundingClientRect:(x)=>S1(x,void 0,0.2)});if(!E.height||!E.width)continue;if(N=="down"&&F.y+r<E.center.y||N=="up"&&F.y-r>E.center.y||N=="left"&&F.x-r>E.center.x||N=="right"&&F.x+r<E.center.x)A.push(B),B.shape=E,D.push(()=>B.shape=j)}}),X.preventDefault(),Z.disable();let T=Z.computeCollisions(A,b1);V(()=>D.forEach((B)=>B()));let[K]=T;if(!K)return;let{id:G}=K,{index:L,group:W}=z.sortable;J.setDropTarget(G).then(()=>{let{source:B,target:M,shape:j}=U;if(!B||!h(B)||!j)return;let{index:E,group:x,target:O}=B.sortable,k=L!==E||W!==x,v=k?O:M==null?void 0:M.element;if(!v)return;v1(v);let o=new B1(v);if(!o)return;let g=Y1.delta(o,Y1.from(j.current.boundingRectangle),B.alignment);if(J.move({by:g}),k)J.setDropTarget(B.id).then(()=>Z.enable());else Z.enable()})})});this.destroy=()=>{H(),$()}}};function AQ(Q){let{x:$,y:H}=Q;if($>0)return"right";else if($<0)return"left";else if(H>0)return"down";else if(H<0)return"up"}var{defineProperty:NQ,defineProperties:RQ,getOwnPropertyDescriptors:DQ,getOwnPropertySymbols:V1}=Object,TQ=Object.prototype.hasOwnProperty,wQ=Object.prototype.propertyIsEnumerable,C1=(Q,$,H)=>($ in Q)?NQ(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:H}):Q[$]=H,S=(Q,$)=>{for(var H in $||($={}))if(TQ.call($,H))C1(Q,H,$[H]);if(V1){for(var H of V1($))if(wQ.call($,H))C1(Q,H,$[H])}return Q},I=(Q,$)=>RQ(Q,DQ($));function GQ(Q,$,H){if($===H)return Q;let X=Q.slice();return X.splice(H,0,X.splice($,1)[0]),X}function H1(Q){return"initialIndex"in Q&&typeof Q.initialIndex==="number"&&"index"in Q&&typeof Q.index==="number"}function jQ(Q,$,H){var X,Y,U;let{source:J,target:Z,canceled:w}=$.operation;if(!J||!Z||w){if("preventDefault"in $)$.preventDefault();return Q}let R=(W,B)=>W===B||typeof W==="object"&&("id"in W)&&W.id===B;if(Array.isArray(Q)){let W=Q.findIndex((M)=>R(M,J.id)),B=Q.findIndex((M)=>R(M,Z.id));if(W===-1||B===-1){if(H1(J)){let{initialIndex:M,index:j}=J;if(M===j||M<0||M>=Q.length){if("preventDefault"in $)$.preventDefault();return Q}return H(Q,M,j)}return Q}if(!w&&"index"in J&&typeof J.index==="number"){let M=J.index;if(M!==W)return H(Q,W,M)}return H(Q,W,B)}let N=Object.entries(Q),z=-1,q,F=-1,A;for(let[W,B]of N){if(z===-1){if(z=B.findIndex((M)=>R(M,J.id)),z!==-1)q=W}if(F===-1){if(F=B.findIndex((M)=>R(M,Z.id)),F!==-1)A=W}if(z!==-1&&F!==-1)break}if(z===-1&&H1(J)){let{initialGroup:W,initialIndex:B,group:M,index:j}=J;if(W==null||M==null||!(W in Q)||!(M in Q)){if("preventDefault"in $)$.preventDefault();return Q}if(W===M&&B===j){if("preventDefault"in $)$.preventDefault();return Q}if(W===M)return I(S({},Q),{[W]:H(Q[W],B,j)});let E=Q[W][B];return I(S({},Q),{[W]:[...Q[W].slice(0,B),...Q[W].slice(B+1)],[M]:[...Q[M].slice(0,j),E,...Q[M].slice(j)]})}if(!J.manager)return Q;let{dragOperation:D}=J.manager,T=(Y=(X=D.shape)==null?void 0:X.current.center)!=null?Y:D.position.current;if(A==null){if(Z.id in Q){let W=Z.shape&&T.y>Z.shape.center.y?Q[Z.id].length:0;A=Z.id,F=W}}if(q==null||A==null||q===A&&z===F){if(q!=null&&q===A&&z===F&&H1(J)){let W=J.group!=null&&J.group!==q,B=J.index!==z;if(W||B){let M=(U=J.group)!=null?U:q;if(M in Q){if(q===M)return I(S({},Q),{[q]:H(Q[q],z,J.index)});let j=Q[q][z];return I(S({},Q),{[q]:[...Q[q].slice(0,z),...Q[q].slice(z+1)],[M]:[...Q[M].slice(0,J.index),j,...Q[M].slice(J.index)]})}}}if("preventDefault"in $)$.preventDefault();return Q}if(q===A)return I(S({},Q),{[q]:H(Q[q],z,F)});let G=Z.shape&&Math.round(T.y)>Math.round(Z.shape.center.y)?1:0,L=Q[q][z];return I(S({},Q),{[q]:[...Q[q].slice(0,z),...Q[q].slice(z+1)],[A]:[...Q[A].slice(0,F+G),L,...Q[A].slice(F+G)]})}function VQ(Q,$){return jQ(Q,$,GQ)}var E1="__default__",CQ=class extends U1{constructor(Q){super(Q);let $=()=>{let X=new Map;for(let Y of Q.registry.droppables)if(Y instanceof L1){let{sortable:U}=Y,{group:J}=U,Z=X.get(J);if(!Z)Z=new Set,X.set(J,Z);Z.add(U)}for(let[Y,U]of X)X.set(Y,new Set(a(U)));return X},H=[Q.monitor.addEventListener("dragover",(X,Y)=>{if(this.disabled)return;let{dragOperation:U}=Y,{source:J,target:Z}=U;if(!h(J)||!h(Z))return;if(J.sortable===Z.sortable)return;let w=$(),R=J.sortable.group===Z.sortable.group,N=w.get(J.sortable.group),z=R?N:w.get(Z.sortable.group);if(!N||!z)return;queueMicrotask(()=>{if(X.defaultPrevented)return;Y.renderer.rendering.then(()=>{var q,F,A;let D=$();for(let[O,k]of w.entries()){let v=Array.from(k).entries();for(let[o,g]of v)if(g.index!==o||g.group!==O||!((q=D.get(O))==null?void 0:q.has(g)))return}let T=J.sortable.element,K=Z.sortable.element;if(!K||!T)return;if(!R&&Z.id===J.sortable.group)return;let G=a(N),L=R?G:a(z),W=(F=J.sortable.group)!=null?F:E1,B=(A=Z.sortable.group)!=null?A:E1,M={[W]:G,[B]:L},j=VQ(M,X);if(M===j)return;let E=j[B].indexOf(J.sortable),x=j[B].indexOf(Z.sortable);Y.collisionObserver.disable(),k1(T,E,K,x),V(()=>{for(let[O,k]of j[W].entries())k.index=O;if(!R)for(let[O,k]of j[B].entries())k.group=Z.sortable.group,k.index=O}),Y.actions.setDropTarget(J.id).then(()=>Y.collisionObserver.enable())})})}),Q.monitor.addEventListener("dragend",(X,Y)=>{if(!X.canceled)return;let{dragOperation:U}=Y,{source:J}=U;if(!h(J))return;if(J.sortable.initialIndex===J.sortable.index&&J.sortable.initialGroup===J.sortable.group)return;queueMicrotask(()=>{let Z=$(),w=Z.get(J.sortable.initialGroup);if(!w)return;Y.renderer.rendering.then(()=>{for(let[F,A]of Z.entries()){let D=Array.from(A).entries();for(let[T,K]of D)if(K.index!==T||K.group!==F)return}let R=a(w),N=J.sortable.element,z=R[J.sortable.initialIndex],q=z==null?void 0:z.element;if(!z||!q||!N)return;k1(N,z.index,q,J.index),V(()=>{for(let[F,A]of Z.entries()){let D=Array.from(A).values();for(let T of D)T.index=T.initialIndex,T.group=T.initialGroup}})})})})];this.destroy=()=>{for(let X of H)X()}}};function k1(Q,$,H,X){let Y=X<$?"afterend":"beforebegin";H.insertAdjacentElement(Y,Q)}function EQ(Q,$){return Q.index-$.index}function a(Q){return Array.from(Q).sort(EQ)}var O1=[LQ,CQ],F1={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},t=new f1,r1,a1,f,M1,c,p,z1,P;a1=[X1],r1=[X1];var u=class{constructor(Q,$){_(this,M1,n(f,8,this)),n(f,11,this),_(this,c),_(this,p),_(this,z1,n(f,12,this)),n(f,15,this),_(this,P),this.register=()=>{return V(()=>{var q,F;(q=this.manager)==null||q.registry.register(this.droppable),(F=this.manager)==null||F.registry.register(this.draggable)}),()=>this.unregister()},this.unregister=()=>{V(()=>{var q,F;(q=this.manager)==null||q.registry.unregister(this.droppable),(F=this.manager)==null||F.registry.unregister(this.draggable)})},this.destroy=()=>{V(()=>{this.droppable.destroy(),this.draggable.destroy()})};var H=Q,{effects:X=()=>[],group:Y,index:U,sensors:J,type:Z,transition:w=F1,plugins:R}=H,N=UQ(H,["effects","group","index","sensors","type","transition","plugins"]);let z=Z1(R,O1);this.droppable=new L1(N,$,this),this.draggable=new t1(j1(G1({},N),{plugins:z,effects:()=>[()=>{var q,F,A;let D=(q=this.manager)==null?void 0:q.dragOperation.status;if((D==null?void 0:D.initializing)&&this.id===((A=(F=this.manager)==null?void 0:F.dragOperation.source)==null?void 0:A.id))t.clear(this.manager);if(D==null?void 0:D.dragging)t.set(this.manager,this.id,J1(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{let{index:q,group:F,manager:A}=this,D=d(this,p),T=d(this,c);if(q!==D||F!==T)y(this,p,q),y(this,c,F),this.animate()},()=>{var q,F;let{target:A}=this,{isDragSource:D}=this.draggable;if(((F=(q=this.draggable.pluginConfig(d1))==null?void 0:q.feedback)!=null?F:"default")==="move"&&D)this.droppable.disabled=!A},...X()],type:Z,sensors:J}),$,this),y(this,P,N.element),this.manager=$,this.index=U,y(this,p,U),this.group=Y,y(this,c,Y),this.type=Z,this.transition=w}get initialIndex(){var Q,$;return($=(Q=t.get(this.manager,this.id))==null?void 0:Q.initialIndex)!=null?$:this.index}get initialGroup(){var Q,$;return($=(Q=t.get(this.manager,this.id))==null?void 0:Q.initialGroup)!=null?$:this.group}animate(){J1(()=>{let{manager:Q,transition:$}=this,{shape:H}=this.droppable;if(!Q)return;let{idle:X}=Q.dragOperation.status;if(!H||!$||X&&!$.idle)return;Q.renderer.rendering.then(()=>{let{element:Y}=this;if(!Y)return;for(let N of Y.getAnimations())if("transitionProperty"in N&&(N.transitionProperty==="transform"||N.transitionProperty==="translate"||N.transitionProperty==="scale"))N.cancel();let U=this.refreshShape();if(!U)return;let J={x:H.boundingRectangle.left-U.boundingRectangle.left,y:H.boundingRectangle.top-U.boundingRectangle.top},{translate:Z}=x1(Y),w=q1(Y,Z,!1),R=q1(Y,Z);if(J.x||J.y){let N=I1(y1(Y))?j1(G1({},$),{duration:0}):$;g1({element:Y,keyframes:{translate:[`${w.x+J.x}px ${w.y+J.y}px ${w.z}`,`${R.x}px ${R.y}px ${R.z}`]},options:N}).then(()=>{if(!Q.dragOperation.status.dragging)this.droppable.shape=void 0})}})})}get manager(){return this.draggable.manager}set manager(Q){V(()=>{this.draggable.manager=Q,this.droppable.manager=Q})}set element(Q){V(()=>{let $=d(this,P),H=this.droppable.element,X=this.draggable.element;if(!H||H===$)this.droppable.element=Q;if(!X||X===$)this.draggable.element=Q;y(this,P,Q)})}get element(){var Q,$;let H=d(this,P);if(!H)return;return($=(Q=P1.get(H))!=null?Q:H)!=null?$:this.droppable.element}set target(Q){this.droppable.element=Q}get target(){return this.droppable.element}set source(Q){this.draggable.element=Q}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set plugins(Q){this.draggable.plugins=Z1(Q,O1)}set disabled(Q){V(()=>{this.droppable.disabled=Q,this.draggable.disabled=Q})}set data(Q){V(()=>{this.droppable.data=Q,this.draggable.data=Q})}set handle(Q){this.draggable.handle=Q}set id(Q){this.droppable.id=Q,this.draggable.id=Q}get id(){return this.droppable.id}set sensors(Q){this.draggable.sensors=Q}set modifiers(Q){this.draggable.modifiers=Q}set collisionPriority(Q){this.droppable.collisionPriority=Q}set collisionDetector(Q){this.droppable.collisionDetector=Q!=null?Q:_1}set alignment(Q){this.draggable.alignment=Q}get alignment(){return this.draggable.alignment}set type(Q){V(()=>{this.droppable.type=Q,this.draggable.type=Q})}get type(){return this.draggable.type}set accept(Q){this.droppable.accept=Q}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(Q){return this.droppable.accepts(Q)}};f=FQ();M1=new WeakMap;c=new WeakMap;p=new WeakMap;z1=new WeakMap;P=new WeakMap;s1(f,4,"index",a1,u,M1);s1(f,4,"group",r1,u,z1);zQ(f,u);var t1=class extends p1{constructor(Q,$,H){super(Q,$);this.sortable=H}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},L1=class extends m1{constructor(Q,$,H){super(Q,$);this.sortable=H}get index(){return this.sortable.index}get group(){return this.sortable.group}};var i=N1(R1(),1);var{defineProperty:kQ,defineProperties:OQ,getOwnPropertyDescriptors:hQ,getOwnPropertySymbols:e1}=Object,fQ=Object.prototype.hasOwnProperty,yQ=Object.prototype.propertyIsEnumerable,QQ=(Q,$,H)=>($ in Q)?kQ(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:H}):Q[$]=H,A1=(Q,$)=>{for(var H in $||($={}))if(fQ.call($,H))QQ(Q,H,$[H]);if(e1){for(var H of e1($))if(yQ.call($,H))QQ(Q,H,$[H])}return Q},SQ=(Q,$)=>OQ(Q,hQ($));function J$(Q){let{accept:$,collisionDetector:H,collisionPriority:X,id:Y,data:U,element:J,handle:Z,index:w,group:R,disabled:N,modifiers:z,sensors:q,target:F,type:A,plugins:D}=Q,T=A1(A1({},F1),Q.transition),K=XQ((L)=>{return new u(SQ(A1({},Q),{transition:T,register:!1,handle:Q1(Z),element:Q1(J),target:Q1(F)}),L)}),G=HQ(K,IQ);return C(Y,()=>K.id=Y),$Q(()=>{V(()=>{K.group=R,K.index=w})},[K,R,w]),C(A,()=>K.type=A),C($,()=>K.accept=$,void 0,l),C(U,()=>U&&(K.data=U)),C(w,()=>{var L;if(((L=K.manager)==null?void 0:L.dragOperation.status.idle)&&(T==null?void 0:T.idle))K.refreshShape()},JQ),$1(Z,(L)=>K.handle=L),$1(J,(L)=>K.element=L),$1(F,(L)=>K.target=L),C(N,()=>K.disabled=N===!0),C(q,()=>K.sensors=q),C(H,()=>K.collisionDetector=H),C(X,()=>K.collisionPriority=X),C(D,()=>K.plugins=D,void 0,l),C(T,()=>K.transition=T,void 0,l),C(z,()=>K.modifiers=z,void 0,l),C(Q.alignment,()=>K.alignment=Q.alignment),{sortable:G,get isDragging(){return G.isDragging},get isDropping(){return G.isDropping},get isDragSource(){return G.isDragSource},get isDropTarget(){return G.isDropTarget},handleRef:i.useCallback((L)=>{K.handle=L!=null?L:void 0},[K]),ref:i.useCallback((L)=>{var W,B;if(!L&&((W=K.element)==null?void 0:W.isConnected)&&!((B=K.manager)==null?void 0:B.dragOperation.status.idle))return;K.element=L!=null?L:void 0},[K]),sourceRef:i.useCallback((L)=>{var W,B;if(!L&&((W=K.source)==null?void 0:W.isConnected)&&!((B=K.manager)==null?void 0:B.dragOperation.status.idle))return;K.source=L!=null?L:void 0},[K]),targetRef:i.useCallback((L)=>{var W,B;if(!L&&((W=K.target)==null?void 0:W.isConnected)&&!((B=K.manager)==null?void 0:B.dragOperation.status.idle))return;K.target=L!=null?L:void 0},[K])}}function IQ(Q,$,H){if(Q==="isDragSource"&&!H&&$)return!0;return!1}
|
|
2
|
-
export{gQ as
|
|
1
|
+
import{Ag as q1,Bg as B1,Cg as W1,Dg as _1,Eg as b1,Fg as d1,Gg as c1,Kg as p1,Lg as m1,Mg as Q1,Ng as $Q,Og as HQ,Pg as JQ,Qg as C,Rg as $1,Tg as XQ,ig as V,jg as J1,kg as h1,lg as l,mg as X1,ng as f1,og as Y1,qg as U1,sg as Z1,tg as y1,ug as S1,vg as I1,wg as P1,xg as x1,yg as v1,zg as g1}from"./chunk-kmhkhcy6.js";import{Ai as w1,Yh as R1,di as D1,ui as T1}from"./chunk-yfgwknpa.js";import{Mm as N1}from"./chunk-wwjqqqr4.js";var s=N1(R1(),1);function YQ(Q){let $=Q.match(/teams\/([^/]+)/);if($)return{teamId:$[1]};let H=Q.match(/projects\/([^/]+)/);if(H)return{projectId:H[1]};return{}}function gQ(){let[Q,$]=s.useState(),H=T1({select:(J)=>J.location.pathname}),{teamId:X,projectId:Y}=YQ(H),{data:U}=D1({queryKey:["projects",Y,"team"],queryFn:async()=>{let J=await w1.api.projects[":projectId"].team.$get({param:{projectId:Y}});if(!J.ok)throw Error("failed to fetch project team");return await J.json()},enabled:!!Y});return s.useEffect(()=>{if(X)$(X);else if(U?.teamId)$(U.teamId)},[X,U]),Q}var{create:ZQ,defineProperty:u1,defineProperties:qQ,getOwnPropertyDescriptor:BQ,getOwnPropertyDescriptors:WQ,getOwnPropertySymbols:e}=Object,l1=Object.prototype.hasOwnProperty,i1=Object.prototype.propertyIsEnumerable,KQ=(Q,$)=>($=Symbol[Q])?$:Symbol.for("Symbol."+Q),m=(Q)=>{throw TypeError(Q)},K1=(Q,$,H)=>($ in Q)?u1(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:H}):Q[$]=H,G1=(Q,$)=>{for(var H in $||($={}))if(l1.call($,H))K1(Q,H,$[H]);if(e){for(var H of e($))if(i1.call($,H))K1(Q,H,$[H])}return Q},j1=(Q,$)=>qQ(Q,WQ($)),UQ=(Q,$)=>{var H={};for(var X in Q)if(l1.call(Q,X)&&$.indexOf(X)<0)H[X]=Q[X];if(Q!=null&&e){for(var X of e(Q))if($.indexOf(X)<0&&i1.call(Q,X))H[X]=Q[X]}return H},FQ=(Q)=>{var $;return[,,,ZQ(($=void 0)!=null?$:null)]},o1=["class","method","getter","setter","accessor","field","value","get","set"],b=(Q)=>Q!==void 0&&typeof Q!=="function"?m("Function expected"):Q,MQ=(Q,$,H,X,Y)=>({kind:o1[Q],name:$,metadata:X,addInitializer:(U)=>H._?m("Already initialized"):Y.push(b(U||null))}),zQ=(Q,$)=>K1($,KQ("metadata"),Q[3]),n=(Q,$,H,X)=>{for(var Y=0,U=Q[$>>1],J=U&&U.length;Y<J;Y++)$&1?U[Y].call(H):X=U[Y].call(H,X);return X},s1=(Q,$,H,X,Y,U)=>{var J,Z,w,R,N,z=$&7,q=!1,F=!1,A=Q.length+1,D=o1[z+5],T=Q[A-1]=[],K=Q[A]||(Q[A]=[]),G=(Y=Y.prototype,BQ({get[H](){return d(this,U)},set[H](W){return y(this,U,W)}},H));for(var L=X.length-1;L>=0;L--)if(R=MQ(z,H,w={},Q[3],K),R.static=q,R.private=F,N=R.access={has:(W)=>(H in W)},N.get=(W)=>W[H],N.set=(W,B)=>W[H]=B,Z=(0,X[L])({get:G.get,set:G.set},R),w._=1,Z===void 0)b(Z)&&(G[D]=Z);else if(typeof Z!=="object"||Z===null)m("Object expected");else b(J=Z.get)&&(G.get=J),b(J=Z.set)&&(G.set=J),b(J=Z.init)&&T.unshift(J);return G&&u1(Y,H,G),Y},n1=(Q,$,H)=>$.has(Q)||m("Cannot "+H),d=(Q,$,H)=>(n1(Q,$,"read from private field"),$.get(Q)),_=(Q,$,H)=>$.has(Q)?m("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(Q):$.set(Q,H),y=(Q,$,H,X)=>(n1(Q,$,"write to private field"),$.set(Q,H),H);function h(Q){return Q instanceof L1||Q instanceof t1}var r=10,LQ=class extends U1{constructor(Q){super(Q);let $=h1(()=>{let{dragOperation:X}=Q;if(!W1(X.activatorEvent))return;if(!h(X.source))return;if(X.status.initialized){let Y=Q.registry.plugins.get(c1);if(Y)return Y.disable(),()=>Y.enable()}}),H=Q.monitor.addEventListener("dragmove",(X,Y)=>{queueMicrotask(()=>{if(this.disabled||X.defaultPrevented||!X.nativeEvent)return;let{dragOperation:U}=Y;if(!W1(X.nativeEvent))return;if(!h(U.source))return;if(!U.shape)return;let{actions:J,collisionObserver:Z,registry:w}=Y,{by:R}=X;if(!R)return;let N=AQ(R),{source:z,target:q}=U,{center:F}=U.shape.current,A=[],D=[];V(()=>{for(let B of w.droppables){let{id:M}=B;if(!B.accepts(z)||M===(q==null?void 0:q.id)&&h(B)||!B.element)continue;let j=B.shape,E=new B1(B.element,{getBoundingClientRect:(x)=>S1(x,void 0,0.2)});if(!E.height||!E.width)continue;if(N=="down"&&F.y+r<E.center.y||N=="up"&&F.y-r>E.center.y||N=="left"&&F.x-r>E.center.x||N=="right"&&F.x+r<E.center.x)A.push(B),B.shape=E,D.push(()=>B.shape=j)}}),X.preventDefault(),Z.disable();let T=Z.computeCollisions(A,b1);V(()=>D.forEach((B)=>B()));let[K]=T;if(!K)return;let{id:G}=K,{index:L,group:W}=z.sortable;J.setDropTarget(G).then(()=>{let{source:B,target:M,shape:j}=U;if(!B||!h(B)||!j)return;let{index:E,group:x,target:O}=B.sortable,k=L!==E||W!==x,v=k?O:M==null?void 0:M.element;if(!v)return;v1(v);let o=new B1(v);if(!o)return;let g=Y1.delta(o,Y1.from(j.current.boundingRectangle),B.alignment);if(J.move({by:g}),k)J.setDropTarget(B.id).then(()=>Z.enable());else Z.enable()})})});this.destroy=()=>{H(),$()}}};function AQ(Q){let{x:$,y:H}=Q;if($>0)return"right";else if($<0)return"left";else if(H>0)return"down";else if(H<0)return"up"}var{defineProperty:NQ,defineProperties:RQ,getOwnPropertyDescriptors:DQ,getOwnPropertySymbols:V1}=Object,TQ=Object.prototype.hasOwnProperty,wQ=Object.prototype.propertyIsEnumerable,C1=(Q,$,H)=>($ in Q)?NQ(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:H}):Q[$]=H,S=(Q,$)=>{for(var H in $||($={}))if(TQ.call($,H))C1(Q,H,$[H]);if(V1){for(var H of V1($))if(wQ.call($,H))C1(Q,H,$[H])}return Q},I=(Q,$)=>RQ(Q,DQ($));function GQ(Q,$,H){if($===H)return Q;let X=Q.slice();return X.splice(H,0,X.splice($,1)[0]),X}function H1(Q){return"initialIndex"in Q&&typeof Q.initialIndex==="number"&&"index"in Q&&typeof Q.index==="number"}function jQ(Q,$,H){var X,Y,U;let{source:J,target:Z,canceled:w}=$.operation;if(!J||!Z||w){if("preventDefault"in $)$.preventDefault();return Q}let R=(W,B)=>W===B||typeof W==="object"&&("id"in W)&&W.id===B;if(Array.isArray(Q)){let W=Q.findIndex((M)=>R(M,J.id)),B=Q.findIndex((M)=>R(M,Z.id));if(W===-1||B===-1){if(H1(J)){let{initialIndex:M,index:j}=J;if(M===j||M<0||M>=Q.length){if("preventDefault"in $)$.preventDefault();return Q}return H(Q,M,j)}return Q}if(!w&&"index"in J&&typeof J.index==="number"){let M=J.index;if(M!==W)return H(Q,W,M)}return H(Q,W,B)}let N=Object.entries(Q),z=-1,q,F=-1,A;for(let[W,B]of N){if(z===-1){if(z=B.findIndex((M)=>R(M,J.id)),z!==-1)q=W}if(F===-1){if(F=B.findIndex((M)=>R(M,Z.id)),F!==-1)A=W}if(z!==-1&&F!==-1)break}if(z===-1&&H1(J)){let{initialGroup:W,initialIndex:B,group:M,index:j}=J;if(W==null||M==null||!(W in Q)||!(M in Q)){if("preventDefault"in $)$.preventDefault();return Q}if(W===M&&B===j){if("preventDefault"in $)$.preventDefault();return Q}if(W===M)return I(S({},Q),{[W]:H(Q[W],B,j)});let E=Q[W][B];return I(S({},Q),{[W]:[...Q[W].slice(0,B),...Q[W].slice(B+1)],[M]:[...Q[M].slice(0,j),E,...Q[M].slice(j)]})}if(!J.manager)return Q;let{dragOperation:D}=J.manager,T=(Y=(X=D.shape)==null?void 0:X.current.center)!=null?Y:D.position.current;if(A==null){if(Z.id in Q){let W=Z.shape&&T.y>Z.shape.center.y?Q[Z.id].length:0;A=Z.id,F=W}}if(q==null||A==null||q===A&&z===F){if(q!=null&&q===A&&z===F&&H1(J)){let W=J.group!=null&&J.group!==q,B=J.index!==z;if(W||B){let M=(U=J.group)!=null?U:q;if(M in Q){if(q===M)return I(S({},Q),{[q]:H(Q[q],z,J.index)});let j=Q[q][z];return I(S({},Q),{[q]:[...Q[q].slice(0,z),...Q[q].slice(z+1)],[M]:[...Q[M].slice(0,J.index),j,...Q[M].slice(J.index)]})}}}if("preventDefault"in $)$.preventDefault();return Q}if(q===A)return I(S({},Q),{[q]:H(Q[q],z,F)});let G=Z.shape&&Math.round(T.y)>Math.round(Z.shape.center.y)?1:0,L=Q[q][z];return I(S({},Q),{[q]:[...Q[q].slice(0,z),...Q[q].slice(z+1)],[A]:[...Q[A].slice(0,F+G),L,...Q[A].slice(F+G)]})}function VQ(Q,$){return jQ(Q,$,GQ)}var E1="__default__",CQ=class extends U1{constructor(Q){super(Q);let $=()=>{let X=new Map;for(let Y of Q.registry.droppables)if(Y instanceof L1){let{sortable:U}=Y,{group:J}=U,Z=X.get(J);if(!Z)Z=new Set,X.set(J,Z);Z.add(U)}for(let[Y,U]of X)X.set(Y,new Set(a(U)));return X},H=[Q.monitor.addEventListener("dragover",(X,Y)=>{if(this.disabled)return;let{dragOperation:U}=Y,{source:J,target:Z}=U;if(!h(J)||!h(Z))return;if(J.sortable===Z.sortable)return;let w=$(),R=J.sortable.group===Z.sortable.group,N=w.get(J.sortable.group),z=R?N:w.get(Z.sortable.group);if(!N||!z)return;queueMicrotask(()=>{if(X.defaultPrevented)return;Y.renderer.rendering.then(()=>{var q,F,A;let D=$();for(let[O,k]of w.entries()){let v=Array.from(k).entries();for(let[o,g]of v)if(g.index!==o||g.group!==O||!((q=D.get(O))==null?void 0:q.has(g)))return}let T=J.sortable.element,K=Z.sortable.element;if(!K||!T)return;if(!R&&Z.id===J.sortable.group)return;let G=a(N),L=R?G:a(z),W=(F=J.sortable.group)!=null?F:E1,B=(A=Z.sortable.group)!=null?A:E1,M={[W]:G,[B]:L},j=VQ(M,X);if(M===j)return;let E=j[B].indexOf(J.sortable),x=j[B].indexOf(Z.sortable);Y.collisionObserver.disable(),k1(T,E,K,x),V(()=>{for(let[O,k]of j[W].entries())k.index=O;if(!R)for(let[O,k]of j[B].entries())k.group=Z.sortable.group,k.index=O}),Y.actions.setDropTarget(J.id).then(()=>Y.collisionObserver.enable())})})}),Q.monitor.addEventListener("dragend",(X,Y)=>{if(!X.canceled)return;let{dragOperation:U}=Y,{source:J}=U;if(!h(J))return;if(J.sortable.initialIndex===J.sortable.index&&J.sortable.initialGroup===J.sortable.group)return;queueMicrotask(()=>{let Z=$(),w=Z.get(J.sortable.initialGroup);if(!w)return;Y.renderer.rendering.then(()=>{for(let[F,A]of Z.entries()){let D=Array.from(A).entries();for(let[T,K]of D)if(K.index!==T||K.group!==F)return}let R=a(w),N=J.sortable.element,z=R[J.sortable.initialIndex],q=z==null?void 0:z.element;if(!z||!q||!N)return;k1(N,z.index,q,J.index),V(()=>{for(let[F,A]of Z.entries()){let D=Array.from(A).values();for(let T of D)T.index=T.initialIndex,T.group=T.initialGroup}})})})})];this.destroy=()=>{for(let X of H)X()}}};function k1(Q,$,H,X){let Y=X<$?"afterend":"beforebegin";H.insertAdjacentElement(Y,Q)}function EQ(Q,$){return Q.index-$.index}function a(Q){return Array.from(Q).sort(EQ)}var O1=[LQ,CQ],F1={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},t=new f1,r1,a1,f,M1,c,p,z1,P;a1=[X1],r1=[X1];var u=class{constructor(Q,$){_(this,M1,n(f,8,this)),n(f,11,this),_(this,c),_(this,p),_(this,z1,n(f,12,this)),n(f,15,this),_(this,P),this.register=()=>{return V(()=>{var q,F;(q=this.manager)==null||q.registry.register(this.droppable),(F=this.manager)==null||F.registry.register(this.draggable)}),()=>this.unregister()},this.unregister=()=>{V(()=>{var q,F;(q=this.manager)==null||q.registry.unregister(this.droppable),(F=this.manager)==null||F.registry.unregister(this.draggable)})},this.destroy=()=>{V(()=>{this.droppable.destroy(),this.draggable.destroy()})};var H=Q,{effects:X=()=>[],group:Y,index:U,sensors:J,type:Z,transition:w=F1,plugins:R}=H,N=UQ(H,["effects","group","index","sensors","type","transition","plugins"]);let z=Z1(R,O1);this.droppable=new L1(N,$,this),this.draggable=new t1(j1(G1({},N),{plugins:z,effects:()=>[()=>{var q,F,A;let D=(q=this.manager)==null?void 0:q.dragOperation.status;if((D==null?void 0:D.initializing)&&this.id===((A=(F=this.manager)==null?void 0:F.dragOperation.source)==null?void 0:A.id))t.clear(this.manager);if(D==null?void 0:D.dragging)t.set(this.manager,this.id,J1(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{let{index:q,group:F,manager:A}=this,D=d(this,p),T=d(this,c);if(q!==D||F!==T)y(this,p,q),y(this,c,F),this.animate()},()=>{var q,F;let{target:A}=this,{isDragSource:D}=this.draggable;if(((F=(q=this.draggable.pluginConfig(d1))==null?void 0:q.feedback)!=null?F:"default")==="move"&&D)this.droppable.disabled=!A},...X()],type:Z,sensors:J}),$,this),y(this,P,N.element),this.manager=$,this.index=U,y(this,p,U),this.group=Y,y(this,c,Y),this.type=Z,this.transition=w}get initialIndex(){var Q,$;return($=(Q=t.get(this.manager,this.id))==null?void 0:Q.initialIndex)!=null?$:this.index}get initialGroup(){var Q,$;return($=(Q=t.get(this.manager,this.id))==null?void 0:Q.initialGroup)!=null?$:this.group}animate(){J1(()=>{let{manager:Q,transition:$}=this,{shape:H}=this.droppable;if(!Q)return;let{idle:X}=Q.dragOperation.status;if(!H||!$||X&&!$.idle)return;Q.renderer.rendering.then(()=>{let{element:Y}=this;if(!Y)return;for(let N of Y.getAnimations())if("transitionProperty"in N&&(N.transitionProperty==="transform"||N.transitionProperty==="translate"||N.transitionProperty==="scale"))N.cancel();let U=this.refreshShape();if(!U)return;let J={x:H.boundingRectangle.left-U.boundingRectangle.left,y:H.boundingRectangle.top-U.boundingRectangle.top},{translate:Z}=x1(Y),w=q1(Y,Z,!1),R=q1(Y,Z);if(J.x||J.y){let N=I1(y1(Y))?j1(G1({},$),{duration:0}):$;g1({element:Y,keyframes:{translate:[`${w.x+J.x}px ${w.y+J.y}px ${w.z}`,`${R.x}px ${R.y}px ${R.z}`]},options:N}).then(()=>{if(!Q.dragOperation.status.dragging)this.droppable.shape=void 0})}})})}get manager(){return this.draggable.manager}set manager(Q){V(()=>{this.draggable.manager=Q,this.droppable.manager=Q})}set element(Q){V(()=>{let $=d(this,P),H=this.droppable.element,X=this.draggable.element;if(!H||H===$)this.droppable.element=Q;if(!X||X===$)this.draggable.element=Q;y(this,P,Q)})}get element(){var Q,$;let H=d(this,P);if(!H)return;return($=(Q=P1.get(H))!=null?Q:H)!=null?$:this.droppable.element}set target(Q){this.droppable.element=Q}get target(){return this.droppable.element}set source(Q){this.draggable.element=Q}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set plugins(Q){this.draggable.plugins=Z1(Q,O1)}set disabled(Q){V(()=>{this.droppable.disabled=Q,this.draggable.disabled=Q})}set data(Q){V(()=>{this.droppable.data=Q,this.draggable.data=Q})}set handle(Q){this.draggable.handle=Q}set id(Q){this.droppable.id=Q,this.draggable.id=Q}get id(){return this.droppable.id}set sensors(Q){this.draggable.sensors=Q}set modifiers(Q){this.draggable.modifiers=Q}set collisionPriority(Q){this.droppable.collisionPriority=Q}set collisionDetector(Q){this.droppable.collisionDetector=Q!=null?Q:_1}set alignment(Q){this.draggable.alignment=Q}get alignment(){return this.draggable.alignment}set type(Q){V(()=>{this.droppable.type=Q,this.draggable.type=Q})}get type(){return this.draggable.type}set accept(Q){this.droppable.accept=Q}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(Q){return this.droppable.accepts(Q)}};f=FQ();M1=new WeakMap;c=new WeakMap;p=new WeakMap;z1=new WeakMap;P=new WeakMap;s1(f,4,"index",a1,u,M1);s1(f,4,"group",r1,u,z1);zQ(f,u);var t1=class extends p1{constructor(Q,$,H){super(Q,$);this.sortable=H}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},L1=class extends m1{constructor(Q,$,H){super(Q,$);this.sortable=H}get index(){return this.sortable.index}get group(){return this.sortable.group}};var i=N1(R1(),1);var{defineProperty:kQ,defineProperties:OQ,getOwnPropertyDescriptors:hQ,getOwnPropertySymbols:e1}=Object,fQ=Object.prototype.hasOwnProperty,yQ=Object.prototype.propertyIsEnumerable,QQ=(Q,$,H)=>($ in Q)?kQ(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:H}):Q[$]=H,A1=(Q,$)=>{for(var H in $||($={}))if(fQ.call($,H))QQ(Q,H,$[H]);if(e1){for(var H of e1($))if(yQ.call($,H))QQ(Q,H,$[H])}return Q},SQ=(Q,$)=>OQ(Q,hQ($));function J$(Q){let{accept:$,collisionDetector:H,collisionPriority:X,id:Y,data:U,element:J,handle:Z,index:w,group:R,disabled:N,modifiers:z,sensors:q,target:F,type:A,plugins:D}=Q,T=A1(A1({},F1),Q.transition),K=XQ((L)=>{return new u(SQ(A1({},Q),{transition:T,register:!1,handle:Q1(Z),element:Q1(J),target:Q1(F)}),L)}),G=HQ(K,IQ);return C(Y,()=>K.id=Y),$Q(()=>{V(()=>{K.group=R,K.index=w})},[K,R,w]),C(A,()=>K.type=A),C($,()=>K.accept=$,void 0,l),C(U,()=>U&&(K.data=U)),C(w,()=>{var L;if(((L=K.manager)==null?void 0:L.dragOperation.status.idle)&&(T==null?void 0:T.idle))K.refreshShape()},JQ),$1(Z,(L)=>K.handle=L),$1(J,(L)=>K.element=L),$1(F,(L)=>K.target=L),C(N,()=>K.disabled=N===!0),C(q,()=>K.sensors=q),C(H,()=>K.collisionDetector=H),C(X,()=>K.collisionPriority=X),C(D,()=>K.plugins=D,void 0,l),C(T,()=>K.transition=T,void 0,l),C(z,()=>K.modifiers=z,void 0,l),C(Q.alignment,()=>K.alignment=Q.alignment),{sortable:G,get isDragging(){return G.isDragging},get isDropping(){return G.isDropping},get isDragSource(){return G.isDragSource},get isDropTarget(){return G.isDropTarget},handleRef:i.useCallback((L)=>{K.handle=L!=null?L:void 0},[K]),ref:i.useCallback((L)=>{var W,B;if(!L&&((W=K.element)==null?void 0:W.isConnected)&&!((B=K.manager)==null?void 0:B.dragOperation.status.idle))return;K.element=L!=null?L:void 0},[K]),sourceRef:i.useCallback((L)=>{var W,B;if(!L&&((W=K.source)==null?void 0:W.isConnected)&&!((B=K.manager)==null?void 0:B.dragOperation.status.idle))return;K.source=L!=null?L:void 0},[K]),targetRef:i.useCallback((L)=>{var W,B;if(!L&&((W=K.target)==null?void 0:W.isConnected)&&!((B=K.manager)==null?void 0:B.dragOperation.status.idle))return;K.target=L!=null?L:void 0},[K])}}function IQ(Q,$,H){if(Q==="isDragSource"&&!H&&$)return!0;return!1}
|
|
2
|
+
export{gQ as pf,h as qf,J$ as rf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Tl as h,Ul as z,Vl as E}from"./chunk-hcaw54dj.js";import{Wl as S}from"./chunk-0qcp4v52.js";import"./chunk-4shqnfq1.js";import{Zl as f}from"./chunk-v1ybpqrz.js";import{_l as R}from"./chunk-8zmk029n.js";import{$l as $}from"./chunk-g2bkj92r.js";import"./chunk-7r6h3fta.js";import{om as M,pm as V}from"./chunk-7m07t899.js";import{um as C,wm as _}from"./chunk-g6aq2cyq.js";import"./chunk-d4ktgq49.js";import{Am as k}from"./chunk-1whn0v5n.js";import{Hm as L}from"./chunk-34f4hk54.js";import{Im as D}from"./chunk-k33qdrdp.js";import"./chunk-wwjqqqr4.js";var O="v1",g=new Set(["openai","openai-codex","opencode","azure-openai-responses"]),A=16;function T(w){let G=new Map;if(!w)return G;for(let j of w.split(",")){let Q=j.trim();if(!Q)continue;let[W,J]=Q.split("=",2);if(!W||!J)continue;G.set(W.trim(),J.trim())}return G}function I(w,G){if(G?.azureDeploymentName)return G.azureDeploymentName;return T($("AZURE_OPENAI_DEPLOYMENT_NAME_MAP",G?.env)).get(w.id)||w.id}function b(w){return V(M(w),"Azure OpenAI API error")}var y=(w,G,j)=>{let Q=new D;return(async()=>{let W=I(w,j),J={role:"assistant",content:[],api:"azure-openai-responses",provider:w.provider,model:w.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let X=j?.apiKey;if(!X)throw Error(`No API key for provider: ${w.provider}`);let Y=U(w,X,j),F=C(G.tools,w.compat?.supportsOpenAIGrammarTools??!1),q=x(w,G,j,W,F),H=await j?.onPayload?.(q,w);if(H!==void 0)q=H;let K={...j?.signal?{signal:j.signal}:{},...j?.timeoutMs!==void 0?{timeout:j.timeoutMs}:{},maxRetries:0},{data:B,response:Z}=await R(()=>Y.responses.create(q,K).withResponse(),{maxRetries:j?.maxRetries,maxRetryDelayMs:j?.maxRetryDelayMs,signal:j?.signal});if(await j?.onResponse?.({status:Z.status,headers:k(Z.headers)},w),Q.push({type:"start",partial:J}),await E(B,J,Q,w,{grammarToolInputProperties:F}),j?.signal?.aborted)throw Error("Request was aborted");if(J.stopReason==="aborted"||J.stopReason==="error")throw Error("An unknown error occurred");Q.push({type:"done",reason:J.stopReason,message:J}),Q.end()}catch(X){for(let Y of J.content)delete Y.index,delete Y.partialJson,delete Y.customInput;J.stopReason=j?.signal?.aborted?"aborted":"error",J.errorMessage=b(X),Q.push({type:"error",reason:J.stopReason,error:J}),Q.end()}})(),Q},t=(w,G,j)=>{let Q=j?.apiKey;if(!Q)throw Error(`No API key for provider: ${w.provider}`);let W=_(w,G,j,Q),J=j?.reasoning?L(w,j.reasoning):void 0;return y(w,G,{...W,reasoningEffort:J==="off"?void 0:J})};function v(w){let G=w.trim().replace(/\/+$/,""),j;try{j=new URL(G)}catch{throw Error(`Invalid Azure OpenAI base URL: ${w}`)}let Q=j.hostname.endsWith(".openai.azure.com")||j.hostname.endsWith(".cognitiveservices.azure.com")||j.hostname.endsWith(".ai.azure.com"),W=j.pathname.replace(/\/+$/,"");if(Q&&(W===""||W==="/"||W==="/openai"||W==="/openai/v1/responses"))j.pathname="/openai/v1",j.search="";return j.toString().replace(/\/+$/,"")}function N(w){return`https://${w}.openai.azure.com/openai/v1`}function P(w,G){let j=G?.azureApiVersion||$("AZURE_OPENAI_API_VERSION",G?.env)||O,Q=G?.azureBaseUrl?.trim()||$("AZURE_OPENAI_BASE_URL",G?.env)?.trim()||void 0,W=G?.azureResourceName||$("AZURE_OPENAI_RESOURCE_NAME",G?.env),J=Q;if(!J&&W)J=N(W);if(!J&&w.baseUrl)J=w.baseUrl;if(!J)throw Error("Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.");return{baseUrl:v(J),apiVersion:j}}function U(w,G,j){let Q={...w.headers};if(j?.headers)Object.assign(Q,j.headers);let{baseUrl:W,apiVersion:J}=P(w,j);return new f({apiKey:G,apiVersion:J,dangerouslyAllowBrowser:!0,defaultHeaders:Q,baseURL:W})}function x(w,G,j,Q,W=C(G.tools,w.compat?.supportsOpenAIGrammarTools??!1)){let J=h(w,G,g,{grammarToolInputProperties:W}),X={model:Q,input:J,stream:!0,prompt_cache_key:S(j?.sessionId),store:!1};if(j?.maxTokens)X.max_output_tokens=Math.max(j.maxTokens,A);if(j?.temperature!==void 0)X.temperature=j?.temperature;if(G.tools&&G.tools.length>0)X.tools=z(G.tools,{supportsStrictMode:w.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:w.compat?.supportsOpenAIGrammarTools??!1});if(w.reasoning){if(j?.reasoningEffort||j?.reasoningSummary){let Y=j?.reasoningEffort?w.thinkingLevelMap?.[j.reasoningEffort]??j.reasoningEffort:"medium";X.reasoning={effort:Y,summary:j?.reasoningSummary||"auto"},X.include=["reasoning.encrypted_content"]}else if(w.thinkingLevelMap?.off!==null)X.reasoning={effort:w.thinkingLevelMap?.off??"none"}}return X}export{t as streamSimple,y as stream};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{B as
|
|
1
|
+
import{Ne as A}from"./chunk-tsym31yb.js";import{Ai as z,_h as v,pi as w}from"./chunk-yfgwknpa.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/collections/")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
|
|
2
|
+
export{B as qe,H as re};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{I as
|
|
2
|
+
import{Rm as G}from"./chunk-wwjqqqr4.js";var q=null;function H(k){if(typeof process>"u"||!process.versions?.bun||Object.keys(process.env).length>0)return;if(q===null){q=new Map;try{let{readFileSync:w}=G("fs"),D=w("/proc/self/environ","utf-8");for(let z of D.split("\x00")){let A=z.indexOf("=");if(A>0)q.set(z.slice(0,A),z.slice(A+1))}}catch{}}return q.get(k)}function I(k,w){return w?.[k]||(typeof process<"u"?process.env[k]:void 0)||H(k)||void 0}
|
|
3
|
+
export{I as $l};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_h as e,al as n,pl as r,sl as i}from"./chunk-yfgwknpa.js";function u({className:a,orientation:t="horizontal",...o}){return e(r.Root,{"data-slot":"tabs","data-orientation":t,orientation:t,className:i("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",a),...o})}var s=n("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function b({className:a,variant:t="default",...o}){return e(r.List,{"data-slot":"tabs-list","data-variant":t,className:i(s({variant:t}),a),...o})}function g({className:a,...t}){return e(r.Trigger,{"data-slot":"tabs-trigger",className:i("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",a),...t})}function f({className:a,...t}){return e(r.Content,{"data-slot":"tabs-content",className:i("flex-1 outline-none",a),...t})}
|
|
2
|
+
export{u as tf,b as uf,g as vf,f as wf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function k(q,J,H){let Q=J[H];if(typeof Q!=="string")throw Error(`Grammar tool call "${q}" requires argument "${H}" to be a string.`);return Q}function d(q,J,H,Q){if(q.closed){if(Q&&H===q.input)return;throw Error(`grammar tool input for property "${J}" changed after it was closed`)}if(!H.startsWith(q.input))throw Error(`grammar tool input for property "${J}" changed non-monotonically`);let V=H.slice(q.input.length);if(!Q&&V.length===0)return;let Z="";if(!q.started)Z+=`{${JSON.stringify(J)}:"`,q.started=!0;if(Z+=JSON.stringify(V).slice(1,-1),q.input=H,Q)Z+='"}',q.closed=!0;return Z}function P(q){let J=q.parameters;if(J.type!=="object")throw Error("grammar constrained sampling requires an object parameter schema");if(!Array.isArray(J.required)||J.required.length!==1||typeof J.required[0]!=="string")throw Error("grammar constrained sampling requires exactly one required string property");let H=J.required[0];if(!J.properties?.[H])throw Error(`grammar constrained sampling requires a properties entry for ${H}`);if(J.properties[H]?.type!=="string")throw Error(`grammar constrained sampling property ${H} must have type string`);return H}function u(q,J){let H=q.constrainedSampling;if(!H||H.type!=="json_schema")return;if(J)return!0;if(H.strict==="require")throw Error(`Tool "${q.name}" requires JSON-schema constrained sampling, but strict tools are unsupported.`);return}function C(q,J){let H=q.constrainedSampling;if(!H||H.type!=="grammar")return;if(!J)return;let Q=H.variants.openai_lark,V=H.variants.openai_regex,Z=typeof Q==="string"&&Q.trim().length>0,E=typeof V==="string"&&V.trim().length>0;if(!Z&&!E)throw Error(`Tool "${q.name}" cannot use grammar constrained sampling: no supported grammar variant was provided.`);try{return{format:Z?"lark":"regex",definition:Z?Q:V,inputProperty:P(q)}}catch(Y){let j=Y instanceof Error?Y.message:String(Y);throw Error(`Tool "${q.name}" cannot use grammar constrained sampling: ${j}.`)}}function c(q,J){let H=new Map;for(let Q of q??[]){let V=C(Q,J);if(V)H.set(Q.name,V.inputProperty)}return H}function R(q){return q.totalTokens||q.input+q.output+q.cacheRead+q.cacheWrite}function v(q){try{return JSON.stringify(q)??"undefined"}catch{return"[unserializable]"}}function h(q){if(typeof q==="string")return q.length;let J=0;for(let H of q)J+=H.type==="text"?H.text.length:4800;return J}function D(q){return Math.ceil(q.length/4)}function O(q){return Math.ceil(h(q)/4)}function _(q){let J=0;if(q.role==="user")return O(q.content);if(q.role==="toolResult")return O(q.content);for(let H of q.content)if(H.type==="text")J+=H.text.length;else if(H.type==="thinking")J+=H.thinking.length;else J+=H.name.length+v(H.arguments).length;return Math.ceil(J/4)}function M(q){let J=Number.NEGATIVE_INFINITY,H;for(let Q=0;Q<q.length;Q++){let V=q[Q];if(V.role==="assistant"){let Z=V;if(Z.timestamp>=J&&Z.stopReason!=="aborted"&&Z.stopReason!=="error"&&R(Z.usage)>0)H={usage:Z.usage,index:Q}}J=Math.max(J,V.timestamp)}return H}function A(q){let J=M(q);if(J){let Q=R(J.usage),V=0;for(let Z=J.index+1;Z<q.length;Z++)V+=_(q[Z]);return{tokens:Q+V,usageTokens:Q,trailingTokens:V,lastUsageIndex:J.index}}let H=0;for(let Q of q)H+=_(Q);return{tokens:H,usageTokens:0,trailingTokens:H,lastUsageIndex:null}}function N(q){if(!q||q.length===0)return 0;return D(v(q))}function I(q){return Array.isArray(q)}function z(q){if(I(q))return A(q);let J=A(q.messages);if(J.lastUsageIndex!==null){let Q=new Set(q.messages.slice(J.lastUsageIndex+1).filter((Z)=>Z.role==="toolResult").flatMap((Z)=>Z.addedToolNames??[])),V=N(q.tools?.filter((Z)=>Q.has(Z.name)));return{tokens:J.tokens+V,usageTokens:J.usageTokens,trailingTokens:J.trailingTokens+V,lastUsageIndex:J.lastUsageIndex}}let H=(q.systemPrompt?D(q.systemPrompt):0)+N(q.tools);return{tokens:J.tokens+H,usageTokens:J.usageTokens,trailingTokens:J.trailingTokens+H,lastUsageIndex:J.lastUsageIndex}}var b=4096,S=1;function x(q,J,H){if(q.contextWindow<=0)return Math.max(S,H);let Q=q.contextWindow-z(J).tokens-b;return Math.min(H,Math.max(S,Q))}function m(q,J,H,Q){return{temperature:H?.temperature,maxTokens:x(q,J,H?.maxTokens??q.maxTokens),signal:H?.signal,apiKey:Q||H?.apiKey,transport:H?.transport,cacheRetention:H?.cacheRetention,sessionId:H?.sessionId,headers:H?.headers,onPayload:H?.onPayload,onResponse:H?.onResponse,timeoutMs:H?.timeoutMs,websocketConnectTimeoutMs:H?.websocketConnectTimeoutMs,maxRetries:H?.maxRetries,maxRetryDelayMs:H?.maxRetryDelayMs,metadata:H?.metadata,env:H?.env}}function T(q){return q==="xhigh"||q==="max"?"high":q}function i(q,J,H,Q){let Z={...{minimal:1024,low:2048,medium:8192,high:16384},...Q},E=1024,Y=T(H),j=Z[Y],X=q===void 0?J:Math.min(q+j,J);if(X<=j)j=Math.max(0,X-1024);return{maxTokens:X,thinkingBudget:j}}function y(q,J){let H=[],Q=!1;for(let V of q){if(V.type==="image"){if(!Q)H.push({type:"text",text:J});Q=!0;continue}H.push(V),Q=V.text===J}return H}function f(q,J){if(J.input.includes("image"))return q;return q.map((H)=>{if(H.role==="user"&&Array.isArray(H.content))return{...H,content:y(H.content,"(image omitted: model does not support images)")};if(H.role==="toolResult")return{...H,content:y(H.content,"(tool image omitted: model does not support images)")};return H})}function l(q,J,H){let Q=new Map,V=q.map(($)=>$.content==null?{...$,content:[]}:$),E=f(V,J).map(($)=>{if($.role==="user")return $;if($.role==="toolResult"){let w=Q.get($.toolCallId);if(w&&w!==$.toolCallId)return{...$,toolCallId:w};return $}if($.role==="assistant"){let w=$,U=w.provider===J.provider&&w.api===J.api&&w.model===J.id,B=w.content.flatMap((F)=>{if(F.type==="thinking"){if(F.redacted)return U?F:[];if(U&&F.thinkingSignature)return F;if(!F.thinking||F.thinking.trim()==="")return[];if(U)return F;return{type:"text",text:F.thinking}}if(F.type==="text"){if(U)return F;return{type:"text",text:F.text}}if(F.type==="toolCall"){let K=F,W=K;if(!U&&K.thoughtSignature)W={...K},delete W.thoughtSignature;if(!U&&H){let L=H(K.id,J,w);if(L!==K.id)Q.set(K.id,L),W={...W,id:L}}return W}return F});return{...w,content:B}}return $}),Y=[],j=[],X=new Set,G=()=>{if(j.length>0){for(let $ of j)if(!X.has($.id))Y.push({role:"toolResult",toolCallId:$.id,toolName:$.name,content:[{type:"text",text:"No result provided"}],isError:!0,timestamp:Date.now()});j=[],X=new Set}};for(let $=0;$<E.length;$++){let w=E[$];if(w.role==="assistant"){G();let U=w;if(U.stopReason==="error"||U.stopReason==="aborted")continue;let B=U.content.filter((F)=>F.type==="toolCall");if(B.length>0)j=B,X=new Set;Y.push(w)}else if(w.role==="toolResult")X.add(w.toolCallId),Y.push(w);else if(w.role==="user")G(),Y.push(w);else Y.push(w)}return G(),Y}
|
|
3
|
-
export{k as
|
|
3
|
+
export{k as qm,d as rm,u as sm,C as tm,c as um,x as vm,m as wm,i as xm,l as ym};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as g}from"./chunk-m84qgdyj.js";import"./chunk-9rhckjgf.js";import"./chunk-s6e91ky2.js";import"./chunk-xvpttxen.js";import"./chunk-bxexm2hd.js";import"./chunk-9yn5r2hh.js";import"./chunk-cc9fftnv.js";import"./chunk-62ag2nfa.js";import"./chunk-ch25gq27.js";import"./chunk-h5jre78a.js";import"./chunk-nw03w9pa.js";import{Le as x}from"./chunk-pg55qp08.js";import{Ne as f}from"./chunk-tsym31yb.js";import"./chunk-y5ptk39s.js";import"./chunk-661mcdxj.js";import"./chunk-kp4kn4b4.js";import"./chunk-f03whbny.js";import"./chunk-p48npmbh.js";import"./chunk-g5qfxnz1.js";import"./chunk-94yxj3yy.js";import"./chunk-enq1hf8g.js";import"./chunk-vgwjg37a.js";import"./chunk-33hax7fe.js";import"./chunk-n3vzdzdw.js";import"./chunk-z7b132c0.js";import"./chunk-1ev668rp.js";import"./chunk-mnhg12fm.js";import"./chunk-a80aab0f.js";import"./chunk-0te5kcy3.js";import"./chunk-kmhkhcy6.js";import"./chunk-y8ffp5zj.js";import"./chunk-6w395tfy.js";import"./chunk-rjga1vn2.js";import"./chunk-dgvcraag.js";import"./chunk-39s0cxq1.js";import"./chunk-qk9npww4.js";import"./chunk-y45tzhdn.js";import"./chunk-02tqxzgz.js";import"./chunk-42et2rqa.js";import{Uh as p}from"./chunk-hsemzjvr.js";import{Ai as h,Yh as v,_h as a,di as r,ei as o,qi as c}from"./chunk-yfgwknpa.js";import{Mm as w}from"./chunk-wwjqqqr4.js";var b=w(v(),1);function d(){let{projectId:e}=y.useParams(),{teamId:s,ensureTeamIdForProject:n}=p();b.useEffect(()=>{n(e)},[e,n]);let{data:i}=o(x(e)),t=i?.rootFolder,{data:m}=r({queryKey:["folders",t],queryFn:async()=>{let l=await h.api.folders[":folderId"].$get({param:{folderId:t}});if(!l.ok)throw Error("failed to fetch folder");return await l.json()},enabled:!!t});if(!s||!t||!m)return a(f,{});return a(g,{teamId:s,projectId:e,projectName:i.name??"",assetId:t,rootFolderId:t})}var y=c("/projects/$projectId/")({component:d});export{y as Route};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{d as
|
|
1
|
+
import{_h as o,sl as r}from"./chunk-yfgwknpa.js";function d({className:t,...a}){return o("div",{"data-slot":"card",className:r("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...a})}function n({className:t,...a}){return o("div",{"data-slot":"card-header",className:r("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function c({className:t,...a}){return o("div",{"data-slot":"card-title",className:r("leading-none font-semibold",t),...a})}function s({className:t,...a}){return o("div",{"data-slot":"card-description",className:r("text-sm text-muted-foreground",t),...a})}function i({className:t,...a}){return o("div",{"data-slot":"card-content",className:r("px-6",t),...a})}function l({className:t,...a}){return o("div",{"data-slot":"card-footer",className:r("flex items-center px-6 [.border-t]:pt-6",t),...a})}
|
|
2
|
+
export{d as Fe,n as Ge,c as He,s as Ie,i as Je,l as Ke};
|