@shumai-one/shumai 0.5.0 → 0.5.2
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-h82r29wm.js → chunk-04avc4fn.js} +49 -49
- package/bin/chunk-0asthrjf.js +2 -0
- package/bin/chunk-0ge2mm8j.js +1 -0
- package/bin/{chunk-3z20b2hz.js → chunk-0j22699g.js} +2 -2
- package/bin/{chunk-j909v9p5.js → chunk-0v9srsdz.js} +1 -1
- package/bin/{chunk-exgtwask.js → chunk-0y4zq3y4.js} +1 -1
- package/bin/{chunk-5yd9cv7f.js → chunk-15vsw36h.js} +5 -5
- package/bin/{chunk-eez1yncf.js → chunk-15w79661.js} +2 -2
- package/bin/{chunk-xvdd04gy.js → chunk-19jpn3r6.js} +1 -1
- package/bin/{chunk-grsgkkrb.js → chunk-19q13a80.js} +6 -6
- package/bin/{chunk-r6gkv98n.js → chunk-1nvj833s.js} +6 -6
- package/bin/chunk-23780yj6.js +3 -0
- package/bin/chunk-2gf95tj0.js +1 -0
- package/bin/{chunk-6vvs18bw.js → chunk-2pw7xcrn.js} +1 -1
- package/bin/chunk-2tk5w3jc.js +1 -0
- package/bin/chunk-2w6gve12.js +4 -0
- package/bin/chunk-301e7g3z.js +2 -0
- package/bin/chunk-3kmjbc3m.js +2 -0
- package/bin/{chunk-zhe16jvg.js → chunk-3pm6q6kg.js} +1 -1
- package/bin/{chunk-zfqz72sd.js → chunk-3q5qkfkc.js} +1 -1
- package/bin/chunk-3td60k1m.js +2 -0
- package/bin/chunk-42hrvk6k.js +211 -0
- package/bin/chunk-4zksqvwj.js +2 -0
- package/bin/chunk-5bk16qdp.js +2 -0
- package/bin/{chunk-y03z5rrg.js → chunk-5nqvqvqp.js} +3 -3
- package/bin/{chunk-e3r1m6rb.js → chunk-5rzxekn4.js} +1 -1
- package/bin/{chunk-h9x81yp6.js → chunk-5vqbzsjv.js} +1 -1
- package/bin/{chunk-628k58ek.js → chunk-6hzktewz.js} +2 -2
- package/bin/{chunk-yfe6hkzk.js → chunk-6jkjx0n2.js} +3 -3
- package/bin/{chunk-gy8z8sd7.js → chunk-6rn094yj.js} +1 -1
- package/bin/{chunk-3cvbb6kh.js → chunk-7qvvf0yd.js} +2 -2
- package/bin/{chunk-35mpp84e.js → chunk-81dawvn4.js} +2 -2
- package/bin/chunk-8abhmarc.js +2 -0
- package/bin/{chunk-51h2bgpf.js → chunk-8ayz61rc.js} +3 -3
- package/bin/{chunk-03bfjh8k.js → chunk-8ny7wvzb.js} +2 -2
- package/bin/{chunk-3btc8a0p.js → chunk-8tzfcqtb.js} +2 -2
- package/bin/{chunk-5patxztz.js → chunk-8zgq5sav.js} +3 -3
- package/bin/{chunk-m1xc3t0p.js → chunk-93p27bbm.js} +6 -6
- package/bin/chunk-951r2rx1.js +1 -0
- package/bin/chunk-965102pf.js +3 -0
- package/bin/{chunk-hr2027z3.js → chunk-98mg3dpd.js} +8 -8
- package/bin/{chunk-v42jcex0.js → chunk-9bakwac0.js} +4 -4
- package/bin/{chunk-z8mmqfm4.js → chunk-9ggwc289.js} +1 -1
- package/bin/{chunk-6bgbx563.js → chunk-9zgqjdx1.js} +2 -2
- package/bin/{chunk-kzsdp31a.js → chunk-a8bymrv1.js} +2 -2
- package/bin/chunk-acn3r2m2.js +1 -0
- package/bin/{chunk-z1r86fna.js → chunk-ae6zgjhd.js} +2 -2
- package/bin/{chunk-trndqdaa.js → chunk-asy868kq.js} +1 -1
- package/bin/{chunk-r1m4q8vw.js → chunk-b5r0be06.js} +2 -2
- package/bin/{chunk-dz33q4v1.js → chunk-bbcmhcvc.js} +2 -2
- package/bin/{chunk-myd3wg9a.js → chunk-bpxw19ez.js} +1 -1
- package/bin/{chunk-sg7n2g3z.js → chunk-cdk8vqeg.js} +4 -4
- package/bin/chunk-ce0bhc72.js +2 -0
- package/bin/chunk-ce75dw3k.css +1 -0
- package/bin/{chunk-m7dp8rqv.js → chunk-cpj562n6.js} +1 -1
- package/bin/{chunk-h153xefb.js → chunk-cx32wsa1.js} +1 -1
- package/bin/{chunk-r5rpdhed.js → chunk-d2dgazjj.js} +1 -1
- package/bin/{chunk-3zvvct3r.js → chunk-d5hbzp7t.js} +1 -1
- package/bin/chunk-d9qpgkek.js +2 -0
- package/bin/{chunk-9h6nn1a3.js → chunk-dche0gy0.js} +1 -1
- package/bin/{chunk-zcrtr8qd.js → chunk-dppfek34.js} +2 -2
- package/bin/chunk-dv6p6n5e.js +1 -0
- package/bin/{chunk-hx76pje1.js → chunk-e439kt05.js} +1 -1
- package/bin/{chunk-gptzcgte.js → chunk-eqr0znmc.js} +1 -1
- package/bin/{chunk-q5mkbnr9.js → chunk-f5z3096k.js} +2 -2
- package/bin/{chunk-b9j5575n.js → chunk-ffj9cq9y.js} +2 -2
- package/bin/{chunk-80qz30dc.js → chunk-fxg81vtx.js} +2 -2
- package/bin/{chunk-5jbx9gqe.js → chunk-ggfx2b0f.js} +1 -1
- package/bin/chunk-gnt9gewm.js +2 -0
- package/bin/{chunk-czny5thj.js → chunk-grjek810.js} +2 -2
- package/bin/chunk-gvas3xkp.js +2 -0
- package/bin/{chunk-ghjhyajn.js → chunk-j53sjkxt.js} +2 -2
- package/bin/{chunk-0tf15vee.js → chunk-jgfye6nf.js} +2 -2
- package/bin/{chunk-tcat7q9p.js → chunk-jt6v15wx.js} +2 -2
- package/bin/{chunk-rn9rktp4.js → chunk-k3prp6c6.js} +4 -4
- package/bin/{chunk-mqr096rn.js → chunk-k97axrc4.js} +1 -1
- package/bin/{chunk-20anqpf1.js → chunk-kvwec0p3.js} +2 -2
- package/bin/{chunk-vbbn4hth.js → chunk-kzr6ecke.js} +1 -1
- package/bin/{chunk-rkq6jvhb.js → chunk-m6v8vt2b.js} +2 -2
- package/bin/{chunk-32japja5.js → chunk-mn108p93.js} +1 -1
- package/bin/{chunk-31vx01aw.js → chunk-mn208vrv.js} +2 -2
- package/bin/chunk-mneeg71d.js +2 -0
- package/bin/{chunk-d7mgjqf8.js → chunk-n76w2wcr.js} +1 -1
- package/bin/{chunk-fyssg02c.js → chunk-n9vp9nbg.js} +29 -29
- package/bin/{chunk-2g5qdx4s.js → chunk-p0j4wpa5.js} +2 -2
- package/bin/chunk-qb178ntp.js +2 -0
- package/bin/{chunk-7vd5yajk.js → chunk-qmrg2jhs.js} +7 -7
- package/bin/{chunk-d9btz95y.js → chunk-qxscgcn9.js} +2 -2
- package/bin/{chunk-0vtk7wrf.js → chunk-r249n1xe.js} +2 -2
- package/bin/{chunk-36r20sj7.js → chunk-r776bhsg.js} +1 -1
- package/bin/{chunk-1k16xsqq.js → chunk-rmvhyqyb.js} +6 -6
- package/bin/{chunk-zwb9kamp.js → chunk-rtaya5wc.js} +2 -2
- package/bin/chunk-rw5h0n0s.js +1 -0
- package/bin/{chunk-m9sp00a9.js → chunk-ryepy5er.js} +4 -4
- package/bin/{chunk-mcd7zas7.js → chunk-rza95y4z.js} +2 -2
- package/bin/chunk-s4r6e6ms.js +1 -0
- package/bin/{chunk-qgkbxw1k.js → chunk-sbyyn9yw.js} +2 -2
- package/bin/chunk-syjjke3f.js +1 -0
- package/bin/chunk-t1yamxgk.js +2 -0
- package/bin/chunk-tgfxe0sb.js +1 -0
- package/bin/chunk-tjretpx8.js +1 -0
- package/bin/chunk-tvkekn4z.js +1 -0
- package/bin/{chunk-5t05jpna.js → chunk-twpc640e.js} +1 -1
- package/bin/{chunk-p5v22g5n.js → chunk-v034sfw8.js} +2 -2
- package/bin/{chunk-wydd7sz7.js → chunk-v5hz09a1.js} +2 -2
- package/bin/{chunk-j3xaq9s3.js → chunk-vm2pz2hm.js} +2 -2
- package/bin/{chunk-mt532a33.js → chunk-vzdgsfkf.js} +1 -1
- package/bin/chunk-w4yjgez6.js +14 -0
- package/bin/{chunk-0yv0nnmh.js → chunk-w73v578p.js} +2 -2
- package/bin/{chunk-edjtb7pk.js → chunk-w9z27p0m.js} +2 -2
- package/bin/chunk-wjcebkpb.js +1 -0
- package/bin/{chunk-cw8z9w5c.js → chunk-wnqxyqrg.js} +2 -2
- package/bin/chunk-ws71fg50.js +2 -0
- package/bin/{chunk-g8h1e1kh.js → chunk-wwkhskce.js} +2 -2
- package/bin/{chunk-kgfa5y9w.js → chunk-xr2v0d6y.js} +5 -5
- package/bin/{chunk-wkxm6yny.js → chunk-y2dhf3p0.js} +2 -2
- package/bin/chunk-yfp3q4da.js +1 -0
- package/bin/{chunk-f22nrm6r.js → chunk-ypkkfwfb.js} +4 -4
- package/bin/chunk-z8e4wc59.js +1 -0
- package/bin/{chunk-fhq5m9ya.js → chunk-zckxc8m6.js} +2 -2
- package/bin/{chunk-3fjgf7eb.js → chunk-zdzkjp4q.js} +2 -2
- package/bin/chunk-zf5cyxnt.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +402 -397
- package/package.json +7 -7
- package/prisma/migrations/20261008134859_add_transcode_3d/migration.sql +2 -0
- package/prisma/schema.prisma +1 -0
- package/bin/chunk-12npypek.js +0 -2
- package/bin/chunk-13d525jm.js +0 -2
- package/bin/chunk-1yt1gsyy.js +0 -2
- package/bin/chunk-3ewmtf1c.js +0 -1
- package/bin/chunk-3xw70yr4.js +0 -2
- package/bin/chunk-5seey9ee.js +0 -2
- package/bin/chunk-66hdwm6f.js +0 -2
- package/bin/chunk-756mr32b.js +0 -2
- package/bin/chunk-7wb3dga5.js +0 -2
- package/bin/chunk-9k86d2a3.js +0 -4
- package/bin/chunk-9wk11jtz.js +0 -1
- package/bin/chunk-a1crhhzy.js +0 -1
- package/bin/chunk-axfwh5et.js +0 -2
- package/bin/chunk-cgsxyw07.js +0 -2
- package/bin/chunk-dckdnqc0.js +0 -2
- package/bin/chunk-dx0wz749.js +0 -211
- package/bin/chunk-dz4fdrmk.js +0 -1
- package/bin/chunk-hz9stgvn.js +0 -1
- package/bin/chunk-hzr8100w.js +0 -3
- package/bin/chunk-jb6d142z.js +0 -1
- package/bin/chunk-k9cgfzgk.js +0 -3
- package/bin/chunk-meyvvmgk.js +0 -1
- package/bin/chunk-n1b3pt17.js +0 -14
- package/bin/chunk-n5v48hz5.js +0 -2
- package/bin/chunk-phzemmmy.js +0 -2
- package/bin/chunk-qhzat67w.js +0 -2
- package/bin/chunk-smcn7ep7.js +0 -2
- package/bin/chunk-tf8q7h6b.js +0 -1
- package/bin/chunk-tvr5rm1g.js +0 -1
- package/bin/chunk-ty88m3yg.js +0 -2
- package/bin/chunk-v2x9915x.js +0 -1
- package/bin/chunk-vnk2p7mq.css +0 -1
- package/bin/chunk-x8hky9td.js +0 -1
- package/bin/chunk-y12ah7c6.js +0 -1
- package/bin/chunk-y7jz31ay.js +0 -1
- package/bin/chunk-ydk3edsw.js +0 -1
- package/bin/chunk-zbma2zeh.js +0 -1
package/bin/chunk-x8hky9td.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,ze}from"./chunk-dx0wz749.js";import"./chunk-n1b3pt17.js";import"./chunk-edjtb7pk.js";import"./chunk-b9j5575n.js";import"./chunk-h82r29wm.js";import"./chunk-cw8z9w5c.js";import"./chunk-dckdnqc0.js";import"./chunk-smcn7ep7.js";import"./chunk-51h2bgpf.js";import"./chunk-yfe6hkzk.js";import"./chunk-m9sp00a9.js";import"./chunk-cgsxyw07.js";import"./chunk-myd3wg9a.js";import{Si}from"./chunk-ty88m3yg.js";import"./chunk-g8h1e1kh.js";import"./chunk-7wb3dga5.js";import"./chunk-3btc8a0p.js";import"./chunk-6bgbx563.js";import"./chunk-d9btz95y.js";import"./chunk-czny5thj.js";import"./chunk-r5rpdhed.js";function p(){let{shareId:a,fileId:s}=e.useParams(),{start:n,version:o,compare:r,cmpLeft:i,cmpRight:l,cmpActive:c}=e.useSearch();return t(Si,{shareId:a,initialFileId:s,startTime:n,versionId:o,compare:r,compareLeftId:i,compareRightId:l,compareActiveSide:c})}var e=ze("/share/$shareId/files/$fileId")({component:p});export{e as Route};
|
package/bin/chunk-y12ah7c6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F,D,h,N,y,u,Yn,S,L,t,o,Q,qu,Hu,yr,Mc,Yi,bo,Ht,Ko,$u,Gu,Vu,Qu,kc,Ku,Z,B,pt,ze,A,I,xr,O,Ct,ve,er,Ut,Yo,Ne,C,mt,_e,Y,Rt,Er,Lt,se,ar,E,Ce,Ie,Te,BA,UA,z0,H0,$0,Tf,m_,rh,De,na,ah,wy,Bc,dh,Us,Jo,Ih,Th,Ev,Cv,qh,gw,Ax,_x,Yx,lp,cp,dS,xS,Ag,$c,AE,Lg,LE,BE,_p,zE,HE,Bg,GE,VE,Ug,QE,WE,Dd,Od,Fd,Tl,Sp,oC,sC,iC,aC,Ld,js,IC,jC,$C,iI,AI,yI,bI,vI,wI,aA,xI,jd,vT,ET,UT,bA,An,$p,u1,d1,Jc,Je,Xe,et,tt,rt,nt,ot,st,q,Pt,M,Dl,Mn,Yp,be,ht,gt,At,vr,rf,ut,Tt,Mt,Ot,xt}from"./chunk-dx0wz749.js";import{Mo,_r}from"./chunk-b9j5575n.js";import{Gl}from"./chunk-51h2bgpf.js";import{Qs,Bo,Wl,Qa,Oi,Yl}from"./chunk-35mpp84e.js";import{Rn,Pn,Nn,wr,Et,yt}from"./chunk-12npypek.js";import"./chunk-eez1yncf.js";import"./chunk-7wb3dga5.js";import{Vn,ao}from"./chunk-3btc8a0p.js";S();function te(a,e){let s=new Set(e);return a.filter((i)=>!s.has(i))}var ae=class extends bo{#r;#e;#o;#a;#t;#s;#i;#n;#l;#d=[];constructor(a,e,s){super();this.#r=a,this.#a=s,this.#o=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){if(this.listeners.size===1)this.#t.forEach((a)=>{a.subscribe((e)=>{this.#p(a,e)})})}onUnsubscribe(){if(!this.listeners.size)this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach((a)=>{a.destroy()})}setQueries(a,e){this.#o=a,this.#a=e,Ht.batch(()=>{let s=this.#t,i=this.#u(this.#o);i.forEach((c)=>c.observer.setOptions(c.defaultedQueryOptions));let m=i.map((c)=>c.observer),r=m.map((c)=>c.getCurrentResult()),p=s.length!==m.length,f=m.some((c,x)=>c!==s[x]),g=p||f,v=g?!0:r.some((c,x)=>{let w=this.#e[x];return!w||!Yi(c,w)});if(!g&&!v)return;if(g)this.#d=i,this.#t=m;if(this.#e=r,!this.hasListeners())return;if(g)te(s,m).forEach((c)=>{c.destroy()}),te(m,s).forEach((c)=>{c.subscribe((x)=>{this.#p(c,x)})});this.#f()})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map((a)=>a.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(a,e){let s=this.#u(a),i=s.map((r)=>r.observer.getOptimisticResult(r.defaultedQueryOptions)),m=s.map((r)=>r.defaultedQueryOptions.queryHash);return[i,(r)=>this.#c(r??i,e,m),()=>this.#m(i,s)]}#m(a,e){let s=new Set;return e.map((i,m)=>{let r=a[m];return!i.defaultedQueryOptions.notifyOnChangeProps?i.observer.trackResult(r,(p)=>{if(!s.has(p))s.add(p),e.forEach((f)=>{f.observer.trackProp(p)})}):r})}#c(a,e,s){if(e){let i=this.#l,m=s!==void 0&&i!==void 0&&(i.length!==s.length||s.some((r,p)=>r!==i[p]));if(this.#e!==this.#n||m||e!==this.#i){if(this.#i=e,this.#n=this.#e,s!==void 0)this.#l=s;this.#s=Mc(this.#s,e(a))}return this.#s}return a}#g(){return!this.#a?.combine||this.#t.some((a,e)=>a.options.suspense&&this.#e[e]?.data===void 0)}#u(a){let e=new Map;this.#t.forEach((i)=>{let m=i.options.queryHash;if(!m)return;let r=e.get(m);if(r)r.push(i);else e.set(m,[i])});let s=[];return a.forEach((i)=>{let m=this.#r.defaultQueryOptions(i),r=e.get(m.queryHash)?.shift()??new Ko(this.#r,m);s.push({defaultedQueryOptions:m,observer:r})}),s}#p(a,e){let s=this.#t.indexOf(a);if(s!==-1)this.#e=this.#e.slice(),this.#e[s]=e,this.#f()}#f(){if(this.hasListeners()){let a=this.#g(),e=this.#s,s=a?e:this.#c(this.#m(this.#e,this.#d),this.#a?.combine);if(a||e!==s)Ht.batch(()=>{this.listeners.forEach((i)=>{i(this.#e)})})}}};S();function re({queries:a,...e},s){let i=Q(s),m=qu(),r=Hu(),p=e.subscribed!==!1,f=N(()=>a.map((d)=>{let b=i.defaultQueryOptions(d);return b._optimisticResults=m?"isRestoring":p?"optimistic":void 0,b}),[a,i,m,p]);f.forEach((d)=>{Qu(d);let b=i.getQueryCache().get(d.queryHash);$u(d,r,b)}),Gu(r);let[g]=u(()=>new ae(i,f,e)),[v,c,x]=g.getOptimisticResult(f,e.combine),w=!m&&p;Yn(D((d)=>w?g.subscribe(Ht.batchCalls(d)):yr,[g,w]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),h(()=>{g.setQueries(f,e)},[f,e,g]);let n=v.some((d,b)=>kc(f[b],d))?v.flatMap((d,b)=>{let T=f[b];if(T&&kc(T,d)){let H=new Ko(i,T);return Ku(T,H,r)}return[]}):[];if(n.length>0)throw Promise.all(n);let _=v.find((d,b)=>{let T=f[b];return T&&Vu({result:d,errorResetBoundary:r,throwOnError:T.throwOnError,query:i.getQueryCache().get(T.queryHash),suspense:T.suspense})});if(_)throw _.error;return c(x())}S();S();var xe=Object.defineProperty,j=(a,e)=>xe(a,"name",{value:e,configurable:!0}),W="Collapsible",[ye,Bt]=mt(W),[we,X]=ye(W),Re=F(j(function(e,s){let{__scopeCollapsible:i,open:m,defaultOpen:r,disabled:p,onOpenChange:f,...g}=e,[v,c]=Lt({prop:m,defaultProp:r??!1,onChange:f,caller:W});return t(we,{scope:i,disabled:p,contentId:Er(),open:v,onOpenToggle:D(()=>c((x)=>!x),[c]),children:t(se.div,{"data-state":G(v),"data-disabled":p?"":void 0,...g,ref:s})})},"Collapsible")),ke="CollapsibleTrigger",Ae=F(j(function(e,s){let{__scopeCollapsible:i,...m}=e,r=X(ke,i);return t(se.button,{type:"button","aria-controls":r.open?r.contentId:void 0,"aria-expanded":r.open||!1,"data-state":G(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...m,ref:s,onClick:Y(e.onClick,r.onOpenToggle)})},"CollapsibleTrigger")),oe="CollapsibleContent",qe=F(j(function(e,s){let{forceMount:i,...m}=e,r=X(oe,e.__scopeCollapsible);return t(ar,{present:i||r.open,children:({present:p})=>t(Pe,{...m,ref:s,present:p})})},"CollapsibleContent")),Pe=F(j(function(e,s){let{__scopeCollapsible:i,present:m,children:r,...p}=e,f=X(oe,i),[g,v]=u(m),c=y(null),x=_e(s,c),w=y(0),n=w.current,_=y(0),d=_.current,b=f.open||g,T=y(b),H=y(void 0);return h(()=>{let k=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(k)},[]),Rt(()=>{let k=c.current;if(k){H.current=H.current||{transitionDuration:k.style.transitionDuration,animationName:k.style.animationName},k.style.transitionDuration="0s",k.style.animationName="none";let z=k.getBoundingClientRect();if(w.current=z.height,_.current=z.width,!T.current)k.style.transitionDuration=H.current.transitionDuration,k.style.animationName=H.current.animationName;v(m)}},[f.open,m]),t(se.div,{"data-state":G(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!b,...p,ref:x,style:{["--radix-collapsible-content-height"]:n?`${n}px`:void 0,["--radix-collapsible-content-width"]:d?`${d}px`:void 0,...e.style},children:b&&r})},"CollapsibleContentImpl"));function G(a){return a?"open":"closed"}j(G,"getState");var Se=Re;var He=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],ie=I("chart-no-axes-column",He);var Oe=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],J=I("funnel",Oe);var Qe=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],U=I("messages-square",Qe);function ne({teamId:a}){let[e,s]=u("team"),[i,m]=u("1h"),{data:r,isLoading:p}=Z({queryKey:["teams",a,"ai-usage",i,"team"],queryFn:async()=>{let d=await A.api.teams[":teamId"]["ai-usage"].$get({param:{teamId:a},query:{timeframe:i}});if(!d.ok)throw Error("Failed to fetch team AI usage");return await d.json()},enabled:!!a&&e==="team"}),{data:f,isLoading:g}=Z({queryKey:["teams",a,"members"],queryFn:async()=>{let d=await A.api.teams[":teamId"].members.$get({param:{teamId:a},query:{}});if(!d.ok)throw Error("Failed to fetch team members");return await d.json()},enabled:!!a&&e==="members"}),v=re({queries:(f||[]).map((d)=>({queryKey:["teams",a,"ai-usage",i,d.id],queryFn:async()=>{let b=await A.api.teams[":teamId"]["ai-usage"].$get({param:{teamId:a},query:{timeframe:i,userId:d.id}});if(!b.ok)throw Error(`Failed to fetch AI usage for member ${d.id}`);return await b.json()},enabled:!!a&&e==="members"}))}),c=g||v.some((d)=>d.isLoading),x=(d)=>{if(!d)return"U";let b=d.split(" ");if(b.length>1)return`${b[0][0]}${b[b.length-1][0]}`.toUpperCase();return d.substring(0,2).toUpperCase()},w=(d)=>{if(!d)return"";switch(d.toLowerCase()){case"owner":return $c();case"editor":return Us();case"reviewer":return js();default:return d}},n=(d)=>(d??0).toLocaleString(),_=(d)=>`$${(d??0).toFixed(6)}`;return o(ut,{className:"border-border/60 shadow-sm",children:[o(Tt,{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between pb-6",children:[o("div",{children:[t(Mt,{className:"text-xl font-semibold tracking-tight",children:H0()}),t(Ot,{className:"text-sm text-muted-foreground mt-1",children:$0()})]}),o("div",{className:"flex flex-wrap items-center gap-3",children:[o(Mo,{type:"single",value:e,onValueChange:(d)=>{if(d)s(d)},className:"border rounded-lg p-1 bg-muted/30",children:[t(_r,{value:"team",className:"px-3 py-1.5 text-xs font-medium",children:ET()}),t(_r,{value:"members",className:"px-3 py-1.5 text-xs font-medium",children:_x()})]}),o(Mo,{type:"single",value:i,onValueChange:(d)=>{if(d)m(d)},className:"border rounded-lg p-1 bg-muted/30",children:[t(_r,{value:"1h",className:"px-2.5 py-1.5 text-xs font-medium",children:"1h"}),t(_r,{value:"24h",className:"px-2.5 py-1.5 text-xs font-medium",children:"24h"}),t(_r,{value:"7d",className:"px-2.5 py-1.5 text-xs font-medium",children:"7d"}),t(_r,{value:"30d",className:"px-2.5 py-1.5 text-xs font-medium",children:"30d"})]})]})]}),t(xt,{children:e==="team"?p?t("div",{className:"flex h-48 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t("div",{className:"rounded-md border",children:o(Rn,{children:[t(Pn,{children:o(wr,{children:[t(Et,{children:jd()}),t(Et,{className:"text-right",children:qh()}),t(Et,{className:"text-right",children:Ag()}),t(Et,{className:"text-right",children:rh()}),t(Et,{className:"text-right",children:bA()}),t(Et,{className:"text-right",children:ah()})]})}),t(Nn,{children:o(wr,{children:[t(yt,{className:"font-medium",children:jd()}),t(yt,{className:"text-right",children:n(r?.team?.inputTokens)}),t(yt,{className:"text-right",children:n(r?.team?.outputTokens)}),t(yt,{className:"text-right",children:n(r?.team?.cacheReadTokens)}),t(yt,{className:"text-right font-medium",children:n(r?.team?.totalTokens)}),t(yt,{className:"text-right font-medium",children:_(r?.team?.cost)})]})})]})}):c?t("div",{className:"flex h-48 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t("div",{className:"rounded-md border",children:o(Rn,{children:[t(Pn,{children:o(wr,{children:[t(Et,{children:Ax()}),t(Et,{children:IC()}),t(Et,{className:"text-right",children:qh()}),t(Et,{className:"text-right",children:Ag()}),t(Et,{className:"text-right",children:rh()}),t(Et,{className:"text-right",children:bA()}),t(Et,{className:"text-right",children:ah()})]})}),t(Nn,{children:(f||[]).map((d,b)=>{let T=v[b]?.data?.member;return o(wr,{children:[t(yt,{children:o("div",{className:"flex items-center gap-3",children:[o(Ce,{className:"h-8 w-8 rounded-full",children:[d.image&&t(Ie,{src:d.image,alt:d.name,className:"object-cover"}),t(Te,{className:"bg-primary/20 text-xs",children:x(d.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium leading-none",children:d.name}),t("span",{className:"text-xs text-muted-foreground mt-0.5",children:d.email})]})]})}),t(yt,{className:"text-xs text-muted-foreground",children:w(d.role)}),t(yt,{className:"text-right",children:n(T?.inputTokens)}),t(yt,{className:"text-right",children:n(T?.outputTokens)}),t(yt,{className:"text-right",children:n(T?.cacheReadTokens)}),t(yt,{className:"text-right font-medium",children:n(T?.totalTokens)}),t(yt,{className:"text-right font-medium",children:_(T?.cost)})]},d.id)})})]})})})]})}S();function le({teamId:a}){let[e,s]=u(null),{ref:i,inView:m}=Pt(),{data:r,isLoading:p,isError:f,fetchNextPage:g,hasNextPage:v,isFetchingNextPage:c}=pt({queryKey:["teams",a,"agent-sessions"],queryFn:async({pageParam:n})=>{let _=await A.api.teams[":teamId"]["agent-sessions"].$get({param:{teamId:a},query:{first:"20",after:n?String(n):void 0}});if(!_.ok)throw Error("Failed to fetch agent sessions");return await _.json()},initialPageParam:"",getNextPageParam:(n)=>n.pageInfo.cursor||void 0,enabled:!!a});h(()=>{if(m&&v&&!c)g()},[m,v,c,g]);let x=r?.pages.flatMap((n)=>n.data).filter((n)=>n.id!=="pending")||[],w=(n)=>{switch(n){case"comment":return t(be,{variant:"outline",className:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",children:vI()});case"chat":return t(be,{variant:"outline",className:"bg-violet-500/10 text-violet-600 dark:text-violet-400 border-violet-500/20",children:bI()});case"naming":return t(be,{variant:"outline",className:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",children:wI()});default:return t(be,{variant:"outline",className:"bg-muted text-muted-foreground border-border",children:n})}};return o("div",{className:"space-y-6",children:[o(ut,{className:"border border-border/50 shadow-xs",children:[t(Tt,{className:"pb-4",children:t("div",{className:"flex items-center justify-between",children:o("div",{children:[o(Mt,{className:"text-xl font-bold flex items-center gap-2",children:[t(U,{className:"w-5 h-5 text-violet-500"}),aA()]}),t(Ot,{className:"mt-1 text-sm text-muted-foreground",children:xI()})]})})}),t(xt,{children:p?t("div",{className:"flex h-64 items-center justify-center",children:t(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):f?t("div",{className:"flex h-64 items-center justify-center text-destructive",children:"Failed to load agent sessions."}):x.length===0?o("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[t(U,{className:"w-10 h-10 text-muted-foreground/40 mb-3"}),t("p",{className:"text-base font-medium",children:dS()})]}):o("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[o(Rn,{children:[t(Pn,{className:"bg-muted/40",children:o(wr,{children:[t(Et,{children:AI()}),t(Et,{children:Bc()}),t(Et,{children:yI()}),t(Et,{className:"text-right",children:wy()})]})}),t(Nn,{children:x.map((n)=>o(wr,{onClick:()=>s(n.id),className:"cursor-pointer hover:bg-muted/50 transition-colors",children:[t(yt,{className:"font-medium",children:o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-semibold text-foreground",children:n.name||$p()}),t("span",{className:"text-xs font-mono text-muted-foreground/70",children:n.id})]})}),t(yt,{children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{className:"h-6 w-6",children:[t(Ie,{src:n.creator?.image||void 0}),t(Te,{className:"text-[10px]",children:n.creator?.name?.[0]?.toUpperCase()||"?"})]}),t("span",{className:"text-sm text-foreground/90",children:n.creator?.name||"System / Agent"})]})}),t(yt,{children:w(n.type)}),t(yt,{className:"text-right text-xs text-muted-foreground",children:Mn(n.createdAt)})]},n.id))})]}),t("div",{ref:i,className:"py-4 flex justify-center",children:c&&t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})})]}),t(Gl,{sessionId:e,open:!!e,onOpenChange:(n)=>{if(!n)s(null)}})]})}S();function de({...a}){return t(Se,{"data-slot":"collapsible",...a})}function me({...a}){return t(Ae,{"data-slot":"collapsible-trigger",...a})}function ce({...a}){return t(qe,{"data-slot":"collapsible-content",...a})}function ee(a){switch(a.toLowerCase()){case"owner":return $c();case"editor":return Us();case"reviewer":return js();default:return a}}function Le(a,e){if(typeof a==="object"&&a!==null&&"message"in a){let s=a.message;if(typeof s==="string")return s}return e}function Be({rule:a}){let e=a.resourceData??{};if(a.resource==="agent_mcp_call_count")return t("span",{children:sC({value:String(e.id??"")})});if(a.resource==="agent_bash_call_count")return t("span",{children:oC({value:String(e.match??"*")})});if(a.resource==="agent_tool_call_count")return t("span",{children:iC({value:String(e.name??e.toolName??"*")})});return null}function Me({rule:a}){if(a.scopeMode==="all_members")return o(be,{variant:"secondary",className:"gap-1 text-xs",children:[t(ao,{className:"h-3 w-3"}),o("span",{children:[Dd(),a.role?` (${ee(a.role)})`:` (${Tl()})`]})]});if(a.scopeMode==="each_member")return o(be,{variant:"secondary",className:"gap-1 text-xs",children:[t(Vn,{className:"h-3 w-3"}),o("span",{children:[Od(),a.role?` (${ee(a.role)})`:` (${Tl()})`]})]});return o(be,{variant:"secondary",className:"gap-1 text-xs",children:[t(Yo,{className:"h-3 w-3"}),o("span",{children:[Fd()," (",a.userIds?.length||0,")"]})]})}function Fe({teamId:a,rule:e,record:s}){let i=Q(),[m,r]=u(!1),[p,f]=u(()=>new Date),g=Qa[e.resource],v=e.scopeMode==="all_members",c=s.percent>=100,x=v?e.role?`${WE()}: ${ee(e.role)}`:aC():s.user?.name||s.userId||An();h(()=>{if(!s.isWindowActive||!s.periodEnd)return;let n=window.setInterval(()=>f(new Date),60000);return()=>window.clearInterval(n)},[s.isWindowActive,s.periodEnd]);let w=B({mutationFn:async()=>{let n=await A.api.teams[":teamId"].quotas[":id"].records.reset.$post({param:{teamId:a,id:e.id},json:{userId:s.userId??null}});if(!n.ok){let _=await n.json().catch(()=>null);throw Error(Le(_,Th()))}return await n.json()},onSuccess:()=>{i.invalidateQueries({queryKey:["teams",a,"quotas",e.id,"records"]}),i.invalidateQueries({queryKey:["teams",a,"quotas"]}),r(!1),M.success(VE())},onError:(n)=>{let _=n instanceof Error?n.message:Th();r(!1),M.error(_)}});return o(L,{children:[o("div",{className:"space-y-3 rounded-xl border border-border/70 bg-card p-4 text-card-foreground shadow-2xs",children:[o("div",{className:"flex items-center justify-between gap-3",children:[o("div",{className:"flex min-w-0 items-center gap-3",children:[v?t("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t(ao,{className:"h-5 w-5"})}):o(Ce,{className:"h-9 w-9 shrink-0 border border-border/50",children:[t(Ie,{src:s.user?.image||void 0}),t(Te,{className:"text-xs font-semibold",children:s.user?.name?.[0]?.toUpperCase()||"U"})]}),o("div",{className:"min-w-0",children:[t("div",{className:"truncate text-sm font-semibold text-foreground",children:x}),!v&&s.user?.email&&t("div",{className:"truncate text-xs text-muted-foreground",children:s.user.email})]})]}),o("div",{className:"flex shrink-0 items-center gap-2",children:[s.isWindowActive&&s.periodEnd?o(be,{variant:"outline",className:"hidden gap-1 border-primary/30 bg-primary/5 text-xs text-primary sm:flex",children:[t(er,{className:"h-3 w-3"}),t("span",{children:Bg({time:Yp(s.periodEnd,p)})})]}):o(be,{variant:"secondary",className:"hidden gap-1 text-xs text-muted-foreground sm:flex",children:[t(xr,{className:"h-3 w-3 text-primary"}),t("span",{children:Lg()})]}),o(E,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>r(!0),disabled:w.isPending,children:[w.isPending?t(O,{className:"h-3.5 w-3.5 animate-spin"}):t(Qs,{className:"h-3.5 w-3.5"}),Ug()]})]})]}),o("div",{className:"space-y-1.5 pt-1",children:[t(rf,{value:Math.min(100,Math.max(0,s.percent)),className:"h-2"}),o("div",{className:"flex items-center justify-between gap-2 text-xs font-medium",children:[o("span",{className:c?"font-bold text-destructive":"text-foreground",children:[Oi(e.resource,s.consumed)," /"," ",Oi(e.resource,e.limit)," ",g?.unit]}),o("span",{className:c?"font-bold text-destructive":"text-muted-foreground",children:[s.percent,"%"]})]})]}),o("div",{className:"flex items-center justify-between gap-2 text-xs text-muted-foreground sm:hidden",children:[s.isWindowActive&&s.periodEnd?o("span",{className:"flex items-center gap-1 text-primary",children:[t(er,{className:"h-3 w-3"}),Bg({time:Yp(s.periodEnd,p)})]}):o("span",{className:"flex items-center gap-1",children:[t(xr,{className:"h-3 w-3 text-primary"}),Lg()]}),o("span",{children:[GE(),": ",Oi(e.resource,s.remaining)," ",g?.unit]})]})]}),t(Je,{open:m,onOpenChange:r,children:o(Xe,{children:[o(et,{children:[t(rt,{children:Ug()}),t(nt,{children:QE({target:x})})]}),o(tt,{children:[t(st,{disabled:w.isPending,children:De()}),o(ot,{onClick:(n)=>{n.preventDefault(),w.mutate()},disabled:w.isPending,children:[w.isPending&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),na()]})]})]})})]})}function je({teamId:a,rule:e}){let[s,i]=u(!1),[m,r]=u(""),p=Qa[e.resource],f=p?.icon||Bo,{data:g,isLoading:v,isError:c}=Z({queryKey:["teams",a,"quotas",e.id,"records"],queryFn:async()=>{let n=await A.api.teams[":teamId"].quotas[":id"].records.$get({param:{teamId:a,id:e.id}});if(!n.ok)throw Error(Ih());return await n.json()},enabled:s,refetchInterval:s?1e4:!1}),x=g?.records??[],w=x.filter((n)=>{if(!m.trim())return!0;let _=m.toLowerCase();return n.user?.name.toLowerCase().includes(_)||n.user?.email.toLowerCase().includes(_)});return o(de,{open:s,onOpenChange:i,className:"rounded-xl border border-border/70",children:[t(me,{asChild:!0,children:o("button",{type:"button","aria-label":s?LE():zE(),className:"flex w-full items-center justify-between gap-4 p-4 text-left transition-colors hover:bg-muted/40",children:[o("div",{className:"flex min-w-0 items-start gap-3",children:[t("div",{className:"mt-0.5 rounded-lg bg-primary/10 p-2 text-primary",children:t(f,{className:"h-5 w-5"})}),o("div",{className:"min-w-0",children:[o("div",{className:"flex flex-wrap items-center gap-2",children:[t("span",{className:"font-semibold text-foreground",children:p?.label()||e.resource}),!e.enabled&&t(be,{variant:"secondary",children:_p()})]}),o("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[t(Me,{rule:e}),o(be,{variant:"outline",className:"gap-1 text-xs",children:[t(er,{className:"h-3 w-3"}),Oi(e.resource,e.limit)," ",p?.unit," /"," ",Yl(e.period)]}),t(Be,{rule:e})]})]})]}),t(ve,{className:`h-5 w-5 shrink-0 text-muted-foreground transition-transform ${s?"rotate-180":""}`})]})}),t(ce,{children:o("div",{className:"space-y-3 border-t border-border/60 bg-muted/10 p-4",children:[e.scopeMode!=="all_members"&&x.length>3&&o("div",{className:"relative",children:[t(Ut,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),t(q,{value:m,onChange:(n)=>r(n.target.value),placeholder:Sp(),className:"h-9 pl-9 text-sm"})]}),v?t("div",{className:"flex justify-center py-10",children:t(O,{className:"h-7 w-7 animate-spin text-primary"})}):c?t("div",{className:"py-8 text-center text-sm text-destructive",children:Ih()}):w.length===0?t("div",{className:"py-8 text-center text-sm text-muted-foreground",children:HE()}):w.map((n,_)=>t(Fe,{teamId:a,rule:e,record:n},n.id||n.userId||`record-${_}`))]})})]})}function ue({teamId:a}){let{data:e,isLoading:s,isError:i}=Z({queryKey:["teams",a,"quotas"],queryFn:async()=>{let r=await A.api.teams[":teamId"].quotas.$get({param:{teamId:a}});if(!r.ok)throw Error(Jo());return await r.json()},enabled:!!a}),m=e?.rules??[];return o(ut,{className:"border-border/60 shadow-sm",children:[o(Tt,{children:[o(Mt,{className:"flex items-center gap-2 text-xl font-semibold tracking-tight",children:[t(Bo,{className:"h-5 w-5 text-primary"}),Ld()]}),t(Ot,{children:BE()})]}),t(xt,{children:s?t("div",{className:"flex h-48 items-center justify-center",children:t(O,{className:"h-7 w-7 animate-spin text-muted-foreground"})}):i?t("div",{className:"py-10 text-center text-sm text-destructive",children:Jo()}):m.length===0?o("div",{className:"flex flex-col items-center justify-center rounded-xl border-2 border-dashed border-border py-12 text-center",children:[t(Bo,{className:"mb-3 h-10 w-10 text-muted-foreground/50"}),t("p",{className:"text-base font-medium text-foreground",children:cp()}),t("p",{className:"mt-1 max-w-md text-sm text-muted-foreground",children:lp()})]}):t("div",{className:"space-y-3",children:m.map((r)=>t(je,{teamId:a,rule:r},r.id))})})]})}S();var Ue=Object.values(Dl);function pe({teamId:a}){let[e,s]=u([]),[i,m]=u([]),[r,p]=u(""),{ref:f,inView:g}=Pt(),{data:v}=Z({queryKey:["teams",a,"members"],queryFn:async()=>{let l=await A.api.teams[":teamId"].members.$get({param:{teamId:a},query:{}});if(!l.ok)return[];return await l.json()},enabled:!!a}),c=v||[],{data:x,isLoading:w,isError:n,fetchNextPage:_,hasNextPage:d,isFetchingNextPage:b}=pt({queryKey:["teams",a,"audit-logs",e,i,r],queryFn:async({pageParam:l})=>{let R=await A.api.teams[":teamId"]["audit-logs"].$get({param:{teamId:a},query:{first:"20",after:l?String(l):void 0,actions:e.length>0?e:void 0,userIds:i.length>0?i:void 0,itemId:r.trim()||void 0}});if(!R.ok)throw Error("Failed to fetch audit logs");return await R.json()},initialPageParam:"",getNextPageParam:(l)=>l.pageInfo.endCursor||void 0,enabled:!!a});h(()=>{if(g&&d&&!b)_()},[g,d,b,_]);let T=x?.pages.flatMap((l)=>l.nodes)||[],H=x?.pages[0]?.total??0,k=(l)=>{s((R)=>R.includes(l)?R.filter((P)=>P!==l):[...R,l])},z=(l)=>{m((R)=>R.includes(l)?R.filter((P)=>P!==l):[...R,l])},fe=(l)=>{if(l.includes("delete")||l.includes("remove")||l.includes("revoke"))return t(be,{variant:"outline",className:"bg-destructive/10 text-destructive border-destructive/20 font-mono text-xs",children:l});if(l.includes("create")||l.includes("add"))return t(be,{variant:"outline",className:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20 font-mono text-xs",children:l});if(l.includes("update")||l.includes("reparent")||l.includes("copy"))return t(be,{variant:"outline",className:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20 font-mono text-xs",children:l});return t(be,{variant:"outline",className:"bg-muted text-muted-foreground border-border font-mono text-xs",children:l})},ge=new Map(c.map((l)=>[l.userId||l.id,l]));return t("div",{className:"space-y-6",children:o(ut,{className:"border border-border/50 shadow-xs",children:[o(Tt,{className:"pb-4",children:[o("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o("div",{children:[o(Mt,{className:"text-xl font-bold flex items-center gap-2",children:[t(Qs,{className:"h-5 w-5 text-primary"}),Tf()]}),t(Ot,{className:"mt-1",children:m_()})]}),H>0&&o(be,{variant:"secondary",className:"w-fit text-xs font-normal",children:[H," ",Tf()]})]}),o("div",{className:"mt-4 flex flex-wrap items-center gap-3 pt-4 border-t border-border/40",children:[o(ht,{children:[t(gt,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-9 gap-2 text-xs border-dashed",children:[t(J,{className:"h-3.5 w-3.5"}),Ev(),e.length>0&&t(be,{variant:"secondary",className:"ml-1 px-1.5 py-0 text-[10px]",children:e.length})]})}),o(At,{className:"w-64 p-2",align:"start",children:[t("div",{className:"text-xs font-semibold text-muted-foreground px-2 py-1 mb-1",children:$C()}),t("div",{className:"max-h-60 overflow-y-auto space-y-1 pr-1",children:Ue.map((l)=>o("label",{className:"flex items-center gap-2 px-2 py-1.5 hover:bg-accent rounded-md cursor-pointer text-xs",children:[t(vr,{checked:e.includes(l),onCheckedChange:()=>k(l)}),t("span",{className:"font-mono",children:l})]},l))}),e.length>0&&t(E,{variant:"ghost",size:"sm",className:"w-full mt-2 h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>s([]),children:"Clear Actions"})]})]}),o(ht,{children:[t(gt,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-9 gap-2 text-xs border-dashed",children:[t(J,{className:"h-3.5 w-3.5"}),Cv(),i.length>0&&t(be,{variant:"secondary",className:"ml-1 px-1.5 py-0 text-[10px]",children:i.length})]})}),o(At,{className:"w-64 p-2",align:"start",children:[t("div",{className:"text-xs font-semibold text-muted-foreground px-2 py-1 mb-1",children:iI()}),t("div",{className:"max-h-60 overflow-y-auto space-y-1 pr-1",children:c.map((l)=>{let R=l.userId||l.user?.id||l.id,P=l.user?.name||l.name||R,K=l.user?.image||l.image;return o("label",{className:"flex items-center gap-2 px-2 py-1.5 hover:bg-accent rounded-md cursor-pointer text-xs",children:[t(vr,{checked:i.includes(R),onCheckedChange:()=>z(R)}),o(Ce,{className:"h-5 w-5",children:[t(Ie,{src:K||void 0}),t(Te,{className:"text-[10px]",children:P.slice(0,2).toUpperCase()})]}),t("span",{className:"truncate",children:P})]},R)})}),i.length>0&&t(E,{variant:"ghost",size:"sm",className:"w-full mt-2 h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>m([]),children:"Clear Users"})]})]}),o("div",{className:"relative flex-1 min-w-[200px] max-w-xs",children:[t(Ut,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),t(q,{type:"text",placeholder:jC(),value:r,onChange:(l)=>p(l.target.value),className:"pl-8 pr-8 h-9 text-xs"}),r&&t("button",{onClick:()=>p(""),className:"absolute right-2.5 top-2.5 text-muted-foreground hover:text-foreground",children:t(Ne,{className:"h-4 w-4"})})]}),(e.length>0||i.length>0||r)&&t(E,{variant:"ghost",size:"sm",className:"h-9 px-2 text-xs text-muted-foreground hover:text-foreground",onClick:()=>{s([]),m([]),p("")},children:"Clear all"})]})]}),o(xt,{className:"p-0",children:[w?t("div",{className:"flex h-64 items-center justify-center",children:t(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):n?t("div",{className:"p-8 text-center text-sm text-destructive",children:"Failed to load audit logs."}):T.length===0?t("div",{className:"p-12 text-center text-sm text-muted-foreground",children:Yx()}):o(Rn,{children:[t(Pn,{children:o(wr,{className:"hover:bg-transparent border-b border-border/50",children:[t(Et,{className:"w-[180px] text-xs font-semibold",children:UA()}),t(Et,{className:"w-[200px] text-xs font-semibold",children:d1()}),t(Et,{className:"text-xs font-semibold",children:gw()}),t(Et,{className:"text-xs font-semibold",children:AE()}),t(Et,{className:"w-[160px] text-right text-xs font-semibold",children:UT()})]})}),t(Nn,{children:T.map((l)=>{let R=l.userId?ge.get(l.userId):null,P=R?.user?.name||R?.name||l.userId||"System",K=R?.user?.image||R?.image;return o(wr,{className:"hover:bg-muted/40 transition-colors",children:[t(yt,{className:"py-3 font-medium",children:fe(l.action)}),t(yt,{className:"py-3",children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{className:"h-6 w-6",children:[t(Ie,{src:K||void 0}),t(Te,{className:"text-[10px]",children:P.slice(0,2).toUpperCase()})]}),t("span",{className:"text-xs font-medium text-foreground truncate max-w-[160px]",children:l.agent?Jc({user:P,agent:l.agent.name}):P}),l.agent&&t(Ct,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),t(yt,{className:"py-3 text-xs font-mono text-muted-foreground",children:l.itemId||"-"}),t(yt,{className:"py-3 text-xs font-mono text-muted-foreground",children:l.projectId||"-"}),t(yt,{className:"py-3 text-right text-xs text-muted-foreground",children:Mn(l.createdAt)})]},l.id)})})]}),t("div",{ref:f,className:"py-4 flex justify-center",children:b&&t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})]})})}function $e(){let{teamId:a}=Ge.useParams(),[e,s]=u("audit-logs"),{data:i,isLoading:m}=Z({queryKey:["teams",a,"me"],queryFn:async()=>{let r=await A.api.teams[":teamId"].me.$get({param:{teamId:a}});if(!r.ok)throw Error("Failed to fetch me");return await r.json()},enabled:!!a});if(m)return t("div",{className:"flex h-screen items-center justify-center",children:t(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(i?.role?.toLowerCase()!=="owner")return o("div",{className:"flex h-full flex-col items-center justify-center p-8 text-center",children:[t(Wl,{className:"h-12 w-12 text-destructive mb-4"}),t("h2",{className:"text-xl font-bold tracking-tight mb-2",children:BA()}),t("p",{className:"text-sm text-muted-foreground max-w-md",children:xS()})]});return t("div",{className:"h-full bg-background font-sans selection:bg-primary/20 transition-colors duration-300",children:o("div",{className:"flex flex-col md:flex-row h-full",children:[t("div",{className:"w-full h-full md:w-72 bg-sidebar border-b md:border-b-0 md:border-r border-sidebar-border z-10 md:left-16 overflow-y-auto transition-colors duration-300",children:o("nav",{className:"p-4 space-y-1 mt-4",children:[t("div",{className:"mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider",children:dh()}),t("div",{className:"mt-4 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border",children:vT()}),o("button",{onClick:()=>s("audit-logs"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="audit-logs"?"bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[t(Qs,{className:"w-5 h-5"}),Tf(),e==="audit-logs"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),o("button",{onClick:()=>s("quotas"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="quotas"?"bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[t(Bo,{className:"w-5 h-5"}),Ld(),e==="quotas"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),t("div",{className:"mt-4 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border",children:z0()}),o("button",{onClick:()=>s("ai-usage"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="ai-usage"?"bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[t(ie,{className:"w-5 h-5"}),u1(),e==="ai-usage"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),o("button",{onClick:()=>s("ai-sessions"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="ai-sessions"?"bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[t(U,{className:"w-5 h-5"}),aA(),e==="ai-sessions"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]})]})}),t("div",{className:"flex-1 overflow-y-auto p-4 md:p-8",children:o("div",{className:"max-w-6xl mx-auto space-y-8",children:[e==="audit-logs"&&t(pe,{teamId:a}),e==="ai-usage"&&t(ne,{teamId:a}),e==="ai-sessions"&&t(le,{teamId:a}),e==="quotas"&&t(ue,{teamId:a})]})})]})})}var Ge=ze("/teams/$teamId/dashboard")({component:$e});export{Ge as Route};
|
package/bin/chunk-y7jz31ay.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,N,u,S,L,t,o,Q,Z,B,pt,ze,A,I,or,O,Vr,Ct,jn,nn,vt,Ma,rr,Bs,vo,pe,wo,we,Ne,C,E,Ce,Ie,Te,he,ge,Ae,K,Qm,eh,De,D_,U_,Zc,hy,gy,Nf,at,qy,Hy,eb,tb,hd,db,Ah,Tn,Uv,zv,jv,qv,Hv,$v,Gv,vd,Ew,Dx,ag,nS,hS,vg,qg,qs,Zd,Pp,Bd,dA,Up,AT,_T,fA,pA,mA,hA,gA,zd,AA,ST,As,Je,Xe,et,tt,rt,nt,ot,st,ue,ae,fe,qe,le,It,q,ce,Xo,Dr,_n,$n,ys,Or,Hd,Pt,M,xe,gr,Qe,Ur,bi,PA,oo,Jp,aa,la,wi,W,Me,Le,Ze,Be,Ue,ne,xi,Kd,Wd,Yd,Xd}from"./chunk-dx0wz749.js";import{qa}from"./chunk-0vtk7wrf.js";import{Vn,ao}from"./chunk-3btc8a0p.js";import{dn}from"./chunk-czny5thj.js";S();var it=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Se=I("pen",it);function Ke({scope:e,onScopeChange:r,selectedGoal:x,onClearGoal:p,onCreateTask:w,canCreateTask:v=!0}){return o("header",{className:"h-14 border-b border-border bg-card/60 backdrop-blur-sm px-4 flex items-center justify-between gap-3 shrink-0 select-none",children:[o("div",{className:"flex items-center gap-3 min-w-0",children:[o("div",{className:"flex items-center bg-muted/60 p-0.5 rounded-lg border border-border/50",children:[o(E,{variant:e==="team"?"secondary":"ghost",size:"sm",onClick:()=>r("team"),className:`h-7 px-2.5 text-xs font-medium gap-1.5 transition-all ${e==="team"?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"}`,children:[t(ao,{className:"w-3.5 h-3.5"}),t("span",{children:ST()})]}),o(E,{variant:e==="my"?"secondary":"ghost",size:"sm",onClick:()=>r("my"),className:`h-7 px-2.5 text-xs font-medium gap-1.5 transition-all ${e==="my"?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"}`,children:[t(Vn,{className:"w-3.5 h-3.5"}),t("span",{children:Dx()})]})]}),x&&o("div",{className:"hidden sm:flex items-center gap-1.5 px-2 py-1 rounded-md bg-sidebar-accent border border-sidebar-border text-xs text-sidebar-accent-foreground min-w-0 max-w-[200px] md:max-w-[280px]",children:[t(wo,{className:"w-3.5 h-3.5 text-sidebar-primary shrink-0"}),t("span",{className:"truncate font-medium",children:x.id===bi?As():x.title}),t(E,{variant:"ghost",size:"icon-xs",onClick:p,className:"h-4 w-4 p-0 ml-0.5 text-muted-foreground hover:text-foreground",title:U_(),children:t(Ne,{className:"w-3 h-3"})})]})]}),v&&t("div",{className:"flex items-center gap-2 shrink-0",children:o(E,{size:"sm",onClick:w,className:"h-8 px-3 text-xs gap-1.5 shadow-xs",children:[t(pe,{className:"w-3.5 h-3.5"}),t("span",{children:Nf()})]})})]})}S();S();function me({teamId:e,isOpen:r,onClose:x,goalToEdit:p}){let w=Q(),[v,_]=u(""),[g,P]=u("");h(()=>{if(p)_(p.title),P(p.description||"");else _(""),P("")},[p,r]);let{mutate:G,isPending:z}=B({mutationFn:async()=>{let n=await A.api.teams[":teamId"].kanban.goals.$post({param:{teamId:e},json:{title:v.trim(),description:g.trim()||void 0}});if(!n.ok){let b=await n.json().catch(()=>({message:Tn()}));throw Error(b.message||Tn())}return await n.json()},onSuccess:()=>{w.invalidateQueries({queryKey:["teams",e,"kanban","goals"]}),M.success(Uv()),x()},onError:(n)=>{M.error(n.message)}}),{mutate:R,isPending:F}=B({mutationFn:async()=>{if(!p)return;let n=await A.api.teams[":teamId"].kanban.goals[":goalId"].$patch({param:{teamId:e,goalId:p.id},json:{title:v.trim(),description:g.trim()||null}});if(!n.ok){let b=await n.json().catch(()=>({message:Tn()}));throw Error(b.message||Tn())}return await n.json()},onSuccess:()=>{w.invalidateQueries({queryKey:["teams",e,"kanban","goals"]}),M.success(Gv()),x()},onError:(n)=>{M.error(n.message)}}),U=(n)=>{if(n.preventDefault(),!v.trim())return;if(p)R();else G()},d=z||F;return t(ue,{open:r,onOpenChange:(n)=>!n&&x(),children:t(ae,{className:"sm:max-w-xl",children:o("form",{onSubmit:U,className:"space-y-4",children:[o(fe,{children:[t(le,{children:p?Ah():gy()}),t(It,{children:p?Ah():hy()})]}),o("div",{className:"space-y-3 py-2",children:[o("div",{className:"space-y-1.5",children:[t(W,{htmlFor:"goal-title",children:Hv()}),t(q,{id:"goal-title",value:v,onChange:(n)=>_(n.target.value),placeholder:$v(),required:!0,autoFocus:!0})]}),o("div",{className:"space-y-1.5",children:[t(W,{htmlFor:"goal-description",children:jv()}),t(wi,{id:"goal-description",value:g,onChange:(n)=>P(n.target.value),placeholder:qv(),rows:3})]})]}),o(qe,{children:[t(E,{type:"button",variant:"outline",onClick:x,disabled:d,children:De()}),o(E,{type:"submit",disabled:!v.trim()||d,children:[d&&t(O,{className:"w-4 h-4 mr-1.5 animate-spin"}),p?qs():Zc()]})]})]})})})}function _e({teamId:e,selectedGoalId:r,onSelectGoal:x,isOwnerOrEditor:p=!0}){let w=Q(),[v,_]=u(!1),[g,P]=u(null),[G,z]=u(null),[R,F]=u(!1),{data:U,isLoading:d}=Z({queryKey:["teams",e,"kanban","goals"],queryFn:async()=>{let i=await A.api.teams[":teamId"].kanban.goals.$get({param:{teamId:e},query:{}});if(!i.ok)throw Error("Failed to fetch goals");return await i.json()},enabled:!!e}),n=U?.data||[],b=n.reduce((i,s)=>i+(s.taskCount||0),0),{mutate:D,isPending:l}=B({mutationFn:async(i)=>{let s=await A.api.teams[":teamId"].kanban.goals[":goalId"].$delete({param:{teamId:e,goalId:i}});if(!s.ok){let m=await s.json().catch(()=>({message:Tn()}));throw Error(m.message||Tn())}return await s.json()},onSuccess:(i,s)=>{if(w.invalidateQueries({queryKey:["teams",e,"kanban","goals"]}),w.invalidateQueries({queryKey:["teams",e,"kanban","tasks"]}),M.success(zv()),r===s)x(null);z(null)},onError:(i)=>{M.error(i.message)}});if(R)return o("div",{className:"border-r border-sidebar-border bg-sidebar flex flex-col items-center w-12 shrink-0 transition-all duration-300",children:[t("div",{className:"h-14 flex items-center justify-center border-b border-sidebar-border w-full shrink-0",children:t(E,{variant:"ghost",size:"icon-sm",onClick:()=>F(!1),title:vd(),className:"text-sidebar-foreground/70 hover:text-sidebar-foreground",children:t(vt,{className:"w-4 h-4"})})}),o("div",{className:"mt-3 flex flex-col items-center gap-2",children:[t(E,{variant:r===null?"secondary":"ghost",size:"icon-sm",onClick:()=>x(null),title:Qm(),className:C("w-8 h-8 rounded-md",r===null&&"bg-sidebar-accent text-sidebar-accent-foreground"),children:t(qa,{className:"w-4 h-4"})}),t(E,{variant:"ghost",size:"icon-sm",onClick:()=>_(!0),title:ag(),className:"w-8 h-8 rounded-md text-sidebar-foreground/70 hover:text-sidebar-foreground",children:t(pe,{className:"w-4 h-4"})})]}),v&&t(me,{teamId:e,isOpen:v,onClose:()=>_(!1)})]});return o("aside",{className:"w-64 border-r border-sidebar-border bg-sidebar flex flex-col shrink-0 transition-all duration-300 select-none",children:[o("div",{className:"h-14 px-3 flex items-center justify-between border-b border-sidebar-border shrink-0",children:[o("div",{className:"flex items-center gap-2 font-semibold text-xs tracking-wider uppercase text-sidebar-foreground/70",children:[t(wo,{className:"w-4 h-4 text-sidebar-primary"}),t("span",{children:vd()})]}),o("div",{className:"flex items-center gap-1",children:[p&&t(E,{variant:"ghost",size:"icon-sm",onClick:()=>_(!0),className:"h-7 w-7 text-sidebar-foreground/70 hover:text-sidebar-foreground",title:ag(),children:t(pe,{className:"w-4 h-4"})}),t(E,{variant:"ghost",size:"icon-sm",onClick:()=>F(!0),className:"h-7 w-7 text-sidebar-foreground/70 hover:text-sidebar-foreground",title:"Collapse",children:t(nn,{className:"w-4 h-4"})})]})]}),t(ce,{className:"flex-1 p-2",children:o("div",{className:"space-y-1",children:[o("div",{onClick:()=>x(null),className:C("flex items-center justify-between px-2.5 py-1 rounded-md text-xs font-medium cursor-pointer transition-colors group h-8 min-h-[32px]",r===null?"bg-sidebar-accent text-sidebar-accent-foreground font-semibold shadow-xs":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),children:[o("div",{className:"flex items-center gap-2 truncate min-w-0",children:[t(qa,{className:"w-3.5 h-3.5 shrink-0 text-sidebar-primary"}),t("span",{className:"truncate",children:Qm()})]}),b>0&&t("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-sidebar-border text-sidebar-foreground/60 shrink-0",children:b})]}),d?t("div",{className:"flex items-center justify-center p-4",children:t(O,{className:"w-4 h-4 animate-spin text-muted-foreground"})}):n.length===0?t("div",{className:"px-2.5 py-4 text-center text-xs text-muted-foreground",children:nS()}):n.map((i)=>{let s=r===i.id,m=i.id===bi,k=m?As():i.title,f=p&&!m;return o("div",{onClick:()=>x(i.id),className:C("flex items-center justify-between px-2.5 py-1 rounded-md text-xs font-medium cursor-pointer transition-colors group relative min-h-[32px]",s?"bg-sidebar-accent text-sidebar-accent-foreground font-semibold shadow-xs":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),children:[o("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t(wo,{className:C("w-3.5 h-3.5 shrink-0",s?"text-sidebar-primary":"text-muted-foreground")}),t("span",{className:"line-clamp-2 break-words leading-tight",title:k,children:k})]}),t("div",{className:"flex items-center shrink-0 ml-1",children:f?o(L,{children:[(i.taskCount??0)>0&&t("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-sidebar-border text-sidebar-foreground/60 group-hover:hidden group-focus-within:hidden [&:has(~_div_[data-state=open])]:hidden",children:i.taskCount}),t("div",{className:"hidden group-hover:flex group-focus-within:flex [&:has([data-state=open])]:flex items-center",onClick:(c)=>c.stopPropagation(),children:o(he,{modal:!1,children:[t(ge,{asChild:!0,children:t(E,{variant:"ghost",size:"icon-xs",className:"h-6 w-6 p-0 text-muted-foreground hover:text-foreground",children:t(or,{className:"w-3.5 h-3.5"})})}),o(Ae,{align:"end",className:"w-36",children:[o(K,{onClick:()=>{P(i)},children:[t(Se,{className:"w-3.5 h-3.5 mr-2"}),db()]}),o(K,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{z(i)},children:[t(we,{className:"w-3.5 h-3.5 mr-2"}),at()]})]})]})})]}):(i.taskCount??0)>0&&t("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-sidebar-border text-sidebar-foreground/60",children:i.taskCount})})]},i.id)})]})}),(v||g)&&t(me,{teamId:e,isOpen:v||!!g,goalToEdit:g,onClose:()=>{_(!1),P(null)}}),G&&t(Je,{open:!!G,onOpenChange:(i)=>!i&&z(null),children:o(Xe,{children:[o(et,{children:[t(rt,{children:qy()}),t(nt,{children:Hy({title:G.title})})]}),o(tt,{children:[t(st,{disabled:l,children:De()}),o(ot,{onClick:()=>D(G.id),disabled:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[l&&t(O,{className:"w-4 h-4 mr-1.5 animate-spin"}),at()]})]})]})})]})}S();S();function Pe(e){return+xe(e)<Date.now()}function Fe({task:e,onClick:r,onDelete:x,disabled:p,isFirst:w,isLast:v,showBottomIndicator:_,currentUserId:g,currentUserRole:P}){let{source:G}=Hd(),z=!!G,R=P?.toLowerCase()==="owner",F=P?.toLowerCase()==="editor",U=!!g&&e.creator?.id===g,d=e.reporter?.id===g||U,n=e.assignee?.id===g,b=R||F||d||n,D=U||R||d,l=p||!b,{ref:i,isDragging:s}=ys({id:e.id,data:{type:"kanban_task",task:e},disabled:l}),{ref:m,isDropTarget:k}=Or({id:`reorder-before-${e.id}`,data:{type:"reorder",task:e,position:"before"},disabled:s||p}),{ref:f,isDropTarget:c}=Or({id:`reorder-after-${e.id}`,data:{type:"reorder",task:e,position:"after"},disabled:s||p}),T=e.isAgentTask,j=e.status===Qe.BLOCKED,y=e.dueDate?Pe(new Date(e.dueDate))&&e.status!==Qe.DONE:!1;return o("div",{className:"relative",children:[t("div",{ref:m,className:C("absolute left-0 right-0 z-20",w?"-top-6 h-[calc(50%+24px)]":"-top-1 h-[calc(50%+4px)]",z&&!s?"pointer-events-auto":"pointer-events-none")}),t("div",{ref:f,className:C("absolute bottom-0 left-0 right-0 z-20",v?"-bottom-6 h-[calc(50%+24px)]":"h-1/2",z&&!s?"pointer-events-auto":"pointer-events-none")}),k&&!s&&t("div",{className:"absolute -top-1.5 left-0 right-0 h-[3px] rounded-full bg-primary shadow-[0_0_8px_rgba(var(--primary),0.6)] z-30 pointer-events-none"}),(c||_)&&!s&&t("div",{className:"absolute -bottom-1.5 left-0 right-0 h-[3px] rounded-full bg-primary shadow-[0_0_8px_rgba(var(--primary),0.6)] z-30 pointer-events-none"}),o("div",{ref:i,onClick:()=>r(e),className:C("group relative flex flex-col gap-2 p-3 rounded-lg border text-card-foreground transition-all duration-200 cursor-pointer select-none",s&&"opacity-40 scale-95 shadow-lg ring-2 ring-primary",!s&&"hover:shadow-md","border-border/80 bg-card hover:border-primary/50 shadow-2xs",j&&"border-red-500/60 bg-red-500/[0.03] ring-1 ring-red-500/20"),children:[o("div",{className:"flex items-center justify-between gap-1.5 min-w-0",children:[o("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[t("span",{className:C("px-1.5 py-0.5 rounded text-[10px] font-medium border uppercase tracking-wider shrink-0",la(e.priority)),children:aa(e.priority)}),T&&o("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold bg-orange-500/15 text-orange-600 dark:text-orange-400 border border-orange-500/30 shrink-0",children:[t(Ct,{className:"w-3 h-3"}),t("span",{children:zd()})]}),e.goal&&o("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium bg-muted text-muted-foreground border border-border/70 truncate max-w-[130px]",children:[t(wo,{className:"w-2.5 h-2.5 shrink-0"}),t("span",{className:"truncate",children:e.goal.title})]})]}),t("div",{className:"flex items-center gap-1 shrink-0",children:D&&t("div",{className:"opacity-0 group-hover:opacity-100 [&:has([data-state=open])]:opacity-100 focus-within:opacity-100 transition-opacity flex items-center",onClick:(X)=>X.stopPropagation(),children:o(he,{modal:!1,children:[t(ge,{asChild:!0,children:t(E,{variant:"ghost",size:"icon-xs",className:"h-5 w-5 p-0 text-muted-foreground hover:text-foreground",children:t(or,{className:"w-3.5 h-3.5"})})}),t(Ae,{align:"end",className:"w-32",children:o(K,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>x?.(e),children:[t(we,{className:"w-3.5 h-3.5 mr-2"}),at()]})})]})})})]}),t("h4",{className:"text-xs font-semibold leading-snug line-clamp-2 text-foreground break-words",children:e.title}),j&&o("div",{className:"flex items-start gap-1.5 p-1.5 rounded bg-red-500/10 border border-red-500/20 text-[11px] text-red-600 dark:text-red-400",children:[t(Vr,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),t("span",{className:"line-clamp-2 break-words",children:e.latestStatusEvent?.blockReason||e.latestStatusEvent?.reason||e.latestStatusEvent?.summary||dA()})]}),e.status===Qe.IN_REVIEW&&e.latestStatusEvent?.summary&&o("div",{className:"flex items-start gap-1.5 p-1.5 rounded bg-purple-500/10 border border-purple-500/20 text-[11px] text-purple-600 dark:text-purple-400",children:[t(dn,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),t("span",{className:"line-clamp-2 break-words",children:e.latestStatusEvent.summary})]}),o("div",{className:"flex items-center justify-between gap-2 pt-1 mt-auto border-t border-border/40 text-[11px] text-muted-foreground",children:[t("div",{className:"flex items-center gap-1.5 min-w-0",children:e.assignee?o(L,{children:[T?t("div",{className:"w-5 h-5 rounded-full bg-orange-500/15 border border-orange-500/30 flex items-center justify-center shrink-0",children:t(Ct,{className:"w-3 h-3 text-orange-600 dark:text-orange-400"})}):o(Ce,{size:"sm",className:"w-5 h-5 border border-border",children:[t(Ie,{src:e.assignee.image}),t(Te,{className:"text-[9px]",children:e.assignee.name.slice(0,2).toUpperCase()})]}),t("span",{className:"truncate text-xs font-medium text-foreground/80 max-w-[90px]",children:e.assignee.name})]}):t("span",{className:"text-[11px] italic text-muted-foreground/60",children:As()})}),o("div",{className:"flex items-center gap-2 shrink-0",children:[e.dueDate&&o("div",{className:C("flex items-center gap-1 text-[10px] font-mono",y?"text-red-500 font-semibold":"text-muted-foreground"),title:gr(new Date(e.dueDate),"yyyy/MM/dd HH:mm"),children:[t(jn,{className:"w-3 h-3"}),t("span",{children:gr(new Date(e.dueDate),"MM/dd")})]}),e.assetCount>0&&o("div",{className:"flex items-center gap-0.5 text-[10px] text-muted-foreground hover:text-foreground",title:Ew({count:e.assetCount}),children:[t(Ma,{className:"w-3 h-3"}),t("span",{children:e.assetCount})]}),e.dependencyCount>0&&o("div",{className:"flex items-center gap-0.5 text-[10px] text-muted-foreground hover:text-foreground",title:`${e.dependencyCount} dependencies`,children:[t(Bs,{className:"w-3 h-3"}),t("span",{children:e.dependencyCount})]}),e.commentCount>0&&o("div",{className:"flex items-center gap-0.5 text-[10px] text-muted-foreground hover:text-foreground",title:`${e.commentCount} comments`,children:[t(vo,{className:"w-3 h-3"}),t("span",{children:e.commentCount})]})]})]})]})]})}function Ee({teamId:e,status:r,selectedGoalId:x,scope:p,currentUserId:w,currentUserRole:v,onTaskClick:_,onDeleteTask:g,onCreateTaskInColumn:P}){let G=v?.toLowerCase()==="owner"||v?.toLowerCase()==="editor",z=p==="my"?w:void 0,{data:R,fetchNextPage:F,hasNextPage:U,isFetchingNextPage:d,isLoading:n}=pt({queryKey:["teams",e,"kanban","tasks",{status:r,goalId:x,assigneeId:z}],queryFn:async({pageParam:H=""})=>{let J=await A.api.teams[":teamId"].kanban.tasks.$get({param:{teamId:e},query:{status:r,goalId:x||void 0,assigneeId:z||void 0,first:"20",after:H||void 0}});if(!J.ok)throw Error("Failed to fetch column tasks");return await J.json()},initialPageParam:"",getNextPageParam:(H)=>H.pageInfo?.cursor||void 0,refetchInterval:5000,enabled:!!e}),{ref:b,inView:D}=Pt({threshold:0.1});h(()=>{if(D&&U&&!d)F()},[D,U,d,F]);let l=N(()=>R?.pages?.flatMap((H)=>Array.isArray(H?.data)?H.data:[])||[],[R]),{source:i,target:s}=Hd(),m=l.filter((H)=>H.id!==i?.id).at(-1),{ref:k,isDropTarget:f}=Or({id:r,data:{type:"kanban_column",status:r,lastTask:m}}),c=i?.data?.type==="kanban_task",T=c&&(f||s?.data?.type==="kanban_column"&&s.data.status===r||s?.data?.type==="reorder"&&s.data.task?.status===r),j=c&&s?.data?.type==="kanban_column"&&s.data.status===r,y=R?.pages?.[0]?.pageInfo?.total??l.length,X=Jp(r);return o("div",{ref:k,className:C("flex flex-col h-full max-h-full w-80 md:w-84 shrink-0 rounded-xl bg-card/60 border border-border/70 shadow-xs transition-colors duration-200 overflow-hidden select-none",T&&"ring-2 ring-primary/60 bg-primary/[0.03] border-primary/40"),children:[o("div",{className:"h-11 px-3.5 flex items-center justify-between border-b border-border/60 bg-card/80 shrink-0",children:[o("div",{className:"flex items-center gap-2 min-w-0",children:[t("div",{className:C("w-2.5 h-2.5 rounded-full shrink-0",X.dot)}),t("h3",{className:"text-xs font-bold tracking-wide uppercase text-foreground/90 truncate",children:oo(r)})]}),t("div",{className:"flex items-center gap-1 shrink-0",children:t("span",{className:"text-[11px] font-mono px-2 py-0.5 rounded-full bg-muted font-medium text-muted-foreground",children:y})})]}),t(ce,{className:"flex-1 min-h-0 [&>div>div]:block!",children:o("div",{className:"p-2.5 space-y-2.5 min-h-full flex flex-col",children:[n?t("div",{className:"flex items-center justify-center py-10",children:t(O,{className:"w-5 h-5 animate-spin text-muted-foreground"})}):l.length===0?t("div",{className:"flex flex-col items-center justify-center py-10 px-4 text-center",children:t("p",{className:"text-xs text-muted-foreground/70",children:hS()})}):l.map((H,J)=>t(Fe,{task:H,onClick:_,onDelete:g,isFirst:J===0,isLast:J===l.length-1,showBottomIndicator:j&&H.id===m?.id,currentUserId:w,currentUserRole:v},H.id)),t("div",{ref:b,className:"h-2"}),d&&t("div",{className:"flex justify-center py-2",children:t(O,{className:"w-4 h-4 animate-spin text-muted-foreground"})})]})}),G&&t("div",{className:"p-2 border-t border-border/50 bg-card/90 shrink-0",children:o(E,{variant:"ghost",size:"sm",onClick:()=>P(r),className:"w-full justify-center h-8 text-xs font-medium text-muted-foreground hover:text-foreground hover:bg-muted/80 border border-dashed border-border/80",children:[t(pe,{className:"w-3.5 h-3.5 mr-1.5"}),t("span",{children:Nf()})]})})]})}function Oe({teamId:e,selectedGoalId:r,scope:x,currentUserId:p,currentUserRole:w,onTaskClick:v,onCreateTaskInColumn:_}){let g=Q(),[P,G]=u(null),{mutate:z,isPending:R}=B({mutationFn:async(d)=>{let n=await A.api.teams[":teamId"].kanban.tasks[":taskId"].$delete({param:{teamId:e,taskId:d}});if(!n.ok){let b=await n.json().catch(()=>({message:Tn()}));throw Error(b.message||Tn())}return await n.json()},onSuccess:()=>{g.invalidateQueries({queryKey:["teams",e,"kanban","tasks"]}),g.invalidateQueries({queryKey:["teams",e,"kanban","goals"]}),M.success(_T()),G(null)},onError:(d)=>{M.error(d.message)}}),{mutate:F}=B({mutationFn:async({taskId:d,fromStatus:n,status:b,reason:D,beforeIndex:l,afterIndex:i})=>{let s=await A.api.teams[":teamId"].kanban.tasks[":taskId"].$patch({param:{teamId:e,taskId:d},json:{fromStatus:n,status:b,reason:D,beforeIndex:l,afterIndex:i}});if(!s.ok){let m=await s.json().catch(()=>({message:Tn()}));throw Error(m.message||Tn())}return await s.json()},onMutate:async({taskId:d,status:n,targetTaskId:b,position:D})=>{await g.cancelQueries({queryKey:["teams",e,"kanban","tasks"]});let l=g.getQueriesData({queryKey:["teams",e,"kanban","tasks"]}),i=null,s=(m)=>m[0]==="teams"&&m[1]===e&&m[2]==="kanban"&&m[3]==="tasks"&&typeof m[4]==="object"&&m[4]!==null&&("status"in m[4]);if(g.setQueriesData({predicate:(m)=>s(m.queryKey)},(m)=>{if(!m||!Array.isArray(m.pages))return m;let k=!1,f=m.pages.map((c)=>{if(!c||!Array.isArray(c.data))return c;let T=c.data.find((j)=>j.id===d);if(T)return i={...T,status:n},k=!0,{...c,data:c.data.filter((j)=>j.id!==d),pageInfo:{...c.pageInfo,total:Math.max(0,(c.pageInfo?.total??c.data.length)-1)}};return c});return k?{...m,pages:f}:m}),i){let m=i;g.setQueriesData({predicate:(k)=>{if(!s(k.queryKey))return!1;return k.queryKey[4]?.status===n}},(k)=>{if(!k||!Array.isArray(k.pages))return k;let f=k.pages.flatMap((y)=>y?.data??[]).filter((y)=>y.id!==d),c=f.length;if(b){let y=f.findIndex((X)=>X.id===b);if(y!==-1)c=D==="before"?y:y+1}f.splice(c,0,m);let T=0,j=k.pages.map((y,X)=>{let H=y?.data?y.data.length:0,J=X===0&&H===0?1:X===k.pages.length-1?f.length-T:H,te=f.slice(T,T+J);return T+=J,{...y,data:te,pageInfo:{...y?.pageInfo,total:(y?.pageInfo?.total??0)+1}}});if(T<f.length&&j.length>0){let y=j.length-1;j[y]={...j[y],data:[...j[y]?.data??[],...f.slice(T)]}}return{...k,pages:j}})}return{previousQueries:l}},onError:(d,n,b)=>{if(b?.previousQueries)for(let[D,l]of b.previousQueries)g.setQueryData(D,l);M.error(d.message)},onSettled:()=>{g.invalidateQueries({queryKey:["teams",e,"kanban","tasks"]})}}),U=(d)=>{if(d.canceled)return;let{source:n,target:b}=d.operation;if(!n||!b)return;let D=n.data;if(D?.type!=="kanban_task"||!D.task)return;let l=D.task,i=w?.toLowerCase()==="owner",s=w?.toLowerCase()==="editor",m=l.reporter?.id===p||l.creator?.id===p,k=l.assignee?.id===p;if(!i&&!s&&!m&&!k){M.error(D_());return}let f=b.data;if(!f)return;if(f.type==="reorder"&&f.task&&f.position){let c=f.task,T=c.status;if(l.id===c.id)return;let j=f.position==="before"?c.sortIndex??void 0:void 0,y=f.position==="after"?c.sortIndex??void 0:void 0;F({taskId:l.id,fromStatus:l.status,status:T,beforeIndex:j,afterIndex:y,targetTaskId:c.id,position:f.position});return}if(f.type==="kanban_column"&&f.status){let{status:c,lastTask:T}=f;if(T){if(l.id===T.id){if(l.status===c)return;F({taskId:l.id,fromStatus:l.status,status:c});return}F({taskId:l.id,fromStatus:l.status,status:c,afterIndex:T.sortIndex??void 0,targetTaskId:T.id,position:"after"});return}if(l.status===c)return;F({taskId:l.id,fromStatus:l.status,status:c})}};return o($n,{sensors:[_n.configure({activationConstraints:[new Dr.Distance({value:8})]}),Xo],onDragEnd:U,children:[t("div",{className:"flex-1 min-h-0 overflow-x-auto overflow-y-hidden p-4 bg-background/50",children:t("div",{className:"flex gap-4 h-full min-w-max pb-2",children:PA.map((d)=>t(Ee,{teamId:e,status:d,selectedGoalId:r,scope:x,currentUserId:p,currentUserRole:w,onTaskClick:v,onDeleteTask:(n)=>G(n),onCreateTaskInColumn:_},d))})}),P&&t(Je,{open:!!P,onOpenChange:(d)=>!d&&G(null),children:o(Xe,{children:[o(et,{children:[t(rt,{children:eb()}),t(nt,{children:tb({title:P.title})})]}),o(tt,{children:[t(st,{disabled:R,children:De()}),o(ot,{onClick:()=>z(P.id),disabled:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[R&&t(O,{className:"w-4 h-4 mr-1.5 animate-spin"}),at()]})]})]})})]})}S();function Ge({teamId:e,isOpen:r,onClose:x,initialGoalId:p}){let w=Q(),v=p===bi||!p?"none":p,[_,g]=u(""),[P,G]=u(""),[z,R]=u(!1),[F,U]=u(Ur.MEDIUM),[d,n]=u(v),[b,D]=u("none"),[l,i]=u("none"),[s,m]=u(void 0),[k,f]=u(void 0),[c,T]=u(null),[j,y]=u(null),[X,H]=u(null),[J,te]=u([]),[re,oe]=u([]),[be,ve]=u(!1),{data:ke}=Z({queryKey:["teams",e,"me"],queryFn:async()=>{let a=await A.api.teams[":teamId"].me.$get({param:{teamId:e}});if(!a.ok)return null;return await a.json()},enabled:!!e&&r});h(()=>{if(r)g(""),G(""),R(!1),U(Ur.MEDIUM),n(v),D("none"),i(ke?.id||"none"),m(void 0),f(void 0),T(null),y(null),H(null),te([]),oe([])},[r,v,ke?.id]);let{data:ye=[]}=Z({queryKey:["teams",e,"members","human"],queryFn:async()=>{let a=await A.api.teams[":teamId"].members.$get({param:{teamId:e},query:{includeAgents:"false"}});if(!a.ok)return[];let V=await a.json();return Array.isArray(V)?V:[]},enabled:!!e&&r}),{data:$e=[]}=Z({queryKey:["teams",e,"agents"],queryFn:async()=>{let a=await A.api.teams[":teamId"].agents.$get({param:{teamId:e}});if(!a.ok)return[];return await a.json()||[]},enabled:!!e&&r}),{data:He}=Z({queryKey:["teams",e,"kanban","goals"],queryFn:async()=>{let a=await A.api.teams[":teamId"].kanban.goals.$get({param:{teamId:e},query:{}});if(!a.ok)return{data:[]};return await a.json()},enabled:!!e&&r}),Ve=He?.data||[],{mutate:We,isPending:se}=B({mutationFn:async()=>{let a=await A.api.teams[":teamId"].kanban.tasks.$post({param:{teamId:e},json:{title:_.trim(),description:P.trim()||void 0,isAgentTask:z,priority:F,goalId:d!=="none"?d:void 0,assigneeId:b!=="none"?b:void 0,reporterId:l!=="none"?l:void 0,startDate:s?s.toISOString():void 0,dueDate:k?k.toISOString():void 0,projectId:c||void 0,targetFolderId:j||void 0,parentIds:J.length>0?J:void 0,assetIds:re.length>0?re.map((V)=>V.id):void 0}});if(!a.ok){let V=await a.text().catch(()=>""),Y=Tn();if(V)try{let de=JSON.parse(V);if(de&&typeof de.message==="string")Y=de.message}catch{Y=V}throw Error(Y)}return await a.json()},onSuccess:()=>{w.invalidateQueries({queryKey:["teams",e,"kanban","tasks"]}),w.invalidateQueries({queryKey:["teams",e,"kanban","goals"]}),M.success(AT()),x()},onError:(a)=>{M.error(a.message)}}),Ye=(a)=>{if(a.preventDefault(),!_.trim()||se)return;We()},ie=z;return t(ue,{open:r,onOpenChange:(a)=>!a&&x(),children:o(ae,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[o("form",{onSubmit:Ye,className:"space-y-4",children:[t(fe,{children:t(le,{children:Nf()})}),o("div",{className:"space-y-3.5 py-1",children:[o("div",{className:"space-y-1.5",children:[t(W,{htmlFor:"create-task-title",children:hA()}),t(q,{id:"create-task-title",value:_,onChange:(a)=>g(a.target.value),placeholder:gA(),required:!0,autoFocus:!0})]}),o("div",{className:"space-y-1.5",children:[t(W,{htmlFor:"create-task-desc",children:fA()}),t(wi,{id:"create-task-desc",value:P,onChange:(a)=>G(a.target.value),placeholder:pA(),rows:3})]}),o("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[o("div",{className:"sm:col-span-2 flex items-center justify-between space-x-2 rounded-lg border border-border/80 bg-muted/30 p-2.5 h-14",children:[o("div",{className:"space-y-0.5 min-w-0 pr-2",children:[o(W,{htmlFor:"create-is-agent-task",className:"text-xs font-medium cursor-pointer flex items-center gap-1.5",children:[t(Ct,{className:"w-3.5 h-3.5 text-orange-500"}),t("span",{children:zd()})]}),t("p",{className:"text-[11px] text-muted-foreground line-clamp-1",children:AA()})]}),t(Me,{id:"create-is-agent-task",checked:z,onCheckedChange:(a)=>{R(a),D("none")}})]}),o("div",{className:"space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:mA()}),o(Le,{value:F,onValueChange:(a)=>U(a),children:[t(Be,{className:"w-full h-9 text-xs",children:t(Ze,{})}),t(Ue,{children:Object.values(Ur).map((a)=>t(ne,{value:a,children:t("span",{className:C("px-1.5 py-0.5 rounded text-[10px] uppercase font-medium",la(a)),children:aa(a)})},a))})]})]}),o("div",{className:"space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:vd()}),o(Le,{value:d,onValueChange:n,children:[t(Be,{className:"w-full h-9 text-xs",children:t(Ze,{placeholder:"None"})}),o(Ue,{children:[t(ne,{value:"none",children:t("span",{className:"text-muted-foreground italic",children:"None"})}),Ve.filter((a)=>a.id!==bi).map((a)=>t(ne,{value:a.id,children:o("div",{className:"flex items-center gap-2",children:[t(wo,{className:"w-3.5 h-3.5 text-primary"}),t("span",{children:a.title})]})},a.id))]})]})]}),o("div",{className:"space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:ie?Zd():eh()}),o(Le,{value:b,onValueChange:D,children:[t(Be,{className:"w-full h-9 text-xs",children:t(Ze,{placeholder:As()})}),o(Ue,{children:[t(ne,{value:"none",children:t("span",{className:"text-muted-foreground italic",children:As()})}),ie?$e.map((a)=>t(ne,{value:a.id,children:o("div",{className:"flex items-center gap-2",children:[t(Ct,{className:"w-3.5 h-3.5 text-purple-500"}),t("span",{children:a.name})]})},a.id)):ye.map((a)=>t(ne,{value:a.id,children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{size:"sm",className:"w-4 h-4",children:[t(Ie,{src:a.image}),t(Te,{className:"text-[8px]",children:a.name.slice(0,2).toUpperCase()})]}),t("span",{children:a.name})]})},a.id))]})]})]}),o("div",{className:"space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:qg()}),o(Le,{value:l,onValueChange:i,children:[t(Be,{className:"w-full h-9 text-xs",children:t(Ze,{placeholder:As()})}),o(Ue,{children:[t(ne,{value:"none",children:t("span",{className:"text-muted-foreground italic",children:As()})}),ye.map((a)=>t(ne,{value:a.id,children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{size:"sm",className:"w-4 h-4",children:[t(Ie,{src:a.image}),t(Te,{className:"text-[8px]",children:a.name.slice(0,2).toUpperCase()})]}),t("span",{children:a.name})]})},a.id))]})]})]}),ie&&o("div",{className:"sm:col-span-2 space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:Up()}),o(E,{type:"button",variant:"outline",size:"sm",onClick:()=>ve(!0),className:"w-full justify-start h-9 text-xs truncate font-normal",children:[t(rr,{className:"w-3.5 h-3.5 mr-2 text-primary shrink-0"}),t("span",{className:"truncate",children:X||Pp()})]})]}),o("div",{className:"space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:Bd()}),t(xi,{value:s,onChange:m,placeholder:Bd(),className:"h-9 text-xs"})]}),o("div",{className:"space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:hd()}),t(xi,{value:k,onChange:f,placeholder:hd(),className:"h-9 text-xs"})]}),o("div",{className:"sm:col-span-2 space-y-1.5",children:[t(W,{className:"text-xs font-medium text-muted-foreground",children:vg()}),t(Kd,{teamId:e,value:J,onChange:te})]}),t("div",{className:"sm:col-span-2 pt-1",children:t(Wd,{teamId:e,projectId:c,assets:re,onAddAssets:(a)=>oe((V)=>[...V,...a]),onRemoveAsset:(a)=>oe((V)=>V.filter((Y)=>Y.id!==a))})})]})]}),o(qe,{children:[t(E,{type:"button",variant:"outline",onClick:x,disabled:se,children:De()}),o(E,{type:"submit",disabled:!_.trim()||se,children:[se&&t(O,{className:"w-4 h-4 mr-1.5 animate-spin"}),Zc()]})]})]}),be&&t(Yd,{teamId:e,currentProjectId:c,currentTargetFolderId:j,isOpen:be,onClose:()=>ve(!1),onSelect:(a,V,Y)=>{T(a),y(V),H(Y||"Selected Folder")}})]})})}function je({teamId:e,initialTaskId:r}){let[x,p]=u("team"),[w,v]=u(null),[_,g]=u(r??null),[P,G]=u(!1);h(()=>{if(r)g(r)},[r]);let[z,R]=u(Qe.TODO),{data:F,isLoading:U}=Z({queryKey:["teams",e,"me"],queryFn:async()=>{let s=await A.api.teams[":teamId"].me.$get({param:{teamId:e}});if(!s.ok)throw Error("Failed to fetch me");return await s.json()},enabled:!!e}),{data:d}=Z({queryKey:["teams",e,"kanban","goals"],queryFn:async()=>{let s=await A.api.teams[":teamId"].kanban.goals.$get({param:{teamId:e},query:{}});if(!s.ok)return{data:[]};return await s.json()},enabled:!!e}),n=d?.data||[],b=w?n.find((s)=>s.id===w)||null:null,D=F?.role?.toLowerCase()==="owner"||F?.role?.toLowerCase()==="editor",l=(s=Qe.TODO)=>{R(s),G(!0)},i=(s)=>{g(s.id)};if(U)return t("div",{className:"flex h-full items-center justify-center",children:t(O,{className:"w-8 h-8 animate-spin text-muted-foreground"})});return o("div",{className:"flex flex-row h-full bg-background overflow-hidden font-sans",children:[t(_e,{teamId:e,selectedGoalId:w,onSelectGoal:v,isOwnerOrEditor:D}),o("div",{className:"flex-1 flex flex-col min-w-0 h-full overflow-hidden",children:[t(Ke,{scope:x,onScopeChange:p,selectedGoal:b,onClearGoal:()=>v(null),onCreateTask:()=>l(Qe.TODO),canCreateTask:D}),t(Oe,{teamId:e,selectedGoalId:w,scope:x,currentUserId:F?.id,currentUserRole:F?.role,onTaskClick:i,onCreateTaskInColumn:(s)=>l(s)})]}),_&&t(Xd,{teamId:e,taskId:_,isOpen:!!_,onClose:()=>g(null),canEdit:D}),P&&t(Ge,{teamId:e,isOpen:P,initialStatus:z,initialGoalId:w,onClose:()=>G(!1)})]})}function lt(){let{teamId:e}=Re.useParams(),{taskId:r}=Re.useSearch();return t(je,{teamId:e,initialTaskId:r})}var Re=ze("/teams/$teamId/kanban")({component:lt});export{Re as Route};
|
package/bin/chunk-ydk3edsw.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,N,u,S,L,t,o,pt,Re,ze,A,O,ta,jn,to,Ce,Ie,Te,G0,q_,Df,Bc,Xx,An,lt,Pt,br,$t,St,om}from"./chunk-dx0wz749.js";import{Ir}from"./chunk-myd3wg9a.js";import{nr}from"./chunk-n5v48hz5.js";import{Rn,Pn,Nn,wr,Et,yt}from"./chunk-12npypek.js";S();var T=(a)=>{if(!a)return"??";return a.split(" ").map((r)=>r[0]).slice(0,2).join("").toUpperCase()};function j(){let{projectId:a}=C.useParams(),{teamId:r,ensureTeamIdForProject:n}=lt(),g=Re();h(()=>{n(a)},[a,n]);let{data:i}=nr(om(a)),d=i?.rootFolder,[v,y]=u(240),{fileListLeftSidebarCollapsed:m,setFileListLeftSidebarCollapsed:w}=$t(),{data:c,isLoading:I,fetchNextPage:f,hasNextPage:p,isFetchingNextPage:l}=pt({queryKey:["collections",a],queryFn:async({pageParam:e})=>{let s=await A.api.projects[":projectId"].collections.$get({param:{projectId:a},query:{first:"20",after:e}});if(!s.ok)throw Error("Failed to fetch collections");return await s.json()},initialPageParam:"",getNextPageParam:(e)=>e.pageInfo?.cursor||void 0,enabled:!!a}),{ref:k,inView:b}=Pt();h(()=>{if(b&&p&&!l)f()},[b,p,l,f]);let x=N(()=>c?.pages.flatMap((e)=>e.data)||[],[c]);if(!r||!d||!i)return t(St,{});return t("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:o("div",{className:"flex flex-1 overflow-hidden relative",children:[!m&&t("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>w(!0)}),!m&&o(L,{children:[t("div",{className:"bg-background",style:{width:v},children:t(br,{teamId:r,projectId:a,projectName:i.name??"",rootFolderId:d})}),t(Ir,{onResize:(e)=>{y((s)=>Math.max(180,Math.min(400,s+e)))},className:"hidden md:block"})]}),o("div",{className:"flex-1 flex flex-col min-h-0 bg-card overflow-hidden",children:[t("header",{className:"h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10",children:o("div",{className:"flex items-center gap-2",children:[t(ta,{className:"h-5 w-5 text-primary"}),t("h1",{className:"font-bold text-lg text-foreground",children:G0()})]})}),t("div",{className:"flex-1 overflow-y-auto p-6",children:I?t("div",{className:"flex justify-center items-center h-64",children:t("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):x.length===0?o("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground gap-3",children:[t(to,{className:"h-10 w-10 text-muted-foreground/50"}),t("p",{children:Xx()})]}):o("div",{className:"border border-border rounded-xl bg-background overflow-hidden shadow-xs",children:[o(Rn,{children:[t(Pn,{children:o(wr,{className:"hover:bg-transparent bg-muted/20",children:[t(Et,{className:"font-semibold px-4 py-3",children:q_()}),t(Et,{className:"font-semibold px-4 py-3",children:Bc()}),t(Et,{className:"font-semibold px-4 py-3 w-[200px]",children:Df()})]})}),t(Nn,{children:x.map((e)=>o(wr,{className:"hover:bg-muted/10 transition-colors cursor-pointer",onClick:()=>g({to:"/projects/$projectId/collections/$collectionId",params:{projectId:a,collectionId:e.id}}),children:[t(yt,{className:"font-medium px-4 py-3.5",children:o("div",{className:"flex items-center gap-2",children:[t(ta,{className:"h-4 w-4 text-primary shrink-0"}),t("span",{className:"text-foreground font-semibold hover:underline",children:e.name})]})}),t(yt,{className:"px-4 py-3.5",children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{className:"h-6 w-6",children:[e.creator?.image&&t(Ie,{src:e.creator.image,alt:e.creator.name,className:"object-cover"}),t(Te,{className:"text-[10px]",children:T(e.creator?.name)})]}),t("span",{className:"text-sm font-medium text-foreground truncate max-w-[200px]",children:e.creator?.name||An()})]})}),t(yt,{className:"px-4 py-3.5 text-muted-foreground text-sm",children:o("div",{className:"flex items-center gap-2",children:[t(jn,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),t("span",{children:new Date(e.createdAt).toLocaleDateString()})]})})]},e.id))})]}),t("div",{ref:k,className:"h-10 w-full flex items-center justify-center",children:l&&t(O,{className:"h-6 w-6 animate-spin text-primary"})})]})})]})]})})}var C=ze("/projects/$projectId/collections/")({component:j});export{C as Route};
|
package/bin/chunk-zbma2zeh.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,y,u,S,L,t,o,Q,Ia,Z,B,Re,Un,ze,A,O,tr,C,E,De,at,Uc,zc,rb,gd,Na,tv,Dh,Fo,bC,xo,Je,Xe,et,tt,rt,nt,ot,st,ue,ae,fe,qe,le,q,lt,Pt,M,un,zr,$t,lr,Ar,Lo,NA}from"./chunk-dx0wz749.js";import"./chunk-edjtb7pk.js";import"./chunk-b9j5575n.js";import{Yr}from"./chunk-cw8z9w5c.js";import"./chunk-m9sp00a9.js";import{Ei}from"./chunk-fhq5m9ya.js";import{es,Hl,rs,vs}from"./chunk-h82r29wm.js";import{Ul,zl}from"./chunk-cgsxyw07.js";import"./chunk-51h2bgpf.js";import{Ii}from"./chunk-yfe6hkzk.js";import{Ir}from"./chunk-myd3wg9a.js";import"./chunk-eez1yncf.js";import"./chunk-7wb3dga5.js";import"./chunk-3btc8a0p.js";import"./chunk-6bgbx563.js";import"./chunk-czny5thj.js";import"./chunk-r5rpdhed.js";S();var kt=({item:n})=>{if(n.preview?.thumbnailUrl)return t("img",{src:n.preview.thumbnailUrl,alt:"Preview",className:"w-full h-full object-cover"});if(n.preview?.proxyType==="audio"||n.proxyType==="audio")return t("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:t(es,{className:"w-5 h-5 text-muted-foreground"})});return t("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:t(tr,{className:"w-5 h-5 text-muted-foreground"})})},Me=({projectId:n,currentAssetId:s,parentFolderId:x,initialFiles:d,initialNextCursor:k})=>{let{ref:a,inView:T}=Pt({threshold:0,rootMargin:"200px"}),b=y(null),N=y(!0),[c,p]=u(d),[f,U]=u(k),[W,Y]=u(!!k),[V,g]=u(!1);return h(()=>{p(d),U(k),Y(!!k),N.current=!0},[d,k]),h(()=>{(async()=>{if(!f||V||!T||!W)return;g(!0);try{let I=await A.api.folders[":folderId"].search.$post({param:{folderId:x},json:{assetType:"file",after:f,first:200,recursively:!1,conditions:[]}});if(!I.ok)throw Error("Failed to fetch next page");let P=await I.json(),X=P.data||[];p((G)=>[...G,...X]),U(P.pageInfo?.cursor||void 0),Y(!!P.pageInfo?.cursor&&X.length>0)}catch(I){console.error("Error fetching next page:",I)}finally{g(!1)}})()},[T,f,W,V,x]),h(()=>{if(c.some((I)=>I?.id===s)&&b.current)if(N.current)b.current.scrollIntoView({block:"center",inline:"center",behavior:"auto"}),N.current=!1;else b.current.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},[c,s]),t("div",{className:"h-24 md:h-full w-full md:w-24 bg-gray-100 dark:bg-gray-950 flex flex-row md:flex-col flex-shrink-0 select-none",children:o("div",{className:"flex-1 overflow-x-auto overflow-y-hidden md:overflow-y-auto md:overflow-x-hidden px-4 md:px-0 py-2 md:py-4 flex flex-row md:flex-col items-center gap-3 no-scrollbar",children:[c.map((m)=>{if(!m)return null;let I=m.id===s;return t("div",{ref:m.id===s?b:null,className:"flex-shrink-0",children:o(Un,{to:"/projects/$projectId/files/$fileId",params:{projectId:n,fileId:m.id},search:{version:void 0},className:C("rounded-lg border overflow-hidden flex items-center justify-center transition-all bg-muted/30 block relative",I?"w-[62px] h-[62px] opacity-100":"w-[52px] h-[52px] opacity-60 hover:opacity-100"),children:[t(kt,{item:m}),m.agent&&t("span",{className:"absolute top-1 right-1 z-10 pointer-events-none select-none rounded bg-black/60 px-1 py-0.5 text-[10px] font-medium leading-none text-white",title:m.agent.name,"data-testid":"carousel-agent-badge",children:"AI"})]})},m.id)}),W&&t("div",{ref:a,className:"px-2 md:px-0 py-2 md:py-4 flex justify-center items-center h-full md:w-full flex-shrink-0",children:V&&t(O,{className:"h-5 w-5 animate-spin text-muted-foreground"})})]})})};S();function At(){let{projectId:n,fileId:s}=Ne.useParams(),x=Ne.useSearch(),{version:d,start:k}=x,a=d||s,{cmpLeft:T,cmpRight:b}=x,N=x.cmpActive??"left",c=!!x.compare&&!!T&&!!b,p=y(null),{teamId:f,ensureTeamIdForProject:U}=lt(),[W,Y]=u(360),[V,g]=u([]),{fileViewRightSidebarCollapsed:m}=$t(),{isChatbotOpen:I}=lr(),P=Ar((e)=>Boolean(e.metadata["appearance.hideAgent"])),[X,G]=u(0),[he,z]=u(null),[ge,Le]=u(null),[Ee,ye]=u(void 0),[_,ne]=u({show:!1,files:[],nextCursor:void 0,folderId:void 0}),Ve=A.api.files[":fileId"].metadata.$patch,{mutate:Pe}=B({mutationFn:async(e)=>{let r=await Ve(e);if(!r.ok)throw Error("Failed to patch metadata");return await r.json()}}),J=Q(),{members:_e,fetchProjectMembers:Ie}=zr(),Ke=Lo();h(()=>{U(n)},[n,U]),h(()=>{if(n)Ie(n,!0)},[n,Ie]),h(()=>{if(n&&s)A.api.projects[":projectId"].recents.view.$post({param:{projectId:n},json:{assetId:s}}).catch(()=>{})},[n,s]);let{data:ve,isLoading:Oe,isError:He,isFetching:Qe}=Z({queryKey:["files",s],queryFn:async()=>{let e=await A.api.files[":fileId"].$get({param:{fileId:s}});if(!e.ok)throw Error("Failed to fetch stack");return await e.json()},enabled:!!f,placeholderData:Ia}),{data:Be,isLoading:Ue,isError:We,isFetching:Ge}=Z({queryKey:["files",d],queryFn:async()=>{let e=await A.api.files[":fileId"].$get({param:{fileId:d}});if(!e.ok)throw Error("Failed to fetch version");return await e.json()},enabled:!!f&&!!d,placeholderData:Ia}),{data:Ye}=Z({queryKey:["version_stacks",s,"versions"],queryFn:async()=>{let e=await A.api.version_stacks[":stackId"].versions.$get({param:{stackId:s}});if(!e.ok)throw Error("Failed to fetch versions");return await e.json()},enabled:!!n&&!!s&&(!!d||c)}),{data:j}=Z({queryKey:["projects",n],queryFn:async()=>{let e=await A.api.projects[":projectId"].$get({param:{projectId:n}});if(!e.ok)throw Error("Failed to fetch project");return await e.json()}}),v=Re(),{setProjectState:we,clearProjectState:xe}=un(),Ze=Oe||!!d&&Ue,it=He||!!d&&We,ct=Qe||!!d&&Ge,i=Be||ve,F=d?Ye:ve?.versionStack?.versions,l=i?.ancestorFolders?.[0]?.id??j?.rootFolder??"",[re,ee]=u(!1),[te,be]=u(""),se=y(null),ie=y(!1),[dt,ce]=u(!1),ft=A.api.files[":fileId"].$put,{mutate:pt,mutateAsync:ut,isPending:Fe}=B({mutationFn:async(e)=>{let r=await ft(e);if(!r.ok)throw Error("Failed to rename file");return await r.json()},onSuccess:()=>{J.invalidateQueries({queryKey:["files"]}),J.invalidateQueries({queryKey:["version_stacks"]}),M.success(bC?.()||"Renamed successfully"),ee(!1)},onError:()=>{M.error(tv?.()||"Failed to rename")}}),mt=A.api.files.$delete,{mutate:ht,mutateAsync:gt,isPending:ke}=B({mutationFn:async(e)=>{if(!(await mt(e)).ok)throw Error("Failed to delete file")},onSuccess:()=>{if(J.invalidateQueries({queryKey:["files"]}),J.invalidateQueries({queryKey:["version_stacks"]}),M.success(rb?.()||"Deleted"),ce(!1),l&&l!==j?.rootFolder)v({to:"/projects/$projectId/folders/$folderId",params:{projectId:n,folderId:l}});else v({to:"/projects/$projectId",params:{projectId:n}})},onError:()=>{M.error(Na?.()||"Failed to delete")}}),yt=(e)=>{if(e?.preventDefault(),!te.trim()||!a)return;pt({param:{fileId:a},json:{name:te.trim()}})},It=()=>{if(!a)return;ht({json:{ids:[a]}})};h(()=>{if(i&&j&&f)we({teamId:f,projectId:n,projectName:j.name??"",ancestorFolders:i.ancestorFolders??[],currentAsset:{id:a||s,name:i.name,type:"file",version:F?F.find((e)=>e.id===a)?.version??F.length:void 0,proxyType:i.proxyType},isRootFolder:!1,fileId:s,downloadInfo:{originalKey:i.media?.original?.key,videoTranscodes:i.media?.videoTranscodes?.map((e)=>({key:e.key,width:e.width,height:e.height,resolution:e.resolution,hdr:e.hdr}))},versions:F,compareMode:c,canCompareVersions:(F?.length??0)>=2,onCompareVersions:()=>{let e=Hl(F);if(!e)return;v({to:"/projects/$projectId/files/$fileId",params:{projectId:n,fileId:s},search:(r)=>({...r,version:void 0,compare:!0,cmpLeft:e.left.id,cmpRight:e.right.id,cmpActive:"left"})})},onFolderClick:(e)=>{v({to:"/projects/$projectId/folders/$folderId",params:{projectId:n,folderId:e}})},onRename:()=>{ie.current=!1,be(i?.name??""),ee(!0)},onDelete:()=>{ce(!0)}});return()=>xe()},[f,n,j,i,F,a,s,c,we,xe,v]),h(()=>{if(!re)return;let e=setTimeout(()=>{ie.current=!0},1000);return()=>clearTimeout(e)},[re]);let vt=()=>{if(ie.current)return;setTimeout(()=>{if(se.current)vs(se.current)},0)};if(h(()=>{if(!l||!a)return;if(_.folderId===l)return;let e=!0;return(async()=>{try{let w="",D=!1,R=[],pe=void 0;for(let Se=0;Se<5;Se++){let Te=await A.api.folders[":folderId"].search.$post({param:{folderId:l},json:{assetType:"file",after:w,first:200,recursively:!1,conditions:[]}});if(!Te.ok)throw Error("Failed to search parent folder for carousel");let H=await Te.json(),me=H.data||[];if(R.push(...me),me.some((oe)=>oe.id===a)){if(D=!0,pe=H.pageInfo?.cursor||void 0,H.pageInfo?.cursor)try{let oe=await A.api.folders[":folderId"].search.$post({param:{folderId:l},json:{assetType:"file",after:H.pageInfo.cursor,first:200,recursively:!1,conditions:[]}});if(oe.ok){let $e=await oe.json(),Ft=$e.data||[];R.push(...Ft),pe=$e.pageInfo?.cursor||void 0}}catch{}break}if(!H.pageInfo?.cursor||me.length<200)break;w=H.pageInfo.cursor}if(e)if(D)ne({show:!0,files:R,nextCursor:pe,folderId:l});else ne({show:!1,files:[],nextCursor:void 0,folderId:l})}catch(w){if(console.error(w),e)ne({show:!1,files:[],nextCursor:void 0,folderId:l})}})(),()=>{e=!1}},[l,a,_.folderId]),h(()=>{G(0),z(null),g([])},[i?.id]),h(()=>{z(null),g([])},[ge?.id]),h(()=>{Yr.getState().reset(),Yr.getState().setIsDrawing(!1),g([]),z(null)},[a]),Ze&&!i)return t(NA,{});if(it||!i||!j||!f)return t("div",{children:Dh()});let K=c?ge:i,Ae=K?.id??a,je=(e,r)=>{if(!f)return;Pe({param:{fileId:Ae},json:[{key:e,value:r}]},{onSuccess:()=>{J.invalidateQueries({queryKey:["files",Ae]})}})},de=(e)=>{v({to:"/projects/$projectId/files/$fileId",params:{projectId:n,fileId:s},search:(r)=>({...r,...e})})},wt=()=>{de({compare:void 0,cmpLeft:void 0,cmpRight:void 0,cmpActive:void 0,version:N==="left"?T:b})},xt=(e)=>{z(e.id||null);let r=e.annotations;if(r&&r.length>0)g(r);else g([]);if(c){if(e.second!==null&&e.second!==void 0)ye({second:e.second,nonce:Date.now()});return}if(e.second!==null&&e.second!==void 0)p.current?.seekTo(e.second),p.current?.pause();else if(r&&r.length>0)p.current?.pause()},bt=(e)=>{z(e.id||null);let w=e.details,D=w?.annotations;if(D&&D.length>0)g(D);else g([]);let R=w?.position?.type==="time"?w.position.seconds:w?.position?.type==="page"?w.position.page:void 0;if(c){if(R!==void 0)ye({second:R,nonce:Date.now()});return}if(R!==void 0)p.current?.seekTo(R),p.current?.pause();else if(D&&D.length>0)p.current?.pause()},Ce=()=>{g([]),z(null)};if(Ke&&!c)return t(Ul,{projectId:n,teamId:f,fileId:s,file:i,projectInfo:j,ancestorFolders:i.ancestorFolders??[],parentFolderId:l,versions:F,activeFileId:a,startTime:k,siblingFiles:_.files,onNavigateToFile:(e)=>{v({to:"/projects/$projectId/files/$fileId",params:{projectId:n,fileId:e}})},onNavigateBack:()=>{if(l&&l!==j?.rootFolder)v({to:"/projects/$projectId/folders/$folderId",params:{projectId:n,folderId:l}});else v({to:"/projects/$projectId",params:{projectId:n}})},onSelectVersion:(e)=>{v({to:"/projects/$projectId/files/$fileId",params:{projectId:n,fileId:s},search:(r)=>({...r,version:e})})},onRenameFile:async(e)=>{await ut({param:{fileId:a},json:{name:e}})},onDeleteFile:async()=>{await gt({json:{ids:[a]}})},onSaveField:je});return o("div",{className:"h-full flex flex-1 flex-col bg-background",children:[o("div",{className:"h-full flex flex-1 overflow-hidden",children:[o("div",{className:"flex-1 relative",children:[ct&&!c&&t("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/50",children:t(O,{className:"h-8 w-8 animate-spin text-foreground"})}),c&&T&&b?t(zl,{versions:F??[],leftId:T,rightId:b,activeSide:N,annotations:V,seekRequest:Ee,onActiveSideChange:(e)=>de({cmpActive:e}),onSwitchVersion:(e,r)=>de(e==="left"?{cmpLeft:r}:{cmpRight:r}),onExit:wt,onActiveAssetChange:Le,onPlay:Ce,onTimeUpdate:G}):t(rs,{file:i,mediaControllerRef:p,onPlay:Ce,onTimeUpdate:G,annotations:V,startTime:k,children:_.show&&t(Me,{projectId:n,currentAssetId:a,parentFolderId:l,initialFiles:_.files,initialNextCursor:_.nextCursor})})]}),(!m||I&&!P)&&o(L,{children:[t(Ir,{onResize:(e)=>{Y((r)=>Math.max(300,Math.min(600,r-e)))},className:"hidden md:block"}),t("div",{style:{width:W},className:"flex-shrink-0 bg-background flex flex-col",children:I&&!P?t(Ei,{projectId:n,contextAssetId:a,file:K,currentTime:X,frameRate:K?.media?.metadata?.frameRate||30,startTimecode:K?.media?.metadata?.startTimecode,onTyping:()=>{if(c)return;p.current?.pause()},onSelectMessage:bt,selectedMessageId:he}):t(Ii,{teamId:f,projectId:n,file:K,onSaveField:je,members:_e,onCommentSelect:xt,currentTime:X,onTyping:()=>{if(c)return;p.current?.pause()},selectedCommentId:he,hideAnnotationControl:K?.proxyType==="audio"})})]})]}),t(ue,{open:re,onOpenChange:ee,children:t(ae,{children:o("form",{onSubmit:yt,children:[t(fe,{children:t(le,{children:Fo()})}),t("div",{className:"py-4",children:t(q,{ref:se,value:te,onChange:(e)=>be(e.target.value),placeholder:gd?.()||"Enter new name",onFocus:vt,autoFocus:!0})}),o(qe,{children:[t(E,{type:"button",variant:"outline",onClick:()=>ee(!1),children:De()}),o(E,{type:"submit",disabled:Fe||!te.trim(),children:[Fe&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),xo()]})]})]})})}),t(Je,{open:dt,onOpenChange:ce,children:o(Xe,{children:[o(et,{children:[t(rt,{children:zc?.()||"Delete Asset?"}),t(nt,{children:Uc?.()||"Deleted items can be recovered for 30 days before being permanently deleted."})]}),o(tt,{children:[t(st,{children:De()}),o(ot,{onClick:It,disabled:ke,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[ke&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),at()]})]})]})})]})}var Ne=ze("/projects/$projectId/files/$fileId")({component:At});export{Ne as Route};
|