@weppy/roblox-mcp 2.9.2 → 2.10.0
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/CHANGELOG.md +29 -0
- package/dashboard/dist/assets/AssetsPage-Czc93xoU.css +1 -0
- package/dashboard/dist/assets/AssetsPage-D9X2pUea.js +46 -0
- package/dashboard/dist/assets/{ChangelogDetailPage-B1zg2f56.js → ChangelogDetailPage-Bc77mNht.js} +1 -1
- package/dashboard/dist/assets/{ChangelogPage-CbfWdVtL.js → ChangelogPage-Cvy3ismU.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-BCviiJ3_.js → ConfirmModal-CEmy8izm.js} +1 -1
- package/dashboard/dist/assets/ConfirmModal-izJskKtO.css +1 -0
- package/dashboard/dist/assets/ConfirmModal.module-D1aZY2bQ.js +1 -0
- package/dashboard/dist/assets/ConnectionPage-B5daijue.css +1 -0
- package/dashboard/dist/assets/ConnectionPage-C_XNqIG-.js +11 -0
- package/dashboard/dist/assets/{ControlsPage-C_38U6b0.js → ControlsPage-CkTB6mEk.js} +1 -1
- package/dashboard/dist/assets/CurrentPlaceScope-CuZXV9Ku.js +1 -0
- package/dashboard/dist/assets/CurrentPlaceScope-D-0g0WrM.css +1 -0
- package/dashboard/dist/assets/{GameChangeDetail-DAEU3IYH.js → GameChangeDetail-D2QTkbEB.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-DCq3Fmko.js → InfoLabel-BUXacsTE.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-lOYmwxzd.js → OverviewPage-CX5zVj8P.js} +1 -1
- package/dashboard/dist/assets/PageHeader-B0qiATU4.js +6 -0
- package/dashboard/dist/assets/PageHeader-CrhjZjgp.css +1 -0
- package/dashboard/dist/assets/PlaytestPage-CVEtQ4dU.css +1 -0
- package/dashboard/dist/assets/PlaytestPage-folHMgTW.js +11 -0
- package/dashboard/dist/assets/SettingsPage-ByHSUA7b.css +1 -0
- package/dashboard/dist/assets/SettingsPage-nlNo4CBL.js +1 -0
- package/dashboard/dist/assets/{StatusBadge-DRbLpCd0.js → StatusBadge-B2VLfqa6.js} +1 -1
- package/dashboard/dist/assets/SyncPage-Bi8xaHnB.js +4 -0
- package/dashboard/dist/assets/SyncPage-CIZWp8Ul.css +1 -0
- package/dashboard/dist/assets/Tabs-CIszXeoU.css +1 -0
- package/dashboard/dist/assets/{Tabs-CGfFE3L1.js → Tabs-DqGYr78-.js} +1 -1
- package/dashboard/dist/assets/ToolsPage-CAaH9fIQ.css +1 -0
- package/dashboard/dist/assets/ToolsPage-DVYql6ES.js +1 -0
- package/dashboard/dist/assets/{TooltipText-CfI7WgY4.js → TooltipText-DaLR7eg1.js} +1 -1
- package/dashboard/dist/assets/UiStudioPage-CHzKSJCc.js +11 -0
- package/dashboard/dist/assets/UiStudioPage-LH2dcLkr.css +1 -0
- package/dashboard/dist/assets/{WhatsNewPage-CLnx6v4u.js → WhatsNewPage-D5LMzwyf.js} +1 -1
- package/dashboard/dist/assets/{copy-BIZzQcB-.js → copy-0T6g5IWT.js} +1 -1
- package/dashboard/dist/assets/index-BDJHcdyQ.js +686 -0
- package/dashboard/dist/assets/{index-Dd1aCYFM.css → index-DzkZyWCv.css} +1 -1
- package/dashboard/dist/assets/sample-requests-DmUwqmFE.css +1 -0
- package/dashboard/dist/assets/sample-requests-Fif4AVnz.js +1 -0
- package/dashboard/dist/assets/{useLiveUptime-BYmnk4Ph.js → useLiveUptime-KCA8LzCI.js} +1 -1
- package/dashboard/dist/assets/useSettings-BJSPSJ0b.js +1 -0
- package/dashboard/dist/assets/useSettings-KAiL5E_X.css +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/index.js +94 -94
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/AssetsPage-Be5aZDhj.css +0 -1
- package/dashboard/dist/assets/AssetsPage-CC3FW3XG.js +0 -46
- package/dashboard/dist/assets/ConfirmModal-D1kfK31C.css +0 -1
- package/dashboard/dist/assets/ConfirmModal.module-NrFlfTWy.js +0 -1
- package/dashboard/dist/assets/ConnectionPage-D1GWlHZP.css +0 -1
- package/dashboard/dist/assets/ConnectionPage-Dskqof1W.js +0 -11
- package/dashboard/dist/assets/CurrentPlaceScope-CHEqGWYd.js +0 -1
- package/dashboard/dist/assets/CurrentPlaceScope-v3pl1mLI.css +0 -1
- package/dashboard/dist/assets/PageHeader-2-fusgsY.css +0 -1
- package/dashboard/dist/assets/PageHeader-Do_AQ2vQ.js +0 -6
- package/dashboard/dist/assets/PlaytestPage-CKcxZyhl.js +0 -11
- package/dashboard/dist/assets/PlaytestPage-DjjsIkke.css +0 -1
- package/dashboard/dist/assets/SettingsPage-C0PubIFP.js +0 -1
- package/dashboard/dist/assets/SettingsPage-DSipzuEo.css +0 -1
- package/dashboard/dist/assets/SyncPage-BFsgItgP.js +0 -4
- package/dashboard/dist/assets/SyncPage-COxqxAjv.css +0 -1
- package/dashboard/dist/assets/Tabs-876h0_zB.css +0 -1
- package/dashboard/dist/assets/ToolsPage-Bt9vYA7u.css +0 -1
- package/dashboard/dist/assets/ToolsPage-DHhF-Y_W.js +0 -1
- package/dashboard/dist/assets/UiStudioPage-RAd0qXzL.js +0 -11
- package/dashboard/dist/assets/UiStudioPage-eSinjpOX.css +0 -1
- package/dashboard/dist/assets/index-DYezp9b1.js +0 -606
- package/dashboard/dist/assets/sample-requests-CnV4bBG4.js +0 -1
- package/dashboard/dist/assets/sample-requests-CygerZZ_.css +0 -1
- package/dashboard/dist/assets/useSettings-Bsfu70PT.css +0 -1
- package/dashboard/dist/assets/useSettings-HzhprVq7.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as V,e as ae,r as u,j as e,g as le,a as I,d as re,T as ce,A as de,S as ue}from"./index-DYezp9b1.js";import{P as pe}from"./PageHeader-Do_AQ2vQ.js";import{I as v}from"./InfoLabel-DCq3Fmko.js";import{T as d}from"./TooltipText-CfI7WgY4.js";import{s as i,u as ge}from"./useSettings-HzhprVq7.js";import{C as he}from"./ConfirmModal-BCviiJ3_.js";import{D as ie,f as ne,r as me,s as ye,a as oe,d as K,S as te,b as ve}from"./sample-requests-CnV4bBG4.js";import"./ConfirmModal.module-NrFlfTWy.js";const xe="_card_1jlvt_4",je="_cardEmbedded_1jlvt_14",fe="_cardTitle_1jlvt_21",Se="_usageRow_1jlvt_30",be="_usageTotal_1jlvt_36",_e="_usageBreakdown_1jlvt_42",Ne="_usageCounts_1jlvt_47",Ce="_divider_1jlvt_53",ke="_lastRunRow_1jlvt_60",Re="_lastRunLabel_1jlvt_69",Le="_errorIcon_1jlvt_75",we="_tooltip_1jlvt_83",He="_cleanupRow_1jlvt_106",Pe="_cleanupLabel_1jlvt_113",Be="_cleanupBtn_1jlvt_120",De="_cleanupBtnDanger_1jlvt_143",Ae="_retentionSection_1jlvt_155",Te="_retentionTitle_1jlvt_161",Me="_retentionFieldset_1jlvt_170",Ee="_proOverlay_1jlvt_185",$e="_radioRow_1jlvt_197",Ie="_radioLabel_1jlvt_204",Ue="_presetGroup_1jlvt_224",ze="_presetBtn_1jlvt_232",Oe="_presetBtnActive_1jlvt_249",Fe="_freeInput_1jlvt_256",qe="_inputError_1jlvt_272",Ge="_inputUnit_1jlvt_276",We="_cascadeRow_1jlvt_283",Ye="_retentionActions_1jlvt_302",Ke="_saveBtn_1jlvt_308",Ve="_runNowBtn_1jlvt_330",Je="_errorMsg_1jlvt_353",n={card:xe,cardEmbedded:je,cardTitle:fe,usageRow:Se,usageTotal:be,usageBreakdown:_e,usageCounts:Ne,divider:Ce,lastRunRow:ke,lastRunLabel:Re,errorIcon:Le,tooltip:we,cleanupRow:He,cleanupLabel:Pe,cleanupBtn:Be,cleanupBtnDanger:De,retentionSection:Ae,retentionTitle:Te,retentionFieldset:Me,proOverlay:Ee,radioRow:$e,radioLabel:Ie,presetGroup:Ue,presetBtn:ze,presetBtnActive:Oe,freeInput:Fe,inputError:qe,inputUnit:Ge,cascadeRow:We,retentionActions:Ye,saveBtn:Ke,runNowBtn:Ve,errorMsg:Je};function Qe(t,s){return!!(t.mode==="off"&&s.mode!=="off"||t.mode==="age"&&s.mode==="age"&&(s.ageDays??0)<(t.ageDays??0)||t.mode==="size"&&s.mode==="size"&&(s.sizeMb??0)<(t.sizeMb??0)||!t.cascadeSnapshots&&s.cascadeSnapshots)}function se(t){return t.mode==="age"?Number.isInteger(t.ageDays)&&t.ageDays>=1&&t.ageDays<=365:t.mode==="size"?Number.isInteger(t.sizeMb)&&t.sizeMb>=50&&t.sizeMb<=1e4:!0}function Xe(t,s){return t.mode===s.mode&&t.ageDays===s.ageDays&&t.sizeMb===s.sizeMb&&t.cascadeSnapshots===s.cascadeSnapshots}function z(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(2)} GB`}function Ze({placeId:t,tier:s,currentPolicy:l,onSaved:x}){const{t:o}=V(),{trackEvent:N}=ae(),[a,g]=u.useState(l),[p,P]=u.useState(()=>[7,14,30,90].includes(l.ageDays??-1)?"":String(l.ageDays??30)),[k,B]=u.useState(()=>[100,500,1e3].includes(l.sizeMb??-1)?"":String(l.sizeMb??500)),[S,D]=u.useState(null),[h,y]=u.useState(!1),[A,R]=u.useState(!1),[_,L]=u.useState(!1),[w,H]=u.useState(null);u.useEffect(()=>{g(l);const c=[7,14,30,90],b=[100,500,1e3];P(c.includes(l.ageDays??-1)?"":String(l.ageDays??30)),B(b.includes(l.sizeMb??-1)?"":String(l.sizeMb??500))},[l]);const C=s==="basic",j=se(a),r=Xe(l,a),T=j&&!r&&!A,f=c=>{g(b=>{const U={...b,mode:c};return c==="age"&&(U.ageDays=parseInt(p,10)||30),c==="size"&&(U.sizeMb=parseInt(k,10)||500),U})},m=c=>{P(""),g(b=>({...b,ageDays:c}))},O=c=>{B(""),g(b=>({...b,sizeMb:c}))},J=c=>{P(c);const b=parseInt(c,10);Number.isNaN(b)||g(U=>({...U,ageDays:b}))},E=c=>{B(c);const b=parseInt(c,10);Number.isNaN(b)||g(U=>({...U,sizeMb:b}))},Q=async()=>{if(H(null),N("dashboard_click_event",{click_target:"ui_studio_cleanup_save",page:"settings"}),Qe(l,a)){try{const c=await ne(t,{mode:a.mode,ageDays:a.ageDays,sizeMb:a.sizeMb,cascadeSnapshots:a.cascadeSnapshots});D(c.dryRun),y(!0)}catch(c){H(c.message)}return}await Y()},Y=async()=>{R(!0);try{await ye(t,a),y(!1),x()}catch(c){throw H(c.message),c}finally{R(!1)}},X=async()=>{H(null),N("dashboard_click_event",{click_target:"ui_studio_cleanup_run_now",page:"settings"}),L(!0);try{await me(t),x()}catch(c){H(c.message)}finally{L(!1)}},Z=S?`${o("uiStudio.cleanup.policy.confirm.messageStrict","이 정책으로 즉시")} ${S.wouldRemoveRequests}${o("uiStudio.cleanup.policy.confirm.requests","건")} / ${S.wouldRemoveSnapshots}${o("uiStudio.cleanup.policy.confirm.snapshots","개 화면 캡처")} / ${z(S.wouldFreeBytes)} ${o("uiStudio.cleanup.policy.confirm.freed","가 삭제됩니다 — 적용?")}`:"",$=a.mode==="age"&&!se(a),ee=a.mode==="size"&&!se(a);return e.jsxs("div",{className:n.retentionSection,children:[e.jsx("h3",{className:n.retentionTitle,children:e.jsx(v,{label:o("uiStudio.cleanup.policy.title","자동 삭제 정책"),tooltip:o("uiStudio.cleanup.policy.title.tooltip","Rules that automatically remove old or large captures.")})}),e.jsxs("div",{style:{position:"relative"},children:[C&&e.jsx("div",{className:n.proOverlay,title:o("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능"),children:e.jsx("div",{className:n.tooltip,children:o("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능")})}),e.jsxs("fieldset",{className:n.retentionFieldset,disabled:C,style:C?{opacity:.45,pointerEvents:"none"}:void 0,children:[e.jsx("div",{className:n.radioRow,children:e.jsx(d,{text:o("uiStudio.cleanup.policy.modeOff.tooltip","Turn off auto-cleanup. Data stays until you remove it manually."),children:e.jsxs("label",{className:n.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"off",checked:a.mode==="off",onChange:()=>f("off")}),o("uiStudio.cleanup.policy.modeOff","사용 안 함 (off)")]})})}),e.jsxs("div",{children:[e.jsx("div",{className:n.radioRow,children:e.jsx(d,{text:o("uiStudio.cleanup.policy.modeAge.tooltip","Automatically delete data older than the configured number of days."),children:e.jsxs("label",{className:n.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"age",checked:a.mode==="age",onChange:()=>f("age")}),o("uiStudio.cleanup.policy.modeAge","기간 기반 (age)")]})})}),a.mode==="age"&&e.jsxs("div",{className:n.presetGroup,children:[[7,14,30,90].map(c=>e.jsx(d,{text:o("uiStudio.cleanup.policy.agePreset.tooltip","Delete data older than this many days."),children:e.jsxs("button",{type:"button",className:`${n.presetBtn} ${a.ageDays===c&&p===""?n.presetBtnActive:""}`,onClick:()=>m(c),children:[c,o("uiStudio.cleanup.policy.daysUnit","일")]})},c)),e.jsx(d,{text:o("uiStudio.cleanup.policy.ageInput.tooltip","Enter any value between 1 and 365 days."),children:e.jsx("input",{type:"number",className:`${n.freeInput} ${$?n.inputError:""}`,value:p,min:1,max:365,onChange:c=>J(c.target.value)})}),e.jsxs("span",{className:n.inputUnit,children:["1–365",o("uiStudio.cleanup.policy.daysUnit","일")]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:n.radioRow,children:e.jsx(d,{text:o("uiStudio.cleanup.policy.modeSize.tooltip","When total usage exceeds the limit, the oldest data is removed first."),children:e.jsxs("label",{className:n.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"size",checked:a.mode==="size",onChange:()=>f("size")}),o("uiStudio.cleanup.policy.modeSize","용량 기반 (size)")]})})}),a.mode==="size"&&e.jsxs("div",{className:n.presetGroup,children:[[100,500,1e3].map(c=>e.jsx(d,{text:o("uiStudio.cleanup.policy.sizePreset.tooltip","Keep total usage under this size."),children:e.jsxs("button",{type:"button",className:`${n.presetBtn} ${a.sizeMb===c&&k===""?n.presetBtnActive:""}`,onClick:()=>O(c),children:[c,o("uiStudio.cleanup.policy.mbUnit","MB")]})},c)),e.jsx(d,{text:o("uiStudio.cleanup.policy.sizeInput.tooltip","Enter any value between 50 MB and 10000 MB (10 GB)."),children:e.jsx("input",{type:"number",className:`${n.freeInput} ${ee?n.inputError:""}`,value:k,min:50,max:1e4,onChange:c=>E(c.target.value)})}),e.jsxs("span",{className:n.inputUnit,children:["50–10000",o("uiStudio.cleanup.policy.mbUnit","MB")]})]})]}),e.jsx(d,{text:o("uiStudio.cleanup.policy.cascade.tooltip","Also delete the capture images linked to those records. If off, the images stay."),children:e.jsxs("label",{className:n.cascadeRow,children:[e.jsx("input",{type:"checkbox",checked:a.cascadeSnapshots,onChange:c=>g(b=>({...b,cascadeSnapshots:c.target.checked}))}),o("uiStudio.cleanup.policy.cascade","연결된 화면 캡처도 함께 삭제")]})}),e.jsxs("div",{className:n.retentionActions,children:[e.jsx(d,{text:o("uiStudio.cleanup.policy.save.tooltip","Save the current cleanup rule. It runs in the background from then on."),children:e.jsx("button",{type:"button",className:n.saveBtn,onClick:()=>void Q(),disabled:!T,children:o("uiStudio.cleanup.policy.save","정책 저장")})}),e.jsx(d,{text:o("uiStudio.cleanup.policy.runNow.tooltip","Run the current rule once now, without waiting for the next scheduled run."),children:e.jsx("button",{type:"button",className:n.runNowBtn,onClick:()=>void X(),disabled:_,children:o("uiStudio.cleanup.policy.runNow","지금 정리")})})]}),w&&e.jsx("div",{className:n.errorMsg,children:w})]})]}),h&&S&&e.jsx(ie,{title:o("uiStudio.cleanup.policy.confirm.title","정책 적용 확인"),message:Z,danger:!0,confirmLabel:o("uiStudio.cleanup.policy.save","정책 저장"),busy:A,onConfirm:Y,onClose:()=>y(!1)})]})}function et({placeId:t,tier:s,onChanged:l,sampleUsage:x,sampleRetention:o,embedded:N=!1}){const{t:a}=V(),g=s==="basic"&&x!=null&&o!=null,[p,P]=u.useState(g?x:null),[k,B]=u.useState(g?o:null),[S,D]=u.useState(null),[h,y]=u.useState(null),[A,R]=u.useState(null),_=u.useCallback(async()=>{if(!g&&t!=null){D(null);try{const[f,m]=await Promise.all([oe(t),ne(t)]);P(f),B(m.policy)}catch(f){D(f.message)}}},[t,g]);u.useEffect(()=>{_()},[_]);const L=u.useCallback(()=>{_(),l==null||l()},[_,l]),w=u.useCallback(async()=>{if(h&&t!=null){R(null);try{h.kind==="keep7"?await K(t,{olderThanDays:7,alsoSnapshots:!0}):h.kind==="keep30"?await K(t,{olderThanDays:30,alsoSnapshots:!0}):await K(t,{all:!0,alsoSnapshots:!0}),y(null),_(),l==null||l()}catch(f){throw R(f.message),f}}},[h,t,_,l]);function H(f){const m=a("uiStudio.cleanup.studioPreservedNote","This deletes saved change records and screenshots on disk only; Roblox Studio instances are not affected.");return f.kind==="keep7"?`${a("uiStudio.cleanup.cleanupConfirmMessage.keep7","7일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${m}`:f.kind==="keep30"?`${a("uiStudio.cleanup.cleanupConfirmMessage.keep30","30일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${m}`:`${((p==null?void 0:p.requestCount)??0)+((p==null?void 0:p.snapshotCount)??0)}${a("uiStudio.cleanup.cleanupConfirmMessage.all","개의 저장된 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${m}`}if(t==null&&!g)return null;if(S)return e.jsx("div",{className:`${n.card} ${N?n.cardEmbedded:""}`,children:e.jsx("p",{className:n.errorMsg,children:S})});if(!p||!k)return e.jsx("div",{className:`${n.card} ${N?n.cardEmbedded:""}`,children:e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",margin:0},children:a("uiStudio.storage.loading","로딩 중...")})});const C=k.lastRunAt,j=k.lastRunStats,r=C?new Date(C).toLocaleString():null,T=t??0;return e.jsxs("div",{className:`${n.card} ${N?n.cardEmbedded:""}`,children:[e.jsx("h3",{className:n.cardTitle,children:e.jsx(v,{label:a("uiStudio.storage.title","UI Studio 저장 데이터"),tooltip:a("uiStudio.storage.title.tooltip","Disk usage of UI Studio change records and screenshots.")})}),e.jsxs("div",{className:n.usageRow,children:[e.jsx(d,{text:a("uiStudio.storage.usageLabel.tooltip","Disk space currently used by UI Studio for this project."),children:e.jsxs("div",{className:n.usageTotal,children:[a("uiStudio.storage.usageLabel","사용 중")," ",z(p.totalBytes)]})}),e.jsxs("div",{className:n.usageBreakdown,children:[e.jsx(d,{text:a("uiStudio.storage.historyBytes.tooltip","Space taken by change record data (JSON)."),children:e.jsxs("span",{children:[a("uiStudio.storage.historyBytes","변경 이력")," ",z(p.historyBytes)]})})," · ",e.jsx(d,{text:a("uiStudio.storage.snapshotBytes.tooltip","Space taken by captured PNG image files."),children:e.jsxs("span",{children:[a("uiStudio.storage.snapshotBytes","화면 캡처")," ",z(p.snapshotBytes)]})})]}),e.jsxs("div",{className:n.usageCounts,children:[e.jsx(d,{text:a("uiStudio.storage.requestCount.tooltip","Number of actions where AI changed the UI."),children:e.jsxs("span",{children:[a("uiStudio.storage.requestCount","변경 기록")," ",p.requestCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(d,{text:a("uiStudio.storage.mutationCount.tooltip","Number of detail changes inside actions (one property edit = 1)."),children:e.jsxs("span",{children:[a("uiStudio.storage.mutationCount","변경 상세")," ",p.mutationCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(d,{text:a("uiStudio.storage.snapshotCount.tooltip","Number of saved capture image files."),children:e.jsxs("span",{children:[a("uiStudio.storage.snapshotCount","화면 캡처")," ",p.snapshotCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})]})]}),e.jsx("hr",{className:n.divider}),e.jsx(Ze,{placeId:T,tier:s,currentPolicy:k,onSaved:L}),e.jsx("hr",{className:n.divider}),e.jsxs("div",{className:n.lastRunRow,children:[e.jsx("span",{className:n.lastRunLabel,children:e.jsx(v,{label:a("uiStudio.storage.lastRun","마지막 자동 정리"),tooltip:a("uiStudio.storage.lastRun.tooltip","When the auto-cleanup policy last ran, and what it removed.")})}),r?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r}),j&&e.jsxs("span",{children:["· ",a("uiStudio.storage.requestCount","변경 기록")," ",j.removedRequests,a("uiStudio.storage.countSuffix","개")," / ",a("uiStudio.storage.snapshotCount","화면 캡처")," ",j.removedSnapshots,a("uiStudio.storage.countSuffix","개")," / ",z(j.freedBytes)," ",a("uiStudio.storage.lastRunFreed","회수")]}),j&&j.errors>0&&e.jsxs("span",{className:n.errorIcon,title:`${a("uiStudio.storage.lastRunErrors","오류")} ${j.errors}건`,children:["⚠",e.jsxs("span",{className:n.tooltip,children:[a("uiStudio.storage.lastRunErrors","오류")," ",j.errors,a("uiStudio.storage.countSuffix","건")]})]})]}):e.jsx("span",{children:a("uiStudio.storage.lastRunNever","—")})]}),e.jsx("hr",{className:n.divider}),e.jsxs("div",{className:n.cleanupRow,children:[e.jsx("span",{className:n.cleanupLabel,children:e.jsx(v,{label:a("uiStudio.cleanup.label","수동 정리"),tooltip:a("uiStudio.cleanup.label.tooltip","Manually clean up change records and captures whenever you want.")})}),e.jsx(d,{text:a("uiStudio.cleanup.keep7.tooltip","Delete change records and captures older than 7 days."),children:e.jsx("button",{type:"button",className:n.cleanupBtn,onClick:()=>y({kind:"keep7"}),disabled:s==="basic",children:a("uiStudio.cleanup.keepLastNDays","최근 7일만 남기기").replace("{n}","7")})}),e.jsx(d,{text:a("uiStudio.cleanup.keep30.tooltip","Delete change records and captures older than 30 days."),children:e.jsx("button",{type:"button",className:n.cleanupBtn,onClick:()=>y({kind:"keep30"}),disabled:s==="basic",children:a("uiStudio.cleanup.keepLastNDays","최근 30일만 남기기").replace("{n}","30")})}),e.jsx(d,{text:a("uiStudio.cleanup.deleteAll.tooltip","Delete every change record and capture for this project. The actual UI in Roblox Studio is not affected."),children:e.jsx("button",{type:"button",className:`${n.cleanupBtn} ${n.cleanupBtnDanger}`,onClick:()=>y({kind:"all"}),disabled:s==="basic",children:a("uiStudio.cleanup.deleteAll","전체 삭제…")})})]}),A&&e.jsx("div",{className:n.errorMsg,children:A}),h&&e.jsx(ie,{title:a("uiStudio.cleanup.cleanupConfirmTitle","정리 확인"),message:H(h),danger:!0,confirmLabel:a("common.delete","삭제"),onConfirm:w,onClose:()=>{y(null),R(null)}})]})}const tt={toolsActivity:null,toolStats:null,toolSessions:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null},st={toolsActivity:null,toolStats:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null};function at(t){var s;return t?t.pluginConnected?t.activePlaceId:t.lastActivePlaceId??((s=t.places[0])==null?void 0:s.placeId)??null:null}async function M(t){try{return await t}catch{return null}}function G(t){return t?typeof t.total=="number"?t.total:Array.isArray(t.entries)?t.entries.length:null:null}function W(t,s,l,x){return s===null?t("settings.dataHistory.metric.unavailable","Unavailable"):`${s.toLocaleString()} ${t(l,x)}`}function F(t,s,l){const x=l===null?t("settings.dataHistory.metric.sizeUnavailable","size unavailable"):z(l);return`${s} · ${x}`}function q(t,s){var x;const l=(x=t==null?void 0:t[s])==null?void 0:x.bytes;return typeof l=="number"&&Number.isFinite(l)?l:null}function it(t,s){return s?[`${s.requestCount.toLocaleString()} ${t("uiStudio.storage.requestCount","change records")}`,`${s.snapshotCount.toLocaleString()} ${t("uiStudio.storage.snapshotCount","screenshots")}`,z(s.totalBytes)].join(" · "):t("settings.dataHistory.metric.unavailable","Unavailable")}function nt({tier:t}){const{t:s}=V(),[l,x]=u.useState(tt),[o,N]=u.useState(st),[a,g]=u.useState(t==="basic"?te:null),[p,P]=u.useState(null),[k,B]=u.useState(!0),[S,D]=u.useState(!0),[h,y]=u.useState(null),[A,R]=u.useState(!1),[_,L]=u.useState(null),w=u.useCallback(async()=>{B(!0);const m=await M(le()),O=at(m);P(O);const[J,E,Q,Y,X,Z,$]=await Promise.all([M(I.get("/api/dashboard/history",{limit:"1",offset:"0"})),M(I.get("/api/dashboard/tool-stats")),M(I.get("/sync/history",{limit:"1",offset:"0"})),M(I.get("/api/dashboard/playtest/history")),M(I.get("/api/dashboard/changelog",{limit:"1",offset:"0"})),M(I.get("/api/dashboard/connection-log")),M(I.get("/api/dashboard/storage-summary"))]),ee=t==="basic"?te:O===null?null:await M(oe(O));x({toolsActivity:G(J),toolStats:(E==null?void 0:E.totalCalls)??null,toolSessions:(E==null?void 0:E.totalSessions)??null,syncLog:G(Q),playtestReports:G(Y),projectChanges:G(X),connectionLog:G(Z)}),N({toolsActivity:q($,"toolsActivity"),toolStats:q($,"toolStats"),syncLog:q($,"syncLog"),playtestReports:q($,"playtestReports"),projectChanges:q($,"projectChanges"),connectionLog:q($,"connectionLog")}),g(ee),B(!1)},[t]);u.useEffect(()=>{w()},[w]);const H=u.useMemo(()=>[{key:"toolsActivity",title:s("settings.dataHistory.toolsActivity.title","Tool activity"),description:s("settings.dataHistory.toolsActivity.description","Saved tool runs shown on the Tools page."),metric:F(s,W(s,l.toolsActivity,"settings.dataHistory.metric.records","records"),o.toolsActivity),metricTooltip:s("settings.dataHistory.toolsActivity.metric.tooltip","Number of saved tool runs and the disk space they use."),route:"/tools",clearEndpoint:"/api/dashboard/tools/history/clear"},{key:"toolStats",title:s("settings.dataHistory.toolStats.title","Tool usage statistics"),description:s("settings.dataHistory.toolStats.description","Aggregated tool counts and status totals."),metric:F(s,l.toolStats===null?s("settings.dataHistory.metric.unavailable","Unavailable"):`${l.toolStats.toLocaleString()} ${s("settings.dataHistory.metric.runs","runs")} · ${(l.toolSessions??0).toLocaleString()} ${s("settings.dataHistory.metric.sessions","sessions")}`,o.toolStats),metricTooltip:s("settings.dataHistory.toolStats.metric.tooltip","Aggregated total runs and session counts."),route:"/tools",clearEndpoint:"/api/dashboard/tools/statistics/clear"},{key:"syncLog",title:s("settings.dataHistory.syncLog.title","Sync log"),description:s("settings.dataHistory.syncLog.description","Saved file sync events for the active place."),metric:F(s,W(s,l.syncLog,"settings.dataHistory.metric.records","records"),o.syncLog),metricTooltip:s("settings.dataHistory.syncLog.metric.tooltip","Number of saved sync events and the disk space they use."),route:"/sync",clearEndpoint:"/api/dashboard/sync/history/clear"},{key:"playtestReports",title:s("settings.dataHistory.playtest.title","Playtest reports"),description:s("settings.dataHistory.playtest.description","Saved automated playtest reports and logs."),metric:F(s,W(s,l.playtestReports,"settings.dataHistory.metric.reports","reports"),o.playtestReports),metricTooltip:s("settings.dataHistory.playtestReports.metric.tooltip","Number of saved playtest reports and the disk space they use."),route:"/playtest",clearEndpoint:"/api/dashboard/playtest/history/clear"},{key:"projectChanges",title:s("settings.dataHistory.projectChanges.title","Project change summary"),description:s("settings.dataHistory.projectChanges.description","Saved summaries of project changes."),metric:F(s,W(s,l.projectChanges,"settings.dataHistory.metric.records","records"),o.projectChanges),metricTooltip:s("settings.dataHistory.projectChanges.metric.tooltip","Number of saved project change summaries and the disk space they use."),route:"/changelog",clearEndpoint:"/api/dashboard/changelog/clear"},{key:"connectionLog",title:s("settings.dataHistory.connectionLog.title","Connection log"),description:s("settings.dataHistory.connectionLog.description","Saved MCP and Studio connection events."),metric:F(s,W(s,l.connectionLog,"settings.dataHistory.metric.records","records"),o.connectionLog),metricTooltip:s("settings.dataHistory.connectionLog.metric.tooltip","Number of saved connection events and the disk space they use."),route:"/connection",clearEndpoint:"/api/dashboard/connection-log/clear"}],[l,o,s]),C=async()=>{if(h){R(!0),L(null);try{if(h.kind==="uiStudio"){if(t!=="pro"||p===null)throw new Error("UI Studio place is unavailable");await K(p,{all:!0,alsoSnapshots:!0}),L(s("settings.dataHistory.uiStudio.clear.success","UI Studio saved data cleared."))}else await I.post(h.row.clearEndpoint),L(s("settings.dataHistory.clear.success","Saved data cleared."));y(null),await w()}catch{L(h.kind==="uiStudio"?s("settings.dataHistory.uiStudio.clear.failed","Failed to clear UI Studio saved data."):s("settings.dataHistory.clear.failed","Failed to clear saved data."))}finally{R(!1)}}},j=t==="pro"?p:0,r=t==="pro"&&p!==null,T=(h==null?void 0:h.kind)==="uiStudio",f=s("settings.dataHistory.title","Data & History");return e.jsxs(e.Fragment,{children:[e.jsxs("section",{id:"data-history",className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(v,{label:s("settings.dataHistory.title","Data & History"),tooltip:s("settings.dataHistory.title.tooltip","Manage saved dashboard data in one place.")}),e.jsxs("div",{className:i.cardHeaderActions,children:[e.jsx(d,{text:s("settings.dataHistory.scope.tooltip","Clear actions apply to the current project and active place where applicable."),children:e.jsx("span",{className:i.headerBadge,children:k?s("common.loading","Loading"):s("settings.dataHistory.scope","Current project")})}),e.jsx(d,{text:s("settings.dataHistory.toggle.tooltip","Collapse or expand this section."),children:e.jsx("button",{className:i.collapseButton,type:"button","aria-expanded":S,"aria-controls":"settings-data-history-body","aria-label":S?s("settings.dataHistory.collapse","Collapse {title}").replace("{title}",f):s("settings.dataHistory.expand","Expand {title}").replace("{title}",f),onClick:()=>D(m=>!m),children:S?"▾":"▸"})})]})]}),S&&e.jsxs("div",{id:"settings-data-history-body",children:[e.jsx("p",{className:i.dataHistoryIntro,children:s("settings.dataHistory.intro","Review saved dashboard data, open the related page, or clear stored records from one place.")}),e.jsxs("div",{className:i.dataHistoryList,children:[H.map(m=>e.jsxs("div",{className:i.dataHistoryRow,children:[e.jsxs("div",{className:i.dataHistoryMain,children:[e.jsx("div",{className:i.dataHistoryTitle,children:m.title}),e.jsx("div",{className:i.dataHistoryDescription,children:m.description})]}),e.jsx(d,{text:m.metricTooltip,children:e.jsx("div",{className:i.dataHistoryMetric,children:m.metric})}),e.jsxs("div",{className:i.dataHistoryActions,children:[e.jsx(d,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:i.linkButton,href:`#${m.route}`,children:s("settings.dataHistory.open","Open")})}),e.jsx(d,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:i.dangerButton,type:"button",onClick:()=>y({kind:"row",row:m}),children:s("common.clear","Clear")})})]})]},m.key)),e.jsxs("div",{className:`${i.dataHistoryRow} ${i.uiStudioDataHistoryRow}`,children:[e.jsxs("div",{className:i.dataHistoryMain,children:[e.jsx("div",{className:i.dataHistoryTitle,children:s("settings.dataHistory.uiStudio.title","UI Studio history and screenshots")}),e.jsx("div",{className:i.dataHistoryDescription,children:s("settings.dataHistory.uiStudio.description","Saved UI Studio change records, screenshots, and cleanup policy.")})]}),e.jsx(d,{text:s("settings.dataHistory.uiStudio.metric.tooltip","UI Studio change record and capture counts, plus total disk usage."),children:e.jsx("div",{className:i.dataHistoryMetric,children:it(s,a)})}),e.jsxs("div",{className:i.dataHistoryActions,children:[e.jsx(d,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:i.linkButton,href:"#/ui-studio?tab=history",children:s("settings.dataHistory.open","Open")})}),e.jsx(d,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:i.dangerButton,type:"button",disabled:!r,onClick:()=>y({kind:"uiStudio"}),children:s("common.clear","Clear")})})]})]}),e.jsx("div",{className:`${i.dataHistoryDetail} ${i.uiStudioDataHistoryDetail}`,children:e.jsx(et,{placeId:j,tier:t,onChanged:w,embedded:!0,...t==="basic"?{sampleUsage:te,sampleRetention:ve}:{}})})]}),_&&e.jsx("p",{className:i.inlineStatus,children:_})]})]}),e.jsx(he,{open:h!==null,title:T?s("settings.dataHistory.uiStudio.clear.title","Clear UI Studio saved data?"):s("settings.dataHistory.clear.title","Clear saved data?"),message:T?s("settings.dataHistory.uiStudio.clear.message","This deletes saved UI Studio change records and screenshots only. Roblox Studio instances and project objects are not changed."):s("settings.dataHistory.clear.message","This deletes saved dashboard records only. Roblox Studio instances and project objects are not changed."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:A,onCancel:()=>!A&&y(null),onConfirm:()=>void C()})]})}const ot={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch","fr-fr":"Français"};function lt(t){return t==="active"?i.statusActive:t==="grace"?i.statusGrace:t==="invalid"||t==="revoked"?i.statusError:i.statusInactive}function rt(t,s){return t.refreshBlockedReason==="missing_session_token"?{label:s("settings.license.status.activationRequired","Activation Required"),tooltip:s("settings.license.status.activationRequired.tooltip","Manual license activation is required before WEPPY Dashboard can refresh this status."),detail:s("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:i.licenseNoticeWarning}:t.statusDetail==="active_cancel_pending"?{label:s("settings.license.active","Active"),tooltip:s("settings.license.status.activeCancelPending.tooltip","Cancellation is pending, but Pro access remains active until the current billing period ends."),detail:s("settings.license.detail.cancelPending","Cancellation is scheduled. Pro access remains active until the current billing period ends."),detailTone:i.licenseNoticeInfo}:t.statusDetail==="grace_provider_unavailable"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:s("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:i.licenseNoticeInfo}:t.statusDetail==="grace_expired"||t.statusDetail==="grace_payment_failed"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:s("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:i.licenseNoticeInfo}:{label:s(`settings.license.${t.status}`,t.status),tooltip:s(`settings.license.${t.status}.tooltip`,"Current license activation state."),detail:t.refreshRequired?s("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:i.licenseNoticeMuted}}function vt(){const{t,selectedLocale:s,setLocale:l}=V(),{trackEvent:x}=ae(),{search:o}=re(),{settings:N,license:a,licenseControlsDisabled:g,licenseSubmitting:p,licenseMessage:P,activateLicense:k,refreshLicense:B,resetLicense:S,loading:D}=ge(),[h,y]=u.useState(""),A=a?rt(a,t):null,R=(a==null?void 0:a.tier)==="pro",_=(a==null?void 0:a.tier)==="pro"?a.maskedKey:void 0,L=a!=null&&a.provider&&a.provider!=="auto"?a.provider:void 0,w=(a==null?void 0:a.tier)==="pro"?"pro":"basic",H=u.useRef(null),C=u.useRef(null),j=u.useMemo(()=>new URLSearchParams(o).get("section")==="license",[o]);return u.useEffect(()=>{var T;if(!j||D)return;const r=H.current;if((T=r==null?void 0:r.scrollIntoView)==null||T.call(r,{block:"start",behavior:"smooth"}),C.current&&!C.current.disabled){C.current.focus();return}r==null||r.focus()},[D,g,p,j]),D?e.jsx("div",{className:i.page,children:e.jsx("div",{className:i.loading,children:t("common.loading")})}):e.jsxs("div",{className:i.page,children:[e.jsx(pe,{title:t("page.settings.title","Settings"),description:t("page.settings.description","Manage license, saved data, server environment, and language."),helpTopicId:"settings",helpState:{tier:w}}),e.jsxs("div",{id:"settings-license",ref:H,tabIndex:-1,"data-testid":"settings-license-card",className:[i.card,j?i.licenseCardTarget:"",(a==null?void 0:a.tier)==="pro"?i.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(v,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(d,{text:g?t("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WEPPY Dashboard."):t("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${i.headerBadge} ${g?"":i.headerBadgeLive}`,children:g?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[a?e.jsxs(e.Fragment,{children:[(()=>{const r=A;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:i.licenseGrid,children:[e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${i.statusDot} ${lt(a.status)}`}),e.jsx(d,{text:(r==null?void 0:r.tooltip)??t(`settings.license.${a.status}.tooltip`,"Current license activation state."),children:(r==null?void 0:r.label)??t(`settings.license.${a.status}`,a.status)})]}),e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:a.tier==="pro"?i.proBadge:"",children:e.jsx(d,{text:t(`tier.${a.tier}.tooltip`,"Available feature set for the connected license."),children:a.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),_&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(d,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:_})})]}),L&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(d,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:L})})]})]}),(r==null?void 0:r.detail)&&e.jsx("p",{className:`${i.licenseNotice} ${r.detailTone}`,children:a.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):r.detail}),a.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${i.licenseNotice} ${i.licenseNoticeMuted}`,children:r==null?void 0:r.detail})]})})(),a.tier==="basic"&&e.jsx(d,{text:t("tier.upgrade.tooltip","View Pro features and purchase options."),children:e.jsx("a",{className:i.upgradeLink,href:ce.settingsLicense,target:"_blank",rel:"noopener noreferrer",onClick:()=>x("dashboard_click_event",{click_target:"upgrade_cta",placement:"settings_license",page:"settings"}),children:t("tier.upgrade","View Pro")})})]}):e.jsx("div",{className:i.loading,children:t("settings.license.unavailable")}),e.jsxs("div",{className:i.licenseControls,children:[e.jsxs("div",{className:i.licenseControlRow,children:[e.jsx(d,{text:t("settings.license.refresh.tooltip","Re-fetch the current state from the license server. Useful when a billing change hasn't appeared yet."),children:e.jsx("button",{type:"button",className:i.actionBtn,disabled:g||p||!R,onClick:()=>{B()},children:p?t("common.loading"):t("settings.license.refresh","Refresh License")})}),e.jsx(d,{text:t("settings.license.reset.tooltip","Remove the currently registered license key. Use this before activating with a different key."),children:e.jsx("button",{type:"button",className:i.actionBtn,disabled:g||p||!R,onClick:()=>{S()},children:p?t("common.loading"):t("settings.license.reset","Reset License")})})]}),e.jsxs("div",{className:i.licenseControlRow,children:[e.jsxs("label",{className:`${i.licenseField} ${i.licenseFieldGrow}`,children:[e.jsx("span",{className:i.controlLabel,children:e.jsx(v,{label:t("settings.license.keyInput","License Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{ref:C,"aria-label":t("settings.license.keyInput","License Key"),className:i.textInput,type:"text",value:h,disabled:g||p,onChange:r=>y(r.target.value)})]}),e.jsx(d,{text:t("settings.license.activate.tooltip","Activate Pro features with the entered license key."),children:e.jsx("button",{type:"button",className:i.actionBtn,disabled:g||p,onClick:()=>{(async()=>await k(h)&&y(""))()},children:p?t("common.loading"):t("settings.license.activate","Activate License")})})]}),P&&e.jsx("p",{className:i.licenseMessage,children:P})]})]})]}),e.jsx(nt,{tier:w}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(v,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(d,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:i.headerBadge,children:t("settings.readOnly","Read-only")})})]}),N?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:i.coldGrid,children:[e.jsx("dt",{children:e.jsx(v,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:N.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(v,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:N.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(v,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether WEPPY Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(d,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WEPPY Dashboard in a browser."),children:String(N.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:i.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:i.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:i.card,children:[e.jsx("div",{className:i.cardHeader,children:e.jsx(v,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the WEPPY Dashboard interface text is localized.")})}),e.jsxs("div",{className:i.langRow,children:[e.jsx("label",{children:e.jsx(v,{label:t("settings.language.dashboard","WEPPY Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the WEPPY Dashboard language or follows the system language when set to Auto.")})}),e.jsx(d,{text:t("settings.language.auto.tooltip","Follow the operating system's language. Falls back to English when not supported."),children:e.jsxs("select",{className:i.select,value:s,onChange:r=>l(r.target.value),children:[e.jsx("option",{value:de,children:t("settings.language.auto","Auto")}),ue.map(r=>e.jsx("option",{value:r,children:ot[r]??r},r))]})})]})]})]})}export{vt as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._card_1jlvt_4{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:16px 20px;display:flex;flex-direction:column;gap:14px}._cardEmbedded_1jlvt_14{border:none;border-radius:0;background:transparent;padding:14px 0 0}._cardTitle_1jlvt_21{margin:0;font-size:13px;font-weight:600;color:var(--text-primary);letter-spacing:.02em}._usageRow_1jlvt_30{display:flex;flex-direction:column;gap:4px}._usageTotal_1jlvt_36{font-size:13px;font-weight:600;color:var(--text-primary)}._usageBreakdown_1jlvt_42{font-size:12px;color:var(--text-muted)}._usageCounts_1jlvt_47{font-size:12px;color:var(--text-secondary)}._divider_1jlvt_53{border:none;border-top:1px solid var(--border);margin:0}._lastRunRow_1jlvt_60{font-size:12px;color:var(--text-secondary);display:flex;align-items:center;gap:6px;flex-wrap:wrap}._lastRunLabel_1jlvt_69{color:var(--text-muted);font-weight:500;white-space:nowrap}._errorIcon_1jlvt_75{color:var(--error-text);cursor:help;font-size:13px;line-height:1;position:relative}._errorIcon_1jlvt_75:hover ._tooltip_1jlvt_83{display:block}._tooltip_1jlvt_83{display:none;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--bg-secondary);border:1px solid var(--border);border-radius:4px;padding:4px 8px;font-size:11px;color:var(--error-text);white-space:nowrap;z-index:10;pointer-events:none;box-shadow:0 2px 8px #0003}._cleanupRow_1jlvt_106{display:flex;flex-wrap:wrap;gap:8px;align-items:center}._cleanupLabel_1jlvt_113{font-size:12px;color:var(--text-muted);font-weight:500;white-space:nowrap}._cleanupBtn_1jlvt_120{padding:5px 10px;border-radius:5px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;cursor:pointer;white-space:nowrap;transition:border-color var(--transition),color var(--transition)}._cleanupBtn_1jlvt_120:hover:not(:disabled){border-color:var(--accent);color:var(--text-primary)}._cleanupBtn_1jlvt_120:disabled{opacity:.45;cursor:not-allowed}._cleanupBtnDanger_1jlvt_143{border-color:var(--error-border, rgba(224, 85, 85, .4));color:var(--error-text)}._cleanupBtnDanger_1jlvt_143:hover:not(:disabled){border-color:var(--error-text);background:var(--error-bg, rgba(224, 85, 85, .08));color:var(--error-text)}._retentionSection_1jlvt_155{display:flex;flex-direction:column;gap:10px}._retentionTitle_1jlvt_161{margin:0;font-size:12px;font-weight:600;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase}._retentionFieldset_1jlvt_170{display:flex;flex-direction:column;gap:10px;border:none;margin:0;padding:0;position:relative}._retentionFieldset_1jlvt_170[disabled]{opacity:.5;pointer-events:none}._proOverlay_1jlvt_185{position:absolute;top:0;right:0;bottom:0;left:0;cursor:not-allowed;z-index:1}._proOverlay_1jlvt_185:hover ._tooltip_1jlvt_83{display:block}._radioRow_1jlvt_197{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._radioLabel_1jlvt_204{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}._radioLabel_1jlvt_204 input[type=radio]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent);flex-shrink:0}._presetGroup_1jlvt_224{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-left:20px}._presetBtn_1jlvt_232{padding:3px 8px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;cursor:pointer;transition:border-color var(--transition),background var(--transition)}._presetBtn_1jlvt_232:hover{border-color:var(--accent);color:var(--text-primary)}._presetBtnActive_1jlvt_249{border-color:var(--accent);background:var(--accent-dim);color:var(--accent);font-weight:600}._freeInput_1jlvt_256{width:72px;font-size:12px;padding:3px 7px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);font-family:inherit}._freeInput_1jlvt_256:focus{outline:none;border-color:var(--accent)}._freeInput_1jlvt_256._inputError_1jlvt_272{border-color:var(--error-text)}._inputUnit_1jlvt_276{font-size:11px;color:var(--text-muted);white-space:nowrap}._cascadeRow_1jlvt_283{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none}._cascadeRow_1jlvt_283 input[type=checkbox]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent);flex-shrink:0}._retentionActions_1jlvt_302{display:flex;gap:8px;flex-wrap:wrap}._saveBtn_1jlvt_308{padding:6px 14px;border-radius:5px;border:1px solid transparent;background:var(--accent);color:var(--bg-card);font-family:var(--font-label);font-size:12px;font-weight:600;cursor:pointer;transition:opacity var(--transition)}._saveBtn_1jlvt_308:hover:not(:disabled){opacity:.88}._saveBtn_1jlvt_308:disabled{opacity:.45;cursor:not-allowed}._runNowBtn_1jlvt_330{padding:6px 14px;border-radius:5px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition)}._runNowBtn_1jlvt_330:hover:not(:disabled){border-color:var(--accent);color:var(--text-primary)}._runNowBtn_1jlvt_330:disabled{opacity:.45;cursor:not-allowed}._errorMsg_1jlvt_353{font-size:12px;color:var(--error-text);padding:4px 0}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as l,a as P,D as E,e as R,d as $,m as A,j as t,u as D,f as O,h as B,l as H,k as M,T as F}from"./index-DYezp9b1.js";import{P as U}from"./PageHeader-Do_AQ2vQ.js";import{I as _}from"./InfoLabel-DCq3Fmko.js";import{T as b}from"./TooltipText-CfI7WgY4.js";import{C as W}from"./ConfirmModal-BCviiJ3_.js";import{C as S}from"./CurrentPlaceScope-CHEqGWYd.js";import{S as q}from"./StatusBadge-DRbLpCd0.js";import"./ConfirmModal.module-NrFlfTWy.js";const G=5e3;function z(){const[e,i]=l.useState(null),[c,o]=l.useState([]),[d,r]=l.useState(!0),[y,w]=l.useState(null),m=l.useRef(null),g=l.useRef(null),p=l.useCallback(async()=>{var u;try{const[T,I]=await Promise.all([P.get("/sync/status"),P.get("/api/dashboard/place-summary")]);i(T);const a=(u=I.places)==null?void 0:u.find(j=>j.isActive);w((a==null?void 0:a.placeDirName)??null)}catch{}},[]),f=l.useCallback(async()=>{try{const u=await P.get("/sync/history",{limit:"30"});o(u.entries??[])}catch{o([])}},[]),x=l.useCallback(async()=>{await Promise.all([p(),f()]),r(!1)},[p,f]),N=l.useCallback(()=>{x()},[x]),n=l.useCallback(async()=>{await P.post("/api/dashboard/sync/history/clear"),o([]),p()},[p]);return l.useEffect(()=>(x(),g.current=setInterval(x,G),()=>{g.current&&clearInterval(g.current)}),[x]),l.useEffect(()=>{const u=new E;m.current=u,u.connect();const T=u.on("sync",()=>{p(),f()});return()=>{T(),u.disconnect(),m.current=null}},[p,f]),{status:e,history:c,loading:d,activePlaceDirName:y,refresh:N,clearHistory:n}}const V="_actions_1j3p3_60",Y="_btn_1j3p3_68",J="_btnPrimary_1j3p3_99",Q="_panel_1j3p3_109",X="_panelIcon_1j3p3_116",Z="_panelTitle_1j3p3_122",K="_panelDesc_1j3p3_131",ee="_benefitList_1j3p3_139",te="_benefitItem_1j3p3_148",h={actions:V,btn:Y,btnPrimary:J,panel:Q,panelIcon:X,panelTitle:Z,panelDesc:K,benefitList:ee,benefitItem:te};function se({icon:e,title:i,description:c,benefits:o,upgradeLabel:d,upgradeHref:r}){const{trackEvent:y}=R(),{pathname:w,search:m}=$(),g=A(w,m);return t.jsxs("div",{className:h.panel,children:[e&&t.jsx("div",{className:h.panelIcon,children:e}),t.jsx("div",{className:h.panelTitle,children:i}),t.jsx("div",{className:h.panelDesc,children:c}),t.jsx("ul",{className:h.benefitList,children:o.map(p=>t.jsx("li",{className:h.benefitItem,children:p},p))}),t.jsx("div",{className:h.actions,children:t.jsx("a",{className:`${h.btn} ${h.btnPrimary}`,href:r,target:"_blank",rel:"noreferrer",onClick:()=>y("dashboard_click_event",{click_target:"upgrade_cta",placement:"tier_panel",...g}),children:d})})]})}const ne="_page_siyu4_2",ie="_card_siyu4_10",ae="_cardHeader_siyu4_17",ce="_clearButton_siyu4_29",oe="_statusRow_siyu4_39",le="_metaItem_siyu4_46",re="_statusGrid_siyu4_52",de="_table_siyu4_71",pe="_directionRail_siyu4_99",ue="_endpointLabel_siyu4_105",ye="_optionRail_siyu4_109",_e="_directionOption_siyu4_115",he="_directionOptionActive_siyu4_129",me="_directionOptionInactive_siyu4_133",ge="_direction_forward_siyu4_139",fe="_direction_bidirectional_siyu4_143",xe="_direction_reverse_siyu4_147",be="_lockBadge_siyu4_152",je="_proBadge_siyu4_160",ve="_forwardBadge_siyu4_174",we="_logContainer_siyu4_187",Te="_logEntry_siyu4_194",Ne="_logTime_siyu4_206",Pe="_logType_siyu4_212",Ie="_logTypeWrite_siyu4_221",Ce="_logTypeUpdate_siyu4_225",Le="_logTypeDelete_siyu4_229",Se="_logTypeIdle_siyu4_233",ke="_logPath_siyu4_237",Re="_logEmpty_siyu4_244",Ee="_overlay_siyu4_251",$e="_overlayTitle_siyu4_261",Ae="_overlayMessage_siyu4_268",De="_checklist_siyu4_274",Oe="_checkItem_siyu4_284",Be="_upgradePanel_siyu4_300",He="_upgradePanelHeader_siyu4_307",Me="_benefitList_siyu4_315",Fe="_benefitItem_siyu4_324",Ue="_upgradeActions_siyu4_339",We="_btn_siyu4_344",qe="_btnPrimary_siyu4_361",Ge="_disabled_siyu4_372",s={page:ne,card:ie,cardHeader:ae,clearButton:ce,statusRow:oe,metaItem:le,statusGrid:re,table:de,directionRail:pe,endpointLabel:ue,optionRail:ye,directionOption:_e,directionOptionActive:he,directionOptionInactive:me,direction_forward:ge,direction_bidirectional:fe,direction_reverse:xe,lockBadge:be,proBadge:je,forwardBadge:ve,logContainer:we,logEntry:Te,logTime:Ne,logType:Pe,logTypeWrite:Ie,logTypeUpdate:Ce,logTypeDelete:Le,logTypeIdle:Se,logPath:ke,logEmpty:Re,overlay:Ee,overlayTitle:$e,overlayMessage:Ae,checklist:De,checkItem:Oe,upgradePanel:Be,upgradePanelHeader:He,benefitList:Me,benefitItem:Fe,upgradeActions:Ue,btn:We,btnPrimary:qe,disabled:Ge},ze=[{key:"forward",symbol:"←"},{key:"bidirectional",symbol:"↔"},{key:"reverse",symbol:"→"}];function Ve(e){const i=new Date(e);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Ye(e){switch(e){case"write":return s.logTypeWrite;case"update":return s.logTypeUpdate;case"delete":return s.logTypeDelete;default:return s.logTypeIdle}}function Je(e){switch(e){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function Qe(e,i,c,o){const d=e(`sync.directions.cat.${i}`,i.charAt(0).toUpperCase()+i.slice(1)),r=e("sync.directions.endpoint.local","Local"),y=e("sync.directions.endpoint.studio","Studio");switch(c){case"forward":return[`${d}: ${r} <- ${y}`,e("sync.directions.tooltip.forward.body","Studio changes sync to local files only")].join(`
|
|
2
|
-
`);case"bidirectional":return[`${d}: ${r} <-> ${y}`,e("sync.directions.tooltip.bidirectional.body","Two-way sync between Local and Studio"),o?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
3
|
-
`);case"reverse":return[`${d}: ${r} -> ${y}`,e("sync.directions.tooltip.reverse.body","Push local file changes to Studio"),o?e("sync.directions.tooltip.proRequired","Pro required in Basic tier"):""].filter(Boolean).join(`
|
|
4
|
-
`);default:return d}}const Xe=["scripts","values","containers","data","services"];function Ze(e,i){return i==="manual"?e("sync.directions.mode.manual","Manual"):i==="auto"?e("sync.directions.mode.auto","Auto"):"-"}function k(...e){const i=e[0]??"",c=i.includes("\\")&&!i.includes("/")?"\\":"/";return e.filter(o=>o.length>0).map((o,d)=>d===0?o.replace(/[\\/]+$/g,""):o.replace(/^[\\/]+|[\\/]+$/g,"")).join(c)}function Ke(e){const i=e.replace(/[\\/]+$/g,""),c=i.split(/[\\/]+/);return c[c.length-1]??i}function et(e,i){const c=Ke(e);return c==="explorer"?e:c===i?k(e,"explorer"):k(e,i,"explorer")}function tt(e,i){return i==="manual"?e("sync.directions.mode.manual.tooltip","Applies sync changes only when you trigger them manually."):i==="auto"?e("sync.directions.mode.auto.tooltip","Applies sync changes automatically when updates arrive."):""}function st(e,i){switch(i){case"write":return e("sync.log.type.write","WRITE");case"update":return e("sync.log.type.update","UPDATE");case"delete":return e("sync.log.type.delete","DELETE");default:return e("sync.log.type.idle","IDLE")}}function nt(e,i){switch(i){case"write":return e("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return e("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return e("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return e("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function ut(){const{t:e}=D(),{trackEvent:i}=R(),{level:c}=O(),{tier:o,loading:d}=B(),r=z(),{show:y}=H(),[w,m]=l.useState(!1),[g,p]=l.useState(!1),f=!d&&o==="basic",x=c==="disconnected"||c==="serverOnly",N=t.jsx(U,{title:e("page.sync.title","Sync"),description:e("page.sync.description","Monitor Studio to local sync status, direction, apply mode, and recent sync logs."),helpTopicId:"sync",helpState:{connectionLevel:c,tier:o}});if(x)return t.jsxs("div",{className:s.page,children:[N,t.jsx(S,{surface:"sync"}),t.jsx("div",{className:s.card,children:t.jsxs("div",{className:s.overlay,children:[t.jsx("div",{className:s.overlayTitle,children:e("sync.overlay.title","Roblox Studio plugin required")}),t.jsx("div",{className:s.overlayMessage,children:e("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check1","Is Roblox Studio running?")}),t.jsx("li",{className:s.checkItem,children:e("sync.overlay.check2","Is the WEPPY Plugin installed?")})]})]})})]});const n=r.status,u=r.history,T=Je(n==null?void 0:n.state),I=async()=>{p(!0);try{await r.clearHistory(),y(e("toast.clearSuccess","Cleared successfully"),"success"),m(!1)}catch{y(e("toast.clearFailed","Failed to clear data"),"error")}finally{p(!1)}};return t.jsxs("div",{className:s.page,children:[N,t.jsx(S,{surface:"sync"}),t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx(b,{text:e("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:e("sync.status.title","Sync Status")}),f&&t.jsx(b,{text:e("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:t.jsx("span",{className:s.forwardBadge,children:e("sync.status.forwardOnly","Forward Only")})})]}),t.jsxs("div",{className:s.statusRow,children:[t.jsx(q,{status:T}),(n==null?void 0:n.placeName)&&t.jsxs("span",{className:s.metaItem,children:[t.jsx(_,{label:e("sync.status.place","Place"),tooltip:e("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",n.placeName,n.placeId?` (${n.placeId})`:""]})]}),t.jsxs("dl",{className:s.statusGrid,children:[(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.path","Place Root"),tooltip:e("sync.status.path.tooltip","Local filesystem root currently used for this place sync output.")})}),t.jsx("dd",{children:n.syncRoot})]}),r.activePlaceDirName&&(n==null?void 0:n.syncRoot)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.placePath","Explorer Path"),tooltip:e("sync.status.placePath.tooltip","Explorer files path for the active place.")})}),t.jsx("dd",{children:et(n.syncRoot,r.activePlaceDirName)})]}),(n==null?void 0:n.instanceCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.instances","Instances"),tooltip:e("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),t.jsx("dd",{children:n.instanceCount})]}),(n==null?void 0:n.scriptCount)!=null&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.scripts","Scripts"),tooltip:e("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),t.jsx("dd",{children:n.scriptCount})]}),(n==null?void 0:n.state)==="syncing"&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(_,{label:e("sync.status.state","State"),tooltip:e("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),t.jsx("dd",{children:e("status.syncing","Syncing")})]})]})]}),(n==null?void 0:n.directions)&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:t.jsx(b,{text:e("sync.directions.title.tooltip","Per-category sync direction and apply behavior between Local and Studio."),children:e("sync.directions.title","Sync Directions")})}),t.jsxs("table",{className:s.table,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:t.jsx(_,{label:e("sync.directions.type","Type"),tooltip:e("sync.directions.type.tooltip","Sync category affected by this rule.")})}),t.jsx("th",{children:t.jsx(_,{label:e("sync.directions.direction","Direction"),tooltip:e("sync.directions.direction.tooltip","Whether each category syncs from Studio, to Studio, or both ways.")})}),t.jsx("th",{children:t.jsx(_,{label:e("sync.directions.applyMode","Apply Mode"),tooltip:e("sync.directions.applyMode.tooltip","How incoming sync changes are applied for this category.")})})]})}),t.jsx("tbody",{children:Xe.map(a=>{var L;const j=n.directions[a],C=(L=n.applyModes)==null?void 0:L[a];return t.jsxs("tr",{children:[t.jsx("td",{children:e(`sync.directions.cat.${a}`,a.charAt(0).toUpperCase()+a.slice(1))}),t.jsx("td",{children:t.jsxs("div",{className:s.directionRail,"aria-label":`${a}-direction-rail`,children:[t.jsx(b,{text:e("sync.directions.endpoint.local.tooltip","Local files on disk are always shown on the left side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.local","Local")})}),t.jsx("span",{className:s.optionRail,children:ze.map(v=>t.jsx(M,{text:Qe(e,a,v.key,f),children:t.jsx("span",{className:`${s.directionOption} ${j===v.key?s.directionOptionActive:s.directionOptionInactive} ${s[`direction_${v.key}`]??""}`,"data-active":j===v.key?"true":"false",children:v.symbol})},v.key))}),t.jsx(b,{text:e("sync.directions.endpoint.studio.tooltip","Roblox Studio is always shown on the right side of the direction rail."),children:t.jsx("span",{className:s.endpointLabel,children:e("sync.directions.endpoint.studio","Studio")})})]})}),t.jsx("td",{children:t.jsx(b,{text:tt(e,C),children:Ze(e,C)})})]},a)})})]})]}),t.jsxs("div",{className:s.card,children:[t.jsxs("div",{className:s.cardHeader,children:[t.jsx("span",{children:e("sync.log.title","Sync Log")}),t.jsx("button",{className:s.clearButton,onClick:()=>{i("dashboard_click_event",{click_target:"sync_clear_log",page:"sync"}),m(!0)},children:e("common.clear","Clear")})]}),t.jsx("div",{className:s.logContainer,children:u.length===0?t.jsx("div",{className:s.logEmpty,children:e("sync.log.empty","No sync events yet")}):u.map((a,j)=>t.jsxs("div",{className:s.logEntry,children:[t.jsx("span",{className:s.logTime,children:Ve(a.timestamp)}),t.jsx(b,{text:nt(e,a.type),children:t.jsx("span",{className:`${s.logType} ${Ye(a.type)}`,children:st(e,a.type)})}),t.jsxs("span",{className:s.logPath,children:[a.path,a.details?` — ${a.details}`:""]})]},j))})]}),f&&t.jsx(se,{title:e("sync.upgrade.title","Explore Full Sync with Pro"),description:e("tier.banner.save","Save AI tokens with Pro!"),benefits:[e("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),e("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),e("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:e("sync.upgrade.buy","View Pro"),upgradeHref:F.sync}),t.jsx(W,{open:w,title:e("sync.clear.title","Clear sync log?"),message:e("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.clear","Clear"),loading:g,onCancel:()=>!g&&m(!1),onConfirm:I})]})}export{ut as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._progressPromoWrap_1j3p3_1{display:flex;flex-direction:column;gap:8px}._progressPromo_1j3p3_1{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 20px;display:flex;align-items:center;gap:16px}._progressMain_1j3p3_17{flex:1;min-width:0}._progressLabel_1j3p3_22{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);margin-bottom:6px;display:flex;justify-content:space-between;gap:12px}._progressBar_1j3p3_32{height:6px;background:var(--bg-secondary);border-radius:3px;overflow:hidden}._progressFill_1j3p3_39{height:100%;background:var(--pro-badge);border-radius:3px;transition:width var(--transition)}._progressTextGroup_1j3p3_46{display:flex;flex-direction:column;gap:3px}._progressText_1j3p3_46{font-family:var(--font-label);font-size:13px;color:var(--pro-badge);white-space:nowrap;font-weight:500}._actions_1j3p3_60{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._btn_1j3p3_68{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._btn_1j3p3_68:hover{border-color:var(--accent);background:var(--accent-dim)}._btnOutline_1j3p3_89{border-color:var(--pro-badge);color:var(--pro-badge)}._btnOutline_1j3p3_89:hover{background:var(--pro-bg-soft);border-color:var(--pro-badge)}._btnPrimary_1j3p3_99{background:var(--pro-badge);color:var(--pro-text-on-badge);border-color:var(--pro-badge)}._btnPrimary_1j3p3_99:hover{opacity:.9}._panel_1j3p3_109{background:linear-gradient(180deg,var(--pro-bg-soft),transparent 60%),var(--bg-secondary);border:1px solid var(--pro-border);border-radius:var(--radius);padding:24px 20px}._panelIcon_1j3p3_116{font-size:32px;margin-bottom:12px;text-align:center}._panelTitle_1j3p3_122{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--pro-text);margin-bottom:8px;text-align:center}._panelDesc_1j3p3_131{font-size:13px;color:var(--text-secondary);margin-bottom:16px;line-height:1.5;text-align:center}._benefitList_1j3p3_139{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:4px}._benefitItem_1j3p3_148{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_1j3p3_148:before{content:"+";position:absolute;left:0;color:var(--pro-badge);font-weight:600}@media(max-width:720px){._progressPromo_1j3p3_1{flex-direction:column;align-items:stretch}._progressText_1j3p3_46{white-space:normal}._actions_1j3p3_60{justify-content:stretch}._btn_1j3p3_68{width:100%}}._page_siyu4_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_siyu4_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_siyu4_17{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_siyu4_29{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:var(--error-text);border-radius:8px;padding:6px 12px;cursor:pointer}._statusRow_siyu4_39{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_siyu4_46{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_siyu4_52{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_siyu4_52 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_siyu4_52 dd{margin:0;font-family:var(--font-code);color:var(--text-primary)}._table_siyu4_71{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_siyu4_71 th{text-align:left;padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-weight:500;font-size:11px}._table_siyu4_71 td{padding:6px 12px;border-bottom:1px solid var(--border);color:var(--text-primary)}._table_siyu4_71 tr:last-child td{border-bottom:none}._directionRail_siyu4_99{display:inline-flex;align-items:center;gap:10px}._endpointLabel_siyu4_105{color:var(--text-secondary)}._optionRail_siyu4_109{display:inline-flex;align-items:center;gap:6px}._directionOption_siyu4_115{display:inline-flex;align-items:center;justify-content:center;width:28px;height:24px;border-radius:6px;border:1px solid var(--border);font-family:var(--font-code);font-size:13px;cursor:help;-webkit-user-select:none;user-select:none}._directionOptionActive_siyu4_129{background:var(--bg-secondary)}._directionOptionInactive_siyu4_133{background:transparent;opacity:.45;color:var(--text-muted)}._directionOptionActive_siyu4_129._direction_forward_siyu4_139{color:var(--success)}._directionOptionActive_siyu4_129._direction_bidirectional_siyu4_143{color:var(--accent)}._directionOptionActive_siyu4_129._direction_reverse_siyu4_147{color:var(--warning)}._lockBadge_siyu4_152{display:inline-block;margin-left:6px;font-size:11px;color:var(--text-muted)}._proBadge_siyu4_160{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:var(--pro-text-on-badge);background:var(--pro-badge);border-radius:3px;vertical-align:middle}._forwardBadge_siyu4_174{display:inline-block;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:4px}._logContainer_siyu4_187{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_siyu4_194{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_siyu4_194:last-child{border-bottom:none}._logTime_siyu4_206{color:var(--text-muted);flex-shrink:0;width:44px}._logType_siyu4_212{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_siyu4_221{color:var(--success)}._logTypeUpdate_siyu4_225{color:var(--accent)}._logTypeDelete_siyu4_229{color:var(--error)}._logTypeIdle_siyu4_233{color:var(--text-muted)}._logPath_siyu4_237{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_siyu4_244{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_siyu4_251{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_siyu4_261{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_siyu4_268{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_siyu4_274{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_siyu4_284{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_siyu4_284:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_siyu4_300{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_siyu4_307{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_siyu4_315{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_siyu4_324{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_siyu4_324:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_siyu4_339{display:flex;gap:8px}._btn_siyu4_344{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_siyu4_344:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_siyu4_361{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_siyu4_361:hover{opacity:.9}._disabled_siyu4_372{opacity:.4;pointer-events:none}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._tabBar_1o4kh_2{display:flex;align-items:stretch;gap:2px;border-bottom:1px solid var(--border)}._tabs_1o4kh_9{display:flex;gap:2px}._actions_1o4kh_14{margin-left:auto;display:flex;align-items:center;gap:8px;padding-bottom:4px}._tab_1o4kh_2{font-family:var(--font-label);font-size:12px;font-weight:500;padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;transition:color var(--transition),border-color var(--transition)}._tab_1o4kh_2:hover{color:var(--text-primary)}._tabActive_1o4kh_39{color:var(--accent);border-bottom-color:var(--accent)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._wrapper_hzgda_2{overflow-x:auto}._table_hzgda_7{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_hzgda_7 th{text-align:left;color:var(--text-muted);font-weight:500;padding:6px 8px;border-bottom:1px solid var(--border);background:var(--bg-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none}._table_hzgda_7 td{padding:6px 8px;color:var(--text-primary);border-bottom:1px solid var(--border-dim, rgba(255, 255, 255, .04))}._sortable_hzgda_32{cursor:pointer;transition:color var(--transition)}._sortable_hzgda_32:hover{color:var(--accent)}._sortArrow_hzgda_41{margin-left:4px;font-size:10px}._table_hzgda_7 tbody tr:hover td{background:var(--accent-dim)}._clickable_hzgda_52{cursor:pointer}._empty_hzgda_57{text-align:center;color:var(--text-muted);font-style:italic;padding:24px 8px}._expandedRow_hzgda_65 td{padding:0!important;border-bottom:1px solid var(--border)}._expandedRow_hzgda_65:hover td{background:transparent!important}._expandedCell_hzgda_74{padding:0!important}._page_16x6v_2{display:flex;flex-direction:column;gap:var(--content-gap);max-width:var(--content-max)}._card_16x6v_12{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardToolbar_16x6v_19{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}._sectionTitle_16x6v_27{font-family:var(--font-label);font-size:13px;color:var(--text-primary)}._dangerButton_16x6v_33{border:1px solid var(--danger-border);background:var(--danger-bg);color:var(--danger-text);border-radius:var(--radius-sm);padding:6px 12px;font-family:var(--font-label);font-size:12px;font-weight:500;cursor:pointer;transition:background var(--transition),border-color var(--transition)}._dangerButton_16x6v_33:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._proBadge_16x6v_52{display:inline-block;margin-left:6px;padding:1px 5px;font-size:9px;font-weight:600;letter-spacing:.05em;color:var(--pro-text-on-badge);background:var(--pro-badge);border-radius:3px;vertical-align:middle}._statusOk_16x6v_67{display:inline-block;padding:2px 8px;border-radius:999px;background:var(--success-bg);color:var(--success);font-weight:500}._statusFallback_16x6v_76{display:inline-block;padding:2px 8px;border-radius:999px;background:var(--info-bg);color:var(--info);font-weight:600}._statusUnsupported_16x6v_85,._statusWarning_16x6v_94{display:inline-block;padding:2px 8px;border-radius:999px;background:var(--warning-bg);color:var(--warning);font-weight:600}._statusError_16x6v_103{display:inline-block;padding:2px 8px;border-radius:999px;background:var(--error-bg);color:var(--error);font-weight:600}._tierBasic_16x6v_113{color:var(--text-secondary)}._tierPro_16x6v_117{color:var(--pro-badge);font-weight:500}._tierMixed_16x6v_122{color:var(--text-primary);font-weight:500}._errorText_16x6v_128{color:var(--error)}._filterRow_16x6v_133{display:flex;align-items:center;gap:12px;margin-bottom:12px}._filterLabel_16x6v_140{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);display:flex;align-items:center;gap:6px}._filterSelect_16x6v_149{font-family:var(--font-code);font-size:12px;padding:3px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary)}._expandedRow_16x6v_160{background:var(--bg-secondary);padding:12px 16px}._expandedSection_16x6v_165{margin-bottom:8px;font-size:12px;color:var(--text-secondary)}._expandedSection_16x6v_165:last-child{margin-bottom:0}._detailList_16x6v_175{display:flex;flex-direction:column;gap:6px}._detailItem_16x6v_181{display:flex;flex-wrap:wrap;gap:6px}._detailLabel_16x6v_187{font-family:var(--font-label);color:var(--text-muted)}._detailValue_16x6v_192{color:var(--text-primary);word-break:break-word}._pre_16x6v_197{font-family:var(--font-code);font-size:11px;color:var(--text-primary);background:var(--bg-card);border:1px solid var(--border);border-radius:4px;padding:8px;margin-top:4px;overflow-x:auto;max-height:200px;overflow-y:auto;white-space:pre-wrap;word-break:break-all}._pagination_16x6v_214{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px}._pageInfo_16x6v_222{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._btn_16x6v_228{font-family:var(--font-label);font-size:12px;padding:4px 12px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_16x6v_228:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._btn_16x6v_228:disabled{opacity:.4;cursor:default}._tierDistribution_16x6v_251{margin-bottom:16px}._tierBarWrap_16x6v_255{display:flex;height:12px;border-radius:6px;overflow:hidden;background:var(--bg-secondary)}._tierBarBasic_16x6v_263{background:var(--text-secondary);transition:width .3s ease}._tierBarPro_16x6v_268{background:var(--accent);transition:width .3s ease}._tierLabels_16x6v_273{display:flex;justify-content:space-between;margin-top:4px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary)}._statsTableWrap_16x6v_282{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._statsTable_16x6v_282{width:100%;border-collapse:collapse}._statsTable_16x6v_282 th,._statsTable_16x6v_282 td{padding:10px 12px;font-size:12px;text-align:left;border-bottom:1px solid var(--border)}._statsTable_16x6v_282 th{font-family:var(--font-label);font-size:11px;font-weight:500;color:var(--text-secondary);background:var(--bg-secondary)}._statsTable_16x6v_282 tbody tr:last-child td{border-bottom:none}._sortableHeader_16x6v_313{cursor:pointer;-webkit-user-select:none;user-select:none}._sortArrow_16x6v_318{margin-left:4px}._statsToolRow_16x6v_322{cursor:pointer}._statsToolRow_16x6v_322:hover td{background:var(--bg-secondary)}._statsActionRow_16x6v_330 td{background:color-mix(in srgb,var(--bg-secondary) 72%,transparent)}._expandButton_16x6v_334{display:inline-flex;align-items:center;gap:8px;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}._expandIcon_16x6v_346{width:10px;color:var(--text-secondary)}._actionLabel_16x6v_351{display:inline-block;padding-left:18px;font-family:var(--font-code);color:var(--text-secondary)}._emptyStats_16x6v_358{text-align:center;color:var(--text-muted)}._summaryLine_16x6v_364{margin-top:12px;font-family:var(--font-code);font-size:12px;color:var(--text-muted);text-align:right}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s,r as n,a as F,D as nt,u as ct,e as dt,l as ut}from"./index-DYezp9b1.js";import{P as pt}from"./PageHeader-Do_AQ2vQ.js";import{T as M}from"./TooltipText-CfI7WgY4.js";import{C as xt}from"./ConfirmModal-BCviiJ3_.js";import{C as ht}from"./CurrentPlaceScope-CHEqGWYd.js";import{T as mt}from"./Tabs-CGfFE3L1.js";import"./ConfirmModal.module-NrFlfTWy.js";const bt="_wrapper_hzgda_2",ft="_table_hzgda_7",gt="_sortable_hzgda_32",_t="_sortArrow_hzgda_41",yt="_clickable_hzgda_52",Ct="_empty_hzgda_57",jt="_expandedRow_hzgda_65",vt="_expandedCell_hzgda_74",T={wrapper:bt,table:ft,sortable:gt,sortArrow:_t,clickable:yt,empty:Ct,expandedRow:jt,expandedCell:vt};function kt({columns:t,data:a,sortBy:b,sortDir:P="asc",onSort:B,onRowClick:i,rowKey:v,emptyMessage:k,expandedKey:E,renderExpandedRow:N}){return s.jsx("div",{className:T.wrapper,children:s.jsxs("table",{className:T.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:t.map(u=>s.jsxs("th",{style:u.width?{width:u.width}:void 0,className:u.sortable?T.sortable:void 0,onClick:u.sortable&&B?()=>B(u.key):void 0,children:[s.jsx("span",{children:u.label}),u.sortable&&b===u.key&&s.jsx("span",{className:T.sortArrow,children:P==="asc"?"▴":"▾"})]},u.key))})}),s.jsx("tbody",{children:a.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:t.length,className:T.empty,children:k||"No data"})}):a.map((u,R)=>{const L=v?v(u):String(R),x=E!=null&&L===E&&N?N(u):null;return s.jsxs(n.Fragment,{children:[s.jsx("tr",{className:i?T.clickable:void 0,onClick:i?()=>i(u):void 0,children:t.map(C=>s.jsx("td",{children:C.render?C.render(u):String(u[C.key]??"")},C.key))}),x&&s.jsx("tr",{className:T.expandedRow,children:s.jsx("td",{colSpan:t.length,className:T.expandedCell,children:x})})]},L)})})]})})}function St(t){return{...t,sequenceNumber:typeof t.sequenceNumber=="number"?t.sequenceNumber:void 0,executionTimeMs:typeof t.executionTimeMs=="number"?t.executionTimeMs:void 0}}const Tt=50;function Nt(t){if(typeof t=="number")return{placeId:String(t)}}function Z(t,a){return typeof a!="number"?t:`${t}?placeId=${encodeURIComponent(String(a))}`}function wt(t){const a=(t==null?void 0:t.placeId)??null,[b,P]=n.useState(null),[B,i]=n.useState(!0),[v,k]=n.useState([]),[E,N]=n.useState(0),[u,R]=n.useState(!1),[L,y]=n.useState(!0),[x,C]=n.useState(0),[f,I]=n.useState(""),$=n.useRef(null),h=n.useCallback(async()=>{i(!0);try{const c=Nt(a),j=c?await F.get("/api/dashboard/tool-stats",c):await F.get("/api/dashboard/tool-stats");P(j)}catch{}finally{i(!1)}},[a]),_=n.useCallback(async(c,j)=>{y(!0);try{const O={limit:String(Tt),offset:String(c)};j&&(O.tool=j),typeof a=="number"&&(O.placeId=String(a));const A=await F.get("/api/dashboard/history",O);k(A.entries.map(St)),N(A.total),R(A.hasMore)}catch{k([]),N(0),R(!1)}finally{y(!1)}},[a]),U=n.useCallback(()=>{h(),_(x,f)},[_,h,x,f]),V=n.useCallback(async()=>{await F.post(Z("/api/dashboard/tools/history/clear",a)),_(x,f)},[_,x,f,a]),q=n.useCallback(async()=>{await F.post(Z("/api/dashboard/tools/statistics/clear",a)),h()},[h,a]);return n.useEffect(()=>{h()},[h]),n.useEffect(()=>{_(x,f)},[_,x,f]),n.useEffect(()=>{const c=new nt;$.current=c,c.connect();const j=c.on("command",()=>{h(),_(x,f)});return()=>{j(),c.disconnect(),$.current=null}},[_,h,x,f]),{statistics:b,statsLoading:B,history:v,historyTotal:E,historyHasMore:u,historyLoading:L,historyOffset:x,historyToolFilter:f,setHistoryOffset:C,setHistoryToolFilter:I,refresh:U,clearHistory:V,clearStatistics:q}}const Mt="_page_16x6v_2",Pt="_card_16x6v_12",Bt="_cardToolbar_16x6v_19",Et="_sectionTitle_16x6v_27",Rt="_dangerButton_16x6v_33",Lt="_proBadge_16x6v_52",It="_statusOk_16x6v_67",At="_statusFallback_16x6v_76",Ht="_statusUnsupported_16x6v_85",Ot="_statusWarning_16x6v_94",Ft="_statusError_16x6v_103",$t="_tierBasic_16x6v_113",qt="_tierPro_16x6v_117",Dt="_tierMixed_16x6v_122",Wt="_filterRow_16x6v_133",zt="_filterLabel_16x6v_140",Ut="_filterSelect_16x6v_149",Vt="_expandedRow_16x6v_160",Kt="_expandedSection_16x6v_165",Gt="_detailList_16x6v_175",Jt="_detailItem_16x6v_181",Qt="_detailLabel_16x6v_187",Zt="_detailValue_16x6v_192",Xt="_pre_16x6v_197",Yt="_pagination_16x6v_214",te="_pageInfo_16x6v_222",ee="_btn_16x6v_228",se="_tierDistribution_16x6v_251",oe="_tierBarWrap_16x6v_255",ae="_tierBarBasic_16x6v_263",re="_tierBarPro_16x6v_268",le="_tierLabels_16x6v_273",ie="_statsTableWrap_16x6v_282",ne="_statsTable_16x6v_282",ce="_sortableHeader_16x6v_313",de="_sortArrow_16x6v_318",ue="_statsToolRow_16x6v_322",pe="_statsActionRow_16x6v_330",xe="_expandButton_16x6v_334",he="_expandIcon_16x6v_346",me="_actionLabel_16x6v_351",be="_emptyStats_16x6v_358",fe="_summaryLine_16x6v_364",o={page:Mt,card:Pt,cardToolbar:Bt,sectionTitle:Et,dangerButton:Rt,proBadge:Lt,statusOk:It,statusFallback:At,statusUnsupported:Ht,statusWarning:Ot,statusError:Ft,tierBasic:$t,tierPro:qt,tierMixed:Dt,filterRow:Wt,filterLabel:zt,filterSelect:Ut,expandedRow:Vt,expandedSection:Kt,detailList:Gt,detailItem:Jt,detailLabel:Qt,detailValue:Zt,pre:Xt,pagination:Yt,pageInfo:te,btn:ee,tierDistribution:se,tierBarWrap:oe,tierBarBasic:ae,tierBarPro:re,tierLabels:le,statsTableWrap:ie,statsTable:ne,sortableHeader:ce,sortArrow:de,statsToolRow:ue,statsActionRow:pe,expandButton:xe,expandIcon:he,actionLabel:me,emptyStats:be,summaryLine:fe},K=50,ge=new Set(["clientId","placeId","pinnedTarget","recentPriority","globalQueue"]);function _e(t){const a=new Date(t);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function z(t){return typeof t!="number"||!Number.isFinite(t)?"-":t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function H(t,a){return a==="pro"?t("tier.pro","Pro"):a==="mixed"?t("tier.mixed","Mixed"):t("tier.basic","Basic")}function tt(t,a){return a!==t&&a.startsWith(`${t}_`)?a.slice(t.length+1):""}function ye(t,a){const b=tt(t,a);return b?`${t}.${b}`:t}function X(t){return typeof t=="string"&&t.length>0?t:void 0}function Ce(t){if(!Array.isArray(t))return;const a=t.filter(b=>typeof b=="string"&&b.length>0);return a.length>0?a:void 0}function je(t){const a=t.result??{};return{requestedCommand:t.requestedCommand??X(a.requestedCommand),executedCommand:t.executedCommand??X(a.executedCommand),alternatives:t.alternatives??Ce(a.alternatives)}}function ve(t,a){switch(t.status){case"fallback":return{label:a("tools.badge.fallback","FALLBACK"),tooltip:a("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:o.statusFallback};case"unsupported":return{label:a("tools.badge.unsupported","UNSUPPORTED"),tooltip:a("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:o.statusUnsupported};case"warning":return{label:a("tools.badge.warn","WARN"),tooltip:a("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:o.statusWarning};case"error":return{label:a("tools.badge.err","FAILED"),tooltip:a("tools.badge.err.tooltip","The tool run failed."),className:o.statusError};default:return{label:a("tools.status.ok","OK"),tooltip:a("tools.status.ok.tooltip","The tool run completed successfully."),className:o.statusOk}}}function g(t,a){return s.jsxs("div",{className:o.detailItem,children:[s.jsx("span",{className:o.detailLabel,children:t}),s.jsx("span",{className:o.detailValue,children:a})]})}function ke(t){if(!t||typeof t!="object")return;const a=t;if(typeof a.selectionMode=="string"&&ge.has(a.selectionMode))return a}function Y(t){if(!(!t||typeof t!="object"||!("routing"in t)))return ke(t.routing)}function Se(t){return t.routing??Y(t.result)??Y(t.data)}function Te(t,a){return t.requestedClientId?t.requestedClientId:t.requestedPlaceId!==void 0?t.requestedPlaceId:a("tools.history.routing.none","No Studio target named")}function Ne(t){return t.actualPlaceName?`${t.actualPlaceName} · ${t.actualPlaceId??"-"}`:t.actualClientId??"-"}function Ae(){const{t}=ct(),{trackEvent:a,trackPageView:b}=dt(),[P,B]=n.useState(null),i=wt({placeId:P}),{show:v}=ut(),[k,E]=n.useState("history"),[N,u]=n.useState(null),[R,L]=n.useState(null),[y,x]=n.useState(null),[C,f]=n.useState(!1),[I,$]=n.useState("totalCalls"),[h,_]=n.useState("desc"),U=n.useCallback(e=>{$(r=>r===e?(_(l=>l==="asc"?"desc":"asc"),e):(_("desc"),e))},[]),V=n.useMemo(()=>{var r;const e=new Set;return Object.keys(((r=i.statistics)==null?void 0:r.tools)??{}).forEach(l=>e.add(l)),i.history.forEach(l=>{l.tool&&e.add(l.tool)}),i.historyToolFilter&&e.add(i.historyToolFilter),Array.from(e).sort()},[i.history,i.historyToolFilter,i.statistics]),q=n.useMemo(()=>{var e;return(e=i.statistics)!=null&&e.tools?Object.values(i.statistics.tools).map(r=>{var Q;const l=Object.entries(r.commands??{}).map(([p,d])=>({toolName:r.tool,commandName:d.command??p,label:tt(r.tool,d.command??p)||(d.command??p),tier:d.tier,totalCalls:d.totalCalls,successCount:d.successCount,fallbackCount:d.fallbackCount,unsupportedCount:d.unsupportedCount,warningCount:d.warningCount??0,failureCount:d.failureCount,totalExecutionTimeMs:d.totalExecutionTimeMs,avgExecutionTimeMs:d.avgExecutionTimeMs})),m=l.reduce((p,d)=>p+d.totalCalls,0),S=l.reduce((p,d)=>p+d.successCount,0),D=l.reduce((p,d)=>p+d.fallbackCount,0),W=l.reduce((p,d)=>p+d.unsupportedCount,0),rt=l.reduce((p,d)=>p+d.warningCount,0),lt=l.reduce((p,d)=>p+d.failureCount,0),J=l.reduce((p,d)=>p+d.totalExecutionTimeMs,0),it=new Set(l.map(p=>p.tier)).size>1?"mixed":((Q=l[0])==null?void 0:Q.tier)??r.tier;return{toolName:r.tool,tier:it,commands:l,totalCalls:m,successCount:S,fallbackCount:D,unsupportedCount:W,warningCount:rt,failureCount:lt,totalExecutionTimeMs:J,avgExecutionTimeMs:m>0?Math.round(J/m):0}}):[]},[i.statistics]),c=n.useCallback((e,r,l,m)=>s.jsx(M,{text:t(l,m),children:t(e,r)}),[t]),j=n.useMemo(()=>[...q].sort((r,l)=>{const m=r[I],S=l[I];if(typeof m=="number"&&typeof S=="number")return h==="asc"?m-S:S-m;const D=String(m??""),W=String(S??"");return h==="asc"?D.localeCompare(W):W.localeCompare(D)}),[q,I,h]),O=n.useMemo(()=>[{key:"timestamp",label:c("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:e=>_e(e.timestamp)},{key:"toolName",label:c("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:e=>s.jsxs("span",{children:[ye(e.tool,e.command),e.tier==="pro"&&s.jsx(M,{text:t("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:o.proBadge,children:t("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:c("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:e=>z(e.executionTimeMs)},{key:"status",label:c("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:e=>{const r=ve(e,t);return s.jsx(M,{text:r.tooltip,children:s.jsx("span",{className:r.className,children:r.label})})}},{key:"tier",label:c("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:e=>s.jsx("span",{className:e.tier==="pro"?o.tierPro:o.tierBasic,children:H(t,e.tier)})}],[t,c]),A=n.useMemo(()=>[{key:"toolName",label:c("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:c("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:c("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:c("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:c("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:c("tools.col.warn","WARN","tools.col.warn.tooltip","Number of expected failures caused by caller input, project state, Roblox policy, or user code."),sortable:!0,width:"80px"},{key:"failureCount",label:c("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:c("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:e=>z(e.avgExecutionTimeMs)},{key:"tier",label:c("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:e=>s.jsx(M,{text:e.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:e.tier==="pro"?o.tierPro:e.tier==="mixed"?o.tierMixed:o.tierBasic,children:H(t,e.tier)})})}],[t,c]),w=n.useMemo(()=>{if(!i.statistics)return null;const e=i.statistics.tierSummary.basic.totalCalls,r=i.statistics.tierSummary.pro.totalCalls,l=e+r;if(l===0)return null;const m=Math.round(e/l*100),S=100-m;return{basic:e,pro:r,basicPct:m,proPct:S}},[i.statistics]),G=n.useCallback(e=>{L(r=>r===e?null:e)},[]),et=n.useCallback(async()=>{if(y){f(!0);try{y==="history"?await i.clearHistory():await i.clearStatistics(),v(t("toast.clearSuccess","Cleared successfully"),"success"),x(null)}catch{v(t("toast.clearFailed","Failed to clear data"),"error")}finally{f(!1)}}},[y,v,t,i]),st=n.useCallback(e=>{const r=e==="history"?"tools_history":"tools_statistics";a("dashboard_click_event",{click_target:e==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:r}),b({page:"tools",tab:r}),E(e)},[a,b]),ot=n.useCallback(e=>{const r=je(e),l=Se(e);return s.jsxs("div",{className:o.expandedRow,children:[s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:t("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:t("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(e.parameters,null,2)})]}),e.result&&s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:t("tools.detail.result.tooltip","Returned result payload for this tool run."),children:t("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(e.result,null,2)})]}),l?s.jsxs("div",{className:o.expandedSection,children:[s.jsx("strong",{children:t("tools.history.routing","Routing")}),s.jsxs("div",{className:o.detailList,children:[g(t("tools.history.routing.mode","Mode"),l.selectionMode),g(t("tools.history.routing.requested","Requested"),Te(l,t)),g(t("tools.history.routing.actual","Actual"),Ne(l))]})]}):null,(e.status==="fallback"||e.status==="unsupported"||e.status==="warning"||e.status==="error")&&s.jsx("div",{className:o.expandedSection,children:s.jsxs("div",{className:o.detailList,children:[e.status==="fallback"&&(r==null?void 0:r.requestedCommand)&&g(t("tools.detail.requestedCommand","Requested Command"),r.requestedCommand),e.status==="fallback"&&(r==null?void 0:r.executedCommand)&&g(t("tools.detail.executedCommand","Executed Command"),r.executedCommand),e.status==="fallback"&&(r==null?void 0:r.alternatives)&&g(t("tools.detail.alternatives","Alternatives"),r.alternatives.join(", ")),e.status==="unsupported"&&e.blockedMessage&&g(t("tools.detail.blockedMessage","Blocked Reason"),e.blockedMessage),e.status==="unsupported"&&g(t("tools.detail.noFallback","No Fallback"),t("tools.detail.noFallback.value","No fallback ran.")),e.status==="warning"&&e.warningMessage&&g(t("tools.detail.warningMessage","Warning Message"),e.warningMessage),e.status==="error"&&e.errorMessage&&g(t("tools.detail.errorMessage","Error Message"),e.errorMessage),e.status==="error"&&e.blockedMessage&&g(t("tools.detail.blockedMessage","Blocked Reason"),e.blockedMessage),e.status==="error"&&e.fallbackCommand&&g(t("tools.detail.executedCommand","Executed Command"),e.fallbackCommand)]})})]})},[t]),at=["history","statistics"].map(e=>({key:e,label:t(`tools.tab.${e}`,e.charAt(0).toUpperCase()+e.slice(1))}));return s.jsxs("div",{className:o.page,children:[s.jsx(pt,{title:t("page.tools.title","Tools"),description:t("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),s.jsx(ht,{surface:"tools",selectable:!0,selectedPlaceId:P,onSelectedPlaceIdChange:e=>{B(e),i.setHistoryOffset(0)}}),s.jsx(mt,{items:at,value:k,onChange:st}),k==="history"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:t("tools.tab.history","History")}),s.jsx("button",{className:o.dangerButton,onClick:()=>{a("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),x("history")},children:t("common.clear","Clear")})]}),s.jsx("div",{className:o.filterRow,children:s.jsxs("label",{className:o.filterLabel,children:[t("tools.filter.tool","Tool"),":",s.jsxs("select",{className:o.filterSelect,value:i.historyToolFilter,onChange:e=>{i.setHistoryToolFilter(e.target.value),i.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:t("tools.filter.all","All")}),V.map(e=>s.jsx("option",{value:e,children:e},e))]})]})}),s.jsx(kt,{columns:O,data:i.history,rowKey:e=>e.id,onRowClick:e=>u(r=>r===e.id?null:e.id),emptyMessage:t("tools.empty.history","No tool history entries for this place"),expandedKey:N,renderExpandedRow:ot}),s.jsxs("div",{className:o.pagination,children:[s.jsx("button",{className:o.btn,disabled:i.historyOffset===0,title:t("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>i.setHistoryOffset(Math.max(0,i.historyOffset-K)),children:t("tools.page.prev","Prev")}),s.jsxs("span",{className:o.pageInfo,children:[i.historyOffset+1,"–",Math.min(i.historyOffset+K,i.historyTotal)," / ",i.historyTotal]}),s.jsx("button",{className:o.btn,disabled:!i.historyHasMore,title:t("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>i.setHistoryOffset(i.historyOffset+K),children:t("tools.page.next","Next")})]})]}),k==="statistics"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:t("tools.tab.statistics","Statistics")}),s.jsx("button",{className:o.dangerButton,onClick:()=>{a("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),x("statistics")},children:t("common.clear","Clear")})]}),w&&s.jsxs("div",{className:o.tierDistribution,children:[s.jsxs("div",{className:o.tierBarWrap,children:[s.jsx("div",{className:o.tierBarBasic,style:{width:`${w.basicPct}%`}}),s.jsx("div",{className:o.tierBarPro,style:{width:`${w.proPct}%`}})]}),s.jsxs("div",{className:o.tierLabels,children:[s.jsxs("span",{children:[H(t,"basic")," ",w.basicPct,"% (",w.basic,")"]}),s.jsxs("span",{children:[H(t,"pro")," ",w.proPct,"% (",w.pro,")"]})]})]}),s.jsx("div",{className:o.statsTableWrap,children:s.jsxs("table",{className:o.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:A.map(e=>s.jsxs("th",{style:e.width?{width:e.width}:void 0,className:e.sortable?o.sortableHeader:void 0,onClick:e.sortable?()=>U(e.key):void 0,children:[s.jsx("span",{children:e.label}),e.sortable&&I===e.key&&s.jsx("span",{className:o.sortArrow,children:h==="asc"?"▴":"▾"})]},e.key))})}),s.jsx("tbody",{children:j.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:A.length,className:o.emptyStats,children:t("tools.empty.stats","No tool statistics for this place")})}):j.map(e=>{const r=R===e.toolName;return s.jsxs(n.Fragment,{children:[s.jsxs("tr",{className:o.statsToolRow,onClick:()=>G(e.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:o.expandButton,"aria-expanded":r,"aria-label":`${e.toolName} ${r?t("common.collapse","Collapse"):t("common.expand","Expand")}`,onClick:l=>{l.stopPropagation(),G(e.toolName)},children:[s.jsx("span",{className:o.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:e.toolName})]})}),s.jsx("td",{children:e.totalCalls}),s.jsx("td",{children:e.successCount}),s.jsx("td",{children:e.fallbackCount}),s.jsx("td",{children:e.unsupportedCount}),s.jsx("td",{children:e.warningCount}),s.jsx("td",{children:e.failureCount}),s.jsx("td",{children:z(e.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(M,{text:e.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:e.tier==="pro"?o.tierPro:e.tier==="mixed"?o.tierMixed:o.tierBasic,children:H(t,e.tier)})})})]}),r&&e.commands.map(l=>s.jsxs("tr",{className:o.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:o.actionLabel,children:l.label})}),s.jsx("td",{children:l.totalCalls}),s.jsx("td",{children:l.successCount}),s.jsx("td",{children:l.fallbackCount}),s.jsx("td",{children:l.unsupportedCount}),s.jsx("td",{children:l.warningCount}),s.jsx("td",{children:l.failureCount}),s.jsx("td",{children:z(l.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:l.tier==="pro"?o.tierPro:o.tierBasic,children:H(t,l.tier)})})]},`${e.toolName}:${l.commandName}`))]},e.toolName)})})]})}),i.statistics&&s.jsxs("div",{className:o.summaryLine,children:[t("tools.summary.total","Total"),": ",i.statistics.totalCalls," ",t("tools.summary.calls","calls")," | ",t("tools.summary.sessions","Sessions"),": ",i.statistics.totalSessions]})]}),s.jsx(xt,{open:y!==null,title:y==="history"?t("tools.clear.history.title","Clear history?"):t("tools.clear.statistics.title","Clear statistics?"),message:y==="history"?t("tools.clear.history.message","This permanently removes the current place tools history."):t("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:C,onCancel:()=>!C&&x(null),onConfirm:et})]})}export{Ae as Component};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{i as xe,n as q,q as Le,r as g,u as M,j as t,e as H,R as $e,X as Ee,T as Se,h as He,t as Oe}from"./index-DYezp9b1.js";import{I as G}from"./InfoLabel-DCq3Fmko.js";import{T as y}from"./TooltipText-CfI7WgY4.js";import{D as se,c as oe,e as Fe,g as Ue,h as ze,i as le,j as je,k as qe,l as ce,d as Ve}from"./sample-requests-CnV4bBG4.js";import{T as We}from"./Tabs-CGfFE3L1.js";import{P as Ke}from"./PageHeader-Do_AQ2vQ.js";import{C as Qe}from"./CurrentPlaceScope-CHEqGWYd.js";/**
|
|
2
|
-
* @license lucide-react v1.8.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Ye=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Je=xe("camera",Ye);/**
|
|
7
|
-
* @license lucide-react v1.8.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Xe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Ze=xe("ellipsis",Xe);async function we(e){const i=await fetch(`${q}${e}`);if(!i.ok){let a=null;try{a=await i.json()}catch{}throw new Le(i.status,(a==null?void 0:a.message)??i.statusText,(a==null?void 0:a.error)??null,a)}return await i.json()}function O(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function et(e){return e.design_check_summary?{priority_high:O(e.design_check_summary.priority_high),priority_medium:O(e.design_check_summary.priority_medium),priority_low:O(e.design_check_summary.priority_low)}:e.lint_summary?{priority_high:O(e.lint_summary.errors),priority_medium:O(e.lint_summary.warnings),priority_low:0}:null}function tt(e){return{rule:e.rule,path:e.path,displayPriority:e.displayPriority??(e.severity==="error"?"priority_high":"priority_medium"),actual:e.actual,expected:e.expected,hint:e.hint}}function ve(e){return{snapshot_id:e.snapshot_id,captured_at:e.captured_at,brief_id:e.brief_id,thresholds_source:e.thresholds_source,scope:e.scope,target:e.target,design_check_summary:et(e),image:e.image}}function it(e){const i=e.check_results??e.lint_results??[];return{...ve(e),check_results:i.map(tt),image_url:e.image_url,meta:e.meta}}async function ue(e,i){const a=new URLSearchParams;i!==void 0&&a.set("limit",String(i));const n=a.toString()?`?${a.toString()}`:"",l=await we(`/api/ui-studio/snapshots${n}`);return{...l,snapshots:l.snapshots.map(ve)}}async function at(e,i){const a=i!==void 0?`?placeId=${i}`:"",n=await we(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${a}`);return it(n)}function be(e,i){const a=i!==void 0?`?placeId=${i}`:"";return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${a}`}const rt=1e4;function Ce(e=50){const[i,a]=g.useState(null),[n,l]=g.useState(!0),[r,o]=g.useState(null),p=g.useCallback(async()=>{try{const u=await ue(void 0,e);a(u),o(null)}catch(u){o(u instanceof Error?u.message:String(u))}finally{l(!1)}},[e]);return g.useEffect(()=>{let u=!1;const _=async()=>{try{const h=await ue(void 0,e);u||(a(h),o(null))}catch(h){u||o(h instanceof Error?h.message:String(h))}finally{u||l(!1)}};_();const m=setInterval(()=>{_()},rt);return()=>{u=!0,clearInterval(m)}},[e]),{data:i,loading:n,error:r,refresh:p}}const st="_page_1fjjw_2",nt="_grid_1fjjw_9",ot="_card_1fjjw_16",lt="_cardBodyButton_1fjjw_31",ct="_thumb_1fjjw_43",ut="_badges_1fjjw_52",dt="_priorityHighBadge_1fjjw_60",ht="_priorityMediumBadge_1fjjw_69",pt="_priorityLowBadge_1fjjw_78",gt="_cardMeta_1fjjw_87",mt="_target_1fjjw_93",_t="_time_1fjjw_100",yt="_drawer_1fjjw_105",ft="_drawerToolbar_1fjjw_122",xt="_drawerTitleBlock_1fjjw_133",St="_drawerEyebrow_1fjjw_140",jt="_drawerTarget_1fjjw_149",wt="_drawerToolbarActions_1fjjw_159",vt="_closeBtn_1fjjw_167",bt="_detailBody_1fjjw_188",Ct="_screenshotPreviewFrame_1fjjw_195",It="_fullImg_1fjjw_208",Nt="_metaDl_1fjjw_215",Pt="_errorMsg_1fjjw_227",kt="_suggestionsWrap_1fjjw_232",Tt="_prioritySection_1fjjw_239",Bt="_sectionHighHeader_1fjjw_243",Dt="_sectionLowHeader_1fjjw_249",Gt="_sectionMediumHeader_1fjjw_255",Mt="_groupCard_1fjjw_261",At="_groupHeader_1fjjw_268",Rt="_groupLabel_1fjjw_284",Lt="_groupCount_1fjjw_289",$t="_groupChevron_1fjjw_296",Et="_groupBody_1fjjw_300",Ht="_groupDescription_1fjjw_303",Ot="_groupFix_1fjjw_308",Ft="_falsePositive_1fjjw_317",Ut="_itemList_1fjjw_325",zt="_suggestionItem_1fjjw_333",qt="_suggestionInfo_1fjjw_343",Vt="_pathBreadcrumb_1fjjw_349",Wt="_currentValue_1fjjw_358",Kt="_copyFixBtn_1fjjw_362",Qt="_emptySuggestions_1fjjw_376",Yt="_sampleBanner_1fjjw_384",Jt="_sampleBannerRow_1fjjw_397",Xt="_sampleBannerMain_1fjjw_405",Zt="_sampleBadge_1fjjw_413",ei="_sampleTitle_1fjjw_423",ti="_sampleMessage_1fjjw_430",ii="_sampleActions_1fjjw_437",ai="_primaryAction_1fjjw_445",ri="_secondaryAction_1fjjw_446",si="_emptyState_1fjjw_481",ni="_pluginGuideCard_1fjjw_489",oi="_pluginGuideMarker_1fjjw_500",li="_pluginGuideBody_1fjjw_515",ci="_pluginGuideTitle_1fjjw_519",ui="_pluginGuideMessage_1fjjw_527",di="_pluginGuideChecklist_1fjjw_534",hi="_pluginGuideWaiting_1fjjw_557",pi="_pluginGuideDot_1fjjw_566",gi="_analysisWorkspace_1fjjw_574",mi="_analysisMainColumn_1fjjw_579",_i="_analysisDetailPopupLayer_1fjjw_583",yi="_analysisDetailDialog_1fjjw_600",fi="_analysisSummaryPanel_1fjjw_619",xi="_recentCapturesHeader_1fjjw_632",Si="_analysisSummaryText_1fjjw_639",ji="_recentCapturesMeta_1fjjw_640",wi="_analysisReportGrid_1fjjw_646",vi="_analysisReportGroup_1fjjw_653",bi="_analysisReportCard_1fjjw_657",Ci="_analysisReportThumb_1fjjw_679",Ii="_analysisReportBody_1fjjw_688",Ni="_analysisReportTopline_1fjjw_695",Pi="_analysisVerdict_1fjjw_702",ki="_analysisVerdict_needsFix_1fjjw_713",Ti="_analysisVerdict_review_1fjjw_714",Bi="_analysisVerdict_passed_1fjjw_719",Di="_analysisReportCounts_1fjjw_724",Gi="_analysisReportTarget_1fjjw_729",Mi="_analysisReportIssue_1fjjw_738",Ai="_analysisReportMeta_1fjjw_744",Ri="_analysisChildList_1fjjw_751",Li="_analysisChildRow_1fjjw_762",$i="_analysisChildPath_1fjjw_783",Ei="_analysisChildSummary_1fjjw_792",Hi="_analysisChildDetailHint_1fjjw_793",Oi="_drawerAnalysisSummary_1fjjw_802",Fi="_drawerAnalysisSummaryItem_1fjjw_813",Ui="_drawerAnalysisLabel_1fjjw_820",zi="_drawerAnalysisCounts_1fjjw_826",qi="_drawerAnalysisValue_1fjjw_827",Vi="_recentCapturesSection_1fjjw_832",Wi="_drawerPrimaryActions_1fjjw_844",Ki="_drawerActionBtn_1fjjw_851",Qi="_drawerMoreMenu_1fjjw_880",Yi="_drawerMoreButton_1fjjw_885",Ji="_drawerMoreMenuBody_1fjjw_910",Xi="_drawerMenuItem_1fjjw_923",Zi="_drawerMenuItemDanger_1fjjw_946",ea="_actionErrMsg_1fjjw_955",ta="_actionStatusMsg_1fjjw_964",ia="_actionStatus_info_1fjjw_978",aa="_actionStatus_success_1fjjw_984",ra="_actionStatus_warning_1fjjw_990",sa="_actionStatusDetail_1fjjw_996",na="_galleryHeader_1fjjw_1002",oa="_cardChecked_1fjjw_1015",la="_cardCheckbox_1fjjw_1022",ca="_captureSelectionActions_1fjjw_1062",ua="_selectionToolbar_1fjjw_1071",da="_selectionBar_1fjjw_1072",ha="_selectionToolbarCount_1fjjw_1091",pa="_selectionToolbarActions_1fjjw_1098",ga="_selectionBarBtn_1fjjw_1105",ma="_selectionBarBtnDanger_1fjjw_1126",s={page:st,grid:nt,card:ot,cardBodyButton:lt,thumb:ct,badges:ut,priorityHighBadge:dt,priorityMediumBadge:ht,priorityLowBadge:pt,cardMeta:gt,target:mt,time:_t,drawer:yt,drawerToolbar:ft,drawerTitleBlock:xt,drawerEyebrow:St,drawerTarget:jt,drawerToolbarActions:wt,closeBtn:vt,detailBody:bt,screenshotPreviewFrame:Ct,fullImg:It,metaDl:Nt,errorMsg:Pt,suggestionsWrap:kt,prioritySection:Tt,sectionHighHeader:Bt,sectionLowHeader:Dt,sectionMediumHeader:Gt,groupCard:Mt,groupHeader:At,groupLabel:Rt,groupCount:Lt,groupChevron:$t,groupBody:Et,groupDescription:Ht,groupFix:Ot,falsePositive:Ft,itemList:Ut,suggestionItem:zt,suggestionInfo:qt,pathBreadcrumb:Vt,currentValue:Wt,copyFixBtn:Kt,emptySuggestions:Qt,sampleBanner:Yt,sampleBannerRow:Jt,sampleBannerMain:Xt,sampleBadge:Zt,sampleTitle:ei,sampleMessage:ti,sampleActions:ii,primaryAction:ai,secondaryAction:ri,emptyState:si,pluginGuideCard:ni,pluginGuideMarker:oi,pluginGuideBody:li,pluginGuideTitle:ci,pluginGuideMessage:ui,pluginGuideChecklist:di,pluginGuideWaiting:hi,pluginGuideDot:pi,analysisWorkspace:gi,analysisMainColumn:mi,analysisDetailPopupLayer:_i,analysisDetailDialog:yi,analysisSummaryPanel:fi,recentCapturesHeader:xi,analysisSummaryText:Si,recentCapturesMeta:ji,analysisReportGrid:wi,analysisReportGroup:vi,analysisReportCard:bi,analysisReportThumb:Ci,analysisReportBody:Ii,analysisReportTopline:Ni,analysisVerdict:Pi,analysisVerdict_needsFix:ki,analysisVerdict_review:Ti,analysisVerdict_passed:Bi,analysisReportCounts:Di,analysisReportTarget:Gi,analysisReportIssue:Mi,analysisReportMeta:Ai,analysisChildList:Ri,analysisChildRow:Li,analysisChildPath:$i,analysisChildSummary:Ei,analysisChildDetailHint:Hi,drawerAnalysisSummary:Oi,drawerAnalysisSummaryItem:Fi,drawerAnalysisLabel:Ui,drawerAnalysisCounts:zi,drawerAnalysisValue:qi,recentCapturesSection:Vi,drawerPrimaryActions:Wi,drawerActionBtn:Ki,drawerMoreMenu:Qi,drawerMoreButton:Yi,drawerMoreMenuBody:Ji,drawerMenuItem:Xi,drawerMenuItemDanger:Zi,actionErrMsg:ea,actionStatusMsg:ta,actionStatus_info:ia,actionStatus_success:aa,actionStatus_warning:ra,actionStatusDetail:sa,galleryHeader:na,cardChecked:oa,cardCheckbox:la,captureSelectionActions:ca,selectionToolbar:ua,selectionBar:da,selectionToolbarCount:ha,selectionToolbarActions:pa,selectionBarBtn:ga,selectionBarBtnDanger:ma};function _a({snapshot:e,placeId:i,onClick:a,imageUrlOverride:n,selectable:l,selected:r,onToggleSelect:o}){var w,b,A;const{t:p}=M(),u=((w=e.design_check_summary)==null?void 0:w.priority_high)??0,_=((b=e.design_check_summary)==null?void 0:b.priority_medium)??0,m=((A=e.design_check_summary)==null?void 0:A.priority_low)??0,h=new Date(e.captured_at*1e3).toLocaleString(),x=n??be(e.snapshot_id,i),j=()=>{o==null||o(e.snapshot_id)};return t.jsxs("div",{className:`${s.card} ${r?s.cardChecked:""}`,children:[l&&t.jsx(y,{text:p("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx("input",{className:s.cardCheckbox,type:"checkbox","aria-label":p("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!r,onChange:j})}),t.jsxs("button",{className:s.cardBodyButton,onClick:C=>a(C.currentTarget),type:"button",children:[t.jsx("img",{className:s.thumb,src:x,alt:e.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:s.badges,children:[u>0&&t.jsx(y,{text:p("uiStudio.gallery.priorityHighBadge.tooltip","Number of suggestions to review first. Click for details."),children:t.jsx("span",{className:s.priorityHighBadge,children:u})}),_>0&&t.jsx(y,{text:p("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:s.priorityMediumBadge,children:_})}),m>0&&t.jsx(y,{text:p("uiStudio.gallery.priorityLowBadge.tooltip","Number of optional improvements."),children:t.jsx("span",{className:s.priorityLowBadge,children:m})})]}),t.jsxs("div",{className:s.cardMeta,children:[t.jsx("div",{className:s.target,children:e.target??e.scope}),t.jsx("div",{className:s.time,children:h})]})]})]})}const ya={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function fa(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const xa={touch_target:{checkLabel:"터치 타겟 크기",description:"모바일에서 손가락으로 누르기 편한 최소 크기를 만족하는지 확인합니다.",howToFix:"버튼 Size 를 44x44 px 이상으로 키우거나 UIPadding 으로 터치 영역을 확장하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{Size:{xScale:0,xOffset:44,yScale:0,yOffset:44}}}},null,2)},contrast:{checkLabel:"텍스트 대비",description:"텍스트와 배경의 명암 비율이 WCAG 접근성 기준을 만족하는지 확인합니다.",howToFix:"TextColor3 를 더 밝은 색(예: #FFFFFF) 으로 바꾸거나, 배경(BackgroundColor3)을 어둡게 조정하세요.",falsePositiveNote:"이모지 아이콘의 경우 색이 고정되어 대비 규칙이 오탐하는 경우가 많습니다. 실제 가독성에 문제 없으면 무시해도 됩니다.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextColor3:{r:255,g:255,b:255}}}},null,2)},text_scaled:{checkLabel:"TextScaled 사용",description:"TextScaled 가 켜져 있으나 UITextSizeConstraint 가 없으면 언어 확장 시 레이아웃이 깨질 수 있습니다.",howToFix:"해당 TextLabel 에 UITextSizeConstraint 자식을 추가하고 MaxTextSize 를 지정하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{addChildren:[{className:"UITextSizeConstraint",name:"SizeConstraint",properties:{MaxTextSize:24,MinTextSize:10}}]}},null,2)},safezone:{checkLabel:"세이프존 배치",description:"버튼이 플랫폼별 세이프존(노치·홈 인디케이터·TV safe margin) 안에 있는지 확인합니다.",howToFix:"Position 을 세이프존 안쪽으로 이동하거나, 부모 Frame 을 축소하세요.",buildUpdateCommand:()=>null},min_text_size:{checkLabel:"최소 폰트 크기",description:"텍스트가 너무 작아 가독성이 떨어지는지 확인합니다. 브리프 기준 하한을 사용합니다.",howToFix:"TextSize 를 14 이상(본문 기준)으로 올리세요.",buildUpdateCommand:e=>{const i=typeof e.expected=="string"?parseInt(e.expected.replace(/[^\d]/g,""),10):14;return JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextSize:Number.isFinite(i)?i:14}}},null,2)}}};function Sa(e,i,a){const n=ya[e];return n?{...i,checkLabel:a(`uiStudio.fix.${n}.label`,i.checkLabel),description:a(`uiStudio.fix.${n}.description`,i.description),howToFix:a(`uiStudio.fix.${n}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?a(`uiStudio.fix.${n}.falsePositive`,i.falsePositiveNote):void 0}:i}function ja(e,i){const a=xa[e]??null;return a?i?Sa(e,a,i):a:null}function wa(e){return fa(e)}function va(e,i){const a=new Map;for(const l of e){const r=`${l.displayPriority}::${l.rule}`,o=a.get(r)??[];o.push(l),a.set(r,o)}const n=[];for(const[l,r]of a){const[o,p]=l.split("::"),u=r.filter(wa).length;n.push({rule:p??"unknown",priority:o,items:r,fixTemplate:ja(p??"",i),falsePositiveRatio:r.length>0?u/r.length:0})}return n.sort((l,r)=>{const o={priority_high:0,priority_medium:1,priority_low:2};return l.priority!==r.priority?o[l.priority]-o[r.priority]:r.items.length-l.items.length}),{high:n.filter(l=>l.priority==="priority_high"),medium:n.filter(l=>l.priority==="priority_medium"),low:n.filter(l=>l.priority==="priority_low")}}function Ie(e){const i=e.split("."),a=i[i.length-1]??e,n=i[i.length-2],l=n?`${n} > ${a}`:a;return{full:e,breadcrumb:l,leaf:a}}function Ne(e){return typeof e=="object"&&e!==null}function de(e){return Ne(e.data)?e.data:{}}function Z(e,i){const a=e[i];return Ne(a)?a:{}}function V(e,i){const a=e[i];return typeof a=="string"?a:null}function W(e,i){const a=e[i];return typeof a=="number"&&Number.isFinite(a)?a:0}function ba(e){const i=Z(e,"design_check_summary");return{priority_high:W(i,"priority_high"),priority_medium:W(i,"priority_medium"),priority_low:W(i,"priority_low")}}function he(e){if(!(e.success??e.ok??!e.error))throw new Error(e.error??"UI Studio action failed")}function pe(e,i){return Pe(e,ba(i))}function F(e,i,a,n,l){const r=e(i,a);return l?`${r}: ${l} · ${n}`:`${r}: ${n}`}function Ca(e){const i=e.design_check_summary;return((i==null?void 0:i.priority_high)??0)>0?"needsFix":((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?"review":"passed"}function Ia(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function K(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function Pe(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${K(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${K(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${K(e,(i==null?void 0:i.priority_low)??0)}`}function Na(e,i){return Pe(e,i.design_check_summary)}function Pa({snapshotId:e,placeId:i,onClose:a,sampleDetail:n,tier:l,onActionDone:r}){const[o,p]=g.useState(n??null),[u,_]=g.useState(null),[m,h]=g.useState(null),[x,j]=g.useState(null),[w,b]=g.useState(null),[A,C]=g.useState(null),{t:d}=M(),{trackEvent:T}=H(),N=l==="pro";g.useEffect(()=>{if(n){p(n),_(null);return}let v=!1;return at(e,i).then(B=>{v||p(B)}).catch(B=>{v||_(B instanceof Error?B.message:String(B))}),()=>{v=!0}},[e,i,n]);const S=async()=>{if(o!=null&&o.target){T("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),b("preview"),j({tone:"info",message:d("uiStudio.actions.previewRunning","캡처 중..."),detail:d("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const v=await oe("preview",{targetPath:o.target,placeId:i});he(v);const B=de(v),L=V(B,"snapshot_id"),f=Z(B,"screenshot"),R=Z(B,"meta"),D=V(f,"saved_path"),ne=V(R,"persist_warning"),U=pe(d,B);j(ne?{tone:"warning",message:F(d,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",U,L),detail:ne}:L&&D?{tone:"success",message:F(d,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",U,L),detail:d("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:L?{tone:"warning",message:F(d,"uiStudio.actions.previewComplete","캡처 완료",U,L),detail:d("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:F(d,"uiStudio.actions.previewComplete","캡처 완료",U),detail:d("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(r==null?void 0:r())}catch(v){h(v instanceof Error?v.message:String(v))}finally{b(null)}}},k=async()=>{if(o!=null&&o.target){T("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),b("check"),j({tone:"info",message:d("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:d("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const v=await oe("check",{targetPath:o.target,placeId:i});he(v);const B=de(v),L=pe(d,B);j({tone:"success",message:F(d,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",L),detail:d("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(r==null?void 0:r())}catch(v){h(v instanceof Error?v.message:String(v))}finally{b(null)}}},E=async()=>{h(null),j(null);try{await Fe(i,e),await(r==null?void 0:r()),C(null),a()}catch(v){throw h(v instanceof Error?v.message:String(v)),v}},I=N?void 0:d("uiStudio.actions.proRequired","Pro에서 사용 가능"),P=o!=null&&o.target?Ie(o.target):null;return t.jsxs("div",{className:s.drawer,children:[t.jsxs("div",{className:s.drawerToolbar,"data-testid":"snapshot-detail-toolbar",children:[t.jsxs("div",{className:s.drawerTitleBlock,children:[t.jsx("span",{className:s.drawerEyebrow,children:d("uiStudio.analysis.detailDialog","Analysis detail")}),t.jsx("span",{className:s.drawerTarget,title:(P==null?void 0:P.full)??e,children:(P==null?void 0:P.breadcrumb)??e})]}),t.jsxs("div",{className:s.drawerToolbarActions,children:[o&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:s.drawerPrimaryActions,children:[t.jsx(y,{text:I??d("uiStudio.actions.captureCurrentState.tooltip","Save the UI currently shown in Studio as a new capture. Existing captures are kept."),children:t.jsxs("button",{className:s.drawerActionBtn,onClick:()=>void S(),disabled:!N||!o.target||w!==null,type:"button",children:[t.jsx(Je,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:d("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(y,{text:I??d("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:s.drawerActionBtn,onClick:()=>void k(),disabled:!N||!o.target||w!==null,type:"button",children:[t.jsx($e,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:d("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:s.drawerMoreMenu,children:[t.jsx("summary",{className:s.drawerMoreButton,title:d("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":d("uiStudio.actions.more","More"),children:t.jsx(Ze,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:s.drawerMoreMenuBody,children:t.jsx(y,{text:I??d("uiStudio.actions.deleteSnapshot.tooltip","Delete only this capture file. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${s.drawerMenuItem} ${s.drawerMenuItemDanger}`,onClick:()=>{T("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),C("deleteSnapshot")},disabled:!N,type:"button",children:d("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(y,{text:d("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:s.closeBtn,onClick:a,type:"button","aria-label":d("uiStudio.detailClose","Close"),children:t.jsx(Ee,{size:18,"aria-hidden":"true"})})})]})]}),u&&t.jsx("div",{className:s.errorMsg,children:u}),o&&t.jsxs("div",{className:s.detailBody,children:[m&&t.jsx("div",{className:s.actionErrMsg,children:m}),x&&t.jsxs("div",{className:`${s.actionStatusMsg} ${s[`actionStatus_${x.tone}`]??""}`,children:[t.jsx("div",{children:x.message}),x.detail&&t.jsx("div",{className:s.actionStatusDetail,children:x.detail})]}),t.jsx(ka,{detail:o}),t.jsx("div",{className:s.screenshotPreviewFrame,"data-testid":"analysis-screenshot-preview",children:t.jsx("img",{className:s.fullImg,src:o.image_url,alt:o.snapshot_id})}),t.jsx(Ta,{items:o.check_results}),t.jsxs("dl",{className:s.metaDl,children:[t.jsx("dt",{children:t.jsx(G,{label:d("uiStudio.capturedAt","Captured"),tooltip:d("uiStudio.capturedAt.tooltip","When this screen was captured.")})}),t.jsx("dd",{children:new Date(o.captured_at*1e3).toLocaleString()}),t.jsx("dt",{children:t.jsx(G,{label:d("uiStudio.scope","Scope"),tooltip:d("uiStudio.scope.tooltip","Capture scope (full screen or a specific UI).")})}),t.jsx("dd",{children:o.scope}),o.target&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(G,{label:d("uiStudio.target","Target"),tooltip:d("uiStudio.target.tooltip","Exact path of the captured UI instance.")})}),t.jsx("dd",{children:o.target})]}),o.brief_id&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(G,{label:d("uiStudio.briefId","Brief"),tooltip:d("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:o.brief_id})]})]})]}),A==="deleteSnapshot"&&t.jsx(se,{title:d("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:d("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:d("common.delete","삭제"),onConfirm:E,onClose:()=>C(null)})]})}function ka({detail:e}){const{t:i}=M(),a=Ca(e);return t.jsxs("section",{className:s.drawerAnalysisSummary,children:[t.jsxs("div",{className:s.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:s.drawerAnalysisLabel,children:t.jsx(G,{label:i("uiStudio.analysis.verdictLabel","개선 요약"),tooltip:i("uiStudio.analysis.verdictLabel.tooltip","Overall improvement verdict for this capture.")})}),t.jsx("span",{className:`${s.analysisVerdict} ${s[`analysisVerdict_${a}`]??""}`,children:Ia(i,a)}),t.jsx("span",{className:s.drawerAnalysisCounts,children:Na(i,e)})]}),t.jsxs("div",{className:s.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:s.drawerAnalysisLabel,children:t.jsx(G,{label:i("uiStudio.analysis.thresholds","검토 기준"),tooltip:i("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom).")})}),t.jsx("span",{className:s.drawerAnalysisValue,children:e.thresholds_source})]})]})}function Ta({items:e}){const{t:i}=M();if(e.length===0)return t.jsx("p",{className:s.emptySuggestions,children:i("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:a,medium:n,low:l}=va(e,i);return t.jsxs("div",{className:s.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(G,{label:i("uiStudio.designCheckResultsTitle","Design Check suggestions"),tooltip:i("uiStudio.designCheckResultsTitle.tooltip","All improvement suggestions found in this capture.")})}),a.length>0&&t.jsxs("section",{className:s.prioritySection,children:[t.jsx("h4",{className:s.sectionHighHeader,children:i("uiStudio.highPrioritySection","우선 검토")}),a.map(r=>t.jsx(Q,{group:r},`h-${r.rule}`))]}),n.length>0&&t.jsxs("section",{className:s.prioritySection,children:[t.jsx("h4",{className:s.sectionMediumHeader,children:i("uiStudio.mediumPrioritySection","검토 권장")}),n.map(r=>t.jsx(Q,{group:r},`m-${r.rule}`))]}),l.length>0&&t.jsxs("section",{className:s.prioritySection,children:[t.jsx("h4",{className:s.sectionLowHeader,children:i("uiStudio.lowPrioritySection","선택 개선")}),l.map(r=>t.jsx(Q,{group:r},`l-${r.rule}`))]})]})}function Q({group:e}){var o,p,u;const{t:i}=M(),[a,n]=g.useState(e.priority==="priority_high"&&e.items.length<=5),l=e.falsePositiveRatio>=.5&&!!((o=e.fixTemplate)!=null&&o.falsePositiveNote),r=((p=e.fixTemplate)==null?void 0:p.checkLabel)??e.rule;return t.jsxs("div",{className:s.groupCard,children:[t.jsx(y,{text:i("uiStudio.suggestionGroup.tooltip","Suggestions of the same kind grouped together. Click to expand or collapse."),children:t.jsxs("button",{className:s.groupHeader,onClick:()=>n(_=>!_),type:"button",children:[t.jsx("span",{className:s.groupLabel,children:r}),t.jsx(y,{text:i("uiStudio.groupSummary.tooltip","Number of UI elements matching this group."),children:t.jsxs("span",{className:s.groupCount,children:[e.items.length," ",i("uiStudio.groupSummary","items")]})}),t.jsx("span",{className:s.groupChevron,children:a?"▾":"▸"})]})}),a&&t.jsxs("div",{className:s.groupBody,children:[e.fixTemplate&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:s.groupDescription,children:e.fixTemplate.description}),t.jsx("p",{className:s.groupFix,children:e.fixTemplate.howToFix})]}),l&&t.jsx(y,{text:i("uiStudio.falsePositiveWarning.tooltip","This check can produce false positives — verify before applying."),children:t.jsxs("p",{className:s.falsePositive,children:[i("uiStudio.falsePositiveWarning","May contain false positives"),":"," ",(u=e.fixTemplate)==null?void 0:u.falsePositiveNote]})}),t.jsx("ul",{className:s.itemList,children:e.items.map((_,m)=>t.jsx(Ba,{item:_,group:e},`${_.path}-${m}`))})]})]})}function Ba({item:e,group:i}){var _;const{t:a}=M(),{trackEvent:n}=H(),[l,r]=g.useState(!1),o=Ie(e.path),p=((_=i.fixTemplate)==null?void 0:_.buildUpdateCommand(e))??null,u=async()=>{if(p)try{await navigator.clipboard.writeText(p),n("dashboard_click_event",{click_target:"ui_studio_copy_ai_instruction",page:"ui-studio",tab:"ui_studio_analysis"}),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return t.jsxs("li",{className:s.suggestionItem,children:[t.jsxs("div",{className:s.suggestionInfo,children:[t.jsx("code",{className:s.pathBreadcrumb,title:`${a("uiStudio.fullPath","Full path")}: ${o.full}`,children:o.breadcrumb}),t.jsxs("span",{className:s.currentValue,children:[t.jsx(y,{text:a("uiStudio.colCurrent.tooltip","The currently applied value."),children:t.jsx("span",{children:a("uiStudio.colCurrent","Current")})}),": ",t.jsx("strong",{children:String(e.actual)})," → ",t.jsx(y,{text:a("uiStudio.colRecommended.tooltip","The recommended value."),children:t.jsx("span",{children:a("uiStudio.colRecommended","Recommended")})}),": ",t.jsx("strong",{children:String(e.expected)})]})]}),p&&t.jsx(y,{text:a("uiStudio.copyFixCommand.tooltip","Copy a prompt that asks the AI to fix this issue."),children:t.jsx("button",{className:s.copyFixBtn,onClick:u,type:"button",children:l?a("uiStudio.copiedToClipboard","Copied"):a("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function Y(e,i){return Object.entries(i).reduce((a,[n,l])=>a.split(`{${n}}`).join(String(l)),e)}function Da(e,i){return i.rule==="contrast"?Y(e("uiStudio.sample.designCheck.contrast","Text contrast is below {expected} (current {actual}). Adjust TextColor3 or BackgroundColor3."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="touch_target"?Y(e("uiStudio.sample.designCheck.touchTarget","Touch targets should be at least {expected} px (current {actual}). Increase Size or padding."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="min_text_size"?Y(e("uiStudio.sample.designCheck.minTextSize","TextSize is below {expected} (current {actual}). Increase it for readability."),{expected:String(i.expected),actual:String(i.actual)}):i.hint}const ke="sample_inventory_preview",ee=Ue,Ga=[{path:"StarterGui.InventoryGame.Overlay.Modal.Header.GoldBox.Icon",hint:"텍스트 대비 4.5:1 미만 (현재 1.24). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"1.24"},{path:"StarterGui.InventoryGame.Overlay.Modal.Header.CloseBtn",hint:"텍스트 대비 4.5:1 미만 (현재 4.11). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"4.11"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.Portrait.Avatar",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot6.EmptyIcon",hint:"텍스트 대비 3.0:1 미만 (현재 2.53). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"2.53"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabAll",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabWeapon",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabArmor",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabConsume",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabMisc",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I6.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I7.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I8.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I9.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I10.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I11.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I12.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I18.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.ItemIconBox.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.Rarity",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.StatsBox.Passive",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12}];function Ma(e){const n={snapshot_id:ke,captured_at:1776757908,brief_id:null,thresholds_source:"default",scope:"targetPath",target:"StarterGui.InventoryGame",design_check_summary:{priority_high:35,priority_medium:10,priority_low:0},image:{file:"ui-studio-sample.png",width:402,height:252}},l={...n,check_results:Ga.map(o=>({...o,hint:Da(e,o)})),image_url:ee};return{list:{placeId:0,snapshots:[n],totalCount:1},detail:l}}const Aa=/plugin not connected|sync not started/i;function te(e){return typeof e=="string"&&Aa.test(e)}function Te(){const{t:e}=M();return t.jsxs("section",{className:s.pluginGuideCard,role:"status","aria-live":"polite",children:[t.jsx("div",{className:s.pluginGuideMarker,"aria-hidden":"true",children:"!"}),t.jsxs("div",{className:s.pluginGuideBody,children:[t.jsx("h2",{className:s.pluginGuideTitle,children:e("uiStudio.pluginGuide.title","Roblox Studio 플러그인이 연결되지 않았습니다")}),t.jsx("p",{className:s.pluginGuideMessage,children:e("uiStudio.pluginGuide.message","UI Studio는 연결된 Studio place의 화면 캡처와 변경 이력을 표시합니다. Studio와 WEPPY Plugin을 연결하면 자동으로 갱신됩니다.")}),t.jsxs("ul",{className:s.pluginGuideChecklist,children:[t.jsx("li",{children:e("uiStudio.pluginGuide.check1","Roblox Studio가 실행 중인가요?")}),t.jsx("li",{children:e("uiStudio.pluginGuide.check2","WEPPY Plugin이 설치되어 실행 중인가요?")})]}),t.jsxs("div",{className:s.pluginGuideWaiting,children:[t.jsx("span",{className:s.pluginGuideDot,"aria-hidden":"true"}),e("uiStudio.pluginGuide.waiting","플러그인 연결을 기다리는 중...")]})]})]})}function Be(e){return e.target??e.scope}function Ra(e){const i=Be(e),a=i.split(".").filter(l=>l.length>0),n=a.findIndex(l=>l==="StarterGui");return n>=0&&a[n+1]?["StarterGui",a[n+1]].join("."):i}function De(e){return((e==null?void 0:e.priority_high)??0)>0?"needsFix":((e==null?void 0:e.priority_medium)??0)>0||((e==null?void 0:e.priority_low)??0)>0?"review":"passed"}function La(e){return De(e.design_check_summary)}function ge(e){return ie(e.design_check_summary)}function ie(e){return((e==null?void 0:e.priority_high)??0)>0?0:((e==null?void 0:e.priority_medium)??0)>0?1:((e==null?void 0:e.priority_low)??0)>0?2:3}function $a(e){return e.length===0?null:{...e.reduce((a,n)=>{const l=n.latest.design_check_summary;return a.priority_high+=(l==null?void 0:l.priority_high)??0,a.priority_medium+=(l==null?void 0:l.priority_medium)??0,a.priority_low+=(l==null?void 0:l.priority_low)??0,a},{priority_high:0,priority_medium:0,priority_low:0})}}function Ea(e){const i=new Map;for(const l of e){const r=Be(l),o=i.get(r);if(!o){i.set(r,{latest:l,snapshotCount:1});continue}o.snapshotCount+=1,l.captured_at>o.latest.captured_at&&(o.latest=l)}const a=[...i.entries()].map(([l,r])=>({key:l,latest:r.latest,snapshotCount:r.snapshotCount,verdict:La(r.latest)})),n=new Map;for(const l of a){const r=Ra(l.latest),o=n.get(r)??[];o.push(l),n.set(r,o)}return[...n.entries()].map(([l,r])=>{var _;const o=r.sort((m,h)=>{const x=ge(m.latest)-ge(h.latest);return x!==0?x:h.latest.captured_at-m.latest.captured_at}),p=o.reduce((m,h)=>h.latest.captured_at>m.captured_at?h.latest:m,((_=o[0])==null?void 0:_.latest)??r[0].latest),u=$a(o);return{key:l,latest:p,snapshotCount:o.reduce((m,h)=>m+h.snapshotCount,0),children:o,summary:u,verdict:De(u)}}).sort((l,r)=>{const o=ie(l.summary)-ie(r.summary);return o!==0?o:r.latest.captured_at-l.latest.captured_at})}function Ha(e){return e.reduce((i,a)=>(a.verdict==="passed"?i.noSuggestions+=1:i.hasSuggestions+=1,i),{hasSuggestions:0,noSuggestions:0})}function $(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function ae(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${$(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${$(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${$(e,(i==null?void 0:i.priority_low)??0)}`}function Oa(e,i,a){return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${$(e,i)} · ${re(e,"needsFix")} ${$(e,a.hasSuggestions)} · ${re(e,"passed")} ${$(e,a.noSuggestions)}`}function Fa({tier:e}){const{t:i}=M(),{trackEvent:a}=H(),n=e==="basic",l=Ce(50),r=g.useRef(null),[o,p]=g.useState(null),[u,_]=g.useState(new Set),[m,h]=g.useState(new Set),[x,j]=g.useState(!1),w=g.useCallback((f,R)=>{p(o===f?null:f)},[o]),b=g.useCallback(()=>{p(null)},[]),A=g.useCallback(f=>{_(R=>{const D=new Set(R);return D.has(f)?D.delete(f):D.add(f),D})},[]);g.useEffect(()=>{var R;if(!o)return;(R=r.current)==null||R.focus();const f=D=>{D.key==="Escape"&&!document.getElementById("delete-confirm-title")&&b()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[b,o]);const C=n?Ma(i):null,d=(C==null?void 0:C.list)??l.data,T=n?!1:l.loading,N=g.useCallback(f=>{h(R=>{const D=new Set(R);return D.has(f)?D.delete(f):D.add(f),D})},[]),S=f=>{h(new Set(f))},k=()=>{h(new Set)},E=async()=>{const f=(d==null?void 0:d.placeId)??0;a("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await ze(f,{ids:[...m]}),await l.refresh(),j(!1),h(new Set)};if(T)return t.jsx("div",{className:s.page,children:i("uiStudio.loading","Loading...")});if(!n&&te(l.error))return t.jsx(Te,{});if(!n&&l.error)return t.jsxs("div",{className:s.page,children:[i("uiStudio.error","Error"),": ",l.error]});const I=(d==null?void 0:d.snapshots)??[],P=(d==null?void 0:d.placeId)??0,v=I.map(f=>f.snapshot_id),B=Ea(I),L=Ha(B);return t.jsxs("div",{children:[t.jsxs("div",{className:s.analysisWorkspace,"data-detail-open":o?"true":"false",children:[t.jsxs("div",{className:s.analysisMainColumn,"data-testid":"analysis-main-column",children:[n&&t.jsx("div",{className:s.sampleBanner,children:t.jsxs("div",{className:s.sampleBannerRow,children:[t.jsxs("div",{className:s.sampleBannerMain,children:[t.jsx("div",{className:s.sampleBadge,children:i("uiStudio.sample.badge","Preview of the Pro UI gallery")}),t.jsx("div",{className:s.sampleTitle,children:i("uiStudio.sample.title","You are previewing the UI screenshot gallery that unlocks after upgrading to Pro.")}),t.jsx("div",{className:s.sampleMessage,children:i("uiStudio.sample.message","This preview uses sample data from a demo inventory UI. Real screenshots, review history, and AI-driven fixes unlock with Pro.")})]}),t.jsx("div",{className:s.sampleActions,children:t.jsx("a",{className:s.primaryAction,href:Se.uiStudioAnalysis,target:"_blank",rel:"noreferrer",onClick:()=>a("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_analysis_banner",page:"ui-studio",tab:"ui_studio_analysis"}),children:i("tier.upgrade","View Pro")})})]})}),t.jsx("div",{className:s.galleryHeader,children:t.jsx("h1",{children:t.jsx(G,{label:i("uiStudio.title","UI Studio"),tooltip:i("uiStudio.title.tooltip","A central place to review AI-generated UI screens and improvement suggestions.")})})}),I.length===0?t.jsx("div",{className:s.emptyState,children:i("uiStudio.empty","No screenshots saved yet. They are created automatically when an AI agent captures the current UI state.")}):t.jsxs(t.Fragment,{children:[t.jsx("section",{className:s.analysisSummaryPanel,children:t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(G,{label:i("uiStudio.analysis.reportsTitle","UI 루트별 최신 분석"),tooltip:i("uiStudio.analysis.reportsTitle.tooltip","Shows the latest capture and suggestion summary per UI (e.g., Inventory window, Main menu).")})}),t.jsx("p",{className:s.analysisSummaryText,children:Oa(i,B.length,L)})]})}),t.jsx("div",{className:s.analysisReportGrid,"data-testid":"analysis-report-grid",children:B.map(f=>t.jsx(za,{report:f,placeId:P,imageUrlOverride:n?ee:void 0,expanded:u.has(f.key),onPrimaryClick:R=>{f.children.length>1?A(f.key):w(f.latest.snapshot_id,R)},onChildClick:(R,D)=>w(R,D)},f.key))}),t.jsxs("section",{className:s.recentCapturesSection,children:[t.jsxs("div",{className:s.recentCapturesHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(G,{label:i("uiStudio.analysis.recentCapturesTitle","최근 캡처"),tooltip:i("uiStudio.analysis.recentCapturesTitle.tooltip","All recently saved captures in chronological order.")})}),t.jsxs("p",{className:s.recentCapturesMeta,children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",$(i,I.length)]})]}),!n&&I.length>0&&t.jsxs("div",{className:s.captureSelectionActions,children:[t.jsx(y,{text:i("uiStudio.gallery.selectAll.tooltip","Select every visible capture at once."),children:t.jsx("button",{className:s.selectionBarBtn,onClick:()=>S(v),type:"button",children:i("uiStudio.gallery.selectAll","모두 선택")})}),m.size>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:s.selectionToolbarCount,children:[m.size,i("uiStudio.gallery.selection.selectedCount"," selected")]}),t.jsx(y,{text:i("uiStudio.gallery.clearSelection.tooltip","Clear the current selection."),children:t.jsx("button",{className:s.selectionBarBtn,onClick:k,type:"button",children:i("uiStudio.gallery.clearSelection","선택 해제")})}),t.jsx(y,{text:i("uiStudio.gallery.deleteSelected.tooltip","Delete only the selected capture files. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${s.selectionBarBtn} ${s.selectionBarBtnDanger}`,onClick:()=>j(!0),type:"button",children:i("common.delete","삭제")})})]})]})]}),t.jsx("div",{className:s.grid,children:I.map(f=>t.jsx(_a,{snapshot:f,placeId:P,onClick:R=>w(f.snapshot_id,R),imageUrlOverride:n?ee:void 0,selectable:!n,selected:m.has(f.snapshot_id),onToggleSelect:N},f.snapshot_id))})]})]})]}),o&&t.jsx("div",{className:s.analysisDetailPopupLayer,"data-testid":"analysis-detail-popup-layer",onClick:b,role:"presentation",children:t.jsx("section",{ref:r,className:s.analysisDetailDialog,role:"dialog","aria-modal":"true","aria-label":i("uiStudio.analysis.detailDialog","Analysis detail"),tabIndex:-1,onClick:f=>f.stopPropagation(),children:t.jsx(Pa,{snapshotId:o,placeId:P,onClose:b,sampleDetail:n&&o===ke?(C==null?void 0:C.detail)??null:null,tier:e,onActionDone:n?void 0:l.refresh})})})]}),x&&t.jsx(se,{title:i("uiStudio.confirm.deleteBatchTitle","화면 캡처 일괄 삭제"),message:i("uiStudio.confirm.deleteBatchMessage",`선택한 ${m.size}개의 화면 캡처를 삭제합니다. 이 작업은 되돌릴 수 없습니다.`),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:E,onClose:()=>j(!1)})]})}function re(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function Ua(e,i){return((i==null?void 0:i.priority_high)??0)>0||((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?ae(e,i):e("uiStudio.analysis.issueSummary.passed","현재 검토 기준에서 추가 개선 제안은 없습니다.")}function za({report:e,placeId:i,imageUrlOverride:a,expanded:n,onPrimaryClick:l,onChildClick:r}){const{t:o}=M(),p=e.latest,u=a??be(p.snapshot_id,i),_=new Date(p.captured_at*1e3).toLocaleString(),m=re(o,e.verdict),h=e.children.length>1;return t.jsxs("div",{className:s.analysisReportGroup,children:[t.jsxs("button",{className:s.analysisReportCard,"aria-expanded":h?n:void 0,"aria-label":`${e.key} ${h?o("uiStudio.analysis.expandChildren","하위 대상 보기"):o("uiStudio.analysis.openDetail","상세 보기")}`,onClick:x=>l(x.currentTarget),type:"button",children:[t.jsx("img",{className:s.analysisReportThumb,src:u,alt:p.snapshot_id,loading:"lazy"}),t.jsxs("div",{className:s.analysisReportBody,children:[t.jsxs("div",{className:s.analysisReportTopline,children:[t.jsx(y,{text:e.verdict==="passed"?o("uiStudio.analysis.verdict.passed.tooltip","No improvements suggested under the current review thresholds."):o("uiStudio.analysis.verdict.hasSuggestions.tooltip","Some improvements were found in this UI. Click the card for details."),children:t.jsx("span",{className:`${s.analysisVerdict} ${s[`analysisVerdict_${e.verdict}`]??""}`,children:m})}),t.jsx(y,{text:o("uiStudio.analysis.counts.tooltip","Shows how many suggestions are marked review first, recommended, or optional."),children:t.jsx("span",{className:s.analysisReportCounts,children:ae(o,e.summary)})})]}),t.jsx("div",{className:s.analysisReportTarget,children:e.key}),t.jsx("div",{className:s.analysisReportIssue,children:Ua(o,e.summary)}),t.jsxs("div",{className:s.analysisReportMeta,children:[_," ·"," ",t.jsx(y,{text:o("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom)."),children:t.jsx("span",{children:o("uiStudio.analysis.thresholds","검토 기준")})}),": ",p.thresholds_source,e.snapshotCount>1?` · ${o("uiStudio.analysis.captureLabel","캡처")} ${$(o,e.snapshotCount)}`:"",h?` · ${o("uiStudio.analysis.childTargets","하위 대상")} ${$(o,e.children.length)}`:""]})]})]}),h&&n&&t.jsx("div",{className:s.analysisChildList,children:e.children.map(x=>t.jsxs("button",{className:s.analysisChildRow,onClick:j=>r(x.latest.snapshot_id,j.currentTarget),type:"button",children:[t.jsx("span",{className:s.analysisChildPath,children:x.key}),t.jsx("span",{className:s.analysisChildSummary,children:ae(o,x.latest.design_check_summary)}),t.jsx("span",{className:s.analysisChildDetailHint,children:o("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},x.key))})]})}function qa(e,i,a=1e4){const[n,l]=g.useState(null),[r,o]=g.useState(!0),[p,u]=g.useState(null),_=JSON.stringify(i),m=g.useCallback(async()=>{if(e===null){l(null),u(null),o(!1);return}try{const h=await le(e,i);l(h),u(null)}catch(h){u(h.message)}finally{o(!1)}},[e,_]);return g.useEffect(()=>{let h=!0;if(e===null)return l(null),u(null),o(!1),()=>{h=!1};const x=async()=>{try{const w=await le(e,i);h&&(l(w),u(null))}catch(w){h&&u(w.message)}finally{h&&o(!1)}};x();const j=setInterval(()=>{x()},a);return()=>{h=!1,clearInterval(j)}},[e,_,a]),{data:n,loading:r,error:p,refresh:m}}const Va="_filterBar_1nnge_4",Wa="_filterGroup_1nnge_14",Ka="_filterLabel_1nnge_21",Qa="_filterCheckbox_1nnge_28",Ya="_segmentGroup_1nnge_45",Ja="_segmentBtn_1nnge_55",Xa="_segmentBtnActive_1nnge_73",Za="_filterInput_1nnge_79",er="_filterResetBtn_1nnge_95",tr="_requestRow_1nnge_114",ir="_requestRowMain_1nnge_127",ar="_requestDetailToggle_1nnge_134",rr="_thumbPair_1nnge_156",sr="_thumbPairButton_1nnge_164",nr="_thumbSlot_1nnge_179",or="_thumbImg_1nnge_204",lr="_thumbPlaceholder_1nnge_211",cr="_thumbArrow_1nnge_219",ur="_extraPathsBadge_1nnge_225",dr="_requestMeta_1nnge_239",hr="_requestLabel_1nnge_247",pr="_requestTime_1nnge_256",gr="_requestStats_1nnge_261",mr="_statDot_1nnge_269",_r="_summaryPill_1nnge_273",yr="_requestActions_1nnge_278",fr="_expandHint_1nnge_285",xr="_mutationsArea_1nnge_298",Sr="_mutLoading_1nnge_307",jr="_mutEmpty_1nnge_308",wr="_mutError_1nnge_314",vr="_mutationRow_1nnge_320",br="_mutationLine_1nnge_330",Cr="_mutTs_1nnge_337",Ir="_mutCommand_1nnge_343",Nr="_mutPath_1nnge_349",Pr="_mutDiff_1nnge_359",kr="_mutErr_1nnge_314",Tr="_changeDetails_1nnge_374",Br="_changeDetailRow_1nnge_382",Dr="_changeDetailRowNoBefore_1nnge_391",Gr="_changeDetailBadge_1nnge_395",Mr="_changeDetail_text_1nnge_412",Ar="_changeDetail_color_1nnge_417",Rr="_changeDetail_size_1nnge_422",Lr="_changeDetail_layout_1nnge_427",$r="_changeDetail_state_1nnge_432",Er="_changeDetail_asset_1nnge_437",Hr="_changeDetail_property_1nnge_442",Or="_changeDetailProperty_1nnge_446",Fr="_changeDetailArrow_1nnge_454",Ur="_changeDetailOldValue_1nnge_460",zr="_changeDetailNewValue_1nnge_461",qr="_compareDialogLayer_1nnge_479",Vr="_compareDialog_1nnge_479",Wr="_beforeAfterDrawer_1nnge_510",Kr="_drawerHeader_1nnge_520",Qr="_drawerTitle_1nnge_529",Yr="_drawerCloseBtn_1nnge_536",Jr="_drawerBody_1nnge_552",Xr="_pathTabs_1nnge_559",Zr="_pathTab_1nnge_559",es="_pathTabActive_1nnge_588",ts="_comparePanel_1nnge_594",is="_compareHalf_1nnge_604",as="_compareLabel_1nnge_611",rs="_compareImg_1nnge_622",ss="_comparePlaceholder_1nnge_630",ns="_compareDetailsPanel_1nnge_642",os="_compareDetailsHeader_1nnge_651",ls="_drawerFooter_1nnge_669",cs="_drawerActionBtn_1nnge_677",us="_historyTabWrap_1nnge_695",ds="_historyWorkspace_1nnge_701",hs="_historyMainColumn_1nnge_706",ps="_requestList_1nnge_710",gs="_emptyHistory_1nnge_715",ms="_historyError_1nnge_722",_s="_historyLoading_1nnge_728",ys="_listHeader_1nnge_736",fs="_listHeaderTitle_1nnge_745",xs="_clearBtn_1nnge_752",Ss="_deleteErrBanner_1nnge_771",c={filterBar:Va,filterGroup:Wa,filterLabel:Ka,filterCheckbox:Qa,segmentGroup:Ya,segmentBtn:Ja,segmentBtnActive:Xa,filterInput:Za,filterResetBtn:er,requestRow:tr,requestRowMain:ir,requestDetailToggle:ar,thumbPair:rr,thumbPairButton:sr,thumbSlot:nr,thumbImg:or,thumbPlaceholder:lr,thumbArrow:cr,extraPathsBadge:ur,requestMeta:dr,requestLabel:hr,requestTime:pr,requestStats:gr,statDot:mr,summaryPill:_r,requestActions:yr,expandHint:fr,mutationsArea:xr,mutLoading:Sr,mutEmpty:jr,mutError:wr,mutationRow:vr,mutationLine:br,mutTs:Cr,mutCommand:Ir,mutPath:Nr,mutDiff:Pr,mutErr:kr,changeDetails:Tr,changeDetailRow:Br,changeDetailRowNoBefore:Dr,changeDetailBadge:Gr,changeDetail_text:Mr,changeDetail_color:Ar,changeDetail_size:Rr,changeDetail_layout:Lr,changeDetail_state:$r,changeDetail_asset:Er,changeDetail_property:Hr,changeDetailProperty:Or,changeDetailArrow:Fr,changeDetailOldValue:Ur,changeDetailNewValue:zr,compareDialogLayer:qr,compareDialog:Vr,beforeAfterDrawer:Wr,drawerHeader:Kr,drawerTitle:Qr,drawerCloseBtn:Yr,drawerBody:Jr,pathTabs:Xr,pathTab:Zr,pathTabActive:es,comparePanel:ts,compareHalf:is,compareLabel:as,compareImg:rs,comparePlaceholder:ss,compareDetailsPanel:ns,compareDetailsHeader:os,drawerFooter:ls,drawerActionBtn:cs,historyTabWrap:us,historyWorkspace:ds,historyMainColumn:hs,requestList:ps,emptyHistory:gs,historyError:ms,historyLoading:_s,listHeader:ys,listHeaderTitle:fs,clearBtn:xs,deleteErrBanner:Ss};function js(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function me(e){return e==null?"nil":typeof e=="string"?`"${e}"`:typeof e=="object"?JSON.stringify(e):String(e)}function Ge({mutations:e,emptyLabel:i}){const{t:a}=M();return e.length===0?t.jsx("div",{className:c.mutEmpty,children:i??a("uiStudio.history.row.mutationsEmpty","No change details")}):t.jsx(t.Fragment,{children:e.map(n=>t.jsx(ws,{mutation:n},n.mutationId))})}function ws({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:js(e.ts)}),t.jsx("span",{className:c.mutCommand,children:e.command}),e.targetPath&&t.jsx("span",{className:c.mutPath,children:e.targetPath}),e.diffSummary&&t.jsx("span",{className:c.mutDiff,children:e.diffSummary})]}),e.changeDetails&&e.changeDetails.length>0&&t.jsx("div",{className:c.changeDetails,children:e.changeDetails.map(i=>t.jsx(vs,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function vs({detail:e}){const i=Object.prototype.hasOwnProperty.call(e,"before");return t.jsxs("div",{className:`${c.changeDetailRow} ${i?"":c.changeDetailRowNoBefore}`,children:[t.jsx("span",{className:`${c.changeDetailBadge} ${c[`changeDetail_${e.category}`]??""}`,children:e.label}),t.jsx("span",{className:c.changeDetailProperty,children:e.property}),i&&t.jsx("span",{className:c.changeDetailOldValue,children:me(e.before)}),t.jsx("span",{className:c.changeDetailArrow,children:"→"}),t.jsx("span",{className:c.changeDetailNewValue,children:me(e.after)})]})}function _e(e,i){return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function bs(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function Cs(e){if(!e)return null;const i=e.split(/[./]/).filter(n=>n.length>0);if(i.length===0)return null;const a=i.findIndex(n=>n==="StarterGui");return a>=0&&i[a+1]?i[a+1]:i[i.length-1]??null}function J(e,i){if(i.label)return i.label;const a=Cs(i.affectedPaths[0]);if(a){const n=i.mutationCount===1?"uiStudio.history.row.pathLabelOne":"uiStudio.history.row.pathLabelMany",l=i.mutationCount===1?"{path} · {n} change detail":"{path} · {n} change details";return e(n,l).replace("{path}",a).replace("{n}",String(i.mutationCount))}return e("uiStudio.history.row.toolLabel","UI changes ({n})").replace("{n}",String(i.mutationCount))}function X(e,i){return`${i}${e("uiStudio.storage.countSuffix","")}`}function Is(e,i){if(!i)return null;const a=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(n=>typeof n=="string"&&n.length>0);return a.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${a.join(" · ")}`}function Ns(e,i){if(!i)return null;if(i.source==="unavailable")return e("uiStudio.history.row.designCheckUnavailable","Suggestions: unavailable");if(i.total===0)return e("uiStudio.history.row.designCheckNone","Suggestions: none");const a=`${e("uiStudio.priorityHigh","Priority")} ${X(e,i.priority_high)}`,n=`${e("uiStudio.priorityMedium","Recommended")} ${X(e,i.priority_medium)}`,l=`${e("uiStudio.priorityLow","Optional")} ${X(e,i.priority_low)}`;return`${e("uiStudio.history.row.designCheck","Suggestions")}: ${a} · ${n} · ${l}`}function Me({req:e,placeId:i,onOpenCompare:a,imageUrlOverride:n,sampleMutations:l}){const{t:r}=M(),[o,p]=g.useState(!1),[u,_]=g.useState(null),[m,h]=g.useState(!1),[x,j]=g.useState(null),w=n!=null,b=e.affectedPaths[0]??null,A=e.affectedPaths.length-1,C=b?e.beforeSnapshots[b]??null:null,d=b?e.afterSnapshots[b]??null:null,T=C?w?n:_e(C,i):null,N=d?w?n:_e(d,i):null,S=Is(r,e.qualityPlanSummary),k=Ns(r,e.postChangeDesignCheckSummary),E=async()=>{if(!o&&u===null)if(w&&l!=null)_(l);else{h(!0),j(null);try{const I=await je(i,e.requestId);_(I.mutations)}catch(I){j(I.message)}finally{h(!1)}}p(I=>!I)};return t.jsxs("div",{className:c.requestRow,children:[t.jsxs("div",{className:c.requestRowMain,children:[t.jsx(y,{text:r("uiStudio.history.row.compare.tooltip","Compare the before and after screens. Click to open the full comparison view."),children:t.jsxs("button",{className:`${c.thumbPair} ${c.thumbPairButton}`,onClick:I=>a(I.currentTarget),disabled:!b,"aria-label":`${J(r,e)} ${r("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:T?t.jsx("img",{className:c.thumbImg,src:T,alt:r("uiStudio.compare.before","Before"),loading:"lazy"}):t.jsx(y,{text:r("uiStudio.history.row.noBeforeState.tooltip","No capture saved before this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:r("uiStudio.history.row.noBeforeState","이전 없음")})})}),t.jsx("span",{className:c.thumbArrow,children:"→"}),t.jsx("div",{className:c.thumbSlot,children:N?t.jsx("img",{className:c.thumbImg,src:N,alt:r("uiStudio.compare.after","After"),loading:"lazy"}):t.jsx(y,{text:r("uiStudio.history.row.noAfterState.tooltip","No capture saved after this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:r("uiStudio.history.row.noAfterState","이후 없음")})})}),A>0&&t.jsx(y,{text:r("uiStudio.history.row.extraPaths.tooltip","Number of additional UIs changed in this action."),children:t.jsxs("span",{className:c.extraPathsBadge,children:["+",A]})})]})}),t.jsxs("button",{className:c.requestDetailToggle,type:"button","aria-expanded":o,"aria-label":`${J(r,e)} ${r("uiStudio.history.row.toggleDetails","Toggle change details")}`,onClick:()=>void E(),children:[t.jsxs("span",{className:c.requestMeta,children:[t.jsx("span",{className:c.requestLabel,children:J(r,e)}),t.jsx("span",{className:c.requestTime,children:bs(e.startedAt)}),t.jsxs("span",{className:c.requestStats,children:[t.jsx(y,{text:r("uiStudio.history.row.affectedPaths.tooltip","Number of UIs affected by this action."),children:t.jsxs("span",{children:[r("uiStudio.history.row.affectedPaths","Paths")," ",e.affectedPaths.length,r("uiStudio.storage.countSuffix","")]})}),t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.mutations.tooltip","Number of detailed changes (e.g., property edits)."),children:t.jsxs("span",{children:[r("uiStudio.history.row.mutations","Change details")," ",e.mutationCount,r("uiStudio.storage.countSuffix","")]})}),S&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.qualityPlan.tooltip","Brief design direction used for this change."),children:t.jsx("span",{className:c.summaryPill,children:S})})]}),k&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.designCheck.tooltip","Post-change Design Check suggestion summary."),children:t.jsx("span",{className:c.summaryPill,children:k})})]})]})]}),t.jsx("span",{className:c.requestActions,children:t.jsx(y,{text:r("uiStudio.history.row.toggleDetails.tooltip","Show or hide a per-line breakdown of what changed."),children:t.jsx("span",{className:c.expandHint,children:o?r("uiStudio.history.row.collapseDetails","Hide change details"):r("uiStudio.history.row.expandDetails","Show {n} change details").replace("{n}",String(e.mutationCount))})})})]})]}),o&&t.jsxs("div",{className:c.mutationsArea,children:[m&&t.jsx("div",{className:c.mutLoading,children:r("uiStudio.history.loading","로딩 중...")}),x&&t.jsx("div",{className:c.mutError,children:x}),u&&t.jsx(Ge,{mutations:u,emptyLabel:r("uiStudio.history.row.mutationsEmpty","No change details")})]})]})}function ye(e,i){return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Ae({requestId:e,placeId:i,onClose:a,imageUrlOverride:n,sampleDetail:l}){const{t:r}=M(),o=g.useRef(null),p=l!=null,[u,_]=g.useState(p?l:null),[m,h]=g.useState(!p),[x,j]=g.useState(null),[w,b]=g.useState(p&&l.affectedPaths.length>0?l.affectedPaths[0]:null);g.useEffect(()=>{var S;(S=o.current)==null||S.focus()},[]),g.useEffect(()=>{const S=k=>{k.key==="Escape"&&(k.preventDefault(),a())};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[a]),g.useEffect(()=>{if(p)return;let S=!0;return h(!0),j(null),je(i,e).then(k=>{S&&(_(k),k.affectedPaths.length>0&&b(k.affectedPaths[0]))}).catch(k=>{S&&j(k.message)}).finally(()=>{S&&h(!1)}),()=>{S=!1}},[e,i,p]);const A=w&&u?u.beforeSnapshots[w]??null:null,C=w&&u?u.afterSnapshots[w]??null:null,d=A?n??ye(A,i):null,T=C?n??ye(C,i):null,N=r("uiStudio.history.row.compare","전후 비교");return t.jsx("div",{className:c.compareDialogLayer,"data-testid":"history-compare-dialog-layer",onClick:a,role:"presentation",children:t.jsx("section",{ref:o,className:c.compareDialog,role:"dialog","aria-modal":"true","aria-label":N,tabIndex:-1,onClick:S=>S.stopPropagation(),children:t.jsxs("div",{className:c.beforeAfterDrawer,children:[t.jsxs("div",{className:c.drawerHeader,children:[t.jsx("h2",{className:c.drawerTitle,children:N}),t.jsx("button",{className:c.drawerCloseBtn,onClick:a,type:"button",children:r("uiStudio.history.drawer.close","닫기")})]}),m&&t.jsx("div",{className:c.drawerBody,children:r("uiStudio.history.loading","로딩 중...")}),x&&t.jsx("div",{className:c.drawerBody,children:t.jsx("span",{className:c.mutErr,children:x})}),!m&&!x&&u&&t.jsxs(t.Fragment,{children:[u.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:u.affectedPaths.map(S=>t.jsx(y,{text:`${r("uiStudio.compare.path.tooltip","The UI instance path for this screen.")} ${S}`,children:t.jsx("button",{role:"tab","aria-selected":w===S,className:`${c.pathTab} ${w===S?c.pathTabActive:""}`,onClick:()=>b(S),type:"button",children:S.split("/").pop()??S})},S))}),t.jsxs("div",{className:c.comparePanel,children:[t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:r("uiStudio.compare.before.tooltip","The screen saved just before AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:r("uiStudio.compare.before","Before")})}),d?t.jsx("img",{className:c.compareImg,src:d,alt:r("uiStudio.compare.before","Before")}):t.jsx("div",{className:c.comparePlaceholder,children:r("uiStudio.history.row.noBeforeState","이전 상태 없음")})]}),t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:r("uiStudio.compare.after.tooltip","The screen saved just after AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:r("uiStudio.compare.after","After")})}),T?t.jsx("img",{className:c.compareImg,src:T,alt:r("uiStudio.compare.after","After")}):t.jsx("div",{className:c.comparePlaceholder,children:r("uiStudio.history.row.noAfterState","이후 상태 없음")})]})]}),t.jsxs("section",{className:c.compareDetailsPanel,children:[t.jsx("div",{className:c.compareDetailsHeader,children:r("uiStudio.history.drawer.changeDetails","Change details")}),t.jsx(Ge,{mutations:u.mutations,emptyLabel:r("uiStudio.history.row.mutationsEmpty","No change details")})]})]}),t.jsx("div",{className:c.drawerFooter,children:t.jsx("button",{className:c.drawerActionBtn,onClick:a,type:"button",children:r("uiStudio.history.drawer.close","닫기")})})]})})})}function z(e){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),a=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999);return{start:i,end:a}}function fe(e,i){const a=e.split("-").map(Number);if(a.length!==3||a.some(o=>Number.isNaN(o)))return;const[n,l,r]=a;return new Date(n,l-1,r,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function Ps(e){const i={limit:50};if(e.action!=="all"&&(i.action=e.action),e.datePreset==="custom"){const a=e.from?fe(e.from,!1):void 0,n=e.to?fe(e.to,!0):void 0;a&&(i.from=a),n&&(i.to=n)}else if(e.datePreset!=="all"){const a=new Date;if(e.datePreset==="today"){const{start:n,end:l}=z(a);i.from=n.toISOString(),i.to=l.toISOString()}else if(e.datePreset==="yesterday"){const n=new Date(a);n.setDate(n.getDate()-1);const{start:l,end:r}=z(n);i.from=l.toISOString(),i.to=r.toISOString()}else{const n=e.datePreset==="7d"?6:29,l=new Date(a);l.setDate(l.getDate()-n);const{start:r}=z(l),{end:o}=z(a);i.from=r.toISOString(),i.to=o.toISOString()}}return i}function Re(){return{action:"all",datePreset:"all"}}function ks(){const{t:e}=M(),{trackEvent:i}=H(),a=qe(e),[n,l]=g.useState(null),r=n?a.requests.find(u=>u.requestId===n)??null:null,o=g.useCallback((u,_)=>{l(u)},[]),p=g.useCallback(()=>{l(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[t.jsx("div",{className:s.sampleBanner,children:t.jsxs("div",{className:s.sampleBannerRow,children:[t.jsxs("div",{className:s.sampleBannerMain,children:[t.jsx("div",{className:s.sampleBadge,children:e("uiStudio.history.sample.bannerBadge","Preview of the Pro change history")}),t.jsx("div",{className:s.sampleTitle,children:e("uiStudio.history.sample.bannerTitle","You are previewing the UI change history that unlocks after upgrading to Pro.")}),t.jsx("div",{className:s.sampleMessage,children:e("uiStudio.history.sample.bannerMessage","This preview uses sample data. Real change history, before/after comparison, and batch delete unlock with Pro.")})]}),t.jsx("div",{className:s.sampleActions,children:t.jsx("a",{className:s.primaryAction,href:Se.uiStudioHistory,target:"_blank",rel:"noreferrer",title:e("uiStudio.history.sample.tooltip","Full history is available with Pro"),onClick:()=>i("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_history_banner",page:"ui-studio",tab:"ui_studio_history"}),children:e("tier.upgrade","View Pro")})})]})}),t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":n?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx("div",{className:c.listHeader,children:t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(G,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})})}),t.jsx("div",{className:c.requestList,children:a.requests.map(u=>t.jsx(Me,{req:u,placeId:0,onOpenCompare:_=>o(u.requestId,_),imageUrlOverride:ce,sampleMutations:a.mutationsByRequest[u.requestId]},u.requestId))})]}),n&&r&&t.jsx(Ae,{requestId:n,placeId:0,onClose:p,imageUrlOverride:ce,sampleDetail:{...r,mutations:a.mutationsByRequest[r.requestId]??[]}})]})]})}function Ts({filter:e,onChange:i}){const{t:a}=M(),n=[{value:"all",label:a("uiStudio.history.filter.actionAll","All"),tooltip:a("uiStudio.history.filter.actionAll.tooltip","Show every kind of action.")},{value:"create_tree",label:a("uiStudio.history.filter.actionCreate","Create"),tooltip:a("uiStudio.history.filter.actionCreate.tooltip","Show only actions that created a new UI.")},{value:"update",label:a("uiStudio.history.filter.actionUpdate","Update"),tooltip:a("uiStudio.history.filter.actionUpdate.tooltip","Show only actions that updated an existing UI.")},{value:"delete",label:a("uiStudio.history.filter.actionDelete","Delete"),tooltip:a("uiStudio.history.filter.actionDelete.tooltip","Show only actions that deleted a UI.")}],l=[{value:"all",label:a("uiStudio.history.filter.dateAll","All"),tooltip:a("uiStudio.history.filter.dateAll.tooltip","Show the full history.")},{value:"today",label:a("uiStudio.history.filter.today","Today"),tooltip:a("uiStudio.history.filter.today.tooltip","Show only changes from today.")},{value:"yesterday",label:a("uiStudio.history.filter.yesterday","Yesterday"),tooltip:a("uiStudio.history.filter.yesterday.tooltip","Show only changes from yesterday.")},{value:"7d",label:a("uiStudio.history.filter.last7Days","Last 7 days"),tooltip:a("uiStudio.history.filter.last7Days.tooltip","Show changes from the last 7 days.")},{value:"30d",label:a("uiStudio.history.filter.last30Days","Last 30 days"),tooltip:a("uiStudio.history.filter.last30Days.tooltip","Show changes from the last 30 days.")},{value:"custom",label:a("uiStudio.history.filter.customRange","Custom range"),tooltip:a("uiStudio.history.filter.customRange.tooltip","Pick a custom start and end date.")}];return t.jsxs("div",{className:c.filterBar,children:[t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(G,{label:a("uiStudio.history.filter.actions","작업 유형"),tooltip:a("uiStudio.history.filter.actions.tooltip","Filter records by the kind of change AI made.")})}),t.jsx("div",{className:c.segmentGroup,children:n.map(r=>t.jsx(y,{text:r.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.action===r.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,action:r.value}),"aria-pressed":e.action===r.value,type:"button",children:r.label})},r.value))})]}),t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(G,{label:a("uiStudio.history.filter.period","Period"),tooltip:a("uiStudio.history.filter.period.tooltip","Filter records by time range.")})}),t.jsx("div",{className:c.segmentGroup,children:l.map(r=>t.jsx(y,{text:r.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.datePreset===r.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,datePreset:r.value,from:r.value==="custom"?e.from:void 0,to:r.value==="custom"?e.to:void 0}),"aria-pressed":e.datePreset===r.value,type:"button",children:r.label})},r.value))})]}),e.datePreset==="custom"&&t.jsxs("div",{className:c.filterGroup,children:[t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-from-date",children:t.jsx(G,{label:a("uiStudio.history.filter.from","시작일"),tooltip:a("uiStudio.history.filter.from.tooltip","Start date for the query.")})}),t.jsx("input",{id:"ui-history-from-date",type:"date",className:c.filterInput,value:e.from??"",onChange:r=>i({...e,from:r.target.value||void 0})}),t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-to-date",children:t.jsx(G,{label:a("uiStudio.history.filter.to","종료일"),tooltip:a("uiStudio.history.filter.to.tooltip","End date for the query.")})}),t.jsx("input",{id:"ui-history-to-date",type:"date",className:c.filterInput,value:e.to??"",onChange:r=>i({...e,to:r.target.value||void 0})})]}),t.jsx(y,{text:a("uiStudio.history.filter.reset.tooltip","Reset all filters to defaults."),children:t.jsx("button",{className:c.filterResetBtn,onClick:()=>i(Re()),type:"button",children:a("uiStudio.history.filter.reset","Reset")})})]})}function Bs(){var I;const{t:e}=M(),{trackEvent:i}=H(),a=Ce(1),n=((I=a.data)==null?void 0:I.placeId)??null,[l,r]=g.useState(Re),{data:o,loading:p,error:u,refresh:_}=qa(n,Ps(l)),[m,h]=g.useState(null),[x,j]=g.useState(!1),[w,b]=g.useState(!1),[A,C]=g.useState(null),d=async()=>{if(C(null),n===null){C(e("uiStudio.history.noPlaceAction","Current place is not available yet."));return}try{await Ve(n,{all:!0,alsoSnapshots:w}),await _(),j(!1)}catch(P){throw C(P.message),P}},T=(o==null?void 0:o.requests)??[],N=n===null&&a.loading,S=te(a.error)||te(u),k=g.useCallback((P,v)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),h(P)},[i]),E=g.useCallback(()=>{h(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[S?t.jsx(Te,{}):t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":m?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx(Ts,{filter:l,onChange:r}),t.jsxs("div",{className:c.listHeader,children:[t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(G,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})}),T.length>0&&t.jsx(y,{text:e("uiStudio.history.clear.tooltip","Delete every change record for this project. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:c.clearBtn,onClick:()=>{i("dashboard_click_event",{click_target:"ui_studio_clear_history",page:"ui-studio",tab:"ui_studio_history"}),j(!0)},type:"button",children:e("uiStudio.history.clear","Clear")})})]}),N&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loadingPlace","Loading current place...")}),!N&&p&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!N&&!p&&u&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",u]}),!N&&!p&&!u&&n===null&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.noPlace","No current place data is available yet. Connect WEPPY Plugin and sync a place to view UI change history.")}),!N&&!p&&!u&&n!==null&&T.length===0&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.empty","아직 변경 이력이 없습니다. AI 에이전트가 manage_ui 로 UI 를 수정하면 자동으로 기록됩니다.")}),!N&&!p&&n!==null&&T.length>0&&t.jsx("div",{className:c.requestList,children:T.map(P=>t.jsx(Me,{req:P,placeId:n,onOpenCompare:v=>k(P.requestId,v)},P.requestId))}),A&&t.jsx("div",{className:c.deleteErrBanner,children:A})]}),m&&n!==null&&t.jsx(Ae,{requestId:m,placeId:n,onClose:E})]}),x&&t.jsx(se,{title:e("uiStudio.history.confirm.clearRequestsTitle","변경 이력 삭제"),message:e("uiStudio.history.confirm.clearRequestsMessage","현재 place의 변경 이력을 삭제합니다. Studio 인스턴스에는 영향을 주지 않습니다."),danger:!0,cascadeOption:{label:e("uiStudio.history.confirm.cascadeOption","연결된 화면 캡처도 함께 삭제"),checked:w,onChange:b},confirmLabel:e("common.delete","삭제"),onConfirm:d,onClose:()=>j(!1)})]})}function Ds({tier:e}){return e==="basic"?t.jsx(ks,{}):t.jsx(Bs,{})}const Gs=["analysis","history"];function Os(){const{t:e}=M(),{trackEvent:i}=H(),{tier:a,loading:n}=He(),[l,r]=Oe(),o=l.get("tab"),p=o&&Gs.includes(o)?o:"analysis",u=m=>{i("dashboard_click_event",{click_target:m==="analysis"?"ui_studio_tab_analysis":"ui_studio_tab_history",page:"ui-studio",tab:m==="analysis"?"ui_studio_analysis":"ui_studio_history"}),r(h=>{const x=new URLSearchParams(h);return x.set("tab",m),x})},_=[{key:"analysis",label:t.jsx(y,{text:e("uiStudio.tabs.analysis.tooltip","Browse AI-captured UI screens and quickly find which UIs need improvement."),children:e("uiStudio.tabs.analysis","Analysis")})},{key:"history",label:t.jsx(y,{text:e("uiStudio.tabs.history.tooltip","Every UI change AI made, in order. Compare before and after screens."),children:e("uiStudio.tabs.history","History")})}];return t.jsxs("div",{className:s.page,children:[t.jsx(Ke,{title:e("page.uiStudio.title","UI Studio"),description:e("page.uiStudio.description","Review UI captures, improvement suggestions, and before/after change history."),helpTopicId:"uiStudio",helpState:{tier:a}}),!n&&a==="pro"&&t.jsx(Qe,{surface:"uiStudio"}),t.jsx(We,{items:_,value:p,onChange:u}),n?t.jsx("div",{className:s.emptyState,children:e("uiStudio.loading","Loading...")}):p==="analysis"?t.jsx(Fa,{tier:a}):t.jsx(Ds,{tier:a})]})}export{Os as Component};
|