@shumai-one/shumai 0.3.3 → 0.3.5
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-d3kpqay2.js → chunk-0bbhm7dp.js} +2 -2
- package/bin/{chunk-9e99n265.js → chunk-17bewdr0.js} +2 -2
- package/bin/{chunk-41m51y08.js → chunk-1fqpgz02.js} +1 -1
- package/bin/chunk-21hvrvzj.js +2 -0
- package/bin/chunk-23mj9p82.js +1 -0
- package/bin/chunk-24mag65w.js +1 -0
- package/bin/chunk-29203j0e.js +7 -0
- package/bin/{chunk-gpmaaca1.js → chunk-2jfbxefd.js} +2 -2
- package/bin/chunk-2jv9re91.js +2 -0
- package/bin/chunk-2rmceamt.js +1 -0
- package/bin/{chunk-bd6x5ns9.js → chunk-3mprq5kb.js} +2 -2
- package/bin/{chunk-wtzkfwmx.js → chunk-3w9vybrh.js} +2 -2
- package/bin/{chunk-gh4w2bdg.js → chunk-3ydjrkbd.js} +1 -1
- package/bin/{chunk-ts9f4zqh.js → chunk-43mhpb0k.js} +2 -2
- package/bin/{chunk-wkth5xwr.js → chunk-4b8ms2ct.js} +2 -2
- package/bin/{chunk-p8enen2a.js → chunk-4rz2105a.js} +1 -1
- package/bin/{chunk-g097058z.js → chunk-4sdrjye2.js} +2 -2
- package/bin/{chunk-yfkcv10v.js → chunk-52qe6z8w.js} +1 -1
- package/bin/{chunk-vg6mkdj1.js → chunk-54hmgj96.js} +2 -2
- package/bin/{chunk-2fc5hk8r.js → chunk-5r55htaw.js} +1 -1
- package/bin/{chunk-am1m29pv.js → chunk-5yxngq5n.js} +1 -1
- package/bin/{chunk-9vgjhemh.js → chunk-6j6dejtd.js} +1 -1
- package/bin/chunk-6kv3jyfc.js +2 -0
- package/bin/{chunk-xcbb21j9.js → chunk-6vn44e4d.js} +2 -2
- package/bin/{chunk-57kgmgfs.js → chunk-7jkvjm4x.js} +2 -2
- package/bin/{chunk-5cm4vge8.js → chunk-7mkk8ahk.js} +2 -2
- package/bin/{chunk-mm810jv7.js → chunk-7w2tx08e.js} +2 -2
- package/bin/{chunk-m6sssvg3.js → chunk-7zdmpbt6.js} +1 -1
- package/bin/{chunk-cdqvg03f.js → chunk-8fsrs7mh.js} +1 -1
- package/bin/{chunk-mggfc9ya.js → chunk-8hq6sn31.js} +2 -2
- package/bin/{chunk-m268vcdm.js → chunk-8mzg29m4.js} +2 -2
- package/bin/chunk-8na8a41a.js +2 -0
- package/bin/{chunk-7x7jtkh8.js → chunk-8skgcmxm.js} +1 -1
- package/bin/chunk-8ttfy5yy.js +1 -0
- package/bin/{chunk-3gcnj1eq.js → chunk-8vc1m0kw.js} +2 -2
- package/bin/{chunk-7anqxx1z.js → chunk-8vvr1ez5.js} +1 -1
- package/bin/chunk-95qc4bkh.js +2 -0
- package/bin/{chunk-3g9g2c7h.js → chunk-97y52q3a.js} +3 -3
- package/bin/{chunk-q8me9zev.js → chunk-9nd5m7hy.js} +1 -1
- package/bin/{chunk-4g7h9qhr.js → chunk-afzc5eae.js} +1 -1
- package/bin/{chunk-1rsp4hc5.js → chunk-ampyjbj4.js} +1 -1
- package/bin/{chunk-749c09cw.js → chunk-arxd4qb9.js} +1 -1
- package/bin/{chunk-x0r8dcq0.js → chunk-avvzqqk2.js} +2 -2
- package/bin/{chunk-525eypdk.js → chunk-b93djch5.js} +1 -1
- package/bin/{chunk-va6hxm7n.js → chunk-bg10gwm1.js} +2 -2
- package/bin/{chunk-h73653yp.js → chunk-bkcf4hw5.js} +1 -1
- package/bin/{chunk-gaemak59.js → chunk-bv642x5z.js} +2 -2
- package/bin/{chunk-rt0pvhdf.js → chunk-c2a5x1pk.js} +1 -1
- package/bin/{chunk-g224r7mc.js → chunk-c5esphve.js} +2 -2
- package/bin/chunk-cbjfw47x.js +62 -0
- package/bin/{chunk-9g6vy76b.js → chunk-d1zpcags.js} +2 -2
- package/bin/{chunk-qshm5vcn.js → chunk-d4zx3r12.js} +1 -1
- package/bin/{chunk-ey7vty63.js → chunk-f70xdh07.js} +2 -2
- package/bin/{chunk-tc7q988r.js → chunk-f7fevgv2.js} +2 -2
- package/bin/{chunk-p1bcbtmg.js → chunk-fcvtv783.js} +1 -1
- package/bin/chunk-fgda7ncw.js +2 -0
- package/bin/{chunk-vf3bg920.js → chunk-fnkrzqrn.js} +2 -2
- package/bin/{chunk-xgb533n0.js → chunk-fq6emqwq.js} +3 -3
- package/bin/{chunk-5vwkfxy7.js → chunk-fw5k0xrc.js} +2 -2
- package/bin/{chunk-3823qzr0.js → chunk-g0jy85re.js} +2 -2
- package/bin/{chunk-6jgq154r.js → chunk-g5mpp3nc.js} +1 -1
- package/bin/{chunk-t15a1vp6.js → chunk-gd1x3rgn.js} +1 -1
- package/bin/chunk-gwxzjc0m.js +1 -0
- package/bin/chunk-h2tztyxs.js +1 -0
- package/bin/{chunk-v0yhkcj5.js → chunk-hbrndqpj.js} +2 -2
- package/bin/{chunk-0dcv6kpk.js → chunk-hk7a2mgn.js} +2 -2
- package/bin/chunk-htrzgs2a.css +1 -0
- package/bin/{chunk-2475z7vk.js → chunk-jf5ytqxd.js} +1 -1
- package/bin/{chunk-r5jmnsqj.js → chunk-jkapr5we.js} +1 -1
- package/bin/chunk-jqyprvqd.js +1 -0
- package/bin/chunk-jyeyp8p3.js +1 -0
- package/bin/{chunk-xsw3pb5p.js → chunk-kn4tnhbw.js} +2 -2
- package/bin/{chunk-jkh04dka.js → chunk-ks8deg42.js} +1 -1
- package/bin/chunk-kwr4m6vh.js +1 -0
- package/bin/chunk-n62kyrh1.js +1 -0
- package/bin/{chunk-9sdhdhv4.js → chunk-n67rfv86.js} +2 -2
- package/bin/{chunk-8a75zqbz.js → chunk-nh4tzzn8.js} +2 -2
- package/bin/{chunk-zgsy3k3h.js → chunk-ntxwp6aa.js} +1 -1
- package/bin/{chunk-7pjes19z.js → chunk-p33nq4pp.js} +2 -2
- package/bin/{chunk-h4a3ms2b.js → chunk-p3k6nzhe.js} +2 -2
- package/bin/{chunk-67rr836p.js → chunk-q0znwxfe.js} +1 -1
- package/bin/{chunk-gpeyctxd.js → chunk-qm9w9fcv.js} +2 -2
- package/bin/chunk-qxwfhv63.js +2 -0
- package/bin/{chunk-9a7a1p1j.js → chunk-r9s1zs4g.js} +2 -2
- package/bin/{chunk-yj6tmjsc.js → chunk-rek85wwv.js} +2 -2
- package/bin/{chunk-wpntb95k.js → chunk-s0g0bc6t.js} +2 -2
- package/bin/{chunk-pdajhyqm.js → chunk-s0k2r6ym.js} +2 -2
- package/bin/{chunk-fwqpq2sy.js → chunk-sx1neqgr.js} +1 -1
- package/bin/{chunk-2jvqhps9.js → chunk-t58kqafx.js} +2 -2
- package/bin/{chunk-qx2mzv89.js → chunk-th07gms7.js} +1 -1
- package/bin/chunk-v0cdg3n6.js +307 -0
- package/bin/{chunk-tzmzqmcg.js → chunk-v4re49f5.js} +1 -1
- package/bin/{chunk-c7rj0f5r.js → chunk-vpq224tm.js} +1 -1
- package/bin/{chunk-mhwp74hh.js → chunk-vvr179pz.js} +1 -1
- package/bin/{chunk-p86w1eaw.js → chunk-vzb2b89p.js} +1 -1
- package/bin/{chunk-bw6wyw7k.js → chunk-w8vk30ze.js} +2 -2
- package/bin/{chunk-0a0sdyta.js → chunk-weean2ja.js} +1 -1
- package/bin/{chunk-pqxh0cg7.js → chunk-wg5tjyj9.js} +2 -2
- package/bin/{chunk-xn9cpax1.js → chunk-wknqst3v.js} +3 -3
- package/bin/chunk-x217skr3.js +2 -0
- package/bin/{chunk-bn4ewsy8.js → chunk-x2z5zz01.js} +1 -1
- package/bin/{chunk-hz6s7by4.js → chunk-xnzyt0kq.js} +1 -1
- package/bin/{chunk-9zvteyz0.js → chunk-xqkwpr7s.js} +2 -2
- package/bin/{chunk-yedr4r8a.js → chunk-xt9n0y9a.js} +1 -1
- package/bin/{chunk-7436fyrg.js → chunk-y6aa5ee0.js} +1 -1
- package/bin/{chunk-v75fanse.js → chunk-zj1rz1s9.js} +2 -2
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +503 -408
- package/package.json +7 -7
- package/prisma/migrations/20260806082136_add_sharelink_watermark/migration.sql +69 -0
- package/prisma/migrations/20260806085643_add_watermark_file_status/migration.sql +7 -0
- package/prisma/migrations/20260807140837_clean_media_remove_raw_transcodes_and_original_download_url/migration.sql +86 -0
- package/prisma/migrations/20260808014542_add_sharelink_allow_download/migration.sql +2 -0
- package/prisma/schema.prisma +68 -0
- package/bin/chunk-1cjgpspz.js +0 -2
- package/bin/chunk-1pgtq4rc.js +0 -2
- package/bin/chunk-25qj10ny.js +0 -1
- package/bin/chunk-4v5ykazp.js +0 -1
- package/bin/chunk-5x3vzer8.js +0 -1
- package/bin/chunk-804ndet8.js +0 -2
- package/bin/chunk-a8daqpfh.js +0 -7
- package/bin/chunk-c0c88nje.js +0 -307
- package/bin/chunk-d6v81kjj.js +0 -1
- package/bin/chunk-dfcrtdk2.js +0 -1
- package/bin/chunk-eczsk2xd.js +0 -62
- package/bin/chunk-g5e93f59.js +0 -2
- package/bin/chunk-g5xkj9p3.js +0 -2
- package/bin/chunk-hp139z0j.js +0 -2
- package/bin/chunk-j4y8c864.js +0 -1
- package/bin/chunk-pbb1tdwt.js +0 -1
- package/bin/chunk-pbfkw90e.js +0 -1
- package/bin/chunk-s10v4b01.css +0 -1
- package/bin/chunk-s1b5kf34.js +0 -2
- package/bin/chunk-v0xbr5e6.js +0 -2
- package/bin/chunk-yfjn4qn2.js +0 -1
- package/bin/chunk-z9560a6e.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as t,j as e,k as y}from"./chunk-v0cdg3n6.js";import{kg as _G,mg as $G,ng as QG,og as XG}from"./chunk-8mzg29m4.js";import{$h as WG,Ag as gG,Bg as r,Cg as H,Dg as O,Gj as v,Hg as NG,Kh as HG,Lh as JG,dj as YG,eh as l,ph as S,ui as a,yj as p,zi as s}from"./chunk-cbjfw47x.js";import{Kk as SG}from"./chunk-gd1x3rgn.js";function cG({file:Y,mediaControllerRef:X,onPlay:K,onPause:N,onTimeUpdate:V,annotations:_,startTime:U,shareId:Z,allowDownload:L,children:B}){let M=y(Y).viewer;return H(M,{ref:X,file:Y,onPlay:K,onPause:N,onTimeUpdate:V,annotations:_,startTime:U,shareId:Z,allowDownload:L,children:B},Y.id)}var J=SG(gG(),1);function GG({activeState:Y,activeAsset:X,previewUrl:K,isFullScreen:N,onTogglePlay:V,onToggleLoop:_,onSeek:U,onVolumeChange:Z,onToggleMute:L,onChangePlaybackRate:B,onChangeResolution:F,onZoomIn:M,onZoomOut:R,onFit:z,onDownload:b,onToggleFullScreen:w,allowDownload:T=!0}){if(Y?.kind==="video"&&Y.video&&X){let $=Y.video,f=$.totalFrames/$.frameRate,x=$.currentFrame/$.frameRate,g={isPlaying:$.isPlaying,progress:f>0?x/f*100:0,currentTime:x,duration:f,volume:$.volume,isMuted:$.isMuted,isLooping:$.isLooping,playbackRate:$.playbackRate,isFullScreen:N,showFrames:!1,currentResolution:$.currentResolution},u=K&&!X.media?.videoPreview?{...X,media:{...X.media,videoPreview:{url:K}}}:X;return H(t,{state:g,zoom:Y.zoom,isControlsVisible:!0,floatOverlayInFullScreen:!1,buffered:$.buffered,data:u,resolutions:$.resolutions,togglePlay:V,toggleLoop:_,toggleMute:L,handleVolumeChange:Z,changePlaybackRate:B,changeResolution:(k)=>F(k.resolution),handleDownload:(k)=>b(k),toggleFullScreen:w,onZoomChange:(k)=>k>=Y.zoom?M():R(),onZoomReset:z,frameRate:$.frameRate,totalFrames:$.totalFrames,currentFrame:$.currentFrame,seekToFrame:U,allowDownload:T})}if(Y?.kind==="image")return H(e,{zoom:Y.zoom,onZoomIn:M,onZoomOut:R,onFit:z,onDownload:()=>b(),canDownload:!!X?.media?.original?.key,fullscreen:{isFullScreen:N,onToggle:w},allowDownload:T});return H("div",{className:"relative z-10 flex items-center justify-end gap-2 border-t border-border bg-card px-4 py-3",children:H("button",{onClick:w,className:"text-foreground transition-colors hover:text-primary",title:"Fullscreen",children:N?H(s,{className:"h-5 w-5"}):H(a,{className:"h-5 w-5"})})})}function c({side:Y,fileName:X,version:K,activeVersionId:N,versions:V,isActive:_,onActivate:U,onSwitchVersion:Z,onExit:L}){let B=p("flex-shrink-0 rounded p-1 transition-colors hover:bg-muted",_?"text-foreground":"text-muted-foreground hover:text-foreground"),F=H("button",{onClick:L,title:v.exit_compare(),className:B,children:H(YG,{className:"h-4 w-4"})}),M=O("button",{onClick:U,className:p("flex min-w-0 items-center gap-1 rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-muted",_?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[H("span",{className:"truncate",children:X}),K!==void 0&&O("span",{className:p("flex-shrink-0 rounded border px-1 py-0 text-xs",_?"border-foreground/40":"border-border"),children:["v",K]})]}),R=O(_G,{children:[H($G,{onClick:U,title:v.switch_version(),className:B,children:H(JG,{className:"h-4 w-4"})}),H(QG,{align:Y==="left"?"start":"end",className:"w-80 p-1",children:H("div",{className:"flex max-h-96 flex-col gap-1 overflow-y-auto",children:V.map((z)=>{let b=z.id===N;return O(XG,{onClick:()=>Z(z.id),className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2",children:[O("div",{className:"flex min-w-[2rem] flex-shrink-0 items-center justify-center rounded-full bg-muted px-2 py-0.5 text-xs font-semibold text-muted-foreground select-none",children:["v",z.version]}),H("div",{className:"flex h-10 w-16 flex-shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:z.previewUrl?H("img",{src:z.previewUrl,alt:z.name||void 0,className:"h-full w-full object-cover"}):H(WG,{className:"h-4 w-4 text-muted-foreground"})}),O("div",{className:"flex min-w-0 flex-1 flex-col text-left",children:[H("span",{className:"truncate text-sm font-semibold text-foreground",children:z.name}),H("span",{className:"truncate text-xs text-muted-foreground",children:z.creator?.name||"Unknown"})]}),b&&H(HG,{className:"ml-auto h-4 w-4 flex-shrink-0 text-primary"})]},z.id)})})})]});return H("div",{onMouseDown:U,className:p("dark flex h-10 flex-shrink-0 items-center gap-1 border-b bg-background px-2 transition-colors",_?"border-b-2 border-primary":"border-border"),children:Y==="left"?O(r,{children:[F,M,R]}):O(r,{children:[M,R,H("div",{className:"ml-auto"}),F]})})}function KG(Y,X,K){return NG({queryKey:X?["public-share-file",K,Y,localStorage.getItem(`share_pwd_${K}`)||""]:["files",Y],queryFn:async()=>{if(X){let V=localStorage.getItem(`share_pwd_${K}`)||"",_=await l.api.shares[":shareId"].files[":fileId"].$get({param:{shareId:K,fileId:Y}},{headers:{"x-share-password":V}});if(!_.ok)throw Error("Failed to fetch version asset");return await _.json()}let N=await l.api.files[":fileId"].$get({param:{fileId:Y}});if(!N.ok)throw Error("Failed to fetch version asset");return await N.json()},enabled:!!Y&&(!X||!!K)})}function zH({isPublic:Y=!1,shareId:X,versions:K,leftId:N,rightId:V,activeSide:_,annotations:U,seekRequest:Z,onActiveSideChange:L,onSwitchVersion:B,onExit:F,onActiveAssetChange:M,onPlay:R,onTimeUpdate:z,allowDownload:b=!0}){let w=J.useRef(null),T=J.useRef(null),$=J.useRef(null),[f,x]=J.useState(null),[g,u]=J.useState(null),[k,zG]=J.useState(1),[OG,n]=J.useState(!1),[qG,VG]=J.useState(!1),{data:E,isLoading:ZG}=KG(N,Y,X),{data:P,isLoading:MG}=KG(V,Y,X),UG=y(E),LG=y(P),I=!!E&&!!P&&UG.id===LG.id,m=_==="left"?E:P,h=_==="left"?f:g,D=J.useCallback(()=>_==="left"?T.current:$.current,[_]),d=J.useCallback(()=>_==="left"?$.current:T.current,[_]);J.useEffect(()=>{M(m??null)},[m,M]),J.useEffect(()=>{if(!Z)return;let G=D();if(G?.seekToSecond(Z.second),G?.pause(),I){let W=d();W?.seekToSecond(Z.second),W?.pause()}},[Z?.nonce]),J.useEffect(()=>{let G=()=>VG(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",G),()=>document.removeEventListener("fullscreenchange",G)},[]);let BG=J.useCallback((G)=>x(G),[]),DG=J.useCallback((G)=>u(G),[]),q=J.useCallback((G)=>{let W=D();if(W)G(W);if(I){let Q=d();if(Q)G(Q)}},[D,d,I]),j=J.useCallback(()=>{let G=!h?.video?.isPlaying;q((W)=>G?W.play():W.pause())},[h?.video?.isPlaying,q]);J.useEffect(()=>{let G=(W)=>{let Q=document.activeElement;if(Q&&(Q.tagName==="INPUT"||Q.tagName==="TEXTAREA"||Q instanceof HTMLElement&&Q.isContentEditable))return;let A=W.key===" ",C=Q&&(Q.tagName==="BUTTON"||Q.tagName==="A"||Q.tagName==="SELECT"||Q.tagName==="OPTION"||Q.getAttribute("role")==="button"||Q.getAttribute("role")==="link"||Q.getAttribute("role")==="checkbox"||Q.getAttribute("role")==="radio"||Q.getAttribute("role")==="menuitem");if(A&&C)return;if(W.key===" "||W.key.toLowerCase()==="k")W.preventDefault(),j()};return window.addEventListener("keydown",G),()=>{window.removeEventListener("keydown",G)}},[j]);let FG=J.useCallback((G)=>q((W)=>W.seekToFrame(G)),[q]),EG=J.useCallback(()=>D()?.toggleLoop(),[D]),PG=J.useCallback((G)=>{zG(G),n(G===0)},[]),RG=J.useCallback(()=>n((G)=>!G),[]),wG=J.useCallback((G)=>q((W)=>W.setPlaybackRate(G)),[q]),TG=J.useCallback((G)=>D()?.changeResolution(G),[D]),kG=J.useCallback(()=>q((G)=>G.zoomBy(1.2)),[q]),IG=J.useCallback(()=>q((G)=>G.zoomBy(0.8)),[q]),bG=J.useCallback(()=>q((G)=>G.fit()),[q]),yG=J.useCallback((G)=>{D()?.download(G)},[D]),fG=J.useCallback(()=>{if(!w.current)return;if(!document.fullscreenElement)w.current.requestFullscreen();else document.exitFullscreen()},[]),mG=J.useCallback((G,W)=>{if(I)$.current?.panBy(G,W)},[I]),jG=J.useCallback((G,W)=>{if(I)T.current?.panBy(G,W)},[I]),CG=J.useCallback(()=>j(),[j]),o=J.useCallback((G)=>K.find((W)=>W.id===G)?.version,[K]),pG=J.useMemo(()=>m?.media?.videoPreview?.url,[m?.media?.videoPreview?.url]),i=(G,W)=>{let A=y(W)?.comparePane;if(!A)return H("div",{className:"flex flex-1 items-center justify-center bg-gray-100 dark:bg-gray-950",children:H("p",{className:"text-muted-foreground",children:"Preview unavailable"})});let C=_===G;return H(A,{ref:G==="left"?T:$,file:W,shareId:X,isActive:C,annotations:C?U:[],onStateChange:G==="left"?BG:DG,onUserPan:G==="left"?mG:jG,onActivate:()=>L(G),muted:C?OG:!0,volume:k,onPlay:R,onTimeUpdate:z,onRequestTogglePlay:CG},W.id)},xG=!!E&&!!P,AG=ZG||MG;return O("div",{ref:w,className:"flex h-full flex-1 flex-col bg-background",children:[O("div",{className:"flex min-h-0 flex-1",children:[O("div",{className:"flex min-w-0 flex-1 flex-col border-r border-zinc-800",children:[E&&H(c,{side:"left",fileName:E.name,version:o(N),activeVersionId:N,versions:K,isActive:_==="left",onActivate:()=>L("left"),onSwitchVersion:(G)=>B("left",G),onExit:F}),H("div",{className:"relative flex min-h-0 flex-1",children:E?i("left",E):H("div",{className:"flex flex-1 items-center justify-center",children:H(S,{className:"h-6 w-6 animate-spin text-foreground"})})})]}),O("div",{className:"flex min-w-0 flex-1 flex-col",children:[P&&H(c,{side:"right",fileName:P.name,version:o(V),activeVersionId:V,versions:K,isActive:_==="right",onActivate:()=>L("right"),onSwitchVersion:(G)=>B("right",G),onExit:F}),H("div",{className:"relative flex min-h-0 flex-1",children:P?i("right",P):H("div",{className:"flex flex-1 items-center justify-center",children:H(S,{className:"h-6 w-6 animate-spin text-foreground"})})})]})]}),AG&&!xG&&H("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/30",children:H(S,{className:"h-8 w-8 animate-spin text-foreground"})}),H(GG,{activeState:h,activeAsset:m??null,previewUrl:pG,isFullScreen:qG,onTogglePlay:j,onToggleLoop:EG,onSeek:FG,onVolumeChange:PG,onToggleMute:RG,onChangePlaybackRate:wG,onChangeResolution:TG,onZoomIn:kG,onZoomOut:IG,onFit:bG,onDownload:yG,onToggleFullScreen:fG,allowDownload:b})]})}
|
|
2
|
+
export{cG as b,zH as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as U}from"./chunk-1fqpgz02.js";import"./chunk-y6aa5ee0.js";import"./chunk-8na8a41a.js";import"./chunk-v0cdg3n6.js";import"./chunk-sx1neqgr.js";import"./chunk-29203j0e.js";import"./chunk-6kv3jyfc.js";import"./chunk-d1zpcags.js";import"./chunk-s0g0bc6t.js";import"./chunk-s0k2r6ym.js";import"./chunk-fw5k0xrc.js";import"./chunk-8vc1m0kw.js";import"./chunk-nh4tzzn8.js";import"./chunk-21hvrvzj.js";import"./chunk-avvzqqk2.js";import"./chunk-4rz2105a.js";import"./chunk-f7fevgv2.js";import"./chunk-rek85wwv.js";import{Ke as N}from"./chunk-3mprq5kb.js";import{Pe as K}from"./chunk-g0jy85re.js";import"./chunk-8hq6sn31.js";import"./chunk-zj1rz1s9.js";import"./chunk-fnkrzqrn.js";import"./chunk-6vn44e4d.js";import"./chunk-f70xdh07.js";import"./chunk-qm9w9fcv.js";import"./chunk-n67rfv86.js";import"./chunk-t58kqafx.js";import"./chunk-7jkvjm4x.js";import"./chunk-r9s1zs4g.js";import"./chunk-3w9vybrh.js";import{wg as J}from"./chunk-8mzg29m4.js";import{Ag as Z,Cg as q,Hg as B,Ig as D,Ug as G,eh as H}from"./chunk-cbjfw47x.js";import{Kk as Y}from"./chunk-gd1x3rgn.js";var V=Y(Z(),1);function _(){let{projectId:h,folderId:W}=z.useParams(),{teamId:v,ensureTeamIdForProject:w}=J();V.useEffect(()=>{w(h)},[h,w]);let{data:A}=D(N(h)),b=A?.rootFolder,{data:X}=B({queryKey:["folders",b],queryFn:()=>(async()=>{return await(await H.api.folders[":folderId"].$get({param:{folderId:b}})).json()})(),enabled:!!b});if(!v||!b||!X)return q(K,{});return q(U,{teamId:v,projectId:h,projectName:A.name??"",assetId:W,rootFolderId:b})}var z=G("/projects/$projectId/folders/$folderId")({component:_});export{z as Route};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{B as
|
|
1
|
+
import{Pe as A}from"./chunk-g0jy85re.js";import{Cg as v,Tg as w,eh as z}from"./chunk-cbjfw47x.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/folders/$folderId")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
|
|
2
|
+
export{B as Ke,H as Le};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{n as
|
|
1
|
+
import{Cg as e,nj as o,yj as t}from"./chunk-cbjfw47x.js";function n({className:a,...r}){return e(o.Root,{"data-slot":"label",className:t("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...r})}
|
|
2
|
+
export{n as jg};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function w(q){let k=q[q.length-1];return k&&k.role!=="user"?"agent":"user"}function x(q){return q.some((k)=>{if(k.role==="user"&&Array.isArray(k.content))return k.content.some((v)=>v.type==="image");if(k.role==="toolResult"&&Array.isArray(k.content))return k.content.some((v)=>v.type==="image");return!1})}function y(q){let k={"X-Initiator":w(q.messages),"Openai-Intent":"conversation-edits"};if(q.hasImages)k["Copilot-Vision-Request"]="true";return k}
|
|
3
|
-
export{x as
|
|
3
|
+
export{x as Pj,y as Qj};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Kk as a,Lk as _}from"./chunk-gd1x3rgn.js";var f=_((J)=>{Object.defineProperty(J,"__esModule",{value:!0});J.Allow=J.ALL=J.COLLECTION=J.ATOM=J.SPECIAL=J.INF=J._INFINITY=J.INFINITY=J.NAN=J.BOOL=J.NULL=J.OBJ=J.ARR=J.NUM=J.STR=void 0;J.STR=1;J.NUM=2;J.ARR=4;J.OBJ=8;J.NULL=16;J.BOOL=32;J.NAN=64;J.INFINITY=128;J._INFINITY=256;J.INF=J.INFINITY|J._INFINITY;J.SPECIAL=J.NULL|J.BOOL|J.INF|J.NAN;J.ATOM=J.STR|J.NUM|J.SPECIAL;J.COLLECTION=J.ARR|J.OBJ;J.ALL=J.ATOM|J.COLLECTION;J.Allow={STR:J.STR,NUM:J.NUM,ARR:J.ARR,OBJ:J.OBJ,NULL:J.NULL,BOOL:J.BOOL,NAN:J.NAN,INFINITY:J.INFINITY,_INFINITY:J._INFINITY,INF:J.INF,SPECIAL:J.SPECIAL,ATOM:J.ATOM,COLLECTION:J.COLLECTION,ALL:J.ALL};J.default=J.Allow});var w=_((X)=>{var d=X&&X.__createBinding||(Object.create?function(F,G,H,z){if(z===void 0)z=H;var K=Object.getOwnPropertyDescriptor(G,H);if(!K||("get"in K?!G.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return G[H]}};Object.defineProperty(F,z,K)}:function(F,G,H,z){if(z===void 0)z=H;F[z]=G[H]}),x=X&&X.__exportStar||function(F,G){for(var H in F)if(H!=="default"&&!Object.prototype.hasOwnProperty.call(G,H))d(G,F,H)};Object.defineProperty(X,"__esModule",{value:!0});X.Allow=X.MalformedJSON=X.PartialJSON=X.parseJSON=X.parse=void 0;var Y=f();Object.defineProperty(X,"Allow",{enumerable:!0,get:function(){return Y.Allow}});x(f(),X);class b extends Error{}X.PartialJSON=b;class P extends Error{}X.MalformedJSON=P;function m(F,G=Y.Allow.ALL){if(typeof F!=="string")throw TypeError(`expecting str, got ${typeof F}`);if(!F.trim())throw Error(`${F} is empty`);return p(F.trim(),G)}X.parseJSON=m;var p=(F,G)=>{let H=F.length,z=0,K=(Q)=>{throw new b(`${Q} at position ${z}`)},$=(Q)=>{throw new P(`${Q} at position ${z}`)},U=()=>{if(V(),z>=H)K("Unexpected end of input");if(F[z]==='"')return O();if(F[z]==="{")return c();if(F[z]==="[")return j();if(F.substring(z,z+4)==="null"||Y.Allow.NULL&G&&H-z<4&&"null".startsWith(F.substring(z)))return z+=4,null;if(F.substring(z,z+4)==="true"||Y.Allow.BOOL&G&&H-z<4&&"true".startsWith(F.substring(z)))return z+=4,!0;if(F.substring(z,z+5)==="false"||Y.Allow.BOOL&G&&H-z<5&&"false".startsWith(F.substring(z)))return z+=5,!1;if(F.substring(z,z+8)==="Infinity"||Y.Allow.INFINITY&G&&H-z<8&&"Infinity".startsWith(F.substring(z)))return z+=8,1/0;if(F.substring(z,z+9)==="-Infinity"||Y.Allow._INFINITY&G&&1<H-z&&H-z<9&&"-Infinity".startsWith(F.substring(z)))return z+=9,-1/0;if(F.substring(z,z+3)==="NaN"||Y.Allow.NAN&G&&H-z<3&&"NaN".startsWith(F.substring(z)))return z+=3,NaN;return g()},O=()=>{let Q=z,Z=!1;z++;while(z<H&&(F[z]!=='"'||Z&&F[z-1]==="\\"))Z=F[z]==="\\"?!Z:!1,z++;if(F.charAt(z)=='"')try{return JSON.parse(F.substring(Q,++z-Number(Z)))}catch(q){$(String(q))}else if(Y.Allow.STR&G)try{return JSON.parse(F.substring(Q,z-Number(Z))+'"')}catch(q){return JSON.parse(F.substring(Q,F.lastIndexOf("\\"))+'"')}K("Unterminated string literal")},c=()=>{z++,V();let Q={};try{while(F[z]!=="}"){if(V(),z>=H&&Y.Allow.OBJ&G)return Q;let Z=O();V(),z++;try{let q=U();Q[Z]=q}catch(q){if(Y.Allow.OBJ&G)return Q;else throw q}if(V(),F[z]===",")z++}}catch(Z){if(Y.Allow.OBJ&G)return Q;else K("Expected '}' at end of object")}return z++,Q},j=()=>{z++;let Q=[];try{while(F[z]!=="]")if(Q.push(U()),V(),F[z]===",")z++}catch(Z){if(Y.Allow.ARR&G)return Q;K("Expected ']' at end of array")}return z++,Q},g=()=>{if(z===0){if(F==="-")$("Not sure what '-' is");try{return JSON.parse(F)}catch(Z){if(Y.Allow.NUM&G)try{return JSON.parse(F.substring(0,F.lastIndexOf("e")))}catch(q){}$(String(Z))}}let Q=z;if(F[z]==="-")z++;while(F[z]&&",]}".indexOf(F[z])===-1)z++;if(z==H&&!(Y.Allow.NUM&G))K("Unterminated number literal");try{return JSON.parse(F.substring(Q,z))}catch(Z){if(F.substring(Q,z)==="-")K("Not sure what '-' is");try{return JSON.parse(F.substring(Q,F.lastIndexOf("e")))}catch(q){$(String(q))}}},V=()=>{while(z<H&&`
|
|
3
3
|
\r `.includes(F[z]))z++};return U()},l=m;X.parse=l});var N=a(w(),1),e=new Set(['"',"\\","/","b","f","n","r","t","u"]);function s(F){let G=F.codePointAt(0);return G!==void 0&&G>=0&&G<=31}function t(F){switch(F){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
4
4
|
`:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${F.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function k(F){let G="",H=!1;for(let z=0;z<F.length;z++){let K=F[z];if(!H){if(G+=K,K==='"')H=!0;continue}if(K==='"'){G+=K,H=!1;continue}if(K==="\\"){let $=F[z+1];if($===void 0){G+="\\\\";continue}if($==="u"){let U=F.slice(z+2,z+6);if(/^[0-9a-fA-F]{4}$/.test(U)){G+=`\\u${U}`,z+=5;continue}}if(e.has($)){G+=`\\${$}`,z+=1;continue}G+="\\\\";continue}G+=s(K)?t(K):K}return G}function i(F){try{return JSON.parse(F)}catch(G){let H=k(F);if(H!==F)return JSON.parse(H);throw G}}function n(F){if(!F||F.trim()==="")return{};try{return i(F)}catch{try{return N.parse(F)??{}}catch{try{return N.parse(k(F))??{}}catch{return{}}}}}
|
|
5
|
-
export{i as
|
|
5
|
+
export{i as _j,n as $j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{B as
|
|
1
|
+
import{Pe as A}from"./chunk-g0jy85re.js";import{Cg as v,Tg as w,eh as z}from"./chunk-cbjfw47x.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/shares/")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
|
|
2
|
+
export{B as Ee,H as Fe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
async function q(j){if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText==="function")try{return await navigator.clipboard.writeText(j),!0}catch{}try{let h=document.createElement("textarea");h.value=j,h.style.position="fixed",h.style.top="0",h.style.left="0",h.style.width="2em",h.style.height="2em",h.style.padding="0",h.style.border="none",h.style.outline="none",h.style.boxShadow="none",h.style.background="transparent",h.style.opacity="0",document.body.appendChild(h),h.focus(),h.select();let p=document.execCommand("copy");return document.body.removeChild(h),p}catch(h){return console.error("Failed to copy text to clipboard:",h),!1}}
|
|
2
|
-
export{q as
|
|
2
|
+
export{q as eb};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{B as
|
|
1
|
+
import{Pe as A}from"./chunk-g0jy85re.js";import{Cg as v,Tg as w,eh as z}from"./chunk-cbjfw47x.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
|
|
2
|
+
export{B as Ne,H as Oe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Wj as L}from"./chunk-b93djch5.js";import{Yj as E}from"./chunk-q0znwxfe.js";import{mk as M,nk as S}from"./chunk-vpq224tm.js";import{xk as O}from"./chunk-jkapr5we.js";import{yk as b,zk as q}from"./chunk-5r55htaw.js";import"./chunk-gd1x3rgn.js";var y=async(B,J,D)=>{let F={api:B.api,provider:B.provider,model:B.id,output:[],stopReason:"stop",timestamp:Date.now()};try{let G=D?.apiKey;if(!G)throw Error(`No API key for provider: ${B.provider}`);let V=C(B,G,D?.headers),Q=H(B,J),X=await D?.onPayload?.(Q,B);if(X!==void 0)Q=X;let N={...D?.signal?{signal:D.signal}:{},...D?.timeoutMs!==void 0?{timeout:D.timeoutMs}:{},maxRetries:0},{data:z,response:A}=await E(()=>V.chat.completions.create(Q,N).withResponse(),{maxRetries:D?.maxRetries,maxRetryDelayMs:D?.maxRetryDelayMs,signal:D?.signal});await D?.onResponse?.({status:A.status,headers:b(A.headers)},B);let Y=z;if(F.responseId=Y.id,Y.usage)F.usage=K(Y.usage,B);let Z=Y.choices[0];if(Z){let _=Z.message.content;if(typeof _==="string"&&_.length>0)F.output.push({type:"text",text:_});for(let $ of Z.message.images??[]){let I=typeof $.image_url==="string"?$.image_url:$.image_url?.url;if(!I?.startsWith("data:"))continue;let f=I.match(/^data:([^;]+);base64,(.+)$/);if(!f)continue;F.output.push({type:"image",mimeType:f[1],data:f[2]})}}return F}catch(G){return F.stopReason=D?.signal?.aborted?"aborted":"error",F.errorMessage=S(M(G)),F}};function C(B,J,D){return new L({apiKey:J,baseURL:B.baseUrl,dangerouslyAllowBrowser:!0,defaultHeaders:q({...B.headers,...D})})}function H(B,J){let D=J.input.map((F)=>{if(F.type==="text")return{type:"text",text:O(F.text)};return{type:"image_url",image_url:{url:`data:${F.mimeType};base64,${F.data}`}}});return{model:B.id,messages:[{role:"user",content:D}],stream:!1,modalities:B.output.includes("text")?["image","text"]:["image"]}}function K(B,J){let D=B.prompt_tokens||0,F=B.prompt_tokens_details?.cached_tokens||0,G=B.prompt_tokens_details?.cache_write_tokens||0,V=G>0?Math.max(0,F-G):F,Q=Math.max(0,D-V-G),X=B.completion_tokens||0,N={input:Q,output:X,cacheRead:V,cacheWrite:G,totalTokens:Q+X+V+G,cost:{input:J.cost.input/1e6*Q,output:J.cost.output/1e6*X,cacheRead:J.cost.cacheRead/1e6*V,cacheWrite:J.cost.cacheWrite/1e6*G,total:0}};return N.cost.total=N.cost.input+N.cost.output+N.cost.cacheRead+N.cost.cacheWrite,N}export{y as generateImages};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{d as
|
|
1
|
+
import{Cg as o,yj as r}from"./chunk-cbjfw47x.js";function d({className:t,...a}){return o("div",{"data-slot":"card",className:r("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...a})}function n({className:t,...a}){return o("div",{"data-slot":"card-header",className:r("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function c({className:t,...a}){return o("div",{"data-slot":"card-title",className:r("leading-none font-semibold",t),...a})}function s({className:t,...a}){return o("div",{"data-slot":"card-description",className:r("text-sm text-muted-foreground",t),...a})}function i({className:t,...a}){return o("div",{"data-slot":"card-content",className:r("px-6",t),...a})}function l({className:t,...a}){return o("div",{"data-slot":"card-footer",className:r("flex items-center px-6 [.border-t]:pt-6",t),...a})}
|
|
2
|
+
export{d as Zf,n as _f,c as $f,s as ag,i as bg,l as cg};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{yc as P,zc as J}from"./chunk-7mkk8ahk.js";import{md as V,nd as W,od as X}from"./chunk-8skgcmxm.js";import"./chunk-gd1x3rgn.js";var Y=class{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(){}async releaseMigrationLock(){}get supportsOutput(){return!0}},Z=class{#h;#j=new k;#z;#H;constructor(h){this.#h={...h}}async init(){if(this.#z=this.#h.database,this.#H=new $(this.#z),this.#h.onCreateConnection)await this.#h.onCreateConnection(this.#H)}async acquireConnection(){return await this.#j.lock(),this.#H}async beginTransaction(h){await h.executeQuery(J.raw("begin"))}async commitTransaction(h){await h.executeQuery(J.raw("commit"))}async rollbackTransaction(h){await h.executeQuery(J.raw("rollback"))}async releaseConnection(){this.#j.unlock()}async destroy(){this.#z?.close()}},$=class{#h;constructor(h){this.#h=h}executeQuery(h){let{sql:z,parameters:H}=h,j=this.#h.prepare(z).all(...H);return Promise.resolve({rows:j})}async*streamQuery(){throw Error("Streaming query is not supported by SQLite driver.")}},k=class{#h;#j;async lock(){while(this.#h!==void 0)await this.#h;this.#h=new Promise((h)=>{this.#j=h})}unlock(){let h=this.#j;this.#h=void 0,this.#j=void 0,h?.()}},w=class{#h;constructor(h){this.#h=h}async getSchemas(){return[]}async getTables(h={withInternalKyselyTables:!1}){let z=this.#h.selectFrom("sqlite_schema").where("type","=","table").where("name","not like","sqlite_%").select("name").$castTo();if(!h.withInternalKyselyTables)z=z.where("name","!=",W).where("name","!=",X);let H=await z.execute();return Promise.all(H.map(({name:j})=>this.#j(j)))}async getMetadata(h){return{tables:await this.getTables(h)}}async#j(h){let z=this.#h,H=(await z.selectFrom("sqlite_master").where("name","=",h).select("sql").$castTo().execute())[0]?.sql?.split(/[\(\),]/)?.find((j)=>j.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.[0]?.replace(/["`]/g,"");return{name:h,columns:(await z.selectFrom(P`pragma_table_info(${h})`.as("table_info")).select(["name","type","notnull","dflt_value"]).execute()).map((j)=>({name:j.name,dataType:j.type,isNullable:!j.notnull,isAutoIncrementing:j.name===H,hasDefaultValue:j.dflt_value!=null})),isView:!0}}},K=class extends V{getCurrentParameterPlaceholder(){return"?"}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}},F=class{#h;constructor(h){this.#h={...h}}createDriver(){return new Z(this.#h)}createQueryCompiler(){return new K}createAdapter(){return new Y}createIntrospector(h){return new w(h)}};export{F as NodeSqliteDialect};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{yc as J,zc as H}from"./chunk-7mkk8ahk.js";import{md as P,nd as V,od as W}from"./chunk-8skgcmxm.js";import"./chunk-gd1x3rgn.js";var X=class{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(){}async releaseMigrationLock(){}get supportsOutput(){return!0}},Y=class{#h;#j=new $;#w;#z;constructor(h){this.#h={...h}}async init(){if(this.#w=this.#h.database,this.#z=new Z(this.#w),this.#h.onCreateConnection)await this.#h.onCreateConnection(this.#z)}async acquireConnection(){return await this.#j.lock(),this.#z}async beginTransaction(h){await h.executeQuery(H.raw("begin"))}async commitTransaction(h){await h.executeQuery(H.raw("commit"))}async rollbackTransaction(h){await h.executeQuery(H.raw("rollback"))}async releaseConnection(){this.#j.unlock()}async destroy(){this.#w?.close()}},Z=class{#h;constructor(h){this.#h=h}executeQuery(h){let{sql:w,parameters:z}=h,j=this.#h.prepare(w);return Promise.resolve({rows:j.all(z)})}async*streamQuery(){throw Error("Streaming query is not supported by SQLite driver.")}},$=class{#h;#j;async lock(){while(this.#h!==void 0)await this.#h;this.#h=new Promise((h)=>{this.#j=h})}unlock(){let h=this.#j;this.#h=void 0,this.#j=void 0,h?.()}},k=class{#h;constructor(h){this.#h=h}async getSchemas(){return[]}async getTables(h={withInternalKyselyTables:!1}){let w=this.#h.selectFrom("sqlite_schema").where("type","=","table").where("name","not like","sqlite_%").select("name").$castTo();if(!h.withInternalKyselyTables)w=w.where("name","!=",V).where("name","!=",W);let z=await w.execute();return Promise.all(z.map(({name:j})=>this.#j(j)))}async getMetadata(h){return{tables:await this.getTables(h)}}async#j(h){let w=this.#h,z=(await w.selectFrom("sqlite_master").where("name","=",h).select("sql").$castTo().execute())[0]?.sql?.split(/[\(\),]/)?.find((j)=>j.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.[0]?.replace(/["`]/g,"");return{name:h,columns:(await w.selectFrom(J`pragma_table_info(${h})`.as("table_info")).select(["name","type","notnull","dflt_value"]).execute()).map((j)=>({name:j.name,dataType:j.type,isNullable:!j.notnull,isAutoIncrementing:j.name===z,hasDefaultValue:j.dflt_value!=null})),isView:!0}}},K=class extends P{getCurrentParameterPlaceholder(){return"?"}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}},G=class{#h;constructor(h){this.#h={...h}}createDriver(){return new Y(this.#h)}createQueryCompiler(){return new K}createAdapter(){return new X}createIntrospector(h){return new k(h)}};export{G as BunSqliteDialect};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{S as n,T as o,U as r}from"./chunk-s0g0bc6t.js";import{$ as I5,Aa as J1,Ba as Z1,Ca as h,Da as X2,Ea as S1,Fa as X1,W as v,X as O2,Y as E5,Z as _0,_ as S2,aa as E2,ca as y2,ea as I2,fa as D5,ga as f5,ha as x5,ia as j5,ja as y5,ka as _5,la as v5,ma as D2,na as f2,oa as x2,pa as h5,qa as g5,ra as m5,sa as b5,ta as P1,ua as T1,va as O1,wa as c5,xa as u5,ya as Z2,za as $1}from"./chunk-fw5k0xrc.js";import{Xa as _}from"./chunk-21hvrvzj.js";import{fb as g0}from"./chunk-f7fevgv2.js";import{sf as K2}from"./chunk-fnkrzqrn.js";import{Df as S0,Ef as y,Jf as q5,Of as B0,Tf as P2}from"./chunk-n67rfv86.js";import{jg as U0}from"./chunk-3w9vybrh.js";import{kg as L1,mg as R1,ng as k1,og as C1}from"./chunk-8mzg29m4.js";import{$i as A1,Ag as u,Aj as $0,Bg as Q2,Bj as V0,Cg as K,Cj as A0,Dg as A,Dj as L0,Eg as H1,Gi as c2,Gj as I,Hj as h0,Ih as N1,Jg as b2,Kh as H2,Lh as w0,Li as G1,Mh as z5,Mi as M1,Nh as G5,Ri as s0,Si as U1,Th as M5,Ui as w1,Wi as F1,Zg as n0,_g as Q5,_i as V1,dj as F0,eh as O0,fi as B1,gi as W1,pi as z1,sh as K1,tj as m0,uh as q1,yj as R0}from"./chunk-cbjfw47x.js";import{Kk as c}from"./chunk-gd1x3rgn.js";function v1($){let J=$.lastIndexOf(".");if(J>0)return[0,J];return[0,$.length]}function i4($){$.focus();let[J,Z]=v1($.value);if(typeof $.setSelectionRange==="function")$.setSelectionRange(J,Z);else $.select()}var a2=Symbol.for("immer-nothing"),p2=Symbol.for("immer-draftable"),b=Symbol.for("immer-state");function l($,...J){throw Error(`[Immer] minified error nr: ${$}. Full error at: https://bit.ly/3cXEKWf`)}var k0=Object.getPrototypeOf;function N0($){return!!$&&!!$[b]}function Y0($){if(!$)return!1;return t2($)||Array.isArray($)||!!$[p2]||!!$.constructor?.[p2]||T0($)||p0($)}var h1=Object.prototype.constructor.toString(),i2=new WeakMap;function t2($){if(!$||typeof $!=="object")return!1;let J=Object.getPrototypeOf($);if(J===null||J===Object.prototype)return!0;let Z=Object.hasOwnProperty.call(J,"constructor")&&J.constructor;if(Z===Object)return!0;if(typeof Z!=="function")return!1;let X=i2.get(Z);if(X===void 0)X=Function.toString.call(Z),i2.set(Z,X);return X===h1}function c0($,J,Z=!0){if(l0($)===0)(Z?Reflect.ownKeys($):Object.keys($)).forEach((Y)=>{J(Y,$[Y],$)});else $.forEach((X,Y)=>J(Y,X,$))}function l0($){let J=$[b];return J?J.type_:Array.isArray($)?1:T0($)?2:p0($)?3:0}function W2($,J){return l0($)===2?$.has(J):Object.prototype.hasOwnProperty.call($,J)}function e2($,J,Z){let X=l0($);if(X===2)$.set(J,Z);else if(X===3)$.add(Z);else $[J]=Z}function g1($,J){if($===J)return $!==0||1/$===1/J;else return $!==$&&J!==J}function T0($){return $ instanceof Map}function p0($){return $ instanceof Set}function X0($){return $.copy_||$.base_}function z2($,J){if(T0($))return new Map($);if(p0($))return new Set($);if(Array.isArray($))return Array.prototype.slice.call($);let Z=t2($);if(J===!0||J==="class_only"&&!Z){let X=Object.getOwnPropertyDescriptors($);delete X[b];let Y=Reflect.ownKeys(X);for(let q=0;q<Y.length;q++){let Q=Y[q],H=X[Q];if(H.writable===!1)H.writable=!0,H.configurable=!0;if(H.get||H.set)X[Q]={configurable:!0,writable:!0,enumerable:H.enumerable,value:$[Q]}}return Object.create(k0($),X)}else{let X=k0($);if(X!==null&&Z)return{...$};let Y=Object.create(X);return Object.assign(Y,$)}}function F2($,J=!1){if(i0($)||N0($)||!Y0($))return $;if(l0($)>1)Object.defineProperties($,{set:b0,add:b0,clear:b0,delete:b0});if(Object.freeze($),J)Object.values($).forEach((Z)=>F2(Z,!0));return $}function m1(){l(2)}var b0={value:m1};function i0($){if($===null||typeof $!=="object")return!0;return Object.isFrozen($)}var b1={};function Q0($){let J=b1[$];if(!J)l(0,$);return J}var C0;function $5(){return C0}function c1($,J){return{drafts_:[],parent_:$,immer_:J,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function n2($,J){if(J)Q0("Patches"),$.patches_=[],$.inversePatches_=[],$.patchListener_=J}function G2($){M2($),$.drafts_.forEach(u1),$.drafts_=null}function M2($){if($===C0)C0=$.parent_}function o2($){return C0=c1(C0,$)}function u1($){let J=$[b];if(J.type_===0||J.type_===1)J.revoke_();else J.revoked_=!0}function r2($,J){J.unfinalizedDrafts_=J.drafts_.length;let Z=J.drafts_[0];if($!==void 0&&$!==Z){if(Z[b].modified_)G2(J),l(4);if(Y0($)){if($=u0(J,$),!J.parent_)d0(J,$)}if(J.patches_)Q0("Patches").generateReplacementPatches_(Z[b].base_,$,J.patches_,J.inversePatches_)}else $=u0(J,Z,[]);if(G2(J),J.patches_)J.patchListener_(J.patches_,J.inversePatches_);return $!==a2?$:void 0}function u0($,J,Z){if(i0(J))return J;let X=$.immer_.shouldUseStrictIteration(),Y=J[b];if(!Y)return c0(J,(q,Q)=>s2($,Y,J,q,Q,Z),X),J;if(Y.scope_!==$)return J;if(!Y.modified_)return d0($,Y.base_,!0),Y.base_;if(!Y.finalized_){Y.finalized_=!0,Y.scope_.unfinalizedDrafts_--;let q=Y.copy_,Q=q,H=!1;if(Y.type_===3)Q=new Set(q),q.clear(),H=!0;if(c0(Q,(G,z)=>s2($,Y,q,G,z,Z,H),X),d0($,q,!1),Z&&$.patches_)Q0("Patches").generatePatches_(Y,Z,$.patches_,$.inversePatches_)}return Y.copy_}function s2($,J,Z,X,Y,q,Q){if(Y==null)return;if(typeof Y!=="object"&&!Q)return;let H=i0(Y);if(H&&!Q)return;if(N0(Y)){let G=q&&J&&J.type_!==3&&!W2(J.assigned_,X)?q.concat(X):void 0,z=u0($,Y,G);if(e2(Z,X,z),N0(z))$.canAutoFreeze_=!1;else return}else if(Q)Z.add(Y);if(Y0(Y)&&!H){if(!$.immer_.autoFreeze_&&$.unfinalizedDrafts_<1)return;if(J&&J.base_&&J.base_[X]===Y&&H)return;if(u0($,Y),(!J||!J.scope_.parent_)&&typeof X!=="symbol"&&(T0(Z)?Z.has(X):Object.prototype.propertyIsEnumerable.call(Z,X)))d0($,Y)}}function d0($,J,Z=!1){if(!$.parent_&&$.immer_.autoFreeze_&&$.canAutoFreeze_)F2(J,Z)}function d1($,J){let Z=Array.isArray($),X={type_:Z?1:0,scope_:J?J.scope_:$5(),modified_:!1,finalized_:!1,assigned_:{},parent_:J,base_:$,draft_:null,copy_:null,revoke_:null,isManual_:!1},Y=X,q=V2;if(Z)Y=[X],q=P0;let{revoke:Q,proxy:H}=Proxy.revocable(Y,q);return X.draft_=H,X.revoke_=Q,H}var V2={get($,J){if(J===b)return $;let Z=X0($);if(!W2(Z,J))return l1($,Z,J);let X=Z[J];if($.finalized_||!Y0(X))return X;if(X===N2($.base_,J))return B2($),$.copy_[J]=w2(X,$);return X},has($,J){return J in X0($)},ownKeys($){return Reflect.ownKeys(X0($))},set($,J,Z){let X=J5(X0($),J);if(X?.set)return X.set.call($.draft_,Z),!0;if(!$.modified_){let Y=N2(X0($),J),q=Y?.[b];if(q&&q.base_===Z)return $.copy_[J]=Z,$.assigned_[J]=!1,!0;if(g1(Z,Y)&&(Z!==void 0||W2($.base_,J)))return!0;B2($),U2($)}if($.copy_[J]===Z&&(Z!==void 0||(J in $.copy_))||Number.isNaN(Z)&&Number.isNaN($.copy_[J]))return!0;return $.copy_[J]=Z,$.assigned_[J]=!0,!0},deleteProperty($,J){if(N2($.base_,J)!==void 0||J in $.base_)$.assigned_[J]=!1,B2($),U2($);else delete $.assigned_[J];if($.copy_)delete $.copy_[J];return!0},getOwnPropertyDescriptor($,J){let Z=X0($),X=Reflect.getOwnPropertyDescriptor(Z,J);if(!X)return X;return{writable:!0,configurable:$.type_!==1||J!=="length",enumerable:X.enumerable,value:Z[J]}},defineProperty(){l(11)},getPrototypeOf($){return k0($.base_)},setPrototypeOf(){l(12)}},P0={};c0(V2,($,J)=>{P0[$]=function(){return arguments[0]=arguments[0][0],J.apply(this,arguments)}});P0.deleteProperty=function($,J){return P0.set.call(this,$,J,void 0)};P0.set=function($,J,Z){return V2.set.call(this,$[0],J,Z,$[0])};function N2($,J){let Z=$[b];return(Z?X0(Z):$)[J]}function l1($,J,Z){let X=J5(J,Z);return X?"value"in X?X.value:X.get?.call($.draft_):void 0}function J5($,J){if(!(J in $))return;let Z=k0($);while(Z){let X=Object.getOwnPropertyDescriptor(Z,J);if(X)return X;Z=k0(Z)}return}function U2($){if(!$.modified_){if($.modified_=!0,$.parent_)U2($.parent_)}}function B2($){if(!$.copy_)$.copy_=z2($.base_,$.scope_.immer_.useStrictShallowCopy_)}var p1=class{constructor($){if(this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(J,Z,X)=>{if(typeof J==="function"&&typeof Z!=="function"){let q=Z;Z=J;let Q=this;return function(G=q,...z){return Q.produce(G,(M)=>Z.call(this,M,...z))}}if(typeof Z!=="function")l(6);if(X!==void 0&&typeof X!=="function")l(7);let Y;if(Y0(J)){let q=o2(this),Q=w2(J,void 0),H=!0;try{Y=Z(Q),H=!1}finally{if(H)G2(q);else M2(q)}return n2(q,X),r2(Y,q)}else if(!J||typeof J!=="object"){if(Y=Z(J),Y===void 0)Y=J;if(Y===a2)Y=void 0;if(this.autoFreeze_)F2(Y,!0);if(X){let q=[],Q=[];Q0("Patches").generateReplacementPatches_(J,Y,q,Q),X(q,Q)}return Y}else l(1,J)},this.produceWithPatches=(J,Z)=>{if(typeof J==="function")return(Q,...H)=>this.produceWithPatches(Q,(G)=>J(G,...H));let X,Y;return[this.produce(J,Z,(Q,H)=>{X=Q,Y=H}),X,Y]},typeof $?.autoFreeze==="boolean")this.setAutoFreeze($.autoFreeze);if(typeof $?.useStrictShallowCopy==="boolean")this.setUseStrictShallowCopy($.useStrictShallowCopy);if(typeof $?.useStrictIteration==="boolean")this.setUseStrictIteration($.useStrictIteration)}createDraft($){if(!Y0($))l(8);if(N0($))$=i1($);let J=o2(this),Z=w2($,void 0);return Z[b].isManual_=!0,M2(J),Z}finishDraft($,J){let Z=$&&$[b];if(!Z||!Z.isManual_)l(9);let{scope_:X}=Z;return n2(X,J),r2(void 0,X)}setAutoFreeze($){this.autoFreeze_=$}setUseStrictShallowCopy($){this.useStrictShallowCopy_=$}setUseStrictIteration($){this.useStrictIteration_=$}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches($,J){let Z;for(Z=J.length-1;Z>=0;Z--){let Y=J[Z];if(Y.path.length===0&&Y.op==="replace"){$=Y.value;break}}if(Z>-1)J=J.slice(Z+1);let X=Q0("Patches").applyPatches_;if(N0($))return X($,J);return this.produce($,(Y)=>X(Y,J))}};function w2($,J){let Z=T0($)?Q0("MapSet").proxyMap_($,J):p0($)?Q0("MapSet").proxySet_($,J):d1($,J);return(J?J.scope_:$5()).drafts_.push(Z),Z}function i1($){if(!N0($))l(10,$);return Z5($)}function Z5($){if(!Y0($)||i0($))return $;let J=$[b],Z,X=!0;if(J){if(!J.modified_)return J.base_;J.finalized_=!0,Z=z2($,J.scope_.immer_.useStrictShallowCopy_),X=J.scope_.immer_.shouldUseStrictIteration()}else Z=z2($,!0);if(c0(Z,(Y,q)=>{e2(Z,Y,Z5(q))},X),J)J.finalized_=!1;return Z}var n1=new p1,X5=n1.produce;var o1=($)=>(J,Z,X)=>{return X.setState=(Y,q,...Q)=>{let H=typeof Y==="function"?X5(Y):Y;return J(H,q,...Q)},$(X.setState,Z,X)},Y5=o1;var o0=n0()(Q5(Y5(($,J)=>({members:[],loading:!1,fetchMembers:async(Z,X,Y)=>{if(!Y&&J().loadedTeamId===Z&&J().loadedWithAgents===X)return;$({loading:!0});try{let q=await O0.api.teams[":teamId"].members.$get({param:{teamId:Z},query:{includeAgents:X?"true":"false"}});if(!q.ok)throw Error("failed to fetch members");let Q=await q.json();$({members:Q||[],loadedTeamId:Z,loadedWithAgents:X,loading:!1})}catch{$({loading:!1})}}}))));var H5=n0(($)=>({fields:[],loadedProjectId:null,setFields:(J,Z)=>$({fields:J,loadedProjectId:Z}),updateFields:(J)=>$({fields:J})}));function A2($,J,Z){let X=y($,Z?.in);if(isNaN(J))return S0(Z?.in||$,NaN);if(!J)return X;let Y=X.getDate(),q=S0(Z?.in||$,X.getTime());q.setMonth(X.getMonth()+J+1,0);let Q=q.getDate();if(Y>=Q)return q;else return X.setFullYear(q.getFullYear(),q.getMonth(),Y),X}function K5($,J){let Z=y($,J?.in),X=Z.getMonth();return Z.setFullYear(Z.getFullYear(),X+1,0),Z.setHours(23,59,59,999),Z}function N5($,J){let[Z,X]=q5($,J.start,J.end);return{start:Z,end:X}}function B5($,J){let{start:Z,end:X}=N5(J?.in,$),Y=+Z>+X,q=Y?+Z:+X,Q=Y?X:Z;Q.setHours(0,0,0,0);let H=J?.step??1;if(!H)return[];if(H<0)H=-H,Y=!Y;let G=[];while(+Q<=q)G.push(S0(Z,Q)),Q.setDate(Q.getDate()+H),Q.setHours(0,0,0,0);return Y?G.reverse():G}function r0($,J){return y($,J?.in).getDate()}function W5($,J){return y($,J?.in).getDay()}function L2($,J){return y($,J?.in).getHours()}function R2($,J){return y($,J?.in).getMinutes()}function k2($,J){return y($,J?.in).getMonth()}function C2($,J){return y($,J?.in).getFullYear()}var a=c(u(),1);var r1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.date,[q,Q]=a.useState(!1),H=a.useRef(null),G=$?new Date($):new Date,z=B0(G)?G:new Date,[M,U]=a.useState(z);a.useEffect(()=>{if(q&&$){let N=new Date($);if(B0(N))U(N)}},[q,$]),a.useEffect(()=>{let N=(k)=>{if(H.current&&!H.current.contains(k.target)){if(q)Q(!1)}};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[q]);let W=()=>{if(!X)Q(!0)},F=(N)=>{if(!N)return"";let k=new Date(N);if(!B0(k))return"Invalid Date";let O="PPP";if(Y?.displayFormat==="usa")O="MM/dd/yyyy";else if(Y?.displayFormat==="euro")O="dd/MM/yyyy";else if(Y?.displayFormat==="iso")O="yyyy-MM-dd";if(Y?.includeTime)if(Y?.timeFormat==="twenty_four_hour")O+=" HH:mm";else O+=" p";let D=P2(k,O);if(Y?.displayTimezone)D+=` (${Intl.DateTimeFormat().resolvedOptions().timeZone})`;return D},B=new Date(M.getFullYear(),M.getMonth(),1),T=K5(M),P=B5({start:B,end:T}),R=W5(B),S=(N)=>{let k=new Date(N);if(Y?.includeTime)k.setHours(L2(z)),k.setMinutes(R2(z));let O=k.toISOString();if(Z(O),!Y?.includeTime)Q(!1)},w=(N,k)=>{let O=$?new Date($):new Date;if(!B0(O))O.setTime(new Date().getTime());if(N==="hour")O.setHours(k);if(N==="minute")O.setMinutes(k);let D=O.toISOString();Z(D)},L=Array.from({length:24},(N,k)=>k),V=Array.from({length:12},(N,k)=>k*5);if(q)return A("div",{className:"relative w-full",ref:H,children:[K("div",{className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm shadow-sm min-h-[28px] flex items-center",children:$?F($):K("span",{className:"text-muted-foreground",children:"Select date..."})}),A("div",{className:"absolute z-50 top-full left-0 mt-1 bg-popover border border-border rounded-lg shadow-xl flex flex-col md:flex-row overflow-hidden min-w-[280px]",children:[A("div",{className:"p-4 w-64",children:[A("div",{className:"flex justify-between items-center mb-4",children:[K("button",{onClick:()=>U(A2(M,-1)),className:"p-1 hover:bg-accent rounded",children:K(z5,{className:"w-4 h-4"})}),K("span",{className:"font-semibold text-sm",children:P2(M,"MMMM yyyy")}),K("button",{onClick:()=>U(A2(M,1)),className:"p-1 hover:bg-accent rounded",children:K(G5,{className:"w-4 h-4"})})]}),K("div",{className:"grid grid-cols-7 gap-1 text-center text-xs mb-2 text-muted-foreground",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map((N)=>K("div",{children:N},N))}),A("div",{className:"grid grid-cols-7 gap-1 text-center text-sm",children:[Array.from({length:R}).map((N,k)=>K("div",{},`empty-${k}`)),P.map((N)=>{let k=$?new Date($):null,O=k&&B0(k)&&r0(k)===r0(N)&&k2(k)===k2(N)&&C2(k)===C2(N);return K("button",{onClick:()=>S(N),className:`w-8 h-8 rounded-full flex items-center justify-center hover:bg-accent transition-colors ${O?"bg-primary text-primary-foreground hover:bg-primary/90":"text-foreground"}`,children:r0(N)},N.toString())})]})]}),Y?.includeTime&&A("div",{className:"border-l border-border bg-muted w-32 flex flex-col",children:[A("div",{className:"p-2 border-b border-border text-xs font-semibold text-muted-foreground flex items-center justify-center gap-1",children:[K(M5,{className:"w-3 h-3"})," Time"]}),A("div",{className:"flex flex-1 h-64",children:[K("div",{className:"flex-1 overflow-y-auto scrollbar-hide border-r border-border",children:L.map((N)=>K("div",{onClick:()=>w("hour",N),className:`px-2 py-1 text-center text-sm cursor-pointer hover:bg-accent ${L2(z)===N?"bg-primary/10 font-medium text-primary":""}`,children:N.toString().padStart(2,"0")},N))}),K("div",{className:"flex-1 overflow-y-auto scrollbar-hide",children:V.map((N)=>K("div",{onClick:()=>w("minute",N),className:`px-2 py-1 text-center text-sm cursor-pointer hover:bg-accent ${R2(z)===N?"bg-primary/10 font-medium text-primary":""}`,children:N.toString().padStart(2,"0")},N))})]})]})]})]});return K("div",{onClick:W,className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded border border-transparent transition-colors ${!X?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$?F($):K("span",{className:"text-muted-foreground italic",children:"Empty"})})},U5=r1;var p=c(u(),1);var s1=({value:$,onSave:J,readOnly:Z})=>{let[X,Y]=p.useState(!1),[q,Q]=p.useState($||""),H=p.useRef(null),G=p.useRef(null),[z,M]=p.useState(!1);p.useEffect(()=>{Q($||"")},[$]),p.useEffect(()=>{if(X&&H.current)H.current.focus(),M(!1)},[X]),p.useEffect(()=>{let B=(T)=>{if(z&&G.current&&!G.current.contains(T.target))M(!1)};if(z)document.addEventListener("mousedown",B);return()=>{document.removeEventListener("mousedown",B)}},[z]);let U=()=>{Y(!1),J(q)},W=(B)=>{B.stopPropagation(),M(!0)},F=(B)=>{if(B.stopPropagation(),!Z)Y(!0)};if(X)return K("textarea",{ref:H,value:q,onChange:(B)=>Q(B.target.value),onBlur:U,className:"w-full min-h-[80px] p-2 border border-ring rounded bg-background text-sm outline-none shadow-sm resize-none"});return A("div",{ref:G,className:"relative w-full text-sm",children:[K("div",{onClick:W,className:`w-full text-foreground rounded border border-transparent transition-all px-2 py-1 line-clamp-2 max-h-[3rem] overflow-hidden ${!Z?"cursor-pointer hover:bg-accent hover:border-border":"cursor-pointer"}`,title:"Click to expand",children:$?$:K("span",{className:"text-muted-foreground italic",children:"Empty"})}),z&&K("div",{onClick:F,className:`absolute top-0 left-0 w-full min-h-full h-auto z-50 bg-background border border-ring rounded shadow-lg px-2 py-1 whitespace-pre-wrap ${!Z?"cursor-text":""}`,children:$?$:K("span",{className:"text-muted-foreground italic",children:"Empty"})})]})},w5=s1;var t=c(u(),1);var a1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.number,[q,Q]=t.useState(!1),[H,G]=t.useState(""),z=t.useRef(null);t.useEffect(()=>{G($!==void 0&&$!==null?$.toString():"")},[$]),t.useEffect(()=>{if(q&&z.current)z.current.focus()},[q]);let M=()=>{if(!X)Q(!0)},U=()=>{if(Q(!1),H==="")Z(void 0);else{let B=parseFloat(H);Z(isNaN(B)?void 0:B)}},W=(B)=>{if(B.key==="Enter")B.stopPropagation(),z.current?.blur()},F=(B)=>{if(B===void 0||B===null||isNaN(B))return"";return B.toFixed(Y?.scale)};if(q)return K("input",{ref:z,type:"number",step:1/Math.pow(10,Y?.scale||0),value:H,onChange:(B)=>G(B.target.value),onBlur:U,onKeyDown:W,onDoubleClick:(B)=>B.stopPropagation(),className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm outline-none shadow-sm text-left font-mono"});return K("div",{onClick:M,onDoubleClick:(B)=>B.stopPropagation(),className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded border border-transparent transition-colors text-left font-mono ${!X?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$!==void 0&&$!==null?F($):K("span",{className:"text-muted-foreground italic font-sans text-left block",children:"Empty"})})},F5=a1;var V5=c(u(),1);var t1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.rating,q=Math.max(2,Math.min(6,Y?.maxValue||5)),[Q,H]=V5.useState(null),G=(M,U)=>{if(M.stopPropagation(),X)return;let W;if($===U)W=0;else W=U;Z(W)},z=Array.from({length:q},(M,U)=>U+1);return K("div",{className:"flex items-center gap-1 h-[28px]",onMouseLeave:()=>!X&&H(null),onDoubleClick:(M)=>M.stopPropagation(),children:z.map((M)=>{let U=Q!==null?M<=Q:M<=($||0);return K("button",{onClick:(W)=>G(W,M),onMouseEnter:()=>!X&&H(M),className:`focus:outline-none transition-transform ${!X?"cursor-pointer hover:scale-110":"cursor-default"}`,type:"button",disabled:X,children:K(s0,{className:`w-5 h-5 transition-colors ${U?"fill-yellow-400 text-yellow-400":"fill-muted text-muted-foreground/30"}`})},M)})})},A5=t1;var E1=c(u(),1);var H0;(function($){$.Base32IncorrectEncoding="B32_ENC_INVALID",$.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",$.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",$.EncodeTimeNegative="ENC_TIME_NEG",$.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",$.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",$.PRNGDetectFailure="PRNG_DETECT",$.ULIDInvalid="ULID_INVALID",$.Unexpected="UNEXPECTED",$.UUIDInvalid="UUID_INVALID"})(H0||(H0={}));class W0 extends Error{constructor($,J){super(`${J} (${$})`);this.name="ULIDError",this.code=$}}function e1($){let J=Math.floor($()*32)%32;return"0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(J)}function $4($){let J=J4(),Z=J&&(J.crypto||J.msCrypto)||null;if(typeof Z?.getRandomValues==="function")return()=>{let X=new Uint8Array(1);return Z.getRandomValues(X),X[0]/256};else if(typeof Z?.randomBytes==="function")return()=>Z.randomBytes(1).readUInt8()/256;throw new W0(H0.PRNGDetectFailure,"Failed to find a reliable PRNG")}function J4(){if(Y4())return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;return null}function Z4($,J){let Z="";for(;$>0;$--)Z=e1(J)+Z;return Z}function X4($,J=10){if(isNaN($))throw new W0(H0.EncodeTimeValueMalformed,`Time must be a number: ${$}`);else if($>281474976710655)throw new W0(H0.EncodeTimeSizeExceeded,`Cannot encode a time larger than 281474976710655: ${$}`);else if($<0)throw new W0(H0.EncodeTimeNegative,`Time must be positive: ${$}`);else if(Number.isInteger($)===!1)throw new W0(H0.EncodeTimeValueMalformed,`Time must be an integer: ${$}`);let Z,X="";for(let Y=J;Y>0;Y--)Z=$%32,X="0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(Z)+X,$=($-Z)/32;return X}function Y4(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function L5($,J){let Z=J||$4(),X=!$||isNaN($)?Date.now():$;return X4(X,10)+Z4(16,Z)}var v0=c(u(),1);var{create:Q4,defineProperty:d5,defineProperties:H4,getOwnPropertyDescriptor:K4,getOwnPropertyDescriptors:q4,getOwnPropertySymbols:J2}=Object,l5=Object.prototype.hasOwnProperty,p5=Object.prototype.propertyIsEnumerable,N4=($,J)=>(J=Symbol[$])?J:Symbol.for("Symbol."+$),j0=($)=>{throw TypeError($)},j2=($,J,Z)=>(J in $)?d5($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,R5=($,J)=>{for(var Z in J||(J={}))if(l5.call(J,Z))j2($,Z,J[Z]);if(J2){for(var Z of J2(J))if(p5.call(J,Z))j2($,Z,J[Z])}return $},k5=($,J)=>H4($,q4(J)),B4=($,J)=>{var Z={};for(var X in $)if(l5.call($,X)&&J.indexOf(X)<0)Z[X]=$[X];if($!=null&&J2){for(var X of J2($))if(J.indexOf(X)<0&&p5.call($,X))Z[X]=$[X]}return Z},W4=($)=>{var J;return[,,,Q4((J=void 0)!=null?J:null)]},i5=["class","method","getter","setter","accessor","field","value","get","set"],I0=($)=>$!==void 0&&typeof $!=="function"?j0("Function expected"):$,z4=($,J,Z,X,Y)=>({kind:i5[$],name:J,metadata:X,addInitializer:(q)=>Z._?j0("Already initialized"):Y.push(I0(q||null))}),G4=($,J)=>j2(J,N4("metadata"),$[3]),a0=($,J,Z,X)=>{for(var Y=0,q=$[J>>1],Q=q&&q.length;Y<Q;Y++)J&1?q[Y].call(Z):X=q[Y].call(Z,X);return X},n5=($,J,Z,X,Y,q)=>{var Q,H,G,z,M,U=J&7,W=!1,F=!1,B=$.length+1,T=i5[U+5],P=$[B-1]=[],R=$[B]||($[B]=[]),S=(Y=Y.prototype,K4({get[Z](){return D0(this,q)},set[Z](L){return K0(this,q,L)}},Z));for(var w=X.length-1;w>=0;w--)if(z=z4(U,Z,G={},$[3],R),z.static=W,z.private=F,M=z.access={has:(L)=>(Z in L)},M.get=(L)=>L[Z],M.set=(L,V)=>L[Z]=V,H=(0,X[w])({get:S.get,set:S.set},z),G._=1,H===void 0)I0(H)&&(S[T]=H);else if(typeof H!=="object"||H===null)j0("Object expected");else I0(Q=H.get)&&(S.get=Q),I0(Q=H.set)&&(S.set=Q),I0(Q=H.init)&&P.unshift(Q);return S&&d5(Y,Z,S),Y},o5=($,J,Z)=>J.has($)||j0("Cannot "+Z),D0=($,J,Z)=>(o5($,J,"read from private field"),J.get($)),E0=($,J,Z)=>J.has($)?j0("Cannot add the same private member more than once"):J instanceof WeakSet?J.add($):J.set($,Z),K0=($,J,Z,X)=>(o5($,J,"write to private field"),J.set($,Z),Z);function i($){return $ instanceof g2||$ instanceof a5}var t0=10,M4=class extends y2{constructor($){super($);let J=E5(()=>{let{dragOperation:X}=$;if(!x2(X.activatorEvent))return;if(!i(X.source))return;if(X.status.initialized){let Y=$.registry.plugins.get(b5);if(Y)return Y.disable(),()=>Y.enable()}}),Z=$.monitor.addEventListener("dragmove",(X,Y)=>{queueMicrotask(()=>{if(this.disabled||X.defaultPrevented||!X.nativeEvent)return;let{dragOperation:q}=Y;if(!x2(X.nativeEvent))return;if(!i(q.source))return;if(!q.shape)return;let{actions:Q,collisionObserver:H,registry:G}=Y,{by:z}=X;if(!z)return;let M=U4(z),{source:U,target:W}=q,{center:F}=q.shape.current,B=[],T=[];v(()=>{for(let V of G.droppables){let{id:N}=V;if(!V.accepts(U)||N===(W==null?void 0:W.id)&&i(V)||!V.element)continue;let k=V.shape,O=new f2(V.element,{getBoundingClientRect:(D)=>f5(D,void 0,0.2)});if(!O.height||!O.width)continue;if(M=="down"&&F.y+t0<O.center.y||M=="up"&&F.y-t0>O.center.y||M=="left"&&F.x-t0>O.center.x||M=="right"&&F.x+t0<O.center.x)B.push(V),V.shape=O,T.push(()=>V.shape=k)}}),X.preventDefault(),H.disable();let P=H.computeCollisions(B,g5);v(()=>T.forEach((V)=>V()));let[R]=P;if(!R)return;let{id:S}=R,{index:w,group:L}=U.sortable;Q.setDropTarget(S).then(()=>{let{source:V,target:N,shape:k}=q;if(!V||!i(V)||!k)return;let{index:O,group:D,target:f}=V.sortable,g=w!==O||L!==D,m=g?f:N==null?void 0:N.element;if(!m)return;_5(m);let C=new f2(m);if(!C)return;let E=E2.delta(C,E2.from(k.current.boundingRectangle),V.alignment);if(Q.move({by:E}),g)Q.setDropTarget(V.id).then(()=>H.enable());else H.enable()})})});this.destroy=()=>{Z(),J()}}};function U4($){let{x:J,y:Z}=$;if(J>0)return"right";else if(J<0)return"left";else if(Z>0)return"down";else if(Z<0)return"up"}var{defineProperty:w4,defineProperties:F4,getOwnPropertyDescriptors:V4,getOwnPropertySymbols:C5}=Object,A4=Object.prototype.hasOwnProperty,L4=Object.prototype.propertyIsEnumerable,P5=($,J,Z)=>(J in $)?w4($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,z0=($,J)=>{for(var Z in J||(J={}))if(A4.call(J,Z))P5($,Z,J[Z]);if(C5){for(var Z of C5(J))if(L4.call(J,Z))P5($,Z,J[Z])}return $},G0=($,J)=>F4($,V4(J));function R4($,J,Z){if(J===Z)return $;let X=$.slice();return X.splice(Z,0,X.splice(J,1)[0]),X}function T2($){return"initialIndex"in $&&typeof $.initialIndex==="number"&&"index"in $&&typeof $.index==="number"}function k4($,J,Z){var X,Y,q;let{source:Q,target:H,canceled:G}=J.operation;if(!Q||!H||G){if("preventDefault"in J)J.preventDefault();return $}let z=(L,V)=>L===V||typeof L==="object"&&("id"in L)&&L.id===V;if(Array.isArray($)){let L=$.findIndex((N)=>z(N,Q.id)),V=$.findIndex((N)=>z(N,H.id));if(L===-1||V===-1){if(T2(Q)){let{initialIndex:N,index:k}=Q;if(N===k||N<0||N>=$.length){if("preventDefault"in J)J.preventDefault();return $}return Z($,N,k)}return $}if(!G&&"index"in Q&&typeof Q.index==="number"){let N=Q.index;if(N!==L)return Z($,L,N)}return Z($,L,V)}let M=Object.entries($),U=-1,W,F=-1,B;for(let[L,V]of M){if(U===-1){if(U=V.findIndex((N)=>z(N,Q.id)),U!==-1)W=L}if(F===-1){if(F=V.findIndex((N)=>z(N,H.id)),F!==-1)B=L}if(U!==-1&&F!==-1)break}if(U===-1&&T2(Q)){let{initialGroup:L,initialIndex:V,group:N,index:k}=Q;if(L==null||N==null||!(L in $)||!(N in $)){if("preventDefault"in J)J.preventDefault();return $}if(L===N&&V===k){if("preventDefault"in J)J.preventDefault();return $}if(L===N)return G0(z0({},$),{[L]:Z($[L],V,k)});let O=$[L][V];return G0(z0({},$),{[L]:[...$[L].slice(0,V),...$[L].slice(V+1)],[N]:[...$[N].slice(0,k),O,...$[N].slice(k)]})}if(!Q.manager)return $;let{dragOperation:T}=Q.manager,P=(Y=(X=T.shape)==null?void 0:X.current.center)!=null?Y:T.position.current;if(B==null){if(H.id in $){let L=H.shape&&P.y>H.shape.center.y?$[H.id].length:0;B=H.id,F=L}}if(W==null||B==null||W===B&&U===F){if(W!=null&&W===B&&U===F&&T2(Q)){let L=Q.group!=null&&Q.group!==W,V=Q.index!==U;if(L||V){let N=(q=Q.group)!=null?q:W;if(N in $){if(W===N)return G0(z0({},$),{[W]:Z($[W],U,Q.index)});let k=$[W][U];return G0(z0({},$),{[W]:[...$[W].slice(0,U),...$[W].slice(U+1)],[N]:[...$[N].slice(0,Q.index),k,...$[N].slice(Q.index)]})}}}if("preventDefault"in J)J.preventDefault();return $}if(W===B)return G0(z0({},$),{[W]:Z($[W],U,F)});let S=H.shape&&Math.round(P.y)>Math.round(H.shape.center.y)?1:0,w=$[W][U];return G0(z0({},$),{[W]:[...$[W].slice(0,U),...$[W].slice(U+1)],[B]:[...$[B].slice(0,F+S),w,...$[B].slice(F+S)]})}function C4($,J){return k4($,J,R4)}var T5="__default__",P4=class extends y2{constructor($){super($);let J=()=>{let X=new Map;for(let Y of $.registry.droppables)if(Y instanceof g2){let{sortable:q}=Y,{group:Q}=q,H=X.get(Q);if(!H)H=new Set,X.set(Q,H);H.add(q)}for(let[Y,q]of X)X.set(Y,new Set(e0(q)));return X},Z=[$.monitor.addEventListener("dragover",(X,Y)=>{if(this.disabled)return;let{dragOperation:q}=Y,{source:Q,target:H}=q;if(!i(Q)||!i(H))return;if(Q.sortable===H.sortable)return;let G=J(),z=Q.sortable.group===H.sortable.group,M=G.get(Q.sortable.group),U=z?M:G.get(H.sortable.group);if(!M||!U)return;queueMicrotask(()=>{if(X.defaultPrevented)return;Y.renderer.rendering.then(()=>{var W,F,B;let T=J();for(let[f,g]of G.entries()){let m=Array.from(g).entries();for(let[C,E]of m)if(E.index!==C||E.group!==f||!((W=T.get(f))==null?void 0:W.has(E)))return}let P=Q.sortable.element,R=H.sortable.element;if(!R||!P)return;if(!z&&H.id===Q.sortable.group)return;let S=e0(M),w=z?S:e0(U),L=(F=Q.sortable.group)!=null?F:T5,V=(B=H.sortable.group)!=null?B:T5,N={[L]:S,[V]:w},k=C4(N,X);if(N===k)return;let O=k[V].indexOf(Q.sortable),D=k[V].indexOf(H.sortable);Y.collisionObserver.disable(),O5(P,O,R,D),v(()=>{for(let[f,g]of k[L].entries())g.index=f;if(!z)for(let[f,g]of k[V].entries())g.group=H.sortable.group,g.index=f}),Y.actions.setDropTarget(Q.id).then(()=>Y.collisionObserver.enable())})})}),$.monitor.addEventListener("dragend",(X,Y)=>{if(!X.canceled)return;let{dragOperation:q}=Y,{source:Q}=q;if(!i(Q))return;if(Q.sortable.initialIndex===Q.sortable.index&&Q.sortable.initialGroup===Q.sortable.group)return;queueMicrotask(()=>{let H=J(),G=H.get(Q.sortable.initialGroup);if(!G)return;Y.renderer.rendering.then(()=>{for(let[F,B]of H.entries()){let T=Array.from(B).entries();for(let[P,R]of T)if(R.index!==P||R.group!==F)return}let z=e0(G),M=Q.sortable.element,U=z[Q.sortable.initialIndex],W=U==null?void 0:U.element;if(!U||!W||!M)return;O5(M,U.index,W,Q.index),v(()=>{for(let[F,B]of H.entries()){let T=Array.from(B).values();for(let P of T)P.index=P.initialIndex,P.group=P.initialGroup}})})})})];this.destroy=()=>{for(let X of Z)X()}}};function O5($,J,Z,X){let Y=X<J?"afterend":"beforebegin";Z.insertAdjacentElement(Y,$)}function T4($,J){return $.index-J.index}function e0($){return Array.from($).sort(T4)}var S5=[M4,P4],_2={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},$2=new I5,r5,s5,e,v2,f0,x0,h2,M0;s5=[S2],r5=[S2];var y0=class{constructor($,J){E0(this,v2,a0(e,8,this)),a0(e,11,this),E0(this,f0),E0(this,x0),E0(this,h2,a0(e,12,this)),a0(e,15,this),E0(this,M0),this.register=()=>{return v(()=>{var W,F;(W=this.manager)==null||W.registry.register(this.droppable),(F=this.manager)==null||F.registry.register(this.draggable)}),()=>this.unregister()},this.unregister=()=>{v(()=>{var W,F;(W=this.manager)==null||W.registry.unregister(this.droppable),(F=this.manager)==null||F.registry.unregister(this.draggable)})},this.destroy=()=>{v(()=>{this.droppable.destroy(),this.draggable.destroy()})};var Z=$,{effects:X=()=>[],group:Y,index:q,sensors:Q,type:H,transition:G=_2,plugins:z}=Z,M=B4(Z,["effects","group","index","sensors","type","transition","plugins"]);let U=I2(z,S5);this.droppable=new g2(M,J,this),this.draggable=new a5(k5(R5({},M),{plugins:U,effects:()=>[()=>{var W,F,B;let T=(W=this.manager)==null?void 0:W.dragOperation.status;if((T==null?void 0:T.initializing)&&this.id===((B=(F=this.manager)==null?void 0:F.dragOperation.source)==null?void 0:B.id))$2.clear(this.manager);if(T==null?void 0:T.dragging)$2.set(this.manager,this.id,O2(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{let{index:W,group:F,manager:B}=this,T=D0(this,x0),P=D0(this,f0);if(W!==T||F!==P)K0(this,x0,W),K0(this,f0,F),this.animate()},()=>{var W,F;let{target:B}=this,{isDragSource:T}=this.draggable;if(((F=(W=this.draggable.pluginConfig(m5))==null?void 0:W.feedback)!=null?F:"default")==="move"&&T)this.droppable.disabled=!B},...X()],type:H,sensors:Q}),J,this),K0(this,M0,M.element),this.manager=J,this.index=q,K0(this,x0,q),this.group=Y,K0(this,f0,Y),this.type=H,this.transition=G}get initialIndex(){var $,J;return(J=($=$2.get(this.manager,this.id))==null?void 0:$.initialIndex)!=null?J:this.index}get initialGroup(){var $,J;return(J=($=$2.get(this.manager,this.id))==null?void 0:$.initialGroup)!=null?J:this.group}animate(){O2(()=>{let{manager:$,transition:J}=this,{shape:Z}=this.droppable;if(!$)return;let{idle:X}=$.dragOperation.status;if(!Z||!J||X&&!J.idle)return;$.renderer.rendering.then(()=>{let{element:Y}=this;if(!Y)return;for(let M of Y.getAnimations())if("transitionProperty"in M&&(M.transitionProperty==="transform"||M.transitionProperty==="translate"||M.transitionProperty==="scale"))M.cancel();let q=this.refreshShape();if(!q)return;let Q={x:Z.boundingRectangle.left-q.boundingRectangle.left,y:Z.boundingRectangle.top-q.boundingRectangle.top},{translate:H}=y5(Y),G=D2(Y,H,!1),z=D2(Y,H);if(Q.x||Q.y){let M=x5(D5(Y))?k5(R5({},J),{duration:0}):J;v5({element:Y,keyframes:{translate:[`${G.x+Q.x}px ${G.y+Q.y}px ${G.z}`,`${z.x}px ${z.y}px ${z.z}`]},options:M}).then(()=>{if(!$.dragOperation.status.dragging)this.droppable.shape=void 0})}})})}get manager(){return this.draggable.manager}set manager($){v(()=>{this.draggable.manager=$,this.droppable.manager=$})}set element($){v(()=>{let J=D0(this,M0),Z=this.droppable.element,X=this.draggable.element;if(!Z||Z===J)this.droppable.element=$;if(!X||X===J)this.draggable.element=$;K0(this,M0,$)})}get element(){var $,J;let Z=D0(this,M0);if(!Z)return;return(J=($=j5.get(Z))!=null?$:Z)!=null?J:this.droppable.element}set target($){this.droppable.element=$}get target(){return this.droppable.element}set source($){this.draggable.element=$}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set plugins($){this.draggable.plugins=I2($,S5)}set disabled($){v(()=>{this.droppable.disabled=$,this.draggable.disabled=$})}set data($){v(()=>{this.droppable.data=$,this.draggable.data=$})}set handle($){this.draggable.handle=$}set id($){this.droppable.id=$,this.draggable.id=$}get id(){return this.droppable.id}set sensors($){this.draggable.sensors=$}set modifiers($){this.draggable.modifiers=$}set collisionPriority($){this.droppable.collisionPriority=$}set collisionDetector($){this.droppable.collisionDetector=$!=null?$:h5}set alignment($){this.draggable.alignment=$}get alignment(){return this.draggable.alignment}set type($){v(()=>{this.droppable.type=$,this.draggable.type=$})}get type(){return this.draggable.type}set accept($){this.droppable.accept=$}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts($){return this.droppable.accepts($)}};e=W4();v2=new WeakMap;f0=new WeakMap;x0=new WeakMap;h2=new WeakMap;M0=new WeakMap;n5(e,4,"index",s5,y0,v2);n5(e,4,"group",r5,y0,h2);G4(e,y0);var a5=class extends c5{constructor($,J,Z){super($,J);this.sortable=Z}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},g2=class extends u5{constructor($,J,Z){super($,J);this.sortable=Z}get index(){return this.sortable.index}get group(){return this.sortable.group}};var{defineProperty:O4,defineProperties:S4,getOwnPropertyDescriptors:E4,getOwnPropertySymbols:t5}=Object,I4=Object.prototype.hasOwnProperty,D4=Object.prototype.propertyIsEnumerable,e5=($,J,Z)=>(J in $)?O4($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,m2=($,J)=>{for(var Z in J||(J={}))if(I4.call(J,Z))e5($,Z,J[Z]);if(t5){for(var Z of t5(J))if(D4.call(J,Z))e5($,Z,J[Z])}return $},f4=($,J)=>S4($,E4(J));function Y1($){let{accept:J,collisionDetector:Z,collisionPriority:X,id:Y,data:q,element:Q,handle:H,index:G,group:z,disabled:M,modifiers:U,sensors:W,target:F,type:B,plugins:T}=$,P=m2(m2({},_2),$.transition),R=X1((w)=>{return new y0(f4(m2({},$),{transition:P,register:!1,handle:Z2(H),element:Z2(Q),target:Z2(F)}),w)}),S=J1(R,x4);return h(Y,()=>R.id=Y),$1(()=>{v(()=>{R.group=z,R.index=G})},[R,z,G]),h(B,()=>R.type=B),h(J,()=>R.accept=J,void 0,_0),h(q,()=>q&&(R.data=q)),h(G,()=>{var w;if(((w=R.manager)==null?void 0:w.dragOperation.status.idle)&&(P==null?void 0:P.idle))R.refreshShape()},Z1),X2(H,(w)=>R.handle=w),X2(Q,(w)=>R.element=w),X2(F,(w)=>R.target=w),h(M,()=>R.disabled=M===!0),h(W,()=>R.sensors=W),h(Z,()=>R.collisionDetector=Z),h(X,()=>R.collisionPriority=X),h(T,()=>R.plugins=T,void 0,_0),h(P,()=>R.transition=P,void 0,_0),h(U,()=>R.modifiers=U,void 0,_0),h($.alignment,()=>R.alignment=$.alignment),{sortable:S,get isDragging(){return S.isDragging},get isDropping(){return S.isDropping},get isDragSource(){return S.isDragSource},get isDropTarget(){return S.isDropTarget},handleRef:v0.useCallback((w)=>{R.handle=w!=null?w:void 0},[R]),ref:v0.useCallback((w)=>{var L,V;if(!w&&((L=R.element)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.element=w!=null?w:void 0},[R]),sourceRef:v0.useCallback((w)=>{var L,V;if(!w&&((L=R.source)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.source=w!=null?w:void 0},[R]),targetRef:v0.useCallback((w)=>{var L,V;if(!w&&((L=R.target)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.target=w!=null?w:void 0},[R])}}function x4($,J,Z){if($==="isDragSource"&&!Z&&J)return!0;return!1}function j4($,J,Z){let X=$.slice();return X.splice(Z,0,X.splice(J,1)[0]),X}function Q1($,J,Z,X){if(Z===X)return $;let Y=j4(J,Z,X),q=new Set(J.map((H)=>H.id)),Q=0;return $.map((H)=>q.has(H.id)?Y[Q++]:H)}async function N$($){let J=[],Z=[],X=$.items;if(X)for(let Q=0;Q<X.length;Q++){let H=X[Q];if(H.kind==="file"){let G=H.webkitGetAsEntry?.();if(G)Z.push({entry:G,path:""})}}else return Array.from($.files);let Y=(Q)=>{return new Promise((H)=>{Q.readEntries((G)=>H(G),()=>H([]))})},q=(Q)=>{return new Promise((H,G)=>{Q.file((z)=>H(z),(z)=>G(z))})};while(Z.length>0){let Q=Z.shift();if(!Q)continue;let{entry:H,path:G}=Q;if(H.isFile)try{let z=await q(H),M=G?`${G}/${z.name}`:z.name;Object.defineProperty(z,"webkitRelativePath",{value:M,writable:!1,configurable:!0}),J.push(z)}catch(z){console.error("Error reading file entry:",z)}else if(H.isDirectory){let z=H.createReader(),M=[],U=await Y(z);while(U.length>0)M=M.concat(U),U=await Y(z);let W=G?`${G}/${H.name}`:H.name;for(let F of M)Z.push({entry:F,path:W})}}return J}var d=c(u(),1);var Y2=["red","orange","yellow","green","blue","purple","gray"],u2={red:{bg:"rgba(239, 68, 68, 0.15)",text:"#ef4444",hex:"#ef4444"},orange:{bg:"rgba(249, 115, 22, 0.15)",text:"#f97316",hex:"#f97316"},yellow:{bg:"rgba(234, 179, 8, 0.15)",text:"#ca8a04",hex:"#eab308"},green:{bg:"rgba(34, 197, 94, 0.15)",text:"#16a34a",hex:"#22c55e"},blue:{bg:"rgba(59, 130, 246, 0.15)",text:"#2563eb",hex:"#3b82f6"},purple:{bg:"rgba(168, 85, 247, 0.15)",text:"#9333ea",hex:"#a855f7"},gray:{bg:"rgba(128, 128, 128, 0.15)",text:"#4b5563",hex:"#808080"},system:{bg:"rgba(128, 128, 128, 0.1)",text:"#6b7280",hex:"#808080"}};function q0($){if(!$)return{backgroundColor:"rgba(128, 128, 128, 0.1)",color:"#6b7280"};let J=$.toLowerCase(),Z=u2[J];if(Z)return{backgroundColor:Z.bg,color:Z.text};if($.startsWith("#"))return{backgroundColor:`${$}33`,color:$};return{backgroundColor:"rgba(128, 128, 128, 0.1)",color:$}}function y4($=[]){let J=new Set($.map((X)=>X.color?.toLowerCase()).filter(Boolean)),Z=Y2.filter((X)=>!J.has(X.toLowerCase()));if(Z.length>0)return Z[Math.floor(Math.random()*Z.length)];return Y2[Math.floor(Math.random()*Y2.length)]}var _4={[_.text]:F1,[_.longText]:q1,[_.select]:z1,[_.selectMulti]:U1,[_.rating]:s0,[_.number]:W1,[_.toggle]:w1,[_.date]:N1,[_.user]:V1,[_.userMulti]:A1};function v4({field:$,index:J,onVisibilityChange:Z}){let{ref:X,handleRef:Y}=Y1({id:$.id,index:J}),q=$.config?.type?_4[$.config.type]:null;return A("div",{ref:X,className:"flex items-center justify-between p-2 rounded-md hover:bg-muted",children:[A("div",{className:"flex items-center gap-2",children:[K("div",{ref:Y,className:"cursor-grab",children:K(B1,{className:"h-4 w-4 text-muted-foreground"})}),q&&K(q,{className:"h-4 w-4 text-muted-foreground shrink-0"}),$.aiAutofill&&K(K1,{className:"h-4 w-4 text-muted-foreground shrink-0"}),K("span",{className:"text-sm truncate",children:$.config?.name})]}),K(g0,{checked:$.visible,onCheckedChange:(Q)=>Z($.id,Q)})]})}function E$({projectId:$,onManageFields:J,onSave:Z}){let{fields:X,updateFields:Y}=H5(),[q,Q]=d.useState(""),[H,G]=d.useState("list"),[z,M]=d.useState(""),[U,W]=d.useState(""),[F,B]=d.useState(!1),[T,P]=d.useState(""),[R,S]=d.useState([]),w=H1();d.useEffect(()=>{w.invalidateQueries({queryKey:["fields",$]})},[$,w]);let L=O0.api.projects[":projectId"].fields.order.$patch,{mutate:V}=b2({mutationFn:async(C)=>{if(!(await L(C)).ok)throw Error(I.failed_update_fields_order());return null}}),N=O0.api.projects[":projectId"].fields.$post,{mutate:k}=b2({mutationFn:async(C)=>{let E=await N(C);if(!E.ok)throw Error(I.failed_create_field());return await E.json()},onSuccess:(C)=>{let E={...C,visible:!0},x=[...X,E];Y(x),M(""),S([]),V({param:{projectId:$},json:x.map((j)=>({fieldId:j.id,visible:j.visible||!1}))}),Z?.()}}),O=d.useMemo(()=>X.filter((C)=>C.config?.name?.toLowerCase().includes(q.toLowerCase())),[X,q]),D=(C)=>{if(C.canceled)return;let{source:E}=C.operation;if(!i(E))return;let{initialIndex:x,index:j}=E;if(x===j)return;let d2=Q1(X,O,x,j);Y(d2),V({param:{projectId:$},json:d2.map((l2)=>({fieldId:l2.id,visible:l2.visible||!1}))})},f=(C,E)=>{let x=X.map((j)=>j.id===C?{...j,visible:E}:j);Y(x),V({param:{projectId:$},json:x.map((j)=>({fieldId:j.id,visible:j.visible||!1}))})},g=()=>{if(!z||!U)return;let C=U===_.select?{select:{options:R}}:U===_.selectMulti?{selectMulti:{options:R}}:{};k({param:{projectId:$},json:{config:{name:z,type:U,...C},label:z,aiAutofill:F,description:T}})},m=X.filter((C)=>C.visible).length;if(H==="create")return K("div",{className:"w-80 p-4",children:A("div",{className:"space-y-4",children:[A("div",{className:"space-y-2",children:[K(U0,{htmlFor:"field-name",children:I.field_name()}),K(h0,{id:"field-name",placeholder:I.new_field_placeholder(),value:z,onChange:(C)=>M(C.target.value),autoFocus:!0})]}),A("div",{className:"space-y-2",children:[K(U0,{children:I.field_type()}),A(L1,{children:[K(R1,{asChild:!0,children:A($0,{variant:"outline",className:"w-full justify-between font-normal",children:[U?K("span",{className:"capitalize",children:U.replace(/_/g," ")}):K("span",{className:"text-muted-foreground border-dashed",children:I.select_field_type()}),K(w0,{className:"ml-2 h-4 w-4 opacity-50"})]})}),K(k1,{className:"w-[--radix-dropdown-menu-trigger-width]",children:Object.values(_).map((C)=>K(C1,{onClick:()=>{W(C),S([])},className:"capitalize",children:C.replace(/_/g," ")},C))})]})]}),A("div",{className:"space-y-2",children:[K(U0,{htmlFor:"field-desc",children:I.description()}),K(h0,{id:"field-desc",placeholder:I.description_optional_placeholder(),value:T,onChange:(C)=>P(C.target.value)})]}),A("div",{className:"flex items-center space-x-2",children:[K(g0,{id:"ai-autofill",checked:F,onCheckedChange:B}),K(U0,{htmlFor:"ai-autofill",children:I.ai_autofill()})]}),(U===_.select||U===_.selectMulti)&&A("div",{className:"space-y-2",children:[A("div",{className:"flex items-center justify-between",children:[K(U0,{className:"text-sm font-medium",children:I.options()}),A($0,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>{let C={id:L5(),displayName:I.new_option(),color:y4(R)};S([...R,C])},children:[K(c2,{className:"h-4 w-4 mr-1"})," ",I.add_option()]})]}),K("div",{className:"space-y-2 max-h-40 overflow-y-auto pr-1",children:R.map((C,E)=>A("div",{className:"flex items-center gap-2",children:[K(h0,{value:C.displayName,onChange:(x)=>{let j=[...R];j[E]={...C,displayName:x.target.value},S(j)},placeholder:I.option_name_placeholder(),className:"h-8 flex-1"}),A(n,{children:[K(o,{asChild:!0,children:K("button",{type:"button",className:"w-6 h-6 rounded-full border shrink-0 cursor-pointer focus:outline-none hover:scale-105 transition-transform",style:{backgroundColor:u2[C.color||""]?.hex||C.color||"#808080"}})}),K(r,{className:"p-2 w-auto",align:"end",children:K("div",{className:"flex gap-1",children:Y2.map((x)=>K("button",{type:"button",className:"w-5 h-5 rounded-full border cursor-pointer hover:scale-110 transition-transform",style:{backgroundColor:u2[x]?.hex||x},onClick:()=>{let j=[...R];j[E]={...C,color:x},S(j)}},x))})})]}),K($0,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>{S(R.filter((x,j)=>j!==E))},children:K(F0,{className:"h-4 w-4"})})]},C.id))})]}),A("div",{className:"flex gap-2 pt-2",children:[K($0,{variant:"secondary",className:"flex-1",onClick:()=>{G("list"),M(""),W(""),B(!1),P(""),S([])},children:I.cancel()}),K($0,{className:"flex-1",onClick:g,disabled:!z||!U,children:I.save()})]})]})});return A("div",{className:"w-80 p-4",children:[K("div",{className:"flex items-center justify-between mb-4",children:A("h3",{className:"font-semibold",children:[I.fields()," ",K("span",{className:"text-muted-foreground text-sm font-normal",children:I.visible_count({count:m})})]})}),A("div",{className:"relative mb-4",children:[K(G1,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),K(h0,{placeholder:I.search_fields_placeholder(),value:q,onChange:(C)=>Q(C.target.value),className:"pl-8"})]}),K("div",{className:"max-h-60 overflow-y-auto pr-2",children:K(S1,{sensors:[O1.configure({activationConstraints:[new T1.Distance({value:8})]}),P1],onDragEnd:D,children:O.map((C,E)=>K(v4,{field:C,index:E,onVisibilityChange:f},C.id))})}),J&&A("div",{className:"mt-4 space-y-2",children:[A($0,{variant:"secondary",className:"w-full",onClick:J,children:[K(M1,{className:"h-4 w-4 mr-2"}),I.manage_fields()]}),A($0,{className:"w-full",onClick:()=>G("create"),children:[K(c2,{className:"h-4 w-4 mr-2"}),I.new_field()]})]})]})}var h4=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.select,[q,Q]=E1.useState(!1),H=Y?.options?.find((W)=>W.id===$),G=()=>{if(!X)Q(!0)},z=(W)=>{Z(W),Q(!1)};return K("div",{className:"relative w-full",onClick:(W)=>W.stopPropagation(),children:A(n,{open:!X&&q,onOpenChange:(W)=>{if(X)return;Q(W)},children:[K(o,{asChild:!0,children:A("div",{onClick:G,className:`flex items-center justify-between w-full min-h-[28px] px-2 py-1 rounded border border-transparent transition-colors ${!X?"cursor-pointer hover:bg-accent hover:border-border group":""}`,children:[((W)=>{if(!W)return K("span",{className:"text-muted-foreground italic",children:"Select an option"});return K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(W.color),children:W.displayName})})(H),!X&&K(w0,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100"})]})}),A(r,{className:"p-1 w-[--radix-popover-trigger-width] min-w-[150px] max-h-60 overflow-auto bg-popover border border-border rounded-lg shadow-lg",align:"start",children:[A("div",{onClick:()=>z(""),className:"px-3 py-2 text-sm text-muted-foreground hover:bg-accent cursor-pointer flex items-center gap-2",children:[K(F0,{className:"w-3 h-3"})," Clear"]}),Y?.options?.map((W)=>K("div",{onClick:()=>z(W.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center",children:K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(W.color),children:W.displayName})},W.id))]})]})})},I1=h4;var J0=c(u(),1);var g4=({value:$=[],config:J,onSave:Z,readOnly:X})=>{let Y=J?.selectMulti,q=J0.useRef(null),[Q,H]=J0.useState(!1),[G,z]=J0.useState(!1),[M,U]=J0.useState($.length),W=Y?.options?.filter((w)=>($||[]).includes(w.id))||[];J0.useLayoutEffect(()=>{if(Q||G){U(W.length);return}if(q.current){let w=q.current.offsetWidth,V=document.createElement("canvas").getContext("2d");if(V){V.font="12px ui-sans-serif, system-ui, sans-serif";let N=0,k=0,D=w-28;for(let f=0;f<W.length;f++){let m=V.measureText(W[f].displayName).width+16+4;if(N+m>D&&f<W.length-1)break;if(f===W.length-1){if(N+m<=w)k++;break}N+=m,k++}U(k)}}},[W,Q,G,$]);let F=(w)=>{let L=$||[],V;if(L.includes(w))V=L.filter((N)=>N!==w);else V=[...L,w];Z(V)},B=(w)=>{if(w.stopPropagation(),Q)return;let L=W.length-M;if(!G&&L>0)z(!0);else if(!X)H(!0)},T=(w)=>{if(w.stopPropagation(),!X)H(!0)},P=W.length-M;return K("div",{className:"relative w-full",onClick:(w)=>w.stopPropagation(),children:A(n,{open:!X&&(G&&!Q||Q),onOpenChange:(w)=>{if(X)return;if(!w)z(!1),H(!1)},children:[K(o,{asChild:!0,children:A("div",{ref:q,onClick:B,className:`w-full px-1 py-1 flex flex-wrap gap-1 rounded border border-transparent transition-all box-border h-[32px] overflow-hidden ${!X||P>0?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:[W.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),W.slice(0,M).map((w)=>K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border border-transparent whitespace-nowrap h-[22px]",style:q0(w.color),children:w.displayName},w.id)),P>0&&A("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-muted text-muted-foreground h-[22px]",children:["+",P]})]})}),K(r,{className:`p-1 bg-popover border rounded-lg shadow-xl max-h-60 overflow-auto ${G&&!Q?"w-[--radix-popover-trigger-width] min-w-[200px] flex flex-wrap gap-1 border-ring min-h-[32px] h-auto cursor-pointer":"w-64 border-border"}`,align:"start",onClick:G&&!Q?T:void 0,children:G&&!Q?A(Q2,{children:[W.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),W.map((w)=>K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border border-transparent whitespace-nowrap h-[22px]",style:q0(w.color),children:w.displayName},w.id))]}):Y?.options?.map((w)=>{let L=($||[]).includes(w.id);return A("div",{onClick:()=>F(w.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center justify-between",children:[K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(w.color),children:w.displayName}),L&&K(H2,{className:"w-4 h-4 text-primary"})]},w.id)})})]})})},D1=g4;var Z0=c(u(),1);var m4=({value:$,onSave:J,readOnly:Z})=>{let[X,Y]=Z0.useState(!1),[q,Q]=Z0.useState($||""),H=Z0.useRef(null);Z0.useEffect(()=>{Q($||"")},[$]),Z0.useEffect(()=>{if(X&&H.current)H.current.focus()},[X]);let G=()=>{if(!Z)Y(!0)},z=()=>{Y(!1),J(q)},M=(U)=>{if(U.key==="Enter")H.current?.blur()};if(X)return K("input",{ref:H,type:"text",value:q,onChange:(U)=>Q(U.target.value),onBlur:z,onKeyDown:M,className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm outline-none shadow-sm"});return K("div",{onClick:G,className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded truncate border border-transparent transition-colors ${!Z?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$||K("span",{className:"text-muted-foreground italic",children:"Empty"})})},f1=m4;var b4=({value:$,onSave:J,readOnly:Z})=>{return K("div",{className:"flex items-center h-[28px] w-full",onClick:(Y)=>Y.stopPropagation(),children:K(g0,{checked:$,onCheckedChange:(Y)=>{if(!Z)J(Y)},disabled:Z,className:"cursor-pointer"})})},x1=b4;var q2=c(u(),1);var c4=({value:$,onSave:J,readOnly:Z})=>{let X=K2(),{members:Y,fetchMembers:q}=o0(),[Q,H]=q2.useState(!1);q2.useEffect(()=>{if(X)q(X)},[X,q]);let G=Y.find((B)=>B.id===$),z=()=>{if(!Z)H(!0)},M=(B)=>{J(B),H(!1)},U=(B)=>{if(Z)return;H(B)},W=(B)=>{return B.split(" ").map((T)=>T[0]).slice(0,2).join("").toUpperCase()};return K("div",{className:"relative w-full",onClick:(B)=>B.stopPropagation(),children:A(n,{open:!Z&&Q,onOpenChange:U,children:[K(o,{asChild:!0,children:A("div",{onClick:z,className:`flex items-center justify-between w-full h-[28px] px-2 rounded border border-transparent transition-colors ${!Z?"cursor-pointer hover:bg-accent hover:border-border group":""}`,children:[((B)=>{if(!B)return K("span",{className:"text-muted-foreground italic text-sm",children:"Select user"});return A("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium bg-muted text-foreground border h-[22px]",children:[A(V0,{className:"w-4 h-4",children:[K(A0,{src:B.image,alt:B.name,className:"object-cover"}),K(L0,{className:"text-[8px] bg-rose-400 text-black font-semibold",children:W(B.name)})]}),K("span",{className:"truncate max-w-[120px]",children:B.name})]})})(G),!Z&&K(w0,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100"})]})}),A(r,{className:"p-1 w-[--radix-popover-trigger-width] min-w-[200px] max-h-60 overflow-auto bg-popover border border-border rounded-lg shadow-lg",align:"start",children:[A("div",{onClick:()=>M(""),className:"px-3 py-2 text-sm text-muted-foreground hover:bg-accent cursor-pointer flex items-center gap-2 rounded-sm",children:[K(F0,{className:"w-3 h-3"})," Clear"]}),Y.map((B)=>A("div",{onClick:()=>M(B.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center gap-2 rounded-sm",children:[A(V0,{className:"w-5 h-5",children:[K(A0,{src:B.image,alt:B.name,className:"object-cover"}),K(L0,{className:"text-[10px] bg-rose-400 text-black font-semibold",children:W(B.name)})]}),K("span",{className:"text-sm font-medium text-foreground",children:B.name})]},B.id))]})]})})},j1=c4;var s=c(u(),1);var u4=({value:$=[],onSave:J,readOnly:Z})=>{let X=K2(),{members:Y,fetchMembers:q}=o0(),Q=s.useRef(null),[H,G]=s.useState(!1),[z,M]=s.useState(!1),[U,W]=s.useState($.length);s.useEffect(()=>{if(X)q(X)},[X,q]);let F=Y.filter((N)=>($||[]).includes(N.id)),B=(N)=>{return N.split(" ").map((k)=>k[0]).slice(0,2).join("").toUpperCase()};s.useLayoutEffect(()=>{if(H||z){W(F.length);return}if(Q.current){let N=Q.current.offsetWidth,O=document.createElement("canvas").getContext("2d");if(O){O.font="12px ui-sans-serif, system-ui, sans-serif";let D=0,f=0,m=N-28;for(let C=0;C<F.length;C++){let x=O.measureText(F[C].name).width+42;if(D+x>m&&C<F.length-1)break;if(C===F.length-1){if(D+x<=N)f++;break}D+=x,f++}W(f)}}},[F,H,z,$]);let T=(N)=>{let k=$||[],O;if(k.includes(N))O=k.filter((D)=>D!==N);else O=[...k,N];J(O)},P=(N)=>{if(N.stopPropagation(),H)return;let k=F.length-U;if(!z&&k>0)M(!0);else if(!Z)G(!0)},R=(N)=>{if(N.stopPropagation(),!Z)G(!0)},S=F.length-U,w=z&&!H||H,L=(N)=>{if(Z)return;if(!N)M(!1),G(!1)},V=(N)=>{return A("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium bg-muted text-foreground border whitespace-nowrap h-[22px]",children:[A(V0,{className:"w-4 h-4",children:[K(A0,{src:N.image,alt:N.name,className:"object-cover"}),K(L0,{className:"text-[8px] bg-rose-400 text-black font-semibold",children:B(N.name)})]}),K("span",{className:"truncate max-w-[100px]",children:N.name})]},N.id)};return K("div",{className:"relative w-full",onClick:(N)=>N.stopPropagation(),children:A(n,{open:!Z&&w,onOpenChange:L,children:[K(o,{asChild:!0,children:A("div",{ref:Q,onClick:P,className:`w-full px-1 py-1 flex flex-wrap gap-1 rounded border border-transparent transition-all box-border h-[32px] overflow-hidden ${!Z||S>0?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:[F.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),F.slice(0,U).map(V),S>0&&A("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-muted text-muted-foreground h-[22px]",children:["+",S]})]})}),K(r,{className:`p-1 bg-popover border rounded-lg shadow-xl max-h-60 overflow-auto ${z&&!H?"w-[--radix-popover-trigger-width] min-w-[200px] flex flex-wrap gap-1 border-ring min-h-[32px] h-auto cursor-pointer":"w-64 border-border"}`,align:"start",onClick:z&&!H?R:void 0,children:z&&!H?A(Q2,{children:[F.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),F.map(V)]}):Y.map((N)=>{let k=($||[]).includes(N.id);return A("div",{onClick:()=>T(N.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center justify-between rounded-sm",children:[A("div",{className:"flex items-center gap-2",children:[A(V0,{className:"w-5 h-5",children:[K(A0,{src:N.image,alt:N.name,className:"object-cover"}),K(L0,{className:"text-[10px] bg-rose-400 text-black font-semibold",children:B(N.name)})]}),K("span",{className:"text-sm font-medium text-foreground",children:N.name})]}),k&&K(H2,{className:"w-4 h-4 text-primary"})]},N.id)})})]})})},y1=u4;var d4=($)=>{if(!$.config)return K("div",{children:"Unknown Field Type"});switch($.config.type){case"text":return K(f1,{...$,value:$.value,onSave:$.onSave});case"longText":return K(w5,{...$,value:$.value,onSave:$.onSave});case"select":return K(I1,{...$,value:$.value,onSave:$.onSave});case"selectMulti":return K(D1,{...$,value:$.value,onSave:$.onSave});case"rating":return K(A5,{...$,value:$.value,onSave:$.onSave});case"number":return K(F5,{...$,value:$.value,onSave:$.onSave});case"toggle":return K(x1,{...$,value:$.value,onSave:$.onSave});case"date":return K(U5,{...$,value:$.value,onSave:$.onSave});case"user":return K(j1,{...$,value:$.value,onSave:$.onSave});case"userMulti":return K(y1,{...$,value:$.value,onSave:$.onSave});default:return K("div",{children:"Unknown Field Type"})}},k6=d4;var T6=({progress:$,className:J})=>{let X=2*Math.PI*20,Y=X-Math.min(100,Math.max(0,$))/100*X;return A("svg",{viewBox:"0 0 50 50",className:R0("w-12 h-12",J),children:[K("circle",{cx:"25",cy:"25",r:20,className:"stroke-muted",strokeWidth:"4",fill:"transparent"}),K("circle",{cx:"25",cy:"25",r:20,className:"stroke-primary transition-all duration-300 ease-out",strokeWidth:"4",fill:"transparent",strokeDasharray:X,strokeDashoffset:Y,transform:"rotate(-90 25 25)"}),K("text",{x:"50%",y:"50%",textAnchor:"middle",dy:".3em",className:"fill-foreground text-[10px] font-bold",children:`${Math.round($)}%`})]})};var l4=($)=>{if(isNaN($))return"00:00";let J=new Date($*1000),Z=J.getUTCHours(),X=J.getUTCMinutes().toString().padStart(2,"0"),Y=J.getUTCSeconds().toString().padStart(2,"0");if(Z)return`${Z}:${X}:${Y}`;return`${X}:${Y}`},E6=($,J,Z,X)=>{if(Z==="frames")return`${$} fr`;if(Z==="standard")return l4($/J);let Y=Math.round(J),q=J!==Y,Q=!1;if(q&&(Y===30||Y===60))Q=!0;let H=0;if(X){let B=X.match(/^([012]\d):(\d\d):(\d\d)(:|;|\.)(\d+)$/);if(B){let T=parseInt(B[1],10),P=parseInt(B[2],10),R=parseInt(B[3],10),S=parseInt(B[5],10);if(Q=B[4]!==":",H=(T*3600+P*60+R)*Y+S,Q){let w=T*60+P,L=J<30?2:4;H-=L*(w-Math.floor(w/10))}}}let G=$+H;if(Q){let B=J<30?2:4,T=Math.floor(G/(17982*B/2)),P=G%(17982*B/2);if(P<B)P=P+B;G+=9*B*T+B*Math.floor((P-B)/(1798*B/2))}let z=G%Y,M=Math.floor(G/Y)%60,U=Math.floor(G/(Y*60))%60,W=Math.floor(G/(Y*3600))%24,F=Q?";":":";return`${W.toString().padStart(2,"0")}:${U.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}${F}${z.toString().padStart(2,"0")}`};var I6=($,J)=>{if(!J)return 0;let Z=1/J;return $*Z+Z/2},p4=($)=>Math.max(100,3000/($||30)),D6=({dbTotalFrames:$,containerDuration:J,frameRate:Z})=>{let X=Z||30,Y=Math.round(J*X);if($<=0)return Y;let q=$/X,Q=J-q,H=p4(X)/1000;return Q>H?Y:$};var _1=c(u(),1);function y6({className:$,defaultValue:J,value:Z,min:X=0,max:Y=100,...q}){let Q=_1.useMemo(()=>Array.isArray(Z)?Z:Array.isArray(J)?J:[X,Y],[Z,J,X,Y]);return A(m0.Root,{"data-slot":"slider",defaultValue:J,value:Z,min:X,max:Y,className:R0("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",$),...q,children:[K(m0.Track,{"data-slot":"slider-track",className:R0("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:K(m0.Range,{"data-slot":"slider-range",className:R0("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:Q.length},(H,G)=>K(m0.Thumb,{"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},G))]})}
|
|
2
|
+
export{A2 as p,K5 as q,N5 as r,k2 as s,C2 as t,Q1 as u,N$ as v,H5 as w,L5 as x,T6 as y,i4 as z,A5 as A,i as B,Y1 as C,Y2 as D,u2 as E,q0 as F,y4 as G,_4 as H,E$ as I,o0 as J,k6 as K,l4 as L,E6 as M,I6 as N,p4 as O,D6 as P,y6 as Q};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{p as
|
|
1
|
+
import{$g as l,Zg as a,ah as o}from"./chunk-cbjfw47x.js";var p=a()(o((i)=>({fileViewLeftSidebarCollapsed:!0,setFileViewLeftSidebarCollapsed:(e)=>i({fileViewLeftSidebarCollapsed:e}),fileViewRightSidebarCollapsed:!1,setFileViewRightSidebarCollapsed:(e)=>i({fileViewRightSidebarCollapsed:e}),fileListLeftSidebarCollapsed:!1,setFileListLeftSidebarCollapsed:(e)=>i({fileListLeftSidebarCollapsed:e}),fileListRightSidebarCollapsed:!0,setFileListRightSidebarCollapsed:(e)=>i({fileListRightSidebarCollapsed:e}),shareConfigLeftSidebarCollapsed:!1,setShareConfigLeftSidebarCollapsed:(e)=>i({shareConfigLeftSidebarCollapsed:e}),shareConfigRightSidebarCollapsed:!1,setShareConfigRightSidebarCollapsed:(e)=>i({shareConfigRightSidebarCollapsed:e}),viewModes:{},setViewMode:(e,d)=>i((s)=>({viewModes:{...s.viewModes,[e]:d}})),videoTimeDisplayMode:"standard",setVideoTimeDisplayMode:(e)=>i({videoTimeDisplayMode:e})}),{name:"ui-storage",storage:l(()=>localStorage)}));
|
|
2
|
+
export{p as vf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{f as
|
|
1
|
+
import{Cg as r,hj as t,ij as a,yj as o}from"./chunk-cbjfw47x.js";var c=t("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function f({className:i,variant:e="default",asChild:n=!1,...s}){let d=n?a.Root:"span";return r(d,{"data-slot":"badge","data-variant":e,className:o(c({variant:e}),i),...s})}
|
|
2
|
+
export{f as eg};
|