PageSourceSearch

https://sodda.ai/_next/static/chunks/34f9x7pluw7ue.js

js sodda.ai collected 2026-10-05 13:33:03 UTC 25,088 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,713567,e=>{"use strict";var s=e.i(470698),a=e.i(744555),t=e.i(430178),r=e.i(561833);let i={name:"arrow-down-up",size:24,node:[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]};i.node;let n=(0,r.default)(i),l={name:"arrow-down-wide-narrow",size:24,node:[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],aliases:["sort-desc"]};l.node;let o=(0,r.default)(l),d={name:"arrow-up-wide-narrow",size:24,node:[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h4",key:"1krc32"}]]};d.node;let c=(0,r.default)(d);var m=e.i(145746),u=e.i(362985),u=u;let x={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};x.node;let h=(0,r.default)(x),p={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};p.node;let g=(0,r.default)(p),f={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};f.node;let j=(0,r.default)(f);var b=e.i(166458),w=e.i(869995),v=e.i(76749),y=e.i(852716);e.i(147857);var N=e.i(607749),k=e.i(222969);e.i(598118);var D=e.i(542950),C=e.i(97256),z=e.i(974438);e.i(664703);var M=e.i(15679),_=e.i(583898),S=e.i(526683),T=e.i(610499),R=e.i(472067),L=e.i(123010),A=e.i(620577);let B={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};B.node;let F=(0,r.default)(B);var I=e.i(232181),P=e.i(545535);let E={name:"ellipsis-vertical",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],aliases:["more-vertical"]};E.node;let H=(0,r.default)(E);var O=e.i(931338);let q={name:"square-arrow-out-up-right",size:24,node:[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],aliases:["arrow-up-right-from-square"]};q.node;let G=(0,r.default)(q);var V=e.i(811439),$=e.i(998808),K=e.i(132787),W=e.i(124622),U=e.i(39660),Y=e.i(102981),J=e.i(68265),Q=e.i(637263),X=e.i(869198),Z=e.i(796543),ee=e.i(631576),es=e.i(334168);function ea({open:e,onOpenChange:a,title:t,description:r,confirmLabel:i,cancelLabel:n,onConfirm:l,destructive:o,busy:d}){return(0,s.jsx)(es.Dialog,{open:e,onOpenChange:a,children:(0,s.jsxs)(es.DialogContent,{className:"sm:max-w-sm",children:[(0,s.jsxs)(es.DialogHeader,{children:[(0,s.jsx)(es.DialogTitle,{children:t}),r?(0,s.jsx)(es.DialogDescription,{children:r}):null]}),(0,s.jsxs)(es.DialogFooter,{className:"gap-2 sm:gap-2",children:[(0,s.jsx)(T.Button,{variant:"outline",onClick:()=>a(!1),disabled:d,className:"sm:min-w-24",children:n}),(0,s.jsx)(T.Button,{variant:o?"destructive":"default",onClick:()=>{l(),a(!1)},disabled:d,className:"sm:min-w-24",children:i})]})]})})}var et=e.i(684571);let er={slide:{shape:"slide"},imageslides:{shape:"slide"},test:{shape:"test"},atestatsiya:{shape:"test"},flashcard:{shape:"game",motif:"cards"},crossword:{shape:"game",motif:"grid"},"listening-game":{shape:"game",motif:"audio"},"sortball-game":{shape:"game",motif:"balls"},podcast:{shape:"media",motif:"audio"},image:{shape:"media",motif:"image"},infographics:{shape:"media",motif:"image"},congratulation:{shape:"media",motif:"card"},resume:{shape:"document",variant:"plain"},translation:{shape:"document",variant:"plain"}};function ei({variant:e,toolKey:a,cover:t,className:r}){let i=t?a&&er[a]?er[a]:"slide"===e?{shape:"slide"}:"test"===e?{shape:"test"}:{shape:"document",variant:"academic"}:null;
1return(0,s.jsx)("div",{"aria-hidden":!0,className:(0,S.cn)("bg-background relative flex h-full w-full items-center justify-center overflow-hidden",r),children:t&&i?"slide"===i.shape?(0,s.jsx)(et.SlideCover,{facts:t,className:"h-[74%] w-auto"}):"test"===i.shape?(0,s.jsx)(et.TestCover,{facts:t,className:"h-[84%] w-auto"}):"game"===i.shape?(0,s.jsx)(et.GameCover,{facts:t,motif:i.motif,className:"h-[74%] w-auto"}):"media"===i.shape?(0,s.jsx)(et.MediaCover,{facts:t,motif:i.motif,className:"h-[74%] w-auto"}):(0,s.jsx)(et.DocumentCover,{facts:t,variant:i.variant,className:"h-[84%] w-auto"}):"slide"===e?(0,s.jsx)(ed,{}):"test"===e?(0,s.jsx)(em,{}):(0,s.jsx)(ec,{})})}function en({className:e,children:a}){return(0,s.jsx)("div",{className:(0,S.cn)("bg-card ring-border/60 flex flex-col overflow-hidden rounded-[4px] shadow-sm ring-1",e),children:a})}function el({w:e,tone:a="light"}){return(0,s.jsx)("span",{className:(0,S.cn)("shrink-0 rounded-full","bold"===a?"bg-foreground/70 h-1.5":"bg-muted-foreground/25 h-1"),style:{width:e}})}function eo({className:e}){return(0,s.jsx)("span",{className:(0,S.cn)("bg-muted-foreground/15 rounded-sm",e)})}function ed(){return(0,s.jsxs)(en,{className:"aspect-[16/10] h-[74%]",children:[(0,s.jsx)("span",{className:"bg-foreground
1/90 h-[24%] w-full shrink-0"}),(0,s.jsxs)("div",{className:"flex flex-1 gap-2 p-2",children:[(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-1 pt-0.5",children:[(0,s.jsx)(el,{w:"92%"}),(0,s.jsx)(el,{w:"82%"}),(0,s.jsx)(el,{w:"62%"})]}),(0,s.jsx)(eo,{className:"h-[72%] w-[34%] self-center"})]})]})}function ec(){return(0,s.jsxs)(en,{className:"aspect-[3/4] h-[84%] gap-[3px] p-2.5",children:[(0,s.jsx)(el,{w:"50%"}),(0,s.jsx)(el,{w:"32%"}),(0,s.jsx)("span",{className:"h-1"}),(0,s.jsx)(el,{w:"58%",tone:"bold"}),(0,s.jsx)("span",{className:"h-0.5"}),(0,s.jsx)(el,{w:"100%"}),(0,s.jsx)(el,{w:"96%"}),(0,s.jsx)(el,{w:"98%"}),(0,s.jsx)(el,{w:"88%"}),(0,s.jsx)(eo,{className:"my-1 h-6 w-full"}),(0,s.jsx)(el,{w:"40%"})]})}function em(){return(0,s.jsx)(en,{className:"aspect-[3/4] h-[84%] justify-center gap-2.5 p-2.5",children:[1,2,3].map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsxs)("span",{className:"text-muted-foreground/70 text-thumb-sm w-2 leading-none font-semibold",children:[e,"."]}),[0,1,2].map(e=>(0,s.jsx)("span",{className:(0,S.cn)("size-1.5 shrink-0 rounded-full",1===e?"bg-foreground
1/70":"ring-muted-foreground/40 ring-1")},e)),(0,s.jsx)(el,{w:"42%"})]},e))})}let eu=(0,a.memo)(function({item:e,onDelete:r,onRename:i,onPayAndStart:n,onCancel:l,view:o="grid"}){let d=(0,t.useTranslations)("app"),c=(0,t.useTranslations)("homeDashboard.workRun"),m=(0,A.useLocale)(),u=(0,C.useRouter)(),[x,h]=(0,a.useState)(!1),p=()=>h(!0),g={prefetch:!!x&&null,onMouseEnter:p,onTouchStart:p,onFocus:p},f=(0,Q.toolForServiceType)(e.serviceType),j=f?.icon??P.FileText,w=f?d(f.titleKey):e.serviceType,v=f?.color,y=(0,Q.historyTabForServiceType)(e.serviceType),N=e.inFlight,k=N&&e.stale,z=e.progressPercent,M="number"==typeof z?Math.max(0,Math.min(100,Math.round(z))):null,_=!!r,L={kindLabel:w,topic:e.title,year:e.ts>0?new Date(e.ts).getFullYear():void 0,...e.cover},[B,E]=(0,a.useState)(!1),[q,et]=(0,a.useState)(!1),[er,en]=(0,a.useState)(e.title),[el,eo]=(0,a.useState)(null),ed=(0,a.useRef)(null),ec=(0,K.useSessionOperationGuard)({requireAuthenticatedSession:!0}),em=e=>{if(ed.current)return null;let s=ec();return s()?(ed.current=e,eo(e),s):null},eu=e=>{ed.current=null,e()&&eo(null)},ex=()=>{if(!l)return;let s=em("cancel");s&&(async()=>{try{if(await l(e),!s())return;$.toast.success(c("cancelled"))}catch(e){if(!s())return;$.toast.error("generation_already_started"===(0,W.readErrorCode)(e)?c("alreadyStarted"):c("cancelFailed"))}finally{eu(s)}})()},eh=(0,s.jsx)("span",{className:(0,S.cn)("flex size-[30px] shrink-0 items-center justify-center rounded-lg",v?"bg-[rgb(var(--tc)/0.12)]":"bg-muted ring-border/50 ring-1"),children:(0,s.jsx)(j,{className:(0,S.cn)("size-[18px]",v?"text-[rgb(var(--tc))]":"text-muted-foreground")})}),ep=(0,s.jsx)(j,{className:(0,S.cn)("size-4 shrink-0",v?"text-[rgb(var(--tc))]":"text-muted-foreground")}),eg=e.ts>0?(0,X.formatBackendDateTime)(e.ts,m):"",ef=(0,s.jsxs)("p",{className:"text-muted-foreground min-w-0 truncate text-xs",children:[(0,s.jsx)("span",{className:"text-foreground/80 font-medium",children:w}),e.timeLabel?(0,s.jsxs)("span",{children:[" · ",e.timeLabel]}):null,eg?(0,s.jsxs)("span",{className:"sr-only",children:[" · ",eg]}):null]}),ej=e.awaitingPayment?(0,s.jsx)("span",{className:"text-warning-text shrink-0 text-xs font-semibold",children:c("awaitingBadge")}):N?(0,s.jsx)("span",{className:(0,S.cn)("shrink-0 text-xs font-semibold tabular-nums",k?"text-muted-foreground":"text-warning-text"),children:null!==M?`${M}%`:d("workInFlight.badge")}):null,eb=N?(0,s.jsx)("div",{className:"bg-muted absolute inset-x-0 bottom-0 h-1 overflow-hidden",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":k?void 0:M??void 0,"aria-label":d("workInFlight.badge"),children:k?(0,s.jsx)("div",{className:"bg-muted-foreground/40 h-full w-full"}):null!==M?(0,s.jsx)("div",{className:"bg-brand-red h-full rounded-r-full transition-[width] duration-500",style:{width:`${M}%`}}):(0,s.jsx)("div",{className:"bg-brand-red h-full w-1/3 rounded-full motion-safe:animate-[work-progress-indeterminate_1.4s_ease-in-out_infinite] motion-reduce:w-2/3"})}):null,ew=_?(0,s.jsxs)(R.DropdownMenu,{children:[(0,s.jsx)(R.DropdownMenuTrigger,{"aria-label":d("workMenu"),className:(0,S.cn)("text-muted-foreground hover:text-foreground border-border/70 bg-card hover:bg-muted flex size-7 items-center justify-center rounded-lg border shadow-sm transition","focus-visible:ring-ring/50 focus-visible:ring-2 focus-visible:outline-none"),children:(0,s.jsx)(H,{className:"size-4"})}),(0,s.jsxs)(R.DropdownMenuContent,{align:"end",children:[(0,s.jsx)(R.DropdownMenuItem,{asChild:!0,children:(0,s.jsxs)(C.Link,{href:e.href,children:[(0,s.jsx)(G,{className:"size-4"}),d("workOpen")]})}),i&&(0,s.jsxs)(R.DropdownMenuItem,{onSelect:()=>{en(e.title),et(!0)},children:[(0,s.jsx)(O.Pencil,{className:"size-4"}),d("workRename")]}),l&&e.cancellable&&!e.awaitingPayment&&(0,s.jsxs)(R.DropdownMenuItem,{onSelect:ex,disabled:null!==el,children:[(0,s.jsx)(F,{className:"size-4"}),c("cancel")]}),(0,s.jsx)(R.DropdownMenuSeparator,{}),(0,s.jsxs)(R.DropdownMenuItem,{onSelect:()=>E(!0),className:"text-destructive focus:text-destructive",children:[(0,s.jsx)(V.Trash2,{className:"size-4"}),d("workDelete.action")]})]})]}):null,ev=e.awaitingPayment&&(n||l)?(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[void 0!==e.priceSom&&(0,s.jsxs)("span",{className:"text-muted-foreground me-auto flex items-center gap-1 text-xs tabular-nums",children:[(0,s.jsx)(I.Coins,{className:"size-3.5","aria-hidden":"true"}),c("price",{price:(0,Y.formatNumber)(e.priceSom)})]}),n&&(0,s.jsxs)(T.Button,{size:"sm",onClick:()=>
1{if(!n)return;let s=em("pay");s&&(async()=>{try{if(await n(e),!s())return;u.push(e.href)}catch(e){if(!s())return;if((0,J.isInsufficientFundsError)(e)){$.toast.error(c("stillShort")),(0,U.track)("balance_error_to_purchase",{tool:"/home"}),u.push("/purchase");return}$.toast.error("generation_not_awaiting_payment"===(0,W.readErrorCode)(e)?c("notAwaiting"):c("payFailed"))}finally{eu(s)}})()},disabled:null!==el,"aria-busy":"pay"===el,children:["pay"===el&&(0,s.jsx)(b.Loader2,{className:"size-4 animate-spin","aria-hidden":"true"}),c("payAndStart")]}),l&&(0,s.jsx)(T.Button,{size:"sm",variant:"ghost",onClick:ex,disabled:null!==el,"aria-busy":"cancel"===el,children:c("cancel")})]}):null,ey=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ea,{open:B,onOpenChange:E,title:d("workDelete.confirm"),description:d("workDelete.irreversible"),confirmLabel:d("workDelete.action"),cancelLabel:d("cancel"),onConfirm:()=>{r&&$.toast.promise(r(e),{loading:d("workDelete.progress"),success:e=>e&&e.participants+e.shared_claims>0?d("workDelete.doneShared",{participants:e.participants,claims:e.shared_claims}):d("workDelete.done"),error:e=>e instanceof D.WorkDeleteError&&"in_progress"===e.reason?d("workDelete.inProgress"):d("workDelete.failed")})},destructive:!0}),i&&(0,s.jsx)(es.Dialog,{open:q,onOpenChange:et,children:(0,s.jsxs)(es.DialogContent,{className:"sm:max-w-sm",children:[(0,s.jsx)(es.DialogHeader,{children:(0,s.jsx)(es.DialogTitle,{children:d("workRename")})}),(0,s.jsxs)("form",{onSubmit:s=>{let a;s.preventDefault(),a=er.trim(),et(!1),i&&a&&a!==e.title&&i(e,a).catch(()=>$.toast.error(d("workRenameFailed")))},children:[(0,s.jsx)(ee.Input,{value:er,onChange:e=>en(e.target.value),placeholder:d("workRenamePlaceholder"),"aria-label":d("workRename"),maxLength:120,autoFocus:!0}),(0,s.jsxs)(es.DialogFooter,{className:"mt-4 gap-2 sm:gap-2",children:[(0,s.jsx)(T.Button,{type:"button",variant:"outline",onClick:()=>et(!1),className:"sm:min-w-24",children:d("cancel")}),(0,s.jsx)(T.Button,{type:"submit",disabled:!er.trim(),className:"sm:min-w-24",children:d("save")})]})]})]})})]});if("list"===o){let a=e.awaitingPayment&&(ej||ev)?(0,s.jsxs)("div",{"data-slot":"work-run-row",className:"flex flex-wrap items-center gap-x-3 gap-y-2 ps-[42px]",children:[ej,ev]}):null;return(0,s.jsxs)("div",{style:v?(0,Z.toolColorVars)(v):void 0,className:(0,S.cn)("group bg-card border-border relative flex flex-col gap-2 overflow-hidden rounded-xl border p-2.5 shadow-[0_1px_3px_0_rgba(0,0,0,0.06),0_1px_2px_-1px_rgba(0,0,0,0.06)] transition-colors duration-200","focus-within:border-ring hover:border-foreground
1/20"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)(C.Link,{href:e.href,className:"flex min-w-0 flex-1 items-center gap-3 rounded-lg",...g,children:[eh,(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,s.jsx)("span",{className:"text-foreground text-meta-lg truncate font-bold",children:e.title}),ef]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2 pe-1",children:[e.awaitingPayment?null:ej,ew]})]}),a,eb,ey]})}return(0,s.jsxs)("div",{style:v?(0,Z.toolColorVars)(v):void 0,className:(0,S.cn)("group bg-card border-border relative overflow-hidden rounded-xl border shadow-[0_1px_3px_0_rgba(0,0,0,0.06),0_1px_2px_-1px_rgba(0,0,0,0.06)] transition-colors duration-200","focus-within:border-ring hover:border-foreground/20"),children:[(0,s.jsxs)(C.Link,{href:e.href,className:"focus-visible:ring-ring/50 block focus-visible:ring-[3px] focus-visible:outline-none",...g,children:[(0,s.jsx)("div",{className:"border-border/60 relative aspect-[7/5] border-b",children:(0,s.jsx)(ei,{variant:"slides"===y?"slide":"tests"===y?"test":"doc",toolKey:f?.key,cover:L})}),(0,s.jsxs)("div",{className:"px-3.5 py-3",children:[(0,s.jsxs)("div",{className:"hidden items-start gap-3 sm:flex",children:[eh,(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-foreground text-body-sm line-clamp-2 min-h-[2.75em] leading-snug font-semibold",children:e.title}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[ef,ej]})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5 sm:hidden",children:[(0,s.jsx)("p",{className:"text-foreground text-meta-lg line-clamp-2 min-h-[2.7em] leading-[1.35] font-bold",children:e.title}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[ep,ef]})]})]})]}),ev?(0,s.jsx)("div",{className:"px-3.5 pb-3",children:ev}):null,ew?(0,s.jsx)("div",{className:"absolute end-2 top-2 z-10",children:ew}):null,eb,ey]})}),ex=["all","slides","documents","tests","games"],eh="home-view";function ep({onRetry:e,label:a}){return(0,s.jsxs)(T.Button,{type:"button",variant:"outline",size:"sm",className:"gap-2",onClick:e,children:[(0,s.jsx)(y.RefreshCw,{className:"size-4","aria-hidden":"true"}),a]})}function eg({icon:e,title:a,description:t,action:r,role:i}){return(0,s.jsxs)("div",{role:i,className:"flex min-h-[40vh] flex-col items-center justify-center gap-3 px-6 py-12 text-center lg:min-h-[55vh] lg:py-16",children:[e,(0,s.jsx)("p",{className:"text-foreground text-lg font-semibold",children:a}),(0,s.jsx)("p",{className:"text-muted-foreground max-w-md text-base",children:t}),r?(0,s.jsx)("div",{className:"mt-2",children:r}):null]})}e.s(["HomeDashboard",0,function(){let e=(0,t.useTranslations)("homeDashboard"),r=(0,t.useTranslations)("errorGeneral"),i=(0,t.useTranslations)("common"),l=(0,k.useAuthStore)(e=>e.isAuthenticated),d=(0,k.useAuthStore)(e=>e.hasAttempted),[x,p]=(0,a.useState)("all"),[f,A]=(0,a.useState)("recent"),[B,F]=(0,a.useState)("desc"),{items:I,isLoading:P,hasInitialLoadError:E,isRetrying:H,retryLoad:O,hasMore:q,isSearchingOlder:G,loadMore:V,isLoadingMore:$,hasLoadMoreError:K,retryLoadMore:W,deleteWork:U,renameWork:Y,resumeWork:J,cancelWork:Q}=(0,D.useWorkHistory)({isAuthenticated:l,hasAttempted:d,tab:x,sort:"name"===f?"title":"recent",dir:B}),X="recent"===f?e("sortRecent"):e("sortName"),Z=e=>{e!==f&&(A(e),F("name"===e?"asc":"desc"))};(0,M.useAbandonedInFlightReporter)(I);let[ee,es]=(0,a.useState)("grid");(0,a.useEffect)(()=>{try{let e=window.localStorage.getItem(eh);("list"===e||"grid"===e)&&es(e)}catch{}},[]);let ea=e=>{es(e);try{window.localStorage.setItem(eh,e)}catch{}},et=(0,z.useInfiniteScroll)(V,$),er=(0,N.useAuthHint)(),ei=d&&!l,en=!er&&!d,el=ei||en,eo=!el&&(P||!d)&&0===I.length;return(0,s.jsxs)("div",{className:(0,S.cn)(_.PAGE_CONTAINER,!el&&"md:mb-10"),children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(h,{className:"text-foreground size-5 shrink-0",strokeWidth:1.75}),(0,s.jsx)("h1",{className:"text-foreground text-base font-semibold tracking-tight",children:e("myFiles")})]}),(0,s.jsx)(T.Button,{asChild:!0,className:"w-full gap-2 shadow-sm sm:w-auto",children:(0,s.jsxs)(C.Link,{href:"/create",children:[(0,s.jsx)(v.Plus,{className:"h-4 w-4"}),e("create")]})})]}),(0,s.jsxs)("div",{className:"mt-8 flex flex-row items-center justify-between gap-2 sm:gap-3",children:[(0,s.jsx)("div",{className:"hidden min-w-0 flex-1 items-center gap-2 sm:flex sm:flex-wrap",children:ex.map(a=>(0,s.jsx)("button",{type:"button",onClick:()=>p(a),"aria-pressed":x===a,className:(0,S.cn)("inline-flex h-9 flex-none items-center rounded-full border px-4 text-sm font-medium whitespace-nowrap transition-colors","focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-none",x===a?"border-primary bg-primary text-primary-foreground":"border-border/60 text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:e(`tabs.${a}`)},a))}),(0,s.jsx)("div",{className:"flex min-w-0 flex-1 sm:hidden",children:(0,s.jsxs)(R.DropdownMenu,{children:[(0,s.jsx)(R.DropdownMenuTrigger,{asChild:!0,children:(0,s.jsxs)(T.Button,{variant:"outline",className:"min-w-0 justify-between gap-2 font-medium",children:[(0,s.jsx)("span",{className:"truncate",children:e(`tabs.${x}`)}
1),(0,s.jsx)(m.ChevronDown,{className:"size-4 shrink-0 opacity-70"})]})}),(0,s.jsx)(R.DropdownMenuContent,{align:"start",children:ex.map(a=>(0,s.jsx)(R.DropdownMenuItem,{onClick:()=>p(a),className:(0,S.cn)(x===a&&"text-primary font-medium"),children:e(`tabs.${a}`)},a))})]})}),(0,s.jsxs)("div",{className:"flex flex-none items-center gap-2",children:[(0,s.jsxs)(R.DropdownMenu,{children:[(0,s.jsx)(R.DropdownMenuTrigger,{asChild:!0,children:(0,s.jsxs)(T.Button,{variant:"outline",className:"gap-2 font-medium","aria-label":X,children:[(0,s.jsx)("span",{className:"hidden sm:inline",children:X}),(0,s.jsx)(n,{className:"size-4 sm:hidden"}),(0,s.jsx)(m.ChevronDown,{className:"hidden size-4 opacity-70 sm:inline"})]})}),(0,s.jsxs)(R.DropdownMenuContent,{align:"end",children:[(0,s.jsx)(R.DropdownMenuItem,{onClick:()=>Z("recent"),className:(0,S.cn)("recent"===f&&"text-primary font-medium"),children:e("sortRecent")}),(0,s.jsx)(R.DropdownMenuItem,{onClick:()=>Z("name"),className:(0,S.cn)("name"===f&&"text-primary font-medium"),children:e("sortName")})]})]}),(0,s.jsx)(T.Button,{variant:"outline",size:"icon","aria-label":e("sortDirection"),onClick:()=>F(e=>"desc"===e?"asc":"desc"),children:"desc"===B?(0,s.jsx)(o,{className:"size-4"}):(0,s.jsx)(c,{className:"size-4"})}),(0,s.jsxs)("div",{role:"group","aria-label":e("viewGrid"),className:"border-border/60 flex items-center gap-0.5 rounded-lg border p-0.5",children:[(0,s.jsx)("button",{type:"button",onClick:()=>ea("grid"),"aria-pressed":"grid"===ee,"aria-label":e("viewGrid"),className:(0,S.cn)("flex size-8 items-center justify-center rounded-md transition-colors","focus-visible:ring-ring/50 focus-visible:ring-2 focus-visible:outline-none","grid"===ee?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:(0,s.jsx)(g,{className:"size-4"})}),(0,s.jsx)("button",{type:"button",onClick:()=>ea("list"),"aria-pressed":"list"===ee,"aria-label":e("viewList"),className:(0,S.cn)("flex size-8 items-center justify-center rounded-md transition-colors","focus-visible:ring-ring/50 focus-visible:ring-2 focus-visible:outline-none","list"===ee?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:(0,s.jsx)(j,{className:"size-4"})})]})]})]}),(0,s.jsxs)("div",{className:"mt-6",children:[el?(0,s.jsxs)("div",{"data-anon-boot":d?"settled":"pending",children:[(0,s.jsx)("div",{"data-anon-prompt":!0,children:(0,s.jsx)(eg,{icon:(0,s.jsx)(w.LogIn,{className:"text-muted-foreground h-10 w-10"}),title:e("loginTitle"),description:e("loginDescription"),action:(0,s.jsx)(T.Button,{onClick:()=>window.dispatchEvent(new CustomEvent("openLoginModal")),children:e("loginCta")})})}),(0,s.jsxs)("div",{role:"status","aria-live":"polite",className:"tg-launch-status text-muted-foreground hidden items-center justify-center gap-2 py-16 text-sm",children:[(0,s.jsx)(b.Loader2,{className:"size-5 animate-spin","aria-hidden":"true"}),i("loading")]})]}):E?(0,s.jsx)(eg,{role:"alert",icon:(0,s.jsx)(u.default,{className:"text-destructive h-10 w-10"}),title:r("title"),description:r("message"),action:(0,s.jsxs)(T.Button,{type:"button",className:"gap-2",onClick:O,disabled:H,"aria-busy":H,children:[H?(0,s.jsx)(b.Loader2,{className:"size-4 animate-spin","aria-hidden":"true"}):(0,s.jsx)(y.RefreshCw,{className:"size-4","aria-hidden":"true"}),H?e("loadingMore"):r("tryAgain")]})}):eo?(0,s.jsx)("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-3 xl:grid-cols-4",children:Array.from({length:8},(e,a)=>(0,s.jsxs)("div",{className:"border-border bg-card overflow-hidden rounded-xl border shadow-[0_1px_3px_0_rgba(0,0,0,0.06),0_1px_2px_-1px_rgba(0,0,0,0.06)]",children:[(0,s.jsx)(L.Skeleton,{className:"bg-background aspect-[7/5] w-full rounded-none"}),(0,s.jsxs)("div",{className:"flex items-start gap-3 px-3.5 py-3",children:[(0,s.jsx)(L.Skeleton,{className:"size-[30px] shrink-0 rounded-lg"}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-2 pt-1",children:[(0,s.jsx)(L.Skeleton,{className:"h-4 w-4/5"}),(0,s.jsx)(L.Skeleton,{className:"h-3 w-1/2"})]})]})]},a))}):G&&K?(0,s.jsx)(eg,{role:"alert",icon:(0,s.jsx)(u.default,{className:"text-destructive h-10 w-10"}),title:e("loadMoreError"),description:r("message"),action:(0,s.jsx)(ep,{onRetry:W,label:r("tryAgain")})}):G?(0,s.jsx)(eg,{role:"status",icon:(0,s.jsx)(b.Loader2,{className:"text-muted-foreground h-10 w-10 animate-spin"}),title:e("searchingOlder"),description:e("loadingMore")}):0===I.length?(0,s.jsx)(eg,{icon:(0,s.jsx)(h,{className:"text-muted-foreground h-10 w-10"}),title:"all"!==x?e("noResultsTitle"):e("emptyTitle"),description:"all"!==x?e("noResultsDescription"):e("empty
1Description"),action:"all"!==x?void 0:(0,s.jsx)(T.Button,{asChild:!0,className:"gap-2",children:(0,s.jsxs)(C.Link,{href:"/create",children:[(0,s.jsx)(v.Plus,{className:"h-4 w-4"}),e("create")]})})}):(0,s.jsx)("div",{className:(0,S.cn)("grid"===ee?"grid grid-cols-2 gap-4 lg:grid-cols-3 xl:grid-cols-4":"flex flex-col gap-3"),children:I.map(e=>(0,s.jsx)(eu,{item:e,onDelete:U,onRename:Y,onPayAndStart:J,onCancel:Q,view:ee},e.id))}),q?(0,s.jsx)("div",{ref:et,"data-testid":"history-sentinel",className:"mt-6 flex min-h-10 items-center justify-center",children:$?(0,s.jsx)(b.Loader2,{className:"text-muted-foreground size-5 animate-spin","aria-hidden":"true"}):K&&!G?(0,s.jsxs)("div",{role:"alert",className:"flex flex-col items-center gap-2 text-center",children:[(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e("loadMoreError")}),(0,s.jsx)(ep,{onRetry:W,label:r("tryAgain")})]}):null}):null]})]})}],713567)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.