@shumai-one/shumai 0.2.0 → 0.2.1
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-fcb14agg.js → chunk-044xt1se.js} +1 -1
- package/bin/chunk-0a5k9avd.js +4 -0
- package/bin/{chunk-xh2ntgmk.js → chunk-14fh4s1a.js} +2 -2
- package/bin/{chunk-y1xs4c5j.js → chunk-1ae8csk6.js} +1 -1
- package/bin/{chunk-yk3k5g5w.js → chunk-1w9dnk5p.js} +2 -2
- package/bin/chunk-211y81mp.js +1 -0
- package/bin/{chunk-twzgpwst.js → chunk-25d1g086.js} +2 -2
- package/bin/chunk-29pkpmvy.js +2 -0
- package/bin/{chunk-9rw65s3e.js → chunk-2djd6pq1.js} +2 -2
- package/bin/chunk-2dsmsa6a.js +3 -0
- package/bin/{chunk-08m8mzfa.js → chunk-2dz8nn9v.js} +1 -1
- package/bin/{chunk-mnv6pj0k.js → chunk-2xnys7v4.js} +2 -2
- package/bin/{chunk-a5kfa0k9.js → chunk-3rmc8nz6.js} +1 -1
- package/bin/{chunk-fwf8yne2.js → chunk-46c5xkmn.js} +2 -2
- package/bin/{chunk-axx5bh38.js → chunk-4fnak2zn.js} +2 -2
- package/bin/{chunk-gk7158n4.js → chunk-50ebjdkv.js} +2 -2
- package/bin/{chunk-29ectt6g.js → chunk-58aabg1f.js} +2 -2
- package/bin/{chunk-hb5v9ees.js → chunk-5j7axztv.js} +2 -2
- package/bin/chunk-5k03xpzq.js +6 -0
- package/bin/chunk-6724dtsx.js +2 -0
- package/bin/{chunk-q4f5vvtx.js → chunk-6h4ay2p8.js} +2 -2
- package/bin/chunk-6w5cn6p3.js +3 -0
- package/bin/{chunk-ps4h3387.js → chunk-75jka5v9.js} +2 -2
- package/bin/chunk-79n633wf.js +3 -0
- package/bin/chunk-7b17fb36.js +6 -0
- package/bin/{chunk-dypsm6m2.js → chunk-7h75r7ep.js} +1 -1
- package/bin/{chunk-pf8edn5x.js → chunk-7ktvhtp1.js} +2 -2
- package/bin/{chunk-6r9w7z15.js → chunk-7mnezagc.js} +2 -2
- package/bin/chunk-7we7ex0m.js +3 -0
- package/bin/{chunk-z42cyc20.js → chunk-82w2419d.js} +2 -2
- package/bin/chunk-861dz0bf.js +8 -0
- package/bin/chunk-891h8br6.js +3 -0
- package/bin/chunk-8abs8d48.js +12 -0
- package/bin/chunk-8qg47kj6.js +3 -0
- package/bin/{chunk-kbzm1pwx.js → chunk-976v5s8y.js} +1 -1
- package/bin/{chunk-8wv3kdz9.js → chunk-99db4j0k.js} +2 -2
- package/bin/{chunk-dgx2zxze.js → chunk-9bpjfkjf.js} +2 -2
- package/bin/chunk-9evm8x70.js +1 -0
- package/bin/{chunk-ec88pb09.js → chunk-9h3ds7rn.js} +2 -2
- package/bin/{chunk-ehfk24cf.js → chunk-9n783gva.js} +1 -1
- package/bin/chunk-a5s5ny4z.js +2 -0
- package/bin/{chunk-3rajscaz.js → chunk-ag35pxnb.js} +1 -1
- package/bin/{chunk-ajqsprm0.js → chunk-azfgjqjx.js} +2 -2
- package/bin/{chunk-s8d2045p.js → chunk-b9hb5jzt.js} +1 -1
- package/bin/chunk-bepnbw1g.js +2 -0
- package/bin/chunk-bg24g9kk.js +1 -0
- package/bin/{chunk-1fpqq6ed.js → chunk-c1v946wb.js} +2 -2
- package/bin/chunk-c45rh4hk.js +3 -0
- package/bin/{chunk-acxm86fh.js → chunk-cj5qwc9c.js} +1 -1
- package/bin/{chunk-j8q688sx.js → chunk-cpr05qng.js} +2 -2
- package/bin/chunk-d2vxmn9v.js +3 -0
- package/bin/chunk-dqtq9t8e.js +1 -0
- package/bin/{chunk-4kk5g619.js → chunk-dwf5e5g3.js} +2 -2
- package/bin/{chunk-w4y97tzy.js → chunk-dzm2f82x.js} +1 -1
- package/bin/chunk-e3c6hyz8.js +4 -0
- package/bin/chunk-fgnxtqtk.js +1 -0
- package/bin/chunk-fxvb6g2r.js +1 -0
- package/bin/{chunk-7ddaxdpf.js → chunk-ga0drqj7.js} +1 -1
- package/bin/{chunk-n5hfy93f.js → chunk-ga3mh3cd.js} +3 -3
- package/bin/chunk-gd5xwgp6.js +2 -0
- package/bin/chunk-hcz4snm7.js +8 -0
- package/bin/{chunk-dyybbn07.js → chunk-hmsb7ehr.js} +1 -1
- package/bin/{chunk-49ej1y67.js → chunk-hqptebzb.js} +2 -2
- package/bin/{chunk-mv79zk8q.js → chunk-hy50c4pw.js} +3 -3
- package/bin/chunk-jbde7evp.js +8 -0
- package/bin/{chunk-mjan6b09.js → chunk-jfjcxyhf.js} +3 -3
- package/bin/{chunk-hdk93ghf.js → chunk-jyjnt0s9.js} +2 -2
- package/bin/chunk-k1r17nfa.js +7 -0
- package/bin/{chunk-3qdn3pty.js → chunk-k5bekrrp.js} +1 -1
- package/bin/{chunk-3x62t1m0.js → chunk-kj751zje.js} +1 -1
- package/bin/chunk-kjkmh26f.js +1 -0
- package/bin/{chunk-m7jfszqt.js → chunk-m11g9hx7.js} +2 -2
- package/bin/{chunk-e5833tbd.js → chunk-m3dwydr3.js} +2 -2
- package/bin/{chunk-5a2maxwp.js → chunk-mg6fce5x.js} +2 -2
- package/bin/{chunk-xpqcvxej.js → chunk-mjncyjwf.js} +1 -1
- package/bin/{chunk-33ee1cvv.js → chunk-mk1jewvw.js} +2 -2
- package/bin/{chunk-gdm6y33a.js → chunk-mv8c5fky.js} +1 -1
- package/bin/chunk-mwh2n8yt.js +3 -0
- package/bin/{chunk-ysq64j13.js → chunk-n4meg9wb.js} +1 -1
- package/bin/{chunk-k5w64spz.js → chunk-nceqrqey.js} +2 -2
- package/bin/{chunk-wv4fe1fj.js → chunk-ngd23mtc.js} +2 -2
- package/bin/{chunk-m54p1cvp.js → chunk-p3emandj.js} +2 -2
- package/bin/{chunk-1wq9hjjr.js → chunk-phw4ne8b.js} +1 -1
- package/bin/{chunk-22dje1f5.js → chunk-pmx9760x.js} +1 -1
- package/bin/chunk-pv76qkym.js +2 -0
- package/bin/{chunk-d1ka11hc.js → chunk-pvy0gccg.js} +1 -1
- package/bin/chunk-pxw97qbq.js +3 -0
- package/bin/chunk-q09dfja5.js +3 -0
- package/bin/chunk-q72ax3m8.js +12 -0
- package/bin/{chunk-zsdwska1.js → chunk-q9sgjs4d.js} +1 -1
- package/bin/chunk-qag3w2dd.js +3 -0
- package/bin/{chunk-2cmg5sfn.js → chunk-qf7n519d.js} +2 -2
- package/bin/{chunk-3n1k9qt5.js → chunk-qj2kpkje.js} +1 -1
- package/bin/{chunk-cp18trqb.js → chunk-qjjr3fff.js} +2 -2
- package/bin/{chunk-fwe9g818.js → chunk-s1n39qte.js} +1 -1
- package/bin/chunk-s2725w64.js +1 -0
- package/bin/{chunk-09wp20mv.js → chunk-saq5797j.js} +1 -1
- package/bin/{chunk-d2y3rbjm.js → chunk-sp75qe28.js} +1 -1
- package/bin/{chunk-4hnrd4qh.js → chunk-sy8rqacm.js} +1 -1
- package/bin/{chunk-6mn3jqm9.js → chunk-t1mxqskx.js} +2 -2
- package/bin/chunk-t84t3v6q.js +1 -0
- package/bin/{chunk-eadb78m8.js → chunk-ta7bfdrn.js} +1 -1
- package/bin/{chunk-2s5a64nr.js → chunk-ttsqdsxr.js} +2 -2
- package/bin/chunk-v05d1aeq.js +2 -0
- package/bin/{chunk-yhj8c5re.js → chunk-v3j7acwn.js} +2 -2
- package/bin/{chunk-kpy0kpna.js → chunk-v98yavtp.js} +2 -2
- package/bin/chunk-vreq89j6.js +1 -0
- package/bin/{chunk-pqm0g14r.js → chunk-w1d5vmtc.js} +2 -2
- package/bin/chunk-w88219ex.js +3 -0
- package/bin/{chunk-vgvmt2m1.js → chunk-wbhsmhgp.js} +2 -2
- package/bin/{chunk-nwtb6dt1.js → chunk-wf4d1anc.js} +5 -5
- package/bin/{chunk-frm7vz6v.js → chunk-wfex9jw0.js} +2 -2
- package/bin/chunk-x9q2vzn8.js +7 -0
- package/bin/chunk-xv4mfppt.js +2 -0
- package/bin/{chunk-r3n9zpfw.js → chunk-y4s3xr4n.js} +2 -2
- package/bin/{chunk-9n0etqsy.js → chunk-ydagqpny.js} +1 -1
- package/bin/{chunk-aakzq0w1.js → chunk-ymyyap80.js} +1 -1
- package/bin/{chunk-5tmf3c0g.js → chunk-zn9jbc6t.js} +2 -2
- package/bin/{chunk-3rt9mnj3.js → chunk-ztmj61z9.js} +1 -1
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +248 -247
- package/package.json +7 -7
- package/prisma/migrations/20260722022359_add_skill_permission/migration.sql +2 -0
- package/prisma/schema.prisma +1 -0
- package/bin/chunk-0at8vxt5.js +0 -3
- package/bin/chunk-0zv7f9ca.js +0 -2
- package/bin/chunk-2k4vp654.js +0 -2
- package/bin/chunk-2tbya52d.js +0 -2
- package/bin/chunk-2vs3evc7.js +0 -14
- package/bin/chunk-33169en9.js +0 -8
- package/bin/chunk-3m39v371.js +0 -1
- package/bin/chunk-6c4c7t0n.js +0 -1
- package/bin/chunk-6frqqxkv.js +0 -1
- package/bin/chunk-7rhjej0x.js +0 -3
- package/bin/chunk-7wvgtw25.js +0 -3
- package/bin/chunk-8s0ae37g.js +0 -1
- package/bin/chunk-94h8644q.js +0 -2
- package/bin/chunk-ac2ky3q0.js +0 -12
- package/bin/chunk-cthpdt54.js +0 -11
- package/bin/chunk-d0earxhc.js +0 -4
- package/bin/chunk-d0n8nxp3.js +0 -3
- package/bin/chunk-d22pyc5n.js +0 -1
- package/bin/chunk-dmgjse02.js +0 -4
- package/bin/chunk-g7wrxnmd.js +0 -1
- package/bin/chunk-jrvrg4fx.js +0 -1
- package/bin/chunk-k712q1zj.js +0 -2
- package/bin/chunk-kef0rnwn.js +0 -1
- package/bin/chunk-n296vcfw.js +0 -3
- package/bin/chunk-n6jgyv4y.js +0 -3
- package/bin/chunk-nar4s9v9.js +0 -3
- package/bin/chunk-nn8e9j7c.js +0 -1
- package/bin/chunk-qqesrgjk.js +0 -7
- package/bin/chunk-qz9xht6d.js +0 -2
- package/bin/chunk-symna5cj.js +0 -1
- package/bin/chunk-w4t9n9te.js +0 -6
- package/bin/chunk-z14hh99h.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ya as lz}from"./chunk-m3dwydr3.js";import{Za as a}from"./chunk-mjncyjwf.js";import{$a as Dz,_a as yz,ab as bz,bb as Cz,cb as fz,db as Iz,eb as gz,fb as uz}from"./chunk-sy8rqacm.js";import{Ng as hz}from"./chunk-cpr05qng.js";import{Og as c}from"./chunk-dwf5e5g3.js";import{$j as wz,Ch as Bz,Dh as zz,Fh as Wz,Fj as _z,Gh as $z,Hj as E,Ij as Sz,Jj as Mz,Kj as vz,Lj as b,Nj as C,Oj as f,Pj as M,Qi as Zz,Rg as Xz,Rh as Tz,Sg as N,Tg as z,Ug as J,Vg as x,Xg as Vz,Yg as Oz,Yh as i,Zg as k,Zj as V,ak as n,bk as Rz,ck as Kz,dh as m,dk as kz,ek as qz,fj as Gz,fk as Az,gk as Ez,ih as Pz,mj as Lz,sh as Yz,uh as X,vh as Jz,wh as Uz}from"./chunk-wf4d1anc.js";import{Pk as Qz}from"./chunk-976v5s8y.js";var K=Qz(Xz(),1);function Fz({open:Z,onOpenChange:$,mode:T,teamId:F,project:W}){let q=x(),R=m(),[H,O]=K.useState(""),[v,B]=K.useState(!0),[I,P]=K.useState(void 0),[h,U]=K.useState(void 0),[A,w]=K.useState(!1),S=K.useRef(null);K.useEffect(()=>{if(Z)if(T==="edit"&&W)O(W.name||""),P(W.coverImageKey),U(W.coverImage),B(W.enableNotification!==!1);else O(""),P(void 0),U(void 0),B(!0)},[Z,T,W]);let g=X.api.teams[":teamId"].projects.$post,{mutate:j}=k({mutationFn:async(Q)=>{let _=await g({param:{teamId:F},json:Q});if(!_.ok)throw Error(V.failed_create_project());return await _.json()},onSuccess:(Q)=>{q.invalidateQueries({queryKey:["teams",F,"projects"]}),$(!1);let _=Q;if(_&&typeof _.id==="string")R({to:"/projects/$projectId",params:{projectId:_.id}})}}),u=X.api.projects[":projectId"].$put,{mutate:y}=k({mutationFn:async(Q)=>{let _=await u({param:{projectId:W.id},json:Q});if(!_.ok)throw Error(V.failed_update_project());return await _.json()},onSuccess:()=>{q.invalidateQueries({queryKey:["teams",F,"projects"]}),$(!1)}}),r=X.api.teams[":teamId"].files.$post,{mutate:D}=k({mutationFn:async({file:Q})=>{let _=await r({param:{teamId:F},form:{file:Q}});if(!_.ok)throw Error(V.failed_upload_file());return await _.json()},onSuccess:(Q)=>{let _=Q;if(_&&typeof _.key==="string")P(_.key);w(!1)},onError:()=>{w(!1)}}),o=(Q)=>{let _=Q.target.files?.[0];if(_){w(!0);let e=URL.createObjectURL(_);U(e),D({file:_})}},t=()=>{S.current?.click()},s=(Q)=>{Q.stopPropagation(),P(void 0),U(void 0)},l=()=>{if(!H.trim())return;if(T==="create")j({name:H.trim(),coverImageKey:I,enableNotification:v});else if(T==="edit"&&W?.id)y({name:H.trim(),coverImageKey:I,enableNotification:v})};return z(Rz,{open:Z,onOpenChange:$,children:J(Kz,{className:"sm:max-w-[550px] overflow-hidden rounded-2xl border border-border/60 bg-background/95 backdrop-blur-md shadow-2xl p-0 gap-0",children:[J(kz,{className:"relative overflow-hidden bg-gradient-to-br from-primary/5 to-transparent p-6 border-b border-border/40",children:[z("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/10 rounded-full blur-2xl pointer-events-none"}),z("div",{className:"absolute bottom-0 left-10 w-32 h-12 bg-primary/5 rounded-full blur-xl pointer-events-none"}),z("div",{className:"flex items-center gap-3",children:J("div",{children:[z(Az,{className:"text-xl font-semibold tracking-tight text-foreground",children:T==="create"?V.create_new_project():V.project_settings()}),z(Ez,{className:"text-xs text-muted-foreground/80 mt-1",children:T==="create"?V.configure_new_project_description():V.manage_project_description()})]})})]}),J("div",{className:"space-y-6 p-6 max-h-[75vh] overflow-y-auto",children:[J("div",{className:"space-y-2",children:[z(c,{htmlFor:"name",className:"text-sm font-semibold tracking-tight text-foreground",children:V.project_name()}),J("div",{className:"relative",children:[z(n,{id:"name",value:H,onChange:(Q)=>O(Q.target.value),placeholder:V.project_name_placeholder(),className:"h-11 px-4 rounded-xl border-border/80 focus-visible:ring-ring/25 focus-visible:border-primary transition-all shadow-xs pr-10"}),H.trim()&&z("div",{className:"absolute inset-y-0 right-3 flex items-center",children:z(i,{className:"w-4 h-4 text-primary"})})]}),z("p",{className:"text-[11px] text-muted-foreground",children:V.project_name_hint()})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J("div",{className:"flex items-center justify-between",children:[J(c,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z($z,{className:"w-4 h-4 text-primary"}),V.project_cover()]}),h&&J("button",{type:"button",onClick:s,className:"text-xs text-muted-foreground hover:text-destructive hover:bg-destructive/5 px-2.5 py-1 rounded-lg transition-all flex items-center gap-1 font-medium",children:[z(Lz,{className:"w-3.5 h-3.5"}),V.remove_cover()]})]}),J("div",{className:"relative aspect-square w-48 mx-auto rounded-2xl border border-dashed border-border flex items-center justify-center cursor-pointer overflow-hidden group shadow-inner bg-muted/20 transition-all duration-300 hover:border-primary/50 hover:bg-muted/40",onClick:t,children:[z("input",{type:"file",ref:S,className:"hidden",accept:"image/*",onChange:o}),A&&z("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-xs flex flex-col items-center justify-center gap-2 z-20",children:J("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-background border rounded-full shadow-lg",children:[z(zz,{className:"w-4 h-4 animate-spin text-primary"}),z("span",{className:"text-xs font-semibold text-foreground",children:V.uploading()})]})}),h?J(N,{children:[z("img",{src:h,alt:V.cover_preview(),className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),J("div",{className:"absolute inset-0 bg-black/45 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col items-center justify-center gap-1.5 text-white z-10",children:[z(Gz,{className:"w-5 h-5 transform translate-y-1 group-hover:translate-y-0 transition-transform duration-300"}),z("span",{className:"text-xs font-semibold",children:V.upload_image()})]})]}):J("div",{className:"flex flex-col items-center gap-2 text-center p-4",children:[z("div",{className:"p-2.5 rounded-full bg-background border shadow-xs group-hover:scale-110 transition-transform duration-300",children:z(Gz,{className:"w-4 h-4 text-muted-foreground"})}),J("div",{children:[z("p",{className:"text-xs font-medium text-foreground",children:V.upload_cover()}),z("p",{className:"text-[11px] text-muted-foreground mt-0.5 max-w-[140px] mx-auto leading-normal",children:V.upload_cover_hint()})]})]})]})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J(c,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z(Wz,{className:"w-4 h-4 text-primary"}),V.project_preferences()]}),J("div",{className:"flex items-start justify-between rounded-xl border border-border/50 bg-muted/10 p-4 transition-all duration-300 hover:bg-muted/20",children:[J("div",{className:"space-y-1 pr-4",children:[J("div",{className:"text-sm font-semibold flex items-center gap-2 text-foreground",children:[z(Tz,{className:"w-4 h-4 text-primary"}),V.activity_notifications()]}),z("p",{className:"text-xs text-muted-foreground leading-normal",children:V.activity_notifications_description()})]}),z(a,{checked:v,onCheckedChange:B,disabled:A,className:"mt-0.5"})]})]})]}),J(qz,{className:"flex items-center justify-end gap-3 px-6 py-4 bg-muted/20 border-t border-border/40",children:[z(E,{type:"button",variant:"ghost",onClick:()=>$(!1),disabled:A,className:"rounded-xl h-10 px-4 hover:bg-muted font-medium text-sm text-muted-foreground hover:text-foreground transition-colors",children:V.cancel()}),z(E,{type:"submit",onClick:l,disabled:!H.trim()||A,className:"rounded-xl h-10 px-5 bg-primary text-primary-foreground hover:bg-primary/90 font-semibold text-sm shadow-lg shadow-primary/10 hover:shadow-primary/20 active:scale-98 transition-all flex items-center gap-2",children:A?J(N,{children:[z(zz,{className:"w-4 h-4 animate-spin"}),V.processing()]}):T==="create"?V.create_project():V.save_changes()})]})]})})}function Nz({sortBy:Z,sortDirection:$,onSortChange:T}){let F=(H)=>{T(H,$)},W=()=>{T(Z,$==="asc"?"desc":"asc")},q=(H)=>{switch(H){case"name":return V.sort_name();case"created_at":return V.sort_created();case"updated_at":return V.sort_updated();default:return H}},R=$==="asc";return J(b,{children:[z(C,{asChild:!0,children:J(E,{variant:"outline",className:"gap-2 bg-muted/50",children:[z("span",{className:"text-muted-foreground",children:V.sorted_by_label()}),z("span",{className:"font-medium text-foreground",children:q(Z)})]})}),J(f,{align:"end",className:"w-56 p-2",children:[z("div",{className:"text-xs font-semibold text-muted-foreground mb-2 px-2",children:V.sort_by()}),J(b,{children:[z(C,{asChild:!0,children:J(E,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted mb-2 border",children:[z("span",{children:q(Z)}),z(Jz,{className:"h-4 w-4 opacity-50"})]})}),z(f,{className:"w-52",children:["name","created_at","updated_at"].map((H)=>J(M,{onClick:()=>F(H),className:"justify-between",children:[q(H),Z===H&&z(i,{className:"h-4 w-4"})]},H))})]}),J(E,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted border",onClick:W,children:[z("span",{className:"text-muted-foreground",children:Z==="name"?R?z(N,{children:V.sort_a_to_z()}):z(N,{children:V.sort_z_to_a()}):R?z(N,{children:V.sort_oldest_to_newest()}):z(N,{children:V.sort_newest_to_oldest()})}),R?z(Uz,{className:"h-4 w-4 opacity-50"}):z(Jz,{className:"h-4 w-4 opacity-50"})]})]})]})}var L=Qz(Xz(),1);function tz(){let{teamId:Z}=sz.useParams(),{canEdit:$,canAdmin:T}=wz(),F=m(),W=x(),[q,R]=L.useState(null),[H,O]=L.useState(!1),[v,B]=L.useState("create"),[I,P]=L.useState(void 0),[h,U]=L.useState(!1),[A,w]=L.useState(void 0),[S,g]=L.useState(""),[j,u]=L.useState(!1),[y,r]=L.useState("name"),[D,o]=L.useState("asc"),t=X.api.teams[":teamId"].projects.$get,{data:s}=Oz({queryKey:["teams",Z,"projects",y,D],queryFn:async()=>{let G=await t({param:{teamId:Z},query:{sortBy:y,sortDirection:D}});if(!G.ok)throw Error("Failed to fetch projects");return await G.json()}}),{data:l}=Vz({queryKey:["teams",Z,"members"],queryFn:async()=>{let G=await X.api.teams[":teamId"].members.$get({param:{teamId:Z},query:{}});if(!G.ok)throw Error("Failed to fetch members");return await G.json()}}),{data:Q}=Vz({queryKey:["teams",Z,"me"],queryFn:async()=>{let G=await X.api.teams[":teamId"].me.$get({param:{teamId:Z}});if(!G.ok)throw Error("Failed to fetch me");return await G.json()}}),_=X.api.teams[":teamId"].invite.$post,e=k({mutationFn:async(G)=>{let Y=await _(G);if(!Y.ok)throw Error("Failed to invite");return await Y.json()}}),d=k({mutationFn:async(G)=>{if(!(await X.api.projects[":projectId"].$delete({param:{projectId:G}})).ok)throw Error("Failed to delete project")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]})}}),dz=k({mutationFn:async(G)=>{let Y=await X.api.projects[":projectId"].$put({param:{projectId:G.id},json:{enableNotification:!G.enableNotification}});if(!Y.ok)throw Error("Failed to update project notification settings");return await Y.json()},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]}),Yz.success(V.project_notification_updated())},onError:(G)=>{Yz.error(G instanceof Error?G.message:V.failed_update_project_notification())}}),Hz=()=>{B("create"),P(void 0),O(!0)},pz=()=>{R("create"),setTimeout(()=>{R(null)},100),setTimeout(()=>{Hz()},200)},cz=(G)=>{B("edit"),P(G),O(!0)},xz=(G)=>{w(G),g(""),U(!0)},mz=async()=>{if(A&&S==="delete")try{await d.mutateAsync(A.id),U(!1)}catch(G){console.error(G)}},iz=(G,Y)=>{if(Y.detail>1)return;R(G),setTimeout(()=>{R(null)},100),setTimeout(()=>{F({to:"/projects/$projectId",params:{projectId:G}})},200)},nz=async(G)=>{return(await e.mutateAsync({param:{teamId:Z},json:{role:G}})).code},az=k({mutationFn:async({userId:G,role:Y})=>{if(!(await X.api.teams[":teamId"].members[":userId"].$patch({param:{teamId:Z,userId:G},json:{role:Y}})).ok)throw Error("Failed to update member role")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),jz=k({mutationFn:async(G)=>{if(!(await X.api.teams[":teamId"].members[":userId"].$delete({param:{teamId:Z,userId:G}})).ok)throw Error("Failed to remove member")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),rz=(G)=>{if(!G)return"??";return G.split(" ").map((Y)=>Y[0]).slice(0,2).join("").toUpperCase()},oz=(G,Y)=>{r(G),o(Y)},p=Array.isArray(l)?l:[];return J("div",{className:"flex-1 overflow-y-auto p-4",children:[J("div",{className:"flex flex-wrap items-center justify-between mb-4 gap-4",children:[z("h1",{className:"text-2xl font-bold",children:V.projects()}),J("div",{className:"flex flex-wrap items-center gap-4",children:[J("div",{className:"flex items-center -space-x-2 cursor-pointer hover:opacity-90",onClick:()=>u(!0),children:[p.slice(0,3).map((G)=>J(Sz,{className:"border-2 border-background w-8 h-8",children:[G.image&&z(Mz,{src:G.image,alt:G.name,className:"object-cover"}),z(vz,{className:"text-[10px]",children:rz(G.name)})]},G.id)),p.length>3&&J("div",{className:"flex items-center justify-center w-8 h-8 rounded-full border-2 border-background bg-muted text-[10px] font-medium",children:["+",p.length-3]})]}),z(Nz,{sortBy:y,sortDirection:D,onSortChange:oz}),$&&J(E,{className:"bg-orange-600 hover:bg-orange-700 text-white gap-2",onClick:Hz,children:[z(Zz,{className:"w-4 h-4"}),V.create_project()]})]})]}),J("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4",children:[s.data?.map((G)=>z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out",q===G.id?"scale-95":"scale-100"),onClick:(Y)=>iz(G.id,Y),children:J("div",{className:"flex flex-col",children:[J("div",{className:"relative w-full h-full aspect-square flex items-center justify-center bg-zinc-400/20",children:[G.coverImage?z("img",{src:G.coverImage,alt:G.name,className:"w-full h-full object-cover rounded"}):J("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 180.95 164.7",preserveAspectRatio:"xMidYMid slice",className:"w-full h-full object-cover rounded",children:[z("polygon",{fill:"#FC9F8E",points:"0 18.5 0 76.0 151.69 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FEBAB8",points:"0 0 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0"}),z("polyline",{fill:"#FAA5A5",points:"0 18.5 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0 0 0"}),z("polygon",{fill:"#EC5B6C",points:"0 76.0 0 164.7 151.69 164.7"}),z("polygon",{fill:"#E85C71",points:"180.95 18.9 110.33 63.9 117.37 68.0 117.26 73.4 180.95 113.6"}),z("polygon",{fill:"#C8405B",points:"117.26 73.4 117.37 99.0 90.53 114.9 174.35 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FFCCBE",points:"90.53 51.6 63.69 68.1 90.53 83.4"}),z("path",{fill:"#FB9991",d:"M 90.53 51.6 L 90.53 61.3 L 100.87 67.4 L 90.53 73.5 L 90.53 83.4 L 117.37 68.0 C 117.15 67.6 90.53 51.6 90.53 51.6 Z"}),z("path",{fill:"#FFEACD",d:"M 63.69 68.1 C 63.47 68.5 64.02 99.3 64.02 99.3 C 64.02 99.3 64.46 99.6 64.9 99.9 L 90.53 83.4 L 63.69 68.1 Z"}),z("polygon",{fill:"#FFCFB5",points:"64.02 99.3 90.53 114.9 90.53 83.4"}),z("path",{fill:"#F67D73",d:"M 90.53 83.4 L 90.53 114.9 L 117.37 99.0 Z"}),z("path",{fill:"#F26560",d:"M 90.53 83.4 L 117.37 99.0 L 117.37 68.0 Z"}),z("polygon",{fill:"#EB5F5B",points:"80.08 67.5 90.53 73.5 90.53 61.3"}),z("polygon",{fill:"#DB4D50",points:"90.53 61.3 90.53 73.5 100.87 67.4"})]}),z("div",{className:"absolute bottom-0 left-0 w-full h-[65%] bg-linear-to-t from-black/35 to-black/0"}),z("p",{className:"absolute left-1 bottom-2 text-white",children:G.name})]}),J("div",{className:"px-2 h-10 flex justify-between items-center",children:[J("p",{className:"truncate pr-1 text-xs text-muted-foreground",children:[V.updated_ago()," ",hz(G.updatedAt??"")]}),z("div",{onClick:(Y)=>Y.stopPropagation(),children:J(b,{modal:!1,children:[z(C,{asChild:!0,children:z("button",{className:"hover:bg-muted outline-none flex px-1",children:z(Bz,{className:"w-5 h-5 text-muted-foreground"})})}),J(f,{align:"end",children:[$&&z(M,{onClick:(Y)=>{Y.stopPropagation(),cz(G)},children:V.project_settings()}),J(M,{className:"flex items-center justify-between gap-4 cursor-pointer",onSelect:(Y)=>{Y.preventDefault(),dz.mutate(G)},children:[z("span",{children:V.notification()}),z(a,{checked:G.enableNotification??!0,className:"pointer-events-none"})]}),T&&z(M,{className:"text-destructive focus:text-destructive",onClick:()=>xz(G),children:V.delete()})]})]})})]})]})},G.id)),$&&z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out border-dashed hover:border-orange-600/50 group",q==="create"?"scale-95":"scale-100"),onClick:pz,children:J("div",{className:"flex flex-col",children:[z("div",{className:"relative w-full aspect-square flex items-center justify-center bg-zinc-400/5 group-hover:bg-orange-600/5 transition-colors",children:z(Zz,{className:"w-8 h-8 text-zinc-400 group-hover:text-orange-600 transition-colors"})}),z("div",{className:"px-2 h-10 flex items-center justify-center bg-zinc-400/10 border-t group-hover:bg-orange-600/10 transition-colors",children:z("p",{className:"text-sm text-muted-foreground group-hover:text-orange-600 transition-colors",children:V.create_project()})})]})})]}),z(Fz,{open:H,onOpenChange:O,mode:v,teamId:Z,project:I}),z(yz,{open:h,onOpenChange:U,children:J(Dz,{children:[J(bz,{children:[z(fz,{children:V.are_you_sure()}),J(Iz,{children:[V.delete_project_warning({name:A?.name??""}),J("div",{className:"mt-4 flex flex-col gap-2 text-foreground",children:[z("span",{className:"text-sm font-medium",children:V.type_delete_to_confirm()}),z(n,{value:S,onChange:(G)=>g(G.target.value),placeholder:V.delete_placeholder(),className:"h-9",autoFocus:!0})]})]})]}),J(Cz,{children:[z(uz,{disabled:d.isPending,children:V.cancel()}),z(gz,{onClick:(G)=>{G.preventDefault(),mz()},disabled:S!=="delete"||d.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:d.isPending?V.deleting():V.delete()})]})]})}),z(lz,{open:j,onOpenChange:u,title:V.team_members(),type:"team",members:p,isOwner:Q?.role==="owner",onInvite:nz,onUpdateRole:async(G,Y)=>{await az.mutateAsync({userId:G,role:Y})},onRemoveMember:async(G)=>{await jz.mutateAsync(G)},currentUserId:Q?.id})]})}var sz=Pz("/teams/$teamId/")({component:tz});export{sz as Route};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{l as
|
|
1
|
+
import{Fj as o,Tg as a}from"./chunk-wf4d1anc.js";function l({className:t,...e}){return a("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:a("table",{"data-slot":"table",className:o("w-full caption-bottom text-sm",t),...e})})}function n({className:t,...e}){return a("thead",{"data-slot":"table-header",className:o("[&_tr]:border-b",t),...e})}function c({className:t,...e}){return a("tbody",{"data-slot":"table-body",className:o("[&_tr:last-child]:border-0",t),...e})}function d({className:t,...e}){return a("tr",{"data-slot":"table-row",className:o("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),...e})}function s({className:t,...e}){return a("th",{"data-slot":"table-head",className:o("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}function b({className:t,...e}){return a("td",{"data-slot":"table-cell",className:o("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}
|
|
2
|
+
export{l as a,n as b,c,d,s as e,b as f};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function V(q){if(!(q instanceof Error))return{message:F(q),messageCarriesBody:!1};let w=q,A=I(w),D=K(w),H=D===void 0||q.message.includes(D);return{status:A,body:D,message:q.message,messageCarriesBody:H}}function I(q){if(typeof q.statusCode==="number")return q.statusCode;if(typeof q.status==="number")return q.status;if(typeof q.$metadata?.httpStatusCode==="number")return q.$metadata.httpStatusCode;if(typeof q.$response?.statusCode==="number")return q.$response.statusCode;return}function K(q){let w=P(q);if(w===void 0)return;let A=w.trim();if(A.length===0)return;return Q(A,4000)}function P(q){if(typeof q.body==="string")return q.body;if(G(q.error))return F(q.error);let w=q.$response?.body;if(typeof w==="string")return w;if(G(w))return F(w);return}function G(q){return typeof q==="object"&&q!==null&&Object.keys(q).length>0}function W(q,w){if(q.messageCarriesBody||q.status===void 0||q.body===void 0)return w!==void 0&&q.status!==void 0?`${w} (${q.status}): ${q.message}`:q.message;return w!==void 0?`${w} (${q.status}): ${q.body}`:`${q.status}: ${q.body}`}function Q(q,w){if(q.length<=w)return q;return`${q.slice(0,w)}... [truncated ${q.length-w} chars]`}function F(q){try{let w=JSON.stringify(q);return w===void 0?String(q):w}catch{return String(q)}}
|
|
3
|
+
export{V as ec,W as fc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{HJ as
|
|
1
|
+
import{k as RG}from"./chunk-ttsqdsxr.js";import{l as DG,m as PG}from"./chunk-hqptebzb.js";import{s as wG}from"./chunk-9bpjfkjf.js";import{t as NG}from"./chunk-75jka5v9.js";import{B as OG,O as MG}from"./chunk-4fnak2zn.js";import{fa as kG}from"./chunk-mk1jewvw.js";import{Da as k,Fa as QG,Ga as UG,Ha as EG,Qa as LG,Ta as qG,Va as c}from"./chunk-v98yavtp.js";import{yf as zG}from"./chunk-7mnezagc.js";import{hg as KG,ig as n}from"./chunk-99db4j0k.js";import{pg as WG}from"./chunk-2xnys7v4.js";import{$j as TG,Fj as $G,Rg as $J,Sg as p,Tg as Z,Ug as W,Vg as AG,Xg as m,Zg as BG,Zj as HG,_g as I,dh as VG,uh as $}from"./chunk-wf4d1anc.js";import{Pk as VJ}from"./chunk-976v5s8y.js";var Y=VJ($J(),1);function HJ({teamId:_,projectId:X,projectName:P,assetId:A,rootFolderId:M,collection:z,onUpdateCollection:vG}){let N=VG(),o=AG(),{canEdit:xG}=TG(X),{setFields:r}=OG(),yG=$.api.files[":fileId"].metadata.$patch,{mutate:bG}=BG({mutationFn:async(G)=>{if(!(await yG(G)).ok)throw Error("Failed to patch metadata");return null}}),{data:v}=m({queryKey:["fields",X],queryFn:async()=>{let G=await $.api.projects[":projectId"].fields.$get({param:{projectId:X}});if(!G.ok)throw Error("Failed to fetch fields");return await G.json()},enabled:!!X});Y.useEffect(()=>{if(v)r(v,X)},[v,X,r]);let B=A==="recently-deleted",[CG,x]=Y.useState(null),[H,w]=Y.useState(new Set),[y,l]=Y.useState(null),[hG,FG]=Y.useState(240),[gG,uG]=Y.useState(360),{isChatbotOpen:b}=n(),{members:fG,fetchMembers:i}=MG(),{metadata:jG,fetchMetadata:a,setMetadata:SG}=zG();Y.useEffect(()=>{if(_)i(_),a(_)},[_,i,a]);let C=Y.useMemo(()=>{return z?.filter?.searchFilter?.conditions||[]},[z]),[O,h]=Y.useState(C);Y.useEffect(()=>{h(C)},[C]);let d=`project:${X}:sort`,Q=jG[d]||{field:"custom",order:"asc"},pG=(G)=>{if(G)SG(_,d,G)},K=!!z,F=O.length>0||K,{fileListLeftSidebarCollapsed:s,setFileListLeftSidebarCollapsed:mG,fileListRightSidebarCollapsed:t,setFileListRightSidebarCollapsed:IG,viewModes:nG}=WG(),e=nG[X]??"card",cG=Y.useRef(null),{data:R}=B?{data:void 0}:m({queryKey:["folders",A],queryFn:async()=>{let G=await $.api.folders[":folderId"].$get({param:{folderId:A}});if(!G.ok)throw Error("failed to fetch folder");return await G.json()}}),{setProjectState:GG,clearProjectState:JG}=KG();Y.useEffect(()=>{return GG({teamId:_,projectId:X,projectName:P,ancestorFolders:R?.ancestorFolders??[],currentAsset:B?{name:"Recently Deleted",type:"folder"}:K?{name:z.name,type:"folder"}:{name:R?.name,type:"folder"},isRootFolder:!B&&!K&&A===M,onFolderClick:(G)=>{N({to:"/projects/$projectId/folders/$folderId",params:{projectId:X,folderId:G}})}}),()=>JG()},[_,X,P,R,B,A,M,GG,JG,N]);let{data:g,fetchNextPage:oG,hasNextPage:rG,isFetchingNextPage:lG}=I({queryKey:B?["projects",X,"recently-deleted","folder"]:["search",_,A,"folder",O,Q,K],queryFn:async({pageParam:G})=>{if(B||K){if(B){let V=await $.api.projects[":projectId"]["recently-deleted"].$get({param:{projectId:X},query:{assetType:"folder",after:G}});if(!V.ok)throw Error("failed to fetch recently deleted folders");return await V.json()}return{data:[],pageInfo:{total:0}}}if(F)return{data:[],pageInfo:{total:0}};let J=await $.api.folders[":folderId"].search.$post({param:{folderId:A},json:{assetType:"folder",after:G,recursively:!1,sort:Q,conditions:[]}});if(!J.ok)throw Error("failed to search folders");return await J.json()},enabled:!F,initialPageParam:"",getNextPageParam:(G)=>{return G.pageInfo?.cursor||void 0}}),{data:u,fetchNextPage:iG,hasNextPage:aG,isFetchingNextPage:dG}=I({queryKey:B?["projects",X,"recently-deleted","file"]:["search",_,A,"file",O,Q,K],queryFn:async({pageParam:G})=>{if(B){let V=await $.api.projects[":projectId"]["recently-deleted"].$get({param:{projectId:X},query:{assetType:"file",after:G}});if(!V.ok)throw Error("failed to fetch recently deleted files");return await V.json()}let J=await $.api.folders[":folderId"].search.$post({param:{folderId:A},json:{assetType:"file",after:G,recursively:F||K,conditions:O,sort:Q}});if(!J.ok)throw Error("failed to search files");return await J.json()},initialPageParam:"",getNextPageParam:(G)=>{return G.pageInfo?.cursor||void 0}}),D=g?.pages.flatMap((G)=>G.data??[])??[],T=u?.pages.flatMap((G)=>G.data??[])??[],sG=g?.pages[0]?.pageInfo?.total,tG=u?.pages[0]?.pageInfo?.total,eG=g?.pages[0]?.pageInfo?.totalSize,GJ=u?.pages[0]?.pageInfo?.totalSize,XG=()=>{w(new Set),x(null),l(null)},{dragState:U,handleDragStart:JJ,handleDragEnd:XJ}=PG({teamId:_,projectId:X,assetId:A,folders:D,files:T,selectedIds:H,onClearSelection:XG}),f=Y.useMemo(()=>{if(H.size!==1)return null;let G=Array.from(H)[0];return T.find((V)=>V.id===G)||null},[H,T]),YJ=(G)=>{if(B)return;if(G.type==="folder")h([]),N({to:"/projects/$projectId/folders/$folderId",params:{projectId:X,folderId:G.id}});else N({to:"/projects/$projectId/files/$fileId",params:{projectId:X,fileId:G.versionStack?G.versionStack.id:G.id},search:{version:void 0}})},ZJ=(G,J)=>{let V=J.metaKey||J.ctrlKey;if(J.shiftKey&&y){let ZG=[...D,...T].find((L)=>L.id===y);if(ZG)if(ZG.type===G.type){let L=G.type==="folder"?D:T,j=L.findIndex((q)=>q.id===y),S=L.findIndex((q)=>q.id===G.id);if(j!==-1&&S!==-1){let q=Math.min(j,S),_J=Math.max(j,S),AJ=L.slice(q,_J+1),_G=new Set(H);AJ.forEach((BJ)=>{_G.add(BJ.id)}),w(_G),x(G);return}}else return}if(V){let E=new Set(H);if(E.has(G.id))E.delete(G.id);else E.add(G.id);w(E)}else w(new Set([G.id]));l(G.id),x(G)},YG=(G,J,V)=>{bG({param:{fileId:G},json:[{key:J,value:V}]},{onSuccess:()=>{o.invalidateQueries({queryKey:["folders",A,"children",{assetType:"file"}]}),o.invalidateQueries({queryKey:["search",_,A]})}})};return W(LG,{modifiers:[DG.configure({anchor:{x:0,y:0}})],plugins:(G)=>G.map((J)=>{if(J===k)return k.configure({dropAnimation:null});if(typeof J==="object"&&J!==null&&"plugin"in J&&J.plugin===k)return k.configure({dropAnimation:null});return J}),sensors:B||!xG?[]:[EG.configure({activationConstraints:[new UG.Distance({value:10})]}),QG],onDragStart:JJ,onDragEnd:XJ,children:[Z("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:W("div",{ref:cG,className:"flex flex-1 overflow-hidden relative",children:[!s&&Z("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>mG(!0)}),(!t||b)&&Z("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>{IG(!0),n.getState().setIsChatbotOpen(!1)}}),!s&&W(p,{children:[Z("div",{className:"bg-background",style:{width:hG},children:Z(kG,{teamId:_,projectId:X,projectName:P,rootFolderId:M,dragState:U,ancestorFolders:R?.ancestorFolders??[]})}),Z(c,{onResize:(G)=>{FG((J)=>Math.max(180,Math.min(400,J+G)))},className:"hidden md:block"})]}),Z(NG,{teamId:_,projectId:X,assetId:A,folders:D,files:T,totalFolders:sG,totalFiles:tG,totalFoldersSize:eG,totalFilesSize:GJ,selectedItem:CG,selectedIds:H,onItemSelect:ZJ,onItemDoubleClick:YJ,onSaveField:YG,displayStyle:e,onClearSelection:XG,fetchNextFoldersPage:oG,hasNextFoldersPage:rG||!1,isFetchingNextFoldersPage:lG,fetchNextFilesPage:iG,hasNextFilesPage:aG||!1,isFetchingNextFilesPage:dG,isRecentlyDeleted:B,filterConditions:O,onFilterChange:h,sort:Q,onSortChange:pG,dragState:U,collection:z,onUpdateCollection:vG,rootFolderId:M}),(!t||b)&&W(p,{children:[Z(c,{onResize:(G)=>{uG((J)=>Math.max(240,Math.min(600,J-G)))},className:"hidden md:block"}),Z("div",{style:{width:gG},className:"bg-background flex flex-col flex-shrink-0",children:b?Z(RG,{projectId:X,contextAssetId:A}):f?Z(wG,{teamId:_,projectId:X,file:f,onSaveField:(G,J)=>YG(f.id,G,J),members:fG,hideAnnotationControl:!0}):Z("div",{className:"flex h-full items-center justify-center p-4 text-center text-sm text-muted-foreground",children:HG.select_asset_to_view_details()})})]})]})}),Z(qG,{children:U?.isActive?Z("div",{className:$G("flex items-center gap-2 rounded-md bg-popover px-3 py-2 text-sm font-medium text-popover-foreground shadow-md ring-1 ring-border cursor-grabbing",e==="list"&&"w-30 h-[40px] px-0 flex-none overflow-hidden justify-center"),style:{transform:"translate(0px, 0px)"},children:W("span",{children:["Moving ",U.itemCount," item",U.itemCount!==1?"s":""]})}):null})]})}
|
|
2
|
+
export{HJ as j};
|