1"use strict";(self.rspackChunkrezona_lab=self.rspackChunkrezona_lab||[]).push([[3253],{67444(e,n,t){var o=t(72361),i=t(68413),r=t(60140),l=t(55496),a=t(71470),s=t(35286),d=t(95086),c=t(71162),p=t(41880),u=t(96962),g=t(55667),x=t(20598),f=t(24328),m=t(64577),b=t(78807),h=t(80593),y=t(38244),F=t(13269);function j(e){return!!e&&"object"==typeof e&&"response"in e&&401===e.response?.status}function v(e){let{projectId:n,name:t,mobile:r=!1}=e,{t:l}=(0,h.s9)(),a=(0,u.jE)(),[s,d]=(0,i.useState)(!1),[c,p]=(0,i.useState)(null),[v,k]=(0,i.useState)(null),w=(0,i.useRef)(null),S=e=>{a.setQueriesData({queryKey:f.bB.gameProjects},t=>(0,F.t)(t,n,e))},z=()=>{a.invalidateQueries({queryKey:f.bB.gameProjects})},C=(0,g.n)({mutationFn:e=>(0,f.T$)(n,{name:e}),onSuccess:e=>{let n=e.name?.trim()||t;S(t=>({...t,...e,name:n})),z(),x.oR.success(l("studio_project_renamed")),p(null)},onError:e=>{j(e)||x.oR.error((0,m.SU)(e,l("studio_project_rename_failed")))}}),I=(0,g.n)({mutationFn:()=>(0,f.ZD)(n),onSuccess:()=>{S(()=>null),z(),x.oR.success(l("studio_project_deleted")),p(null)},onError:e=>{j(e)||x.oR.error((0,m.SU)(e,l("studio_project_delete_failed")))}});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("button",{ref:w,type:"button","aria-label":l("studio_project_actions"),"aria-haspopup":"menu","aria-expanded":s,onClick:e=>{e.preventDefault(),e.stopPropagation(),k(w.current?.getBoundingClientRect()??null),d(e=>!e)},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:r?24:28,height:r?24:28,margin:0,padding:0,border:"none",borderRadius:8,background:s?"rgba(255,255,255,0.08)":"transparent",color:y.x.grey200,cursor:"pointer",flexShrink:0},children:(0,o.jsx)(h.In,{name:"more",size:18})}),r?(0,o.jsx)(b.U,{open:s,title:t,onClose:()=>d(!1),actions:[{key:"rename",label:l("studio_rename"),icon:"pencil",onSelect:()=>p("rename")},{key:"delete",label:l("studio_delete_project"),icon:"trashOutline",tone:"danger",onSelect:()=>p("delete")}]}):s&&v&&(0,o.jsx)(_,{anchorRect:v,onClose:()=>{d(!1),requestAnimationFrame(()=>w.current?.focus())},onRename:()=>{d(!1),p("rename")},onDelete:()=>{d(!1),p("delete")}}),(0,o.jsx)(P,{open:"rename"===c,mobile:r,initialName:t,busy:C.isPending,finalFocus:w,onClose:()=>{C.isPending||p(null)},onSubmit:e=>{let n=e.trim();n&&n!==t?C.mutate(n):p(null)}}),(0,o.jsx)(E,{open:"delete"===c,mobile:r,name:t,busy:I.isPending,finalFocus:w,onClose:()=>{I.isPending||p(null)},onConfirm:()=>I.mutate()})]})}function _(e){let{anchorRect:n,onClose:t,onRename:l,onDelete:a}=e,{t:s}=(0,h.s9)(),d=(0,i.useRef)(null),[c,p]=(0,i.useState)(null),[u,g]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()},n=()=>t();return window.addEventListener("keydown",e),window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),()=>{window.removeEventListener("keydown",e),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}},[t]),(0,i.useLayoutEffect)(()=>{let e=d.current?.offsetHeight??116,t=n.right+8,o=t+196<=window.innerWidth-8?t:Math.max(8,n.left-8-196),i=n.top;i+e>window.innerHeight-8&&(i=Math.max(8,window.innerHeight-8-e)),p({top:i,left:o})},[n]);let x={display:"flex",alignItems:"center",gap:10,width:"100%",margin:0,padding:"10px 12px",border:"none",borderRadius:8,background:"transparent",cursor:"pointer",fontFamily:"var(--tln-font-body)",fontSize:14,fontWeight:400,textAlign:"left"};return(0,r.createPortal)((0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{children:"@keyframes tlnProjMenuPop{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:scale(1)}}"}),(0,o.jsx)("div",{onClick:t,style:{position:"fixed",inset:0,zIndex:999}}),(0,o.jsxs)("div",{ref:d,role:"menu","aria-label":s("studio_project_actions"),style:{position:"fixed",top:c?.top??-9999,left:c?.left??-9999,width:196,zIndex:1e3,display:"flex",flexDirection:"column",gap:2,padding:6,borderRadius:16,background:"#171717",border:"1px solid #202020",boxShadow:"0 12px 40px rgba(0,0,0,0.45)",opacity:+!!c,animation:c?"tlnProjMenuPop .12s var(--tln-ease-out)":void 0},children:[(0,o.jsxs)("button",{type:"button",role:"menuitem",onClick:e=>{e.preventDefault(),e.stopPropagation(),l()},onMouseEnter:()=>g("rename"),onMouseLeave:()=>g(null),style:{...x,background:"rename"===u?"#494949":"transparent",color:"#ffffff",fontWeight:"rename"===u?600:400},children:[(0,o.jsx)(h.In,{name:"pencil",size:16}),(0,o.jsx)("span",{children:s("studio_rename")}
1)]}),(0,o.jsxs)("button",{type:"button",role:"menuitem",onClick:e=>{e.preventDefault(),e.stopPropagation(),a()},onMouseEnter:()=>g("delete"),onMouseLeave:()=>g(null),style:{...x,background:"delete"===u?"rgba(255,255,255,0.06)":"transparent",color:"#FF5A5A"},children:[(0,o.jsx)(h.In,{name:"trashOutline",size:16}),(0,o.jsx)("span",{children:s("studio_delete_project")})]})]})]}),document.body)}let k={position:"fixed",inset:0,zIndex:1100,background:"rgba(0,0,0,0.55)"},w={position:"fixed",top:"50%",left:"50%",zIndex:1101,width:"min(400px, calc(100vw - 32px))",borderRadius:16,background:"#171717",border:"1px solid #2a2a2a",boxShadow:"0 20px 60px rgba(0,0,0,0.5)",padding:20,display:"flex",flexDirection:"column",gap:16,fontFamily:"var(--tln-font-body)",color:y.x.textPrimary,outline:"none"},S={...k,zIndex:1e4,background:"rgba(0,0,0,0.7)",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)"},z={...w,zIndex:10001,width:"min(420px, calc(100vw - 48px))",borderRadius:24,background:"#262626",border:"1px solid #404040",boxShadow:"0px 32px 64px 0px rgba(0, 0, 0, 0.5), 0px 20px 24px 0px rgba(0, 0, 0, 0.5)",padding:32,gap:12,color:"#FFFFFF"},C={margin:0,fontFamily:"var(--tln-font-body)",fontSize:20,fontWeight:700,letterSpacing:"-0.02em",lineHeight:1.2,color:"#FFFFFF"},I={display:"grid",placeItems:"center",width:24,height:24,flexShrink:0,padding:0,border:"none",background:"transparent",color:"#FFFFFF",cursor:"pointer"};function R(e){let{title:n,disabled:t,onClose:i}=e,{t:r}=(0,h.s9)();return(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[(0,o.jsx)(l.L,{style:C,children:n}),(0,o.jsx)("button",{type:"button","aria-label":r("common_close"),disabled:t,onClick:i,style:I,children:(0,o.jsx)(h.In,{name:"x",size:16})})]})}function P(e){let{open:n,mobile:t,initialName:r,busy:p,finalFocus:u,onClose:g,onSubmit:x}=e,{t:f}=(0,h.s9)(),[m,b]=(0,i.useState)(r),F=(0,i.useRef)(null);return(0,i.useEffect)(()=>{n&&b(r)},[n,r]),(0,o.jsx)(a.D,{open:n,onOpenChange:e=>{e||p||g()},children:(0,o.jsxs)(s.Z,{children:[(0,o.jsx)(d.X,{className:"tln-proj-dialog-backdrop",style:t?S:k}),(0,o.jsx)(c.h,{className:"tln-proj-dialog-popup",finalFocus:u,initialFocus:F,style:t?z:w,children:(0,o.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p||x(m)},style:{display:"flex",flexDirection:"column",gap:t?12:16,margin:0},children:[t?(0,o.jsx)(R,{title:f("studio_rename"),disabled:p,onClose:g}):(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,o.jsx)(h.In,{name:"pencil",size:18}),(0,o.jsx)(l.L,{style:{margin:0,fontFamily:"var(--tln-font-display)",fontSize:18,fontWeight:600},children:f("studio_rename")})]}),(0,o.jsx)("input",{ref:F,value:m,onChange:e=>b(e.target.value),onFocus:e=>e.currentTarget.select(),disabled:p,maxLength:120,"aria-label":f("studio_project_name"),placeholder:t?f("studio_project_name_placeholder"):void 0,style:t?{width:"100%",boxSizing:"border-box",borderRadius:12,border:"1px solid rgba(211, 237, 248, 0.11)",background:"#101112",color:"#FFFFFF",padding:"12px 16px",fontFamily:"var(--tln-font-body)",fontSize:14,lineHeight:"20px",outline:"none"}:{width:"100%",height:40,borderRadius:10,border:"1px solid #333",background:"#0f0f0f",color:y.x.textPrimary,padding:"0 12px",fontFamily:"var(--tln-font-body)",fontSize:14,outline:"none"}}),(0,o.jsxs)("div",{style:t?{display:"flex",gap:16,paddingTop:24}:{display:"flex",justifyContent:"flex-end",gap:8},children:[(0,o.jsx)(D,{type:"button",variant:"ghost",mobile:t,disabled:p,onClick:g,children:f("common_cancel")}),(0,o.jsx)(D,{type:"submit",variant:"primary",mobile:t,disabled:p||!m.trim(),children:f(p?"studio_saving":"studio_save")})]})]})})]})})}function E(e){let{open:n,mobile:t,name:r,busy:u,finalFocus:g,onClose:x,onConfirm:f}=e,{t:m}=(0,h.s9)(),b=(0,i.useId)();return(0,o.jsx)(a.D,{open:n,onOpenChange:e=>{e||u||x()},children:(0,o.jsxs)(s.Z,{children:[(0,o.jsx)(d.X,{className:"tln-proj-dialog-backdrop",style:t?S:k}),(0,o.jsxs)(c.h,{className:"tln-proj-dialog-popup",finalFocus:g,"aria-describedby":b,style:t?{...z,gap:8}:w,children:[t?(0,o.jsx)(R,{title:m("studio_delete_project"),disabled:u,onClose:x}):(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,o.jsx)("span",{style:{color:"#FF5A5A",display:"inline-flex"},children:(0,o.jsx)(h.In,{name:"trashOutline",size:18})}),(0,o.jsx)(l.L,{style:{margin:0,fontFamily:"var(--tln-font-display)",fontSize:18,fontWeight:600},children:m("studio_delete_project")})]}),(0,o.jsx)(p.r,{id:b,style:{margin:0,color:t?"#FFFFFF":y.x.textMeta,fontSize:14,lineHeight:t?"18px":1.5,letterSpacing:t?"0.0157em":void 0,overflowWrap:"anywhere",wordBreak:"break-word"},children:m("studio_delete_project_confirm",{name:r})}),(0,o.jsxs)("div",{style:t?{display:"flex",gap:16,paddingTop:24}:{display:"flex",justifyContent:"flex-end",gap:8},children:[(0,o.jsx)(D,{type:"button",variant:"ghost",mobile:t,disabled:u,onClick:x,children:m("common_cancel")}),(0,o.jsx)(D,{type:"button",variant:"danger",mobile:t,disabled:u,onClick:f,children:m(u?"studio_deleting":t?"common_delete":"studio_delete_project")})]})]})]})})}function D(e){let{variant:n,mobile:t=!1,children:i,...r}=e,l={ghost:{background:"transparent",color:y.x.textPrimary,border:"1px solid #333"},primary:{background:"var(--tln-signal)",color:"#fff",border:"none"},danger:{background:"#FF5A5A",color:"#fff",border:"none"}};return(0,o.jsx)("button",{...r,style:{...t?{flex:1,minWidth:0,padding:"12px 16px",borderRadius:8,fontFamily:"var(--tln-font-body)",fontSize:16,lineHeight:"24px",letterSpacing:"0.015em",whiteSpace:"nowrap"}:{height:36,padding:"0 16px",borderRadius:999,fontFamily:"var(--tln-font-display)",fontSize:13,fontWeight:600},cursor:r.disabled?"not-allowed":"pointer",opacity:r.disabled?.55:1,...(t?{ghost:{background:"#404040",color:"#FFFFFF",border:"1px solid #404040",fontWeight:400},primary:{background:"linear-gradient(180deg, #FB923C 0%, #FF8029 100%)",color:"#FFFFFF",border:"none",fontWeight:600},danger:{background:"#FF5630",color:"#FFFFFF",border:"none",fontWeight:600}}:l)[n],...r.style||null},children:i})}t.d(n,{D:()=>v})},13269(e,n,t){function o(e,n){let t=String(n);return String(e.id)===t||void 0!==e.public_id&&null!==e.public_id&&String(e.public_id)===t}function i(e,n,t){return e?.pages?{...e,pages:e.pages.map(e=>{let i=[];for(let r of e.items){if(!o(r,n)){i.push(r);continue}let e=t(r);e&&i.push(e)}let r=e.items.length-i.length;return{...e,items:i,total:Math.max(0,(e.total??i.length)-r)}})}:e}t.d(n,{d:()=>o,t:()=>i})}}]);
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.