@weppy/roblox-mcp 2.7.13 → 2.7.15
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 +17 -0
- package/dashboard/dist/assets/{ChangelogDetailPage-BpYn-_uJ.js → ChangelogDetailPage-Cado4LDZ.js} +1 -1
- package/dashboard/dist/assets/{ChangelogPage-BGqHwmkj.js → ChangelogPage-DyS8_4IL.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-lSOkaAvB.js → ConfirmModal-C66ZwIur.js} +1 -1
- package/dashboard/dist/assets/{ConnectionPage-BKHQPyJV.js → ConnectionPage-DsGgzpmn.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-DjupgTS5.js → GameChangeDetail-BvLY7yg8.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-BkXtpBzT.js → InfoLabel-LyMkHb1i.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-D-ZhLkmY.js → OverviewPage-BDkw5pqk.js} +1 -1
- package/dashboard/dist/assets/{PlaytestPage-vBV2EzAl.js → PlaytestPage-Chwh5KSd.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-KOJtVHm4.js → SettingsPage-7nNA3k5H.js} +1 -1
- package/dashboard/dist/assets/{StatusBadge-C0DYxkUy.js → StatusBadge-CLJmMG0w.js} +1 -1
- package/dashboard/dist/assets/{SyncPage-CJfFG48l.js → SyncPage-CUP2s1T6.js} +1 -1
- package/dashboard/dist/assets/{Tabs-B4kZyHzy.js → Tabs-C9KNjyNX.js} +1 -1
- package/dashboard/dist/assets/{ToolsPage-CB2Sn5ZE.js → ToolsPage-QacrKG2A.js} +1 -1
- package/dashboard/dist/assets/{TooltipText-59Xfc1Ui.js → TooltipText-BPEldl3x.js} +1 -1
- package/dashboard/dist/assets/UiStudioPage-RUjTAi4h.js +16 -0
- package/dashboard/dist/assets/WhatsNewPage-CKNhbHAQ.js +1 -0
- package/dashboard/dist/assets/{index-BIVkyPD7.js → index-VNIYQxwF.js} +78 -51
- package/dashboard/dist/assets/{sample-requests-DyHFY41o.js → sample-requests-Bttgc133.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-C1ZSqLmR.js → useLiveUptime-CksXMBr9.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dist/index.js +77 -78
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/AssetsPage-CGgBe-s5.css +0 -1
- package/dashboard/dist/assets/AssetsPage-UVXVmDv7.js +0 -46
- package/dashboard/dist/assets/UiStudioPage-CPmYO3Vj.js +0 -11
- package/dashboard/dist/assets/WhatsNewPage-ClHLVkbF.js +0 -1
- package/dashboard/dist/assets/x-sRJSvoLm.js +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weppy/roblox-mcp",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.15",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server for Roblox Studio integration - enables AI coding agents to interact with Roblox Studio in real-time",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_1ld7j_1{display:flex;flex-direction:column;gap:14px;min-height:100%;max-width:var(--content-max)}._headerRow_1ld7j_9{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}._headerRow_1ld7j_9 h1{margin:0;font-size:22px;letter-spacing:0}._headerRow_1ld7j_9 p{margin:4px 0 0;color:var(--text-secondary);font-size:13px}._headerMeta_1ld7j_28{display:grid;justify-items:end;gap:2px;color:var(--text-secondary);font-size:12px}._headerMeta_1ld7j_28 strong{color:var(--text-primary);font-size:20px}._toolbar_1ld7j_41{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._toolbarActions_1ld7j_49,._actionRow_1ld7j_50,._copyRow_1ld7j_51,._buttonRow_1ld7j_52{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._segmented_1ld7j_59{display:inline-flex;min-height:32px;border:1px solid var(--border);border-radius:6px;overflow:hidden;background:var(--bg-card)}._segmented_1ld7j_59 button{border:0;border-right:1px solid var(--border);background:transparent;color:var(--text-secondary);padding:0 10px;font-family:var(--font-label);font-size:12px;cursor:pointer}._segmented_1ld7j_59 button:last-child{border-right:0}._segmented_1ld7j_59 ._segmentedActive_1ld7j_83{background:var(--accent-dim);color:var(--accent)}._filterLabel_1ld7j_88{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}._filterLabel_1ld7j_88 select{min-height:32px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);padding:0 8px;font:inherit}._commandButton_1ld7j_106,._primaryButton_1ld7j_107,._iconButton_1ld7j_108{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition),opacity var(--transition)}._commandButton_1ld7j_106{min-height:32px;padding:6px 10px}._primaryButton_1ld7j_107{min-height:34px;padding:7px 12px;border-color:var(--accent);color:var(--accent)}._iconButton_1ld7j_108{width:32px;height:32px;padding:0}._commandButton_1ld7j_106:hover,._primaryButton_1ld7j_107:hover,._iconButton_1ld7j_108:hover{border-color:var(--accent)}._commandButton_1ld7j_106:disabled,._primaryButton_1ld7j_107:disabled,._iconButton_1ld7j_108:disabled{cursor:not-allowed;opacity:.5}._grid_1ld7j_154{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}._assetCard_1ld7j_160{display:flex;flex-direction:column;gap:8px;min-width:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:8px;color:var(--text-primary);text-align:left;cursor:pointer}._assetCardSelected_1ld7j_174{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}._thumbnailWrap_1ld7j_179{display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-secondary)}._thumbnail_1ld7j_179{width:100%;height:100%;object-fit:contain}._thumbnailFallback_1ld7j_195{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--border);border-radius:8px;color:var(--text-secondary);background:var(--bg-card)}._assetCardBody_1ld7j_206{display:flex;flex-direction:column;gap:6px;min-width:0}._assetName_1ld7j_213{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-label);font-size:13px}._assetMeta_1ld7j_221{display:flex;align-items:center;justify-content:space-between;gap:8px}._statusChip_1ld7j_228,._categoryPill_1ld7j_229{border:1px solid var(--border);border-radius:4px;padding:2px 6px;font-size:11px;color:var(--text-secondary)}._categoryPill_1ld7j_229{color:var(--text-primary);background:var(--bg-secondary)}._status_uploaded_1ld7j_242{color:var(--success);border-color:var(--success)}._status_failed_1ld7j_247{color:var(--error);border-color:var(--error)}._status_processing_1ld7j_252,._status_uploading_1ld7j_253{color:var(--warning);border-color:var(--warning)}._assetId_1ld7j_258,._scopeText_1ld7j_259,._muted_1ld7j_260{color:var(--text-muted);font-size:12px}._emptyState_1ld7j_265,._notice_1ld7j_266,._errorState_1ld7j_267,._messageState_1ld7j_268{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:14px;color:var(--text-secondary)}._emptyState_1ld7j_265{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._emptyState_1ld7j_265 p{margin:0;color:var(--text-primary);font-family:var(--font-label)}._notice_1ld7j_266{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}._proNotice_1ld7j_298{color:var(--pro-text);border-color:var(--pro-border);background:var(--pro-bg-soft)}._errorState_1ld7j_267{color:var(--error);border-color:var(--error)}._messageState_1ld7j_268{color:var(--success);border-color:var(--success)}._drawer_1ld7j_314{position:fixed;top:0;right:0;z-index:40;width:min(460px,100vw);height:100vh;overflow-y:auto;border-left:1px solid var(--border);background:var(--bg-primary);padding:18px;box-shadow:-12px 0 24px #00000047}._settingsDrawer_1ld7j_328{width:min(580px,100vw)}._detailPopupLayer_1ld7j_332{position:fixed;top:calc(var(--header-height) + 16px);right:24px;bottom:24px;left:calc(var(--sidebar-width) + 24px);z-index:900;display:flex;align-items:stretch;justify-content:center;padding:clamp(12px,2vw,24px);background:#03071294;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-sizing:border-box}._detailDialog_1ld7j_348{width:min(1120px,100%);min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);box-shadow:0 24px 60px #0000006b}._detailDialog_1ld7j_348:focus{outline:none}._detailDialogHeader_1ld7j_365{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg-card) 92%,var(--bg-secondary))}._detailTitleBlock_1ld7j_376{min-width:0;display:flex;flex-direction:column;gap:3px}._detailTitleBlock_1ld7j_376 h2{margin:0;font-size:18px;letter-spacing:0}._detailTitleBlock_1ld7j_376 span:last-child{overflow:hidden;color:var(--text-muted);font-family:var(--font-code);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._detailEyebrow_1ld7j_398{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._detailHeaderActions_1ld7j_407{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._detailDialogBody_1ld7j_415{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.1fr);gap:0;overflow:hidden}._detailPreviewPane_1ld7j_424{min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:24px;border-right:1px solid var(--border);background:var(--bg-secondary)}._detailPreview_1ld7j_424,._detailPreviewFallback_1ld7j_436{width:100%;max-width:520px;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._detailPreview_1ld7j_424{display:block;object-fit:contain}._detailPreviewFallback_1ld7j_436{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._detailPreviewFallback_1ld7j_436 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._detailContentPane_1ld7j_463{min-width:0;overflow-y:auto;padding:18px 22px 24px}._detailContentPane_1ld7j_463 ._formStack_1ld7j_469{margin-top:0}._drawerHeader_1ld7j_473{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}._drawerHeader_1ld7j_473 h2{margin:0;font-size:18px;letter-spacing:0}._drawerHeader_1ld7j_473 span{color:var(--text-muted);font-size:12px}._preview_1ld7j_492,._previewFallback_1ld7j_493{width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);margin-bottom:14px}._preview_1ld7j_492{object-fit:contain}._previewFallback_1ld7j_493{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._previewFallback_1ld7j_493 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._formStack_1ld7j_469,._detailSection_1ld7j_520,._noticeList_1ld7j_521,._settingsPanel_1ld7j_522{display:flex;flex-direction:column;gap:10px;margin-top:14px}._noticeList_1ld7j_521{color:var(--text-muted);font-size:12px;line-height:1.45}._noticeList_1ld7j_521 p{margin:0}._field_1ld7j_539{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}._field_1ld7j_539 input,._field_1ld7j_539 textarea,._field_1ld7j_539 select{width:100%;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);padding:8px;font:inherit}._twoColumn_1ld7j_559{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}._detailSection_1ld7j_520{padding-top:12px;border-top:1px solid var(--border)}._detailSection_1ld7j_520 h3{margin:0;font-size:13px;letter-spacing:0}._detailGrid_1ld7j_576,._compactMeta_1ld7j_577{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}._compactMeta_1ld7j_577{border:1px solid var(--border);border-radius:6px;padding:10px;background:var(--bg-card)}._detailGrid_1ld7j_576 dt,._compactMeta_1ld7j_577 dt{color:var(--text-muted)}._detailGrid_1ld7j_576 dd,._compactMeta_1ld7j_577 dd{margin:0;min-width:0;overflow-wrap:anywhere}._hashText_1ld7j_604{font-family:var(--font-code)}._usageList_1ld7j_608{display:flex;flex-direction:column;gap:8px}._usageItem_1ld7j_614{display:grid;gap:4px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--bg-card);font-size:12px}._usageItem_1ld7j_614 strong{color:var(--text-primary);overflow-wrap:anywhere}._usageItem_1ld7j_614 code{color:var(--accent);overflow-wrap:anywhere}._settingsPanel_1ld7j_522{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--bg-card)}._toggleRow_1ld7j_641{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}._toggleRow_1ld7j_641 span{display:grid;gap:3px}._toggleRow_1ld7j_641 small,._inlineHelp_1ld7j_655{color:var(--text-muted);font-size:12px}._toggleRow_1ld7j_641 input{width:18px;height:18px}._inlineHelp_1ld7j_655{margin:0}._inlineHelp_1ld7j_655 a{color:var(--accent)}@media(max-width:1120px){._detailPopupLayer_1ld7j_332{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}._detailDialogBody_1ld7j_415{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr)}}@media(max-width:820px){._detailPopupLayer_1ld7j_332{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}._detailDialogHeader_1ld7j_365{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._detailHeaderActions_1ld7j_407{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._detailDialogBody_1ld7j_415{grid-template-columns:minmax(0,1fr);overflow-y:auto}._detailPreviewPane_1ld7j_424{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--border)}._detailPreview_1ld7j_424,._detailPreviewFallback_1ld7j_436{max-width:340px}._detailContentPane_1ld7j_463{overflow:visible;padding:14px}}@media(max-width:720px){._headerRow_1ld7j_9,._toolbar_1ld7j_41{align-items:stretch;flex-direction:column}._headerMeta_1ld7j_28{justify-items:start}._toolbarActions_1ld7j_49{justify-content:flex-start}._twoColumn_1ld7j_559{grid-template-columns:1fr}}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import{q as A,a as w,s as D,u as E,j as s,P as re,I as de,r as i,R as Z,k as ue,i as pe,l as he,t as me}from"./index-BIVkyPD7.js";import{T as R}from"./TooltipText-59Xfc1Ui.js";import{X as K}from"./x-sRJSvoLm.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 ge=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ye=A("arrow-left",ge);/**
|
|
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=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],je=A("audio-lines",xe);/**
|
|
12
|
-
* @license lucide-react v1.8.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const _e=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}]],be=A("badge",_e);/**
|
|
17
|
-
* @license lucide-react v1.8.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const ve=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],fe=A("box",ve);/**
|
|
22
|
-
* @license lucide-react v1.8.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const Ce=[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]],Ne=A("clapperboard",Ce);/**
|
|
27
|
-
* @license lucide-react v1.8.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const ke=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],V=A("copy",ke);/**
|
|
32
|
-
* @license lucide-react v1.8.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const we=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],Se=A("film",we);/**
|
|
37
|
-
* @license lucide-react v1.8.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const Ae=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pe=A("search",Ae);/**
|
|
42
|
-
* @license lucide-react v1.8.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Ie=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],q=A("upload",Ie),Be=["image","decal","audio","mesh","model","video","animation"];function X(e){if(e.scope==="place"&&typeof e.placeId=="number")return{placeId:String(e.placeId)}}function L(e){const l=X(e);return l?`?placeId=${encodeURIComponent(l.placeId)}`:""}function G(e){return`/api/assets/${encodeURIComponent(e.scope)}/${encodeURIComponent(e.category)}`}function M(e,l){return`${G(e)}/${encodeURIComponent(l)}`}async function J(e){return w.get(G(e),X(e))}async function Re(e){const u=(await Promise.all(Be.map(a=>J({...e,category:a})))).flatMap(a=>a.assets);return u.sort((a,n)=>n.createdAt.localeCompare(a.createdAt)||n.id.localeCompare(a.id)),{assets:u,totalCount:u.length}}async function Le(e){return w.post(`${G(e)}/rescan${L(e)}`,{})}async function $e(e,l,u){return(await w.patch(`${M(e,l)}${L(e)}`,u)).asset}async function Ee(e,l,u){return(await w.post(`${M(e,l)}/upload${L(e)}`,u)).asset}async function Ue(e,l){return(await w.post(`${M(e,l)}/status-refresh${L(e)}`,{})).asset}async function De(e,l,u){const a={...e,placeId:u??e.placeId};return w.post(`${M(e,l)}/usage-scan${L(a)}`,{})}function Q(e){return e.fileUrl?`${D}${e.fileUrl}`:`${D}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/file${L({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}function Me(e){return e.previewUrl?`${D}${e.previewUrl}`:`${D}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/preview${L({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}const Fe="_page_1ld7j_1",Te="_headerRow_1ld7j_9",Oe="_headerMeta_1ld7j_28",He="_toolbar_1ld7j_41",ze="_toolbarActions_1ld7j_49",Ke="_actionRow_1ld7j_50",Ge="_copyRow_1ld7j_51",Ye="_buttonRow_1ld7j_52",We="_segmented_1ld7j_59",Ve="_segmentedActive_1ld7j_83",Ze="_filterLabel_1ld7j_88",qe="_commandButton_1ld7j_106",Xe="_primaryButton_1ld7j_107",Je="_iconButton_1ld7j_108",Qe="_grid_1ld7j_154",es="_assetCard_1ld7j_160",ss="_assetCardSelected_1ld7j_174",ts="_thumbnailWrap_1ld7j_179",as="_thumbnail_1ld7j_179",ls="_thumbnailFallback_1ld7j_195",ns="_assetCardBody_1ld7j_206",os="_assetName_1ld7j_213",is="_assetMeta_1ld7j_221",cs="_statusChip_1ld7j_228",rs="_categoryPill_1ld7j_229",ds="_status_uploaded_1ld7j_242",us="_status_failed_1ld7j_247",ps="_status_processing_1ld7j_252",hs="_status_uploading_1ld7j_253",ms="_assetId_1ld7j_258",gs="_scopeText_1ld7j_259",ys="_muted_1ld7j_260",xs="_emptyState_1ld7j_265",js="_notice_1ld7j_266",_s="_errorState_1ld7j_267",bs="_messageState_1ld7j_268",vs="_proNotice_1ld7j_298",fs="_drawer_1ld7j_314",Cs="_settingsDrawer_1ld7j_328",Ns="_detailPopupLayer_1ld7j_332",ks="_detailDialog_1ld7j_348",ws="_detailDialogHeader_1ld7j_365",Ss="_detailTitleBlock_1ld7j_376",As="_detailEyebrow_1ld7j_398",Ps="_detailHeaderActions_1ld7j_407",Is="_detailDialogBody_1ld7j_415",Bs="_detailPreviewPane_1ld7j_424",Rs="_detailPreview_1ld7j_424",Ls="_detailPreviewFallback_1ld7j_436",$s="_detailContentPane_1ld7j_463",Es="_formStack_1ld7j_469",Us="_drawerHeader_1ld7j_473",Ds="_preview_1ld7j_492",Ms="_previewFallback_1ld7j_493",Fs="_detailSection_1ld7j_520",Ts="_noticeList_1ld7j_521",Os="_settingsPanel_1ld7j_522",Hs="_field_1ld7j_539",zs="_twoColumn_1ld7j_559",Ks="_detailGrid_1ld7j_576",Gs="_compactMeta_1ld7j_577",Ys="_hashText_1ld7j_604",Ws="_usageList_1ld7j_608",Vs="_usageItem_1ld7j_614",Zs="_toggleRow_1ld7j_641",qs="_inlineHelp_1ld7j_655",t={page:Fe,headerRow:Te,headerMeta:Oe,toolbar:He,toolbarActions:ze,actionRow:Ke,copyRow:Ge,buttonRow:Ye,segmented:We,segmentedActive:Ve,filterLabel:Ze,commandButton:qe,primaryButton:Xe,iconButton:Je,grid:Qe,assetCard:es,assetCardSelected:ss,thumbnailWrap:ts,thumbnail:as,thumbnailFallback:ls,assetCardBody:ns,assetName:os,assetMeta:is,statusChip:cs,categoryPill:rs,status_uploaded:ds,status_failed:us,status_processing:ps,status_uploading:hs,assetId:ms,scopeText:gs,muted:ys,emptyState:xs,notice:js,errorState:_s,messageState:bs,proNotice:vs,drawer:fs,settingsDrawer:Cs,detailPopupLayer:Ns,detailDialog:ks,detailDialogHeader:ws,detailTitleBlock:Ss,detailEyebrow:As,detailHeaderActions:Ps,detailDialogBody:Is,detailPreviewPane:Bs,detailPreview:Rs,detailPreviewFallback:Ls,detailContentPane:$s,formStack:Es,drawerHeader:Us,preview:Ds,previewFallback:Ms,detailSection:Fs,noticeList:Ts,settingsPanel:Os,field:Hs,twoColumn:zs,detailGrid:Ks,compactMeta:Gs,hashText:Ys,usageList:Ws,usageItem:Vs,toggleRow:Zs,inlineHelp:qs},Xs={image:de,decal:be,audio:je,mesh:fe,model:re,video:Se,animation:Ne};function B(e,l){return l(`assets.category.${e}`,e)}function z(e,l){return l(`assets.status.${e}`,e)}function Js(e){return e.category==="image"||e.category==="decal"}function Qs({assets:e,selectedAssetId:l,onSelect:u}){const{t:a}=E();return e.length===0?s.jsxs("div",{className:t.emptyState,children:[s.jsx("p",{children:a("assets.empty.title","No assets yet")}),s.jsx("span",{children:a("assets.empty.body","Choose a scope and category, then rescan that inbox folder.")})]}):s.jsx("div",{className:t.grid,children:e.map(n=>{const _=Xs[n.category];return s.jsxs("button",{type:"button",className:[t.assetCard,l===n.id?t.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>u(n.id),children:[s.jsx("span",{className:t.thumbnailWrap,children:Js(n)?s.jsx("img",{className:t.thumbnail,src:Me(n),alt:n.displayName,loading:"lazy"}):s.jsx("span",{className:t.thumbnailFallback,"aria-hidden":"true",children:s.jsx(_,{size:30})})}),s.jsxs("span",{className:t.assetCardBody,children:[s.jsx("span",{className:t.assetName,children:n.displayName}),s.jsxs("span",{className:t.assetMeta,children:[s.jsx("span",{className:t.categoryPill,children:B(n.category,a)}),s.jsx("span",{className:`${t.statusChip} ${t[`status_${n.status}`]??""}`,children:z(n.status,a)})]}),s.jsxs("span",{className:t.assetMeta,children:[s.jsx("span",{className:t.scopeText,children:n.scope.kind==="shared"?a("assets.scope.shared","Shared"):a("assets.scope.place","Current Place")}),s.jsx("span",{className:t.assetId,children:n.roblox.assetId?`#${n.roblox.assetId}`:a("assets.status.localOnly","Local only")})]})]})]},n.id)})})}function et(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function st(e){return e.category==="image"||e.category==="decal"}function tt({asset:e,busyAction:l,canUpload:u,onClose:a,onSave:n,onUpload:_,onRefreshStatus:p,onScanUsage:m}){const{t:o}=E(),f=i.useRef(null),[g,k]=i.useState(""),[y,C]=i.useState("");if(i.useEffect(()=>{k((e==null?void 0:e.displayName)??""),C((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{var c;if(!e)return;(c=f.current)==null||c.focus();const d=b=>{b.key==="Escape"&&a()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,a]),!e)return null;const P=e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath),x=!!e.roblox.assetUri;return s.jsx("div",{className:t.detailPopupLayer,onClick:a,role:"presentation",children:s.jsxs("section",{ref:f,className:t.detailDialog,role:"dialog","aria-modal":"true","aria-label":o("assets.detail.title","Asset details"),tabIndex:-1,onClick:d=>d.stopPropagation(),children:[s.jsxs("div",{className:t.detailDialogHeader,children:[s.jsxs("div",{className:t.detailTitleBlock,children:[s.jsxs("span",{className:t.detailEyebrow,children:[B(e.category,o)," · ",z(e.status,o)]}),s.jsx("h2",{children:o("assets.detail.title","Asset details")}),s.jsx("span",{children:e.id})]}),s.jsxs("div",{className:t.detailHeaderActions,children:[s.jsx(R,{text:u?o("assets.upload.open.tooltip","Upload this local file to Roblox with the saved API key."):o("assets.proOnly.tooltip","Roblox upload is available on Pro."),children:s.jsxs("button",{type:"button",className:t.commandButton,disabled:!u,onClick:_,children:[s.jsx(q,{size:15}),o("assets.upload.open","Upload")]})}),s.jsxs("button",{type:"button",className:t.commandButton,disabled:!P||l==="status-refresh",onClick:()=>void p(),children:[s.jsx(Z,{size:15}),o("assets.detail.refreshStatus","Refresh")]}),s.jsxs("button",{type:"button",className:t.commandButton,disabled:!e.roblox.assetId||l==="usage-scan",onClick:()=>void m(),children:[s.jsx(Pe,{size:15}),o("assets.detail.scanUsage","Scan usage")]}),s.jsx(R,{text:o("common.close","Close"),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:a,"aria-label":o("common.close","Close"),children:s.jsx(K,{size:16})})})]})]}),s.jsxs("div",{className:t.detailDialogBody,children:[s.jsx("div",{className:t.detailPreviewPane,children:st(e)?s.jsx("img",{className:t.detailPreview,src:Q(e),alt:e.displayName}):s.jsxs("div",{className:t.detailPreviewFallback,children:[s.jsx("span",{children:B(e.category,o)}),s.jsx("code",{children:e.file.original})]})}),s.jsxs("div",{className:t.detailContentPane,children:[s.jsxs("div",{className:t.formStack,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:o("assets.detail.displayName","Display name")}),s.jsx("input",{value:g,onChange:d=>k(d.target.value)})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:o("assets.detail.description","Description")}),s.jsx("textarea",{value:y,rows:3,onChange:d=>C(d.target.value)})]}),s.jsx("button",{type:"button",className:t.primaryButton,disabled:l==="update",onClick:()=>void n(g,y),children:o("assets.detail.save","Save metadata")})]}),s.jsxs("section",{className:t.detailSection,children:[s.jsx("h3",{children:o("assets.detail.localFile","Local file")}),s.jsxs("dl",{className:t.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.category","Category")}),s.jsx("dd",{children:B(e.category,o)}),s.jsx("dt",{children:o("assets.detail.scope","Scope")}),s.jsx("dd",{children:e.scope.kind==="shared"?o("assets.scope.shared","Shared"):o("assets.scope.place","Current Place")}),s.jsx("dt",{children:o("assets.detail.mimeType","Type")}),s.jsx("dd",{children:e.file.mimeType}),s.jsx("dt",{children:o("assets.detail.size","Size")}),s.jsx("dd",{children:et(e.file.sizeBytes)}),s.jsx("dt",{children:o("assets.detail.source","Source")}),s.jsx("dd",{children:e.source.originalPath}),s.jsx("dt",{children:o("assets.detail.sha256","SHA-256")}),s.jsx("dd",{className:t.hashText,children:e.file.sha256})]})]}),s.jsxs("section",{className:t.detailSection,children:[s.jsx("h3",{children:o("assets.detail.roblox","Roblox")}),s.jsxs("dl",{className:t.detailGrid,children:[s.jsx("dt",{children:o("assets.detail.status","Status")}),s.jsx("dd",{children:z(e.status,o)}),s.jsx("dt",{children:o("assets.detail.assetId","Asset ID")}),s.jsx("dd",{children:e.roblox.assetId??o("assets.status.localOnly","Local only")}),e.roblox.errorMessage&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:o("assets.detail.error","Error")}),s.jsx("dd",{children:e.roblox.errorMessage})]})]}),s.jsxs("div",{className:t.copyRow,children:[s.jsxs("button",{type:"button",className:t.commandButton,disabled:!e.roblox.assetId,onClick:()=>{var d;return e.roblox.assetId&&void((d=navigator.clipboard)==null?void 0:d.writeText(e.roblox.assetId))},children:[s.jsx(V,{size:15}),o("assets.detail.copyAssetId","Copy ID")]}),s.jsxs("button",{type:"button",className:t.commandButton,disabled:!x,onClick:()=>{var d;return e.roblox.assetUri&&void((d=navigator.clipboard)==null?void 0:d.writeText(e.roblox.assetUri))},children:[s.jsx(V,{size:15}),o("assets.detail.copyUri","Copy URI")]})]})]}),s.jsxs("section",{className:t.detailSection,children:[s.jsx("h3",{children:o("assets.detail.usedInPlace","Used in this Place")}),e.usage.references.length===0?s.jsx("p",{className:t.muted,children:o("assets.detail.noUsage","No local sync references found yet.")}):s.jsx("div",{className:t.usageList,children:e.usage.references.map((d,c)=>s.jsxs("div",{className:t.usageItem,children:[s.jsx("strong",{children:d.kind==="property"?d.instancePath:d.filePath}),s.jsx("span",{children:d.property??o("assets.detail.line","line {line}").replace("{line}",String(d.line??"-"))}),s.jsx("code",{children:d.value})]},`${d.kind}-${c}`))})]})]})]})]})})}function at(e){return e.category==="image"||e.category==="decal"}function lt({asset:e,open:l,canUpload:u,busyAction:a,onClose:n,onBack:_,onUpload:p}){const{t:m}=E(),o=i.useRef(null),[f,g]=i.useState(""),[k,y]=i.useState(""),[C,P]=i.useState("user"),[x,d]=i.useState("");return i.useEffect(()=>{g((e==null?void 0:e.displayName)??""),y((e==null?void 0:e.description)??""),d("")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{var b;if(!l||!e)return;(b=o.current)==null||b.focus();const c=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,n,l]),!l||!e?null:s.jsx("div",{className:t.detailPopupLayer,onClick:n,role:"presentation",children:s.jsxs("section",{ref:o,className:t.detailDialog,role:"dialog","aria-modal":"true","aria-label":m("assets.upload.title","Upload asset"),tabIndex:-1,onClick:c=>c.stopPropagation(),children:[s.jsxs("div",{className:t.detailDialogHeader,children:[s.jsxs("div",{className:t.detailTitleBlock,children:[s.jsxs("span",{className:t.detailEyebrow,children:[B(e.category,m)," · ",m("assets.upload.intent","Upload to Roblox")]}),s.jsx("h2",{children:m("assets.upload.title","Upload asset")}),s.jsx("span",{children:e.displayName})]}),s.jsxs("div",{className:t.detailHeaderActions,children:[s.jsxs("button",{type:"button",className:t.commandButton,onClick:_,children:[s.jsx(ye,{size:15}),m("assets.upload.backToDetails","Back to details")]}),s.jsx(R,{text:m("common.close","Close"),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:n,"aria-label":m("common.close","Close"),children:s.jsx(K,{size:16})})})]})]}),s.jsxs("div",{className:t.detailDialogBody,children:[s.jsx("div",{className:t.detailPreviewPane,children:at(e)?s.jsx("img",{className:t.detailPreview,src:Q(e),alt:e.displayName}):s.jsxs("div",{className:t.detailPreviewFallback,children:[s.jsx("span",{children:B(e.category,m)}),s.jsx("code",{children:e.file.original})]})}),s.jsxs("div",{className:t.detailContentPane,children:[!u&&s.jsx("div",{className:t.notice,children:m("assets.proOnly.upload","Roblox upload is available on Pro.")}),s.jsxs("dl",{className:t.compactMeta,children:[s.jsx("dt",{children:m("assets.detail.category","Category")}),s.jsx("dd",{children:B(e.category,m)}),s.jsx("dt",{children:m("assets.detail.source","Source")}),s.jsx("dd",{children:e.source.originalPath})]}),s.jsxs("div",{className:t.formStack,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.detail.displayName","Display name")}),s.jsx("input",{value:f,disabled:!u,onChange:c=>g(c.target.value)})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.detail.description","Description")}),s.jsx("textarea",{value:k,rows:3,disabled:!u,onChange:c=>y(c.target.value)})]}),s.jsxs("div",{className:t.twoColumn,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.upload.creatorType","Creator type")}),s.jsxs("select",{value:C,disabled:!u,onChange:c=>P(c.target.value),children:[s.jsx("option",{value:"user",children:m("assets.creator.user","User")}),s.jsx("option",{value:"group",children:m("assets.creator.group","Group")})]})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:m("assets.upload.creatorId","Creator ID")}),s.jsx("input",{value:x,disabled:!u,onChange:c=>d(c.target.value)})]})]}),s.jsx("button",{type:"button",className:t.primaryButton,disabled:!u||a==="upload",onClick:()=>{const c=x.trim();p({displayName:f,description:k,...c?{creatorType:C,creatorId:c}:{}})},children:a==="upload"?m("assets.upload.uploading","Uploading..."):m("assets.upload.submit","Upload with API Key")})]}),s.jsxs("div",{className:t.noticeList,children:[s.jsx("p",{children:m("assets.upload.noDelete","WEPPY does not provide Roblox asset deletion.")}),s.jsx("p",{children:m("assets.upload.delay","Roblox processing and moderation can delay visibility in Studio or Creator Dashboard.")})]})]})]})]})})}function ee(e){return{assetUploadByOpenCloudEnabled:e.hot.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD===!0}}function nt(e){const l={};return typeof e.assetUploadByOpenCloudEnabled=="boolean"&&(l.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD=e.assetUploadByOpenCloudEnabled),l}async function ot(){const e=await w.get("/api/dashboard/settings");return ee(e)}async function it(e){const l=await w.patch("/api/dashboard/settings",nt(e));return ee(l)}async function ct(){return w.get("/api/dashboard/open-cloud/credential")}async function rt(e){return w.put("/api/dashboard/open-cloud/credential",e)}async function dt(e){return w.patch("/api/dashboard/open-cloud/credential/default-creator",e)}async function ut(e){return w.post("/api/dashboard/open-cloud/credential/test",e?{apiKey:e}:{})}async function pt(){return w.delete("/api/dashboard/open-cloud/credential")}function ht(e,l){return e!=null&&e.configured?e.storageProvider==="env"?l("assets.settings.credential.env","Environment variable"):e.maskedKey??l("assets.settings.credential.local","Local encrypted file"):l("assets.settings.credential.none","No API key saved")}function mt({open:e,tier:l,onClose:u}){const{t:a}=E(),[n,_]=i.useState(null),[p,m]=i.useState(null),[o,f]=i.useState(""),[g,k]=i.useState("user"),[y,C]=i.useState(""),[P,x]=i.useState(null),[d,c]=i.useState(!1),b=l==="basic",N=i.useCallback(async()=>{c(!0),x(null);try{const[r,j]=await Promise.all([ot(),ct()]);_(r),m(j.credential),j.credential.creatorType&&k(j.credential.creatorType),j.credential.creatorId&&C(j.credential.creatorId)}catch(r){x(r instanceof Error?r.message:a("assets.settings.loadFailed","Failed to load upload settings."))}finally{c(!1)}},[a]);if(i.useEffect(()=>{e&&N()},[N,e]),!e)return null;const F=(n==null?void 0:n.assetUploadByOpenCloudEnabled)===!0;return s.jsxs("aside",{className:`${t.drawer} ${t.settingsDrawer}`,"aria-label":a("assets.settings.title","Asset Library settings"),children:[s.jsxs("div",{className:t.drawerHeader,children:[s.jsxs("div",{children:[s.jsx("h2",{children:a("assets.settings.title","Asset Library settings")}),s.jsx("span",{children:ht(p,a)})]}),s.jsx(R,{text:a("common.close","Close"),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:u,"aria-label":a("common.close","Close"),children:s.jsx(K,{size:16})})})]}),b&&s.jsx("div",{className:`${t.notice} ${t.proNotice}`,children:a("assets.settings.proOnly","Roblox upload settings and Open Cloud credential controls are available on Pro.")}),s.jsxs("section",{className:t.settingsPanel,children:[s.jsxs("label",{className:t.toggleRow,children:[s.jsxs("span",{children:[s.jsx("strong",{children:a("assets.settings.openCloudToggle","API Key local upload")}),s.jsx("small",{children:a("assets.settings.openCloudToggle.help","Controls whether server-side Open Cloud upload mutations can run.")})]}),s.jsx("input",{type:"checkbox",checked:F,disabled:b||d,onChange:r=>{(async()=>{c(!0);try{const j=await it({assetUploadByOpenCloudEnabled:r.target.checked});_(j),x(a("assets.settings.saved","Upload settings saved."))}catch(j){x(j instanceof Error?j.message:a("assets.settings.saveFailed","Failed to save upload settings."))}finally{c(!1)}})()}})]}),s.jsxs("div",{className:t.formStack,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:a("assets.settings.apiKey","Open Cloud API Key")}),s.jsx("input",{value:o,type:"password",disabled:b||d,onChange:r=>f(r.target.value)})]}),!(p!=null&&p.configured)&&s.jsx("p",{className:t.inlineHelp,children:s.jsx("a",{href:"https://create.roblox.com/docs/cloud/auth/api-keys",target:"_blank",rel:"noreferrer",children:a("assets.settings.apiKeyGuide","Create a Roblox API key with Assets API permissions.")})}),s.jsxs("div",{className:t.buttonRow,children:[s.jsx("button",{type:"button",className:t.commandButton,disabled:b||d||!o.trim(),onClick:()=>{(async()=>{c(!0);try{const r=await rt({apiKey:o.trim(),...y.trim()?{creatorType:g,creatorId:y.trim()}:{}});m(r.credential),f(""),x(r.message??a("assets.settings.saved","Upload settings saved."))}catch(r){x(r instanceof Error?r.message:a("assets.settings.saveFailed","Failed to save upload settings."))}finally{c(!1)}})()},children:a("assets.settings.saveApiKey","Save API Key")}),s.jsx("button",{type:"button",className:t.commandButton,disabled:b||d,onClick:()=>{(async()=>{var r;c(!0);try{const j=await ut(o.trim()||void 0);m(j.credential),x(((r=j.validation)==null?void 0:r.message)??a("assets.settings.tested","Connection tested."))}catch(j){x(j instanceof Error?j.message:a("assets.settings.testFailed","Connection test failed."))}finally{c(!1)}})()},children:a("assets.settings.testConnection","Test Connection")}),s.jsx("button",{type:"button",className:t.commandButton,disabled:b||d,onClick:()=>{(async()=>{c(!0);try{const r=await pt();m(r.credential),x(r.message??a("assets.settings.removed","API key removed."))}catch(r){x(r instanceof Error?r.message:a("assets.settings.removeFailed","Failed to remove API key."))}finally{c(!1)}})()},children:a("assets.settings.removeApiKey","Remove API Key")})]})]}),s.jsxs("div",{className:t.twoColumn,children:[s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:a("assets.upload.creatorType","Creator type")}),s.jsxs("select",{value:g,disabled:b||d||(p==null?void 0:p.storageProvider)==="env",onChange:r=>k(r.target.value),children:[s.jsx("option",{value:"user",children:a("assets.creator.user","User")}),s.jsx("option",{value:"group",children:a("assets.creator.group","Group")})]})]}),s.jsxs("label",{className:t.field,children:[s.jsx("span",{children:a("assets.upload.creatorId","Creator ID")}),s.jsx("input",{value:y,disabled:b||d||(p==null?void 0:p.storageProvider)==="env",onChange:r=>C(r.target.value)})]})]}),!(p!=null&&p.creatorId)&&s.jsx("p",{className:t.inlineHelp,children:a("assets.settings.creatorHelp","Use the numeric user ID from a profile URL or group ID from a group URL.")}),s.jsx("button",{type:"button",className:t.primaryButton,disabled:b||d||(p==null?void 0:p.storageProvider)==="env"||!y.trim(),onClick:()=>{(async()=>{c(!0);try{const r=await dt({creatorType:g,creatorId:y.trim()});m(r.credential),x(r.message??a("assets.settings.saved","Upload settings saved."))}catch(r){x(r instanceof Error?r.message:a("assets.settings.saveFailed","Failed to save upload settings."))}finally{c(!1)}})()},children:a("assets.settings.saveCreator","Save default Creator")})]}),P&&s.jsx("div",{className:t.messageState,children:P})]})}function H(e,l){return e instanceof Error&&e.message.trim().length>0?e.message:l}function gt(e,l){return e.some(a=>a.id===l.id)?e.map(a=>a.id===l.id?l:a):[l,...e]}function yt(e,l){if((l==null?void 0:l.id)===e)return l.category;const u=/^asset_(image|decal|audio|mesh|model|video|animation)_/.exec(e);return u!=null&&u[1]?u[1]:null}function xt(e){if(e.pluginConnected&&e.activePlaceId!==null)return{placeId:e.activePlaceId,placeName:e.activePlaceName};if(e.lastActivePlaceId!==null)return{placeId:e.lastActivePlaceId,placeName:e.lastActivePlaceName};const l=e.places[0];return{placeId:(l==null?void 0:l.placeId)??null,placeName:(l==null?void 0:l.placeName)??null}}function jt(){const[e,l]=i.useState([]),[u,a]=i.useState(0),[n,_]=i.useState(null),[p,m]=i.useState("place"),[o,f]=i.useState("all"),[g,k]=i.useState(null),[y,C]=i.useState(null),[P,x]=i.useState(!0),[d,c]=i.useState(null),[b,N]=i.useState(null),[F,r]=i.useState(null),j=i.useMemo(()=>e.find(h=>h.id===n)??null,[e,n]),Y=i.useCallback(()=>({scope:p,placeId:p==="place"?g:void 0}),[g,p]),U=i.useCallback(h=>({...Y(),category:h}),[Y]),W=i.useCallback(async()=>{try{const h=await ue(),v=xt(h);return k(v.placeId),C(v.placeName),v.placeId}catch{return k(null),C(null),null}},[]),T=i.useCallback(async()=>{N(null);try{const h=await W(),v={scope:p,placeId:p==="place"?h:void 0};if(p==="place"&&h===null){l([]),a(0),x(!1),N("No active place is connected for place-scoped assets.");return}const S=o==="all"?await Re(v):await J({...v,category:o});l(S.assets),a(S.totalCount)}catch(h){N(H(h,"Failed to load Asset Library."))}finally{x(!1)}},[o,W,p]);i.useEffect(()=>{T()},[T]);const I=i.useCallback(async(h,v,S)=>{const O=yt(v,j);if(!O)return N("Asset category is unavailable."),null;c(h),N(null),r(null);try{const $=await S(U(O));return l(ce=>gt(ce,$)),_($.id),r("Asset Library updated."),$}catch($){return N(H($,"Asset Library action failed.")),null}finally{c(null)}},[U,j]),se=i.useCallback(async()=>{if(o==="all"){N("Choose a category before rescanning inbox files.");return}c("rescan"),N(null),r(null);try{const h=await Le(U(o));l(h.assets),a(h.totalCount),r(`${h.adoptedCount} asset(s) added, ${h.skippedCount} skipped.`)}catch(h){N(H(h,"Asset Library rescan failed."))}finally{c(null)}},[o,U]),te=i.useCallback((h,v)=>I("update",h,S=>$e(S,h,v)),[I]),ae=i.useCallback((h,v)=>I("upload",h,S=>Ee(S,h,v)),[I]),le=i.useCallback(h=>I("status-refresh",h,v=>Ue(v,h)),[I]),ne=i.useCallback((h,v)=>I("usage-scan",h,async S=>(await De(S,h,v)).asset),[I]),oe=i.useCallback(h=>{m(h),_(null)},[]),ie=i.useCallback(h=>{f(h),_(null)},[]);return{assets:e,totalCount:u,selectedAsset:j,selectedAssetId:n,scope:p,categoryFilter:o,activePlaceId:g,activePlaceName:y,loading:P,busyAction:d,error:b,lastMessage:F,setScope:oe,setCategoryFilter:ie,selectAsset:_,refresh:T,rescan:se,updateMetadata:te,uploadAsset:ae,refreshStatus:le,scanUsage:ne}}const _t=["all","image","decal","audio","mesh","model","video","animation"];function Ct(){const{t:e}=E(),{trackEvent:l}=pe(),{tier:u,loading:a}=he(),n=jt(),[_,p]=i.useState(!1),[m,o]=i.useState(!1),f=!a&&u==="pro",g=n.selectedAsset,k=i.useMemo(()=>n.scope==="place"?n.activePlaceName??e("assets.scope.place","Current Place"):e("assets.scope.shared","Shared"),[n.activePlaceName,n.scope,e]);return s.jsxs("div",{className:t.page,children:[s.jsxs("div",{className:t.headerRow,children:[s.jsxs("div",{children:[s.jsx("h1",{children:e("assets.title","Assets")}),s.jsx("p",{children:e("assets.subtitle","Browse local originals, upload to Roblox, and inspect synced usage by place.")})]}),s.jsxs("div",{className:t.headerMeta,children:[s.jsx("span",{children:k}),s.jsx("strong",{children:n.totalCount})]})]}),s.jsxs("div",{className:t.toolbar,children:[s.jsxs("div",{className:t.segmented,role:"group","aria-label":e("assets.scope.label","Asset scope"),children:[s.jsx("button",{type:"button",className:n.scope==="place"?t.segmentedActive:"",onClick:()=>n.setScope("place"),children:e("assets.scope.place","Current Place")}),s.jsx("button",{type:"button",className:n.scope==="shared"?t.segmentedActive:"",onClick:()=>n.setScope("shared"),children:e("assets.scope.shared","Shared")})]}),s.jsxs("label",{className:t.filterLabel,children:[s.jsx("span",{children:e("assets.category.filter","Category")}),s.jsx("select",{value:n.categoryFilter,onChange:y=>n.setCategoryFilter(y.target.value),children:_t.map(y=>s.jsx("option",{value:y,children:y==="all"?e("assets.category.all","All"):B(y,e)},y))})]}),s.jsxs("div",{className:t.toolbarActions,children:[s.jsx(R,{text:n.categoryFilter==="all"?e("assets.rescan.chooseCategory","Choose a category before rescanning."):e("assets.rescan.tooltip","Scan the selected inbox folder."),children:s.jsxs("button",{type:"button",className:t.commandButton,disabled:n.categoryFilter==="all"||n.busyAction==="rescan",onClick:()=>{l("dashboard_click_event",{click_target:"assets_rescan",page:"assets"}),n.rescan()},children:[s.jsx(Z,{size:15}),e("assets.rescan","Rescan")]})}),s.jsx(R,{text:g?e("assets.upload.open.tooltip","Upload this local file to Roblox with the saved API key."):e("assets.upload.selectFirst","Select an asset first."),children:s.jsxs("button",{type:"button",className:t.commandButton,disabled:!g||!f,onClick:()=>{l("dashboard_click_event",{click_target:"assets_upload_open",page:"assets"}),p(!0)},children:[s.jsx(q,{size:15}),e("assets.upload.open","Upload")]})}),s.jsx(R,{text:e("assets.settings.open.tooltip","Open Roblox upload settings."),children:s.jsx("button",{type:"button",className:t.iconButton,onClick:()=>{l("dashboard_click_event",{click_target:"assets_open_settings",page:"assets"}),o(!0)},"aria-label":e("assets.settings.open","Open settings"),children:s.jsx(me,{size:16})})})]})]}),n.error&&s.jsx("div",{className:t.errorState,children:n.error}),n.lastMessage&&s.jsx("div",{className:t.messageState,children:n.lastMessage}),!f&&!a&&s.jsx("div",{className:`${t.notice} ${t.proNotice}`,children:e("assets.basic.notice","Browse, preview, edit metadata, and scan usage on Basic. Roblox upload controls are available on Pro.")}),n.loading?s.jsx("div",{className:t.emptyState,children:e("common.loading","Loading...")}):s.jsx(Qs,{assets:n.assets,selectedAssetId:n.selectedAssetId,onSelect:n.selectAsset}),s.jsx(tt,{asset:_?null:g,busyAction:n.busyAction,canUpload:f,onClose:()=>n.selectAsset(null),onSave:async(y,C)=>{g&&await n.updateMetadata(g.id,{displayName:y,description:C})},onUpload:()=>p(!0),onRefreshStatus:async()=>{g&&await n.refreshStatus(g.id)},onScanUsage:async()=>{g&&(l("dashboard_click_event",{click_target:"assets_usage_scan",page:"assets"}),await n.scanUsage(g.id,n.activePlaceId??void 0))}}),s.jsx(lt,{asset:g,open:_,canUpload:f,busyAction:n.busyAction,onClose:()=>{p(!1),n.selectAsset(null)},onBack:()=>p(!1),onUpload:async y=>{if(!g)return;l("dashboard_click_event",{click_target:"assets_upload_submit",page:"assets"}),await n.uploadAsset(g.id,y)&&p(!1)}}),s.jsx(mt,{open:m,tier:u,onClose:()=>o(!1)})]})}export{Ct as Component};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{q as xe,s as q,v as Le,r as p,u as D,j as t,i as H,R as $e,T as Se,l as Ee,w as He}from"./index-BIVkyPD7.js";import{I as B}from"./InfoLabel-BkXtpBzT.js";import{T as y}from"./TooltipText-59Xfc1Ui.js";import{D as se,c as oe,e as Oe,g as Fe,h as Ue,i as le,j as je,k as ze,l as ce,d as qe}from"./sample-requests-DyHFY41o.js";import{X as Ve}from"./x-sRJSvoLm.js";import{T as We}from"./Tabs-B4kZyHzy.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 Ke=[["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"}]],Qe=xe("camera",Ke);/**
|
|
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 Ye=[["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"}]],Je=xe("ellipsis",Ye);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 Xe(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 Ze(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:Xe(e),image:e.image}}function et(e){const i=e.check_results??e.lint_results??[];return{...ve(e),check_results:i.map(Ze),image_url:e.image_url,meta:e.meta}}async function de(e,i){const a=new URLSearchParams;i!==void 0&&a.set("limit",String(i));const o=a.toString()?`?${a.toString()}`:"",l=await we(`/api/ui-studio/snapshots${o}`);return{...l,snapshots:l.snapshots.map(ve)}}async function tt(e,i){const a=i!==void 0?`?placeId=${i}`:"",o=await we(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${a}`);return et(o)}function be(e,i){const a=i!==void 0?`?placeId=${i}`:"";return`${q}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${a}`}const it=1e4;function Ce(e=50){const[i,a]=p.useState(null),[o,l]=p.useState(!0),[r,n]=p.useState(null),g=p.useCallback(async()=>{try{const d=await de(void 0,e);a(d),n(null)}catch(d){n(d instanceof Error?d.message:String(d))}finally{l(!1)}},[e]);return p.useEffect(()=>{let d=!1;const _=async()=>{try{const h=await de(void 0,e);d||(a(h),n(null))}catch(h){d||n(h instanceof Error?h.message:String(h))}finally{d||l(!1)}};_();const m=setInterval(()=>{_()},it);return()=>{d=!0,clearInterval(m)}},[e]),{data:i,loading:o,error:r,refresh:g}}const at="_page_1fjjw_2",rt="_grid_1fjjw_9",st="_card_1fjjw_16",nt="_cardBodyButton_1fjjw_31",ot="_thumb_1fjjw_43",lt="_badges_1fjjw_52",ct="_priorityHighBadge_1fjjw_60",dt="_priorityMediumBadge_1fjjw_69",ut="_priorityLowBadge_1fjjw_78",ht="_cardMeta_1fjjw_87",pt="_target_1fjjw_93",gt="_time_1fjjw_100",mt="_drawer_1fjjw_105",_t="_drawerToolbar_1fjjw_122",yt="_drawerTitleBlock_1fjjw_133",ft="_drawerEyebrow_1fjjw_140",xt="_drawerTarget_1fjjw_149",St="_drawerToolbarActions_1fjjw_159",jt="_closeBtn_1fjjw_167",wt="_detailBody_1fjjw_188",vt="_screenshotPreviewFrame_1fjjw_195",bt="_fullImg_1fjjw_208",Ct="_metaDl_1fjjw_215",It="_errorMsg_1fjjw_227",Nt="_suggestionsWrap_1fjjw_232",Pt="_prioritySection_1fjjw_239",kt="_sectionHighHeader_1fjjw_243",Tt="_sectionLowHeader_1fjjw_249",Bt="_sectionMediumHeader_1fjjw_255",Dt="_groupCard_1fjjw_261",Gt="_groupHeader_1fjjw_268",Mt="_groupLabel_1fjjw_284",At="_groupCount_1fjjw_289",Rt="_groupChevron_1fjjw_296",Lt="_groupBody_1fjjw_300",$t="_groupDescription_1fjjw_303",Et="_groupFix_1fjjw_308",Ht="_falsePositive_1fjjw_317",Ot="_itemList_1fjjw_325",Ft="_suggestionItem_1fjjw_333",Ut="_suggestionInfo_1fjjw_343",zt="_pathBreadcrumb_1fjjw_349",qt="_currentValue_1fjjw_358",Vt="_copyFixBtn_1fjjw_362",Wt="_emptySuggestions_1fjjw_376",Kt="_sampleBanner_1fjjw_384",Qt="_sampleBannerRow_1fjjw_397",Yt="_sampleBannerMain_1fjjw_405",Jt="_sampleBadge_1fjjw_413",Xt="_sampleTitle_1fjjw_423",Zt="_sampleMessage_1fjjw_430",ei="_sampleActions_1fjjw_437",ti="_primaryAction_1fjjw_445",ii="_secondaryAction_1fjjw_446",ai="_emptyState_1fjjw_481",ri="_pluginGuideCard_1fjjw_489",si="_pluginGuideMarker_1fjjw_500",ni="_pluginGuideBody_1fjjw_515",oi="_pluginGuideTitle_1fjjw_519",li="_pluginGuideMessage_1fjjw_527",ci="_pluginGuideChecklist_1fjjw_534",di="_pluginGuideWaiting_1fjjw_557",ui="_pluginGuideDot_1fjjw_566",hi="_analysisWorkspace_1fjjw_574",pi="_analysisMainColumn_1fjjw_579",gi="_analysisDetailPopupLayer_1fjjw_583",mi="_analysisDetailDialog_1fjjw_600",_i="_analysisSummaryPanel_1fjjw_619",yi="_recentCapturesHeader_1fjjw_632",fi="_analysisSummaryText_1fjjw_639",xi="_recentCapturesMeta_1fjjw_640",Si="_analysisReportGrid_1fjjw_646",ji="_analysisReportGroup_1fjjw_653",wi="_analysisReportCard_1fjjw_657",vi="_analysisReportThumb_1fjjw_679",bi="_analysisReportBody_1fjjw_688",Ci="_analysisReportTopline_1fjjw_695",Ii="_analysisVerdict_1fjjw_702",Ni="_analysisVerdict_needsFix_1fjjw_713",Pi="_analysisVerdict_review_1fjjw_714",ki="_analysisVerdict_passed_1fjjw_719",Ti="_analysisReportCounts_1fjjw_724",Bi="_analysisReportTarget_1fjjw_729",Di="_analysisReportIssue_1fjjw_738",Gi="_analysisReportMeta_1fjjw_744",Mi="_analysisChildList_1fjjw_751",Ai="_analysisChildRow_1fjjw_762",Ri="_analysisChildPath_1fjjw_783",Li="_analysisChildSummary_1fjjw_792",$i="_analysisChildDetailHint_1fjjw_793",Ei="_drawerAnalysisSummary_1fjjw_802",Hi="_drawerAnalysisSummaryItem_1fjjw_813",Oi="_drawerAnalysisLabel_1fjjw_820",Fi="_drawerAnalysisCounts_1fjjw_826",Ui="_drawerAnalysisValue_1fjjw_827",zi="_recentCapturesSection_1fjjw_832",qi="_drawerPrimaryActions_1fjjw_844",Vi="_drawerActionBtn_1fjjw_851",Wi="_drawerMoreMenu_1fjjw_880",Ki="_drawerMoreButton_1fjjw_885",Qi="_drawerMoreMenuBody_1fjjw_910",Yi="_drawerMenuItem_1fjjw_923",Ji="_drawerMenuItemDanger_1fjjw_946",Xi="_actionErrMsg_1fjjw_955",Zi="_actionStatusMsg_1fjjw_964",ea="_actionStatus_info_1fjjw_978",ta="_actionStatus_success_1fjjw_984",ia="_actionStatus_warning_1fjjw_990",aa="_actionStatusDetail_1fjjw_996",ra="_galleryHeader_1fjjw_1002",sa="_cardChecked_1fjjw_1015",na="_cardCheckbox_1fjjw_1022",oa="_captureSelectionActions_1fjjw_1062",la="_selectionToolbar_1fjjw_1071",ca="_selectionBar_1fjjw_1072",da="_selectionToolbarCount_1fjjw_1091",ua="_selectionToolbarActions_1fjjw_1098",ha="_selectionBarBtn_1fjjw_1105",pa="_selectionBarBtnDanger_1fjjw_1126",s={page:at,grid:rt,card:st,cardBodyButton:nt,thumb:ot,badges:lt,priorityHighBadge:ct,priorityMediumBadge:dt,priorityLowBadge:ut,cardMeta:ht,target:pt,time:gt,drawer:mt,drawerToolbar:_t,drawerTitleBlock:yt,drawerEyebrow:ft,drawerTarget:xt,drawerToolbarActions:St,closeBtn:jt,detailBody:wt,screenshotPreviewFrame:vt,fullImg:bt,metaDl:Ct,errorMsg:It,suggestionsWrap:Nt,prioritySection:Pt,sectionHighHeader:kt,sectionLowHeader:Tt,sectionMediumHeader:Bt,groupCard:Dt,groupHeader:Gt,groupLabel:Mt,groupCount:At,groupChevron:Rt,groupBody:Lt,groupDescription:$t,groupFix:Et,falsePositive:Ht,itemList:Ot,suggestionItem:Ft,suggestionInfo:Ut,pathBreadcrumb:zt,currentValue:qt,copyFixBtn:Vt,emptySuggestions:Wt,sampleBanner:Kt,sampleBannerRow:Qt,sampleBannerMain:Yt,sampleBadge:Jt,sampleTitle:Xt,sampleMessage:Zt,sampleActions:ei,primaryAction:ti,secondaryAction:ii,emptyState:ai,pluginGuideCard:ri,pluginGuideMarker:si,pluginGuideBody:ni,pluginGuideTitle:oi,pluginGuideMessage:li,pluginGuideChecklist:ci,pluginGuideWaiting:di,pluginGuideDot:ui,analysisWorkspace:hi,analysisMainColumn:pi,analysisDetailPopupLayer:gi,analysisDetailDialog:mi,analysisSummaryPanel:_i,recentCapturesHeader:yi,analysisSummaryText:fi,recentCapturesMeta:xi,analysisReportGrid:Si,analysisReportGroup:ji,analysisReportCard:wi,analysisReportThumb:vi,analysisReportBody:bi,analysisReportTopline:Ci,analysisVerdict:Ii,analysisVerdict_needsFix:Ni,analysisVerdict_review:Pi,analysisVerdict_passed:ki,analysisReportCounts:Ti,analysisReportTarget:Bi,analysisReportIssue:Di,analysisReportMeta:Gi,analysisChildList:Mi,analysisChildRow:Ai,analysisChildPath:Ri,analysisChildSummary:Li,analysisChildDetailHint:$i,drawerAnalysisSummary:Ei,drawerAnalysisSummaryItem:Hi,drawerAnalysisLabel:Oi,drawerAnalysisCounts:Fi,drawerAnalysisValue:Ui,recentCapturesSection:zi,drawerPrimaryActions:qi,drawerActionBtn:Vi,drawerMoreMenu:Wi,drawerMoreButton:Ki,drawerMoreMenuBody:Qi,drawerMenuItem:Yi,drawerMenuItemDanger:Ji,actionErrMsg:Xi,actionStatusMsg:Zi,actionStatus_info:ea,actionStatus_success:ta,actionStatus_warning:ia,actionStatusDetail:aa,galleryHeader:ra,cardChecked:sa,cardCheckbox:na,captureSelectionActions:oa,selectionToolbar:la,selectionBar:ca,selectionToolbarCount:da,selectionToolbarActions:ua,selectionBarBtn:ha,selectionBarBtnDanger:pa};function ga({snapshot:e,placeId:i,onClick:a,imageUrlOverride:o,selectable:l,selected:r,onToggleSelect:n}){var w,C,G;const{t:g}=D(),d=((w=e.design_check_summary)==null?void 0:w.priority_high)??0,_=((C=e.design_check_summary)==null?void 0:C.priority_medium)??0,m=((G=e.design_check_summary)==null?void 0:G.priority_low)??0,h=new Date(e.captured_at*1e3).toLocaleString(),x=o??be(e.snapshot_id,i),j=()=>{n==null||n(e.snapshot_id)};return t.jsxs("div",{className:`${s.card} ${r?s.cardChecked:""}`,children:[l&&t.jsx(y,{text:g("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx("input",{className:s.cardCheckbox,type:"checkbox","aria-label":g("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!r,onChange:j})}),t.jsxs("button",{className:s.cardBodyButton,onClick:I=>a(I.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:[d>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityHighBadge.tooltip","Number of suggestions to review first. Click for details."),children:t.jsx("span",{className:s.priorityHighBadge,children:d})}),_>0&&t.jsx(y,{text:g("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:s.priorityMediumBadge,children:_})}),m>0&&t.jsx(y,{text:g("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 ma={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function _a(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const ya={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 fa(e,i,a){const o=ma[e];return o?{...i,checkLabel:a(`uiStudio.fix.${o}.label`,i.checkLabel),description:a(`uiStudio.fix.${o}.description`,i.description),howToFix:a(`uiStudio.fix.${o}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?a(`uiStudio.fix.${o}.falsePositive`,i.falsePositiveNote):void 0}:i}function xa(e,i){const a=ya[e]??null;return a?i?fa(e,a,i):a:null}function Sa(e){return _a(e)}function ja(e,i){const a=new Map;for(const l of e){const r=`${l.displayPriority}::${l.rule}`,n=a.get(r)??[];n.push(l),a.set(r,n)}const o=[];for(const[l,r]of a){const[n,g]=l.split("::"),d=r.filter(Sa).length;o.push({rule:g??"unknown",priority:n,items:r,fixTemplate:xa(g??"",i),falsePositiveRatio:r.length>0?d/r.length:0})}return o.sort((l,r)=>{const n={priority_high:0,priority_medium:1,priority_low:2};return l.priority!==r.priority?n[l.priority]-n[r.priority]:r.items.length-l.items.length}),{high:o.filter(l=>l.priority==="priority_high"),medium:o.filter(l=>l.priority==="priority_medium"),low:o.filter(l=>l.priority==="priority_low")}}function Ie(e){const i=e.split("."),a=i[i.length-1]??e,o=i[i.length-2],l=o?`${o} > ${a}`:a;return{full:e,breadcrumb:l,leaf:a}}function Ne(e){return typeof e=="object"&&e!==null}function ue(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 wa(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,wa(i))}function F(e,i,a,o,l){const r=e(i,a);return l?`${r}: ${l} · ${o}`:`${r}: ${o}`}function va(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 ba(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 Ca(e,i){return Pe(e,i.design_check_summary)}function Ia({snapshotId:e,placeId:i,onClose:a,sampleDetail:o,tier:l,onActionDone:r}){const[n,g]=p.useState(o??null),[d,_]=p.useState(null),[m,h]=p.useState(null),[x,j]=p.useState(null),[w,C]=p.useState(null),[G,I]=p.useState(null),{t:u}=D(),{trackEvent:P}=H(),A=l==="pro";p.useEffect(()=>{if(o){g(o),_(null);return}let b=!1;return tt(e,i).then(k=>{b||g(k)}).catch(k=>{b||_(k instanceof Error?k.message:String(k))}),()=>{b=!0}},[e,i,o]);const S=async()=>{if(n!=null&&n.target){P("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),C("preview"),j({tone:"info",message:u("uiStudio.actions.previewRunning","캡처 중..."),detail:u("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const b=await oe("preview",{targetPath:n.target});he(b);const k=ue(b),L=V(k,"snapshot_id"),f=Z(k,"screenshot"),M=Z(k,"meta"),T=V(f,"saved_path"),ne=V(M,"persist_warning"),U=pe(u,k);j(ne?{tone:"warning",message:F(u,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",U,L),detail:ne}:L&&T?{tone:"success",message:F(u,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",U,L),detail:u("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:L?{tone:"warning",message:F(u,"uiStudio.actions.previewComplete","캡처 완료",U,L),detail:u("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:F(u,"uiStudio.actions.previewComplete","캡처 완료",U),detail:u("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(r==null?void 0:r())}catch(b){h(b instanceof Error?b.message:String(b))}finally{C(null)}}},N=async()=>{if(n!=null&&n.target){P("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),C("check"),j({tone:"info",message:u("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:u("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const b=await oe("check",{targetPath:n.target});he(b);const k=ue(b),L=pe(u,k);j({tone:"success",message:F(u,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",L),detail:u("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(r==null?void 0:r())}catch(b){h(b instanceof Error?b.message:String(b))}finally{C(null)}}},E=async()=>{h(null),j(null);try{await Oe(i,e),await(r==null?void 0:r()),I(null),a()}catch(b){throw h(b instanceof Error?b.message:String(b)),b}},v=A?void 0:u("uiStudio.actions.proRequired","Pro에서 사용 가능"),R=n!=null&&n.target?Ie(n.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:u("uiStudio.analysis.detailDialog","Analysis detail")}),t.jsx("span",{className:s.drawerTarget,title:(R==null?void 0:R.full)??e,children:(R==null?void 0:R.breadcrumb)??e})]}),t.jsxs("div",{className:s.drawerToolbarActions,children:[n&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:s.drawerPrimaryActions,children:[t.jsx(y,{text:v??u("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:!A||!n.target||w!==null,type:"button",children:[t.jsx(Qe,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:u("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(y,{text:v??u("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:s.drawerActionBtn,onClick:()=>void N(),disabled:!A||!n.target||w!==null,type:"button",children:[t.jsx($e,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:u("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:s.drawerMoreMenu,children:[t.jsx("summary",{className:s.drawerMoreButton,title:u("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":u("uiStudio.actions.more","More"),children:t.jsx(Je,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:s.drawerMoreMenuBody,children:t.jsx(y,{text:v??u("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:()=>{P("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),I("deleteSnapshot")},disabled:!A,type:"button",children:u("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(y,{text:u("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:s.closeBtn,onClick:a,type:"button","aria-label":u("uiStudio.detailClose","Close"),children:t.jsx(Ve,{size:18,"aria-hidden":"true"})})})]})]}),d&&t.jsx("div",{className:s.errorMsg,children:d}),n&&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(Na,{detail:n}),t.jsx("div",{className:s.screenshotPreviewFrame,"data-testid":"analysis-screenshot-preview",children:t.jsx("img",{className:s.fullImg,src:n.image_url,alt:n.snapshot_id})}),t.jsx(Pa,{items:n.check_results}),t.jsxs("dl",{className:s.metaDl,children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.capturedAt","Captured"),tooltip:u("uiStudio.capturedAt.tooltip","When this screen was captured.")})}),t.jsx("dd",{children:new Date(n.captured_at*1e3).toLocaleString()}),t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.scope","Scope"),tooltip:u("uiStudio.scope.tooltip","Capture scope (full screen or a specific UI).")})}),t.jsx("dd",{children:n.scope}),n.target&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.target","Target"),tooltip:u("uiStudio.target.tooltip","Exact path of the captured UI instance.")})}),t.jsx("dd",{children:n.target})]}),n.brief_id&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:u("uiStudio.briefId","Brief"),tooltip:u("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:n.brief_id})]})]})]}),G==="deleteSnapshot"&&t.jsx(se,{title:u("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:u("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:u("common.delete","삭제"),onConfirm:E,onClose:()=>I(null)})]})}function Na({detail:e}){const{t:i}=D(),a=va(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(B,{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:ba(i,a)}),t.jsx("span",{className:s.drawerAnalysisCounts,children:Ca(i,e)})]}),t.jsxs("div",{className:s.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:s.drawerAnalysisLabel,children:t.jsx(B,{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 Pa({items:e}){const{t:i}=D();if(e.length===0)return t.jsx("p",{className:s.emptySuggestions,children:i("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:a,medium:o,low:l}=ja(e,i);return t.jsxs("div",{className:s.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(B,{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}`))]}),o.length>0&&t.jsxs("section",{className:s.prioritySection,children:[t.jsx("h4",{className:s.sectionMediumHeader,children:i("uiStudio.mediumPrioritySection","검토 권장")}),o.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 n,g,d;const{t:i}=D(),[a,o]=p.useState(e.priority==="priority_high"&&e.items.length<=5),l=e.falsePositiveRatio>=.5&&!!((n=e.fixTemplate)!=null&&n.falsePositiveNote),r=((g=e.fixTemplate)==null?void 0:g.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:()=>o(_=>!_),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"),":"," ",(d=e.fixTemplate)==null?void 0:d.falsePositiveNote]})}),t.jsx("ul",{className:s.itemList,children:e.items.map((_,m)=>t.jsx(ka,{item:_,group:e},`${_.path}-${m}`))})]})]})}function ka({item:e,group:i}){var _;const{t:a}=D(),{trackEvent:o}=H(),[l,r]=p.useState(!1),n=Ie(e.path),g=((_=i.fixTemplate)==null?void 0:_.buildUpdateCommand(e))??null,d=async()=>{if(g)try{await navigator.clipboard.writeText(g),o("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")}: ${n.full}`,children:n.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)})]})]}),g&&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:d,type:"button",children:l?a("uiStudio.copiedToClipboard","Copied"):a("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function Y(e,i){return Object.entries(i).reduce((a,[o,l])=>a.split(`{${o}}`).join(String(l)),e)}function Ta(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=Fe,Ba=[{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 Da(e){const o={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={...o,check_results:Ba.map(n=>({...n,hint:Ta(e,n)})),image_url:ee};return{list:{placeId:0,snapshots:[o],totalCount:1},detail:l}}const Ga=/plugin not connected|sync not started/i;function te(e){return typeof e=="string"&&Ga.test(e)}function Te(){const{t:e}=D();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 Ma(e){const i=Be(e),a=i.split(".").filter(l=>l.length>0),o=a.findIndex(l=>l==="StarterGui");return o>=0&&a[o+1]?["StarterGui",a[o+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 Aa(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 Ra(e){return e.length===0?null:{...e.reduce((a,o)=>{const l=o.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 La(e){const i=new Map;for(const l of e){const r=Be(l),n=i.get(r);if(!n){i.set(r,{latest:l,snapshotCount:1});continue}n.snapshotCount+=1,l.captured_at>n.latest.captured_at&&(n.latest=l)}const a=[...i.entries()].map(([l,r])=>({key:l,latest:r.latest,snapshotCount:r.snapshotCount,verdict:Aa(r.latest)})),o=new Map;for(const l of a){const r=Ma(l.latest),n=o.get(r)??[];n.push(l),o.set(r,n)}return[...o.entries()].map(([l,r])=>{var _;const n=r.sort((m,h)=>{const x=ge(m.latest)-ge(h.latest);return x!==0?x:h.latest.captured_at-m.latest.captured_at}),g=n.reduce((m,h)=>h.latest.captured_at>m.captured_at?h.latest:m,((_=n[0])==null?void 0:_.latest)??r[0].latest),d=Ra(n);return{key:l,latest:g,snapshotCount:n.reduce((m,h)=>m+h.snapshotCount,0),children:n,summary:d,verdict:De(d)}}).sort((l,r)=>{const n=ie(l.summary)-ie(r.summary);return n!==0?n:r.latest.captured_at-l.latest.captured_at})}function $a(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 Ea(e,i,a){return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${$(e,i)} · ${re(e,"needsFix")} ${$(e,a.hasSuggestions)} · ${re(e,"passed")} ${$(e,a.noSuggestions)}`}function Ha({tier:e}){const{t:i}=D(),{trackEvent:a}=H(),o=e==="basic",l=Ce(50),r=p.useRef(null),[n,g]=p.useState(null),[d,_]=p.useState(new Set),[m,h]=p.useState(new Set),[x,j]=p.useState(!1),w=p.useCallback((f,M)=>{g(n===f?null:f)},[n]),C=p.useCallback(()=>{g(null)},[]),G=p.useCallback(f=>{_(M=>{const T=new Set(M);return T.has(f)?T.delete(f):T.add(f),T})},[]);p.useEffect(()=>{var M;if(!n)return;(M=r.current)==null||M.focus();const f=T=>{T.key==="Escape"&&!document.getElementById("delete-confirm-title")&&C()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[C,n]);const I=o?Da(i):null,u=(I==null?void 0:I.list)??l.data,P=o?!1:l.loading,A=p.useCallback(f=>{h(M=>{const T=new Set(M);return T.has(f)?T.delete(f):T.add(f),T})},[]),S=f=>{h(new Set(f))},N=()=>{h(new Set)},E=async()=>{const f=(u==null?void 0:u.placeId)??0;a("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await Ue(f,{ids:[...m]}),await l.refresh(),j(!1),h(new Set)};if(P)return t.jsx("div",{className:s.page,children:i("uiStudio.loading","Loading...")});if(!o&&te(l.error))return t.jsx(Te,{});if(!o&&l.error)return t.jsxs("div",{className:s.page,children:[i("uiStudio.error","Error"),": ",l.error]});const v=(u==null?void 0:u.snapshots)??[],R=(u==null?void 0:u.placeId)??0,b=v.map(f=>f.snapshot_id),k=La(v),L=$a(k);return t.jsxs("div",{children:[t.jsxs("div",{className:s.analysisWorkspace,"data-detail-open":n?"true":"false",children:[t.jsxs("div",{className:s.analysisMainColumn,"data-testid":"analysis-main-column",children:[o&&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(B,{label:i("uiStudio.title","UI Studio"),tooltip:i("uiStudio.title.tooltip","A central place to review AI-generated UI screens and improvement suggestions.")})})}),v.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(B,{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:Ea(i,k.length,L)})]})}),t.jsx("div",{className:s.analysisReportGrid,"data-testid":"analysis-report-grid",children:k.map(f=>t.jsx(Fa,{report:f,placeId:R,imageUrlOverride:o?ee:void 0,expanded:d.has(f.key),onPrimaryClick:M=>{f.children.length>1?G(f.key):w(f.latest.snapshot_id,M)},onChildClick:(M,T)=>w(M,T)},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(B,{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,v.length)]})]}),!o&&v.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(b),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:N,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:v.map(f=>t.jsx(ga,{snapshot:f,placeId:R,onClick:M=>w(f.snapshot_id,M),imageUrlOverride:o?ee:void 0,selectable:!o,selected:m.has(f.snapshot_id),onToggleSelect:A},f.snapshot_id))})]})]})]}),n&&t.jsx("div",{className:s.analysisDetailPopupLayer,"data-testid":"analysis-detail-popup-layer",onClick:C,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(Ia,{snapshotId:n,placeId:R,onClose:C,sampleDetail:o&&n===ke?(I==null?void 0:I.detail)??null:null,tier:e,onActionDone:o?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 Oa(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 Fa({report:e,placeId:i,imageUrlOverride:a,expanded:o,onPrimaryClick:l,onChildClick:r}){const{t:n}=D(),g=e.latest,d=a??be(g.snapshot_id,i),_=new Date(g.captured_at*1e3).toLocaleString(),m=re(n,e.verdict),h=e.children.length>1;return t.jsxs("div",{className:s.analysisReportGroup,children:[t.jsxs("button",{className:s.analysisReportCard,"aria-expanded":h?o:void 0,"aria-label":`${e.key} ${h?n("uiStudio.analysis.expandChildren","하위 대상 보기"):n("uiStudio.analysis.openDetail","상세 보기")}`,onClick:x=>l(x.currentTarget),type:"button",children:[t.jsx("img",{className:s.analysisReportThumb,src:d,alt:g.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"?n("uiStudio.analysis.verdict.passed.tooltip","No improvements suggested under the current review thresholds."):n("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:n("uiStudio.analysis.counts.tooltip","Shows how many suggestions are marked review first, recommended, or optional."),children:t.jsx("span",{className:s.analysisReportCounts,children:ae(n,e.summary)})})]}),t.jsx("div",{className:s.analysisReportTarget,children:e.key}),t.jsx("div",{className:s.analysisReportIssue,children:Oa(n,e.summary)}),t.jsxs("div",{className:s.analysisReportMeta,children:[_," ·"," ",t.jsx(y,{text:n("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom)."),children:t.jsx("span",{children:n("uiStudio.analysis.thresholds","검토 기준")})}),": ",g.thresholds_source,e.snapshotCount>1?` · ${n("uiStudio.analysis.captureLabel","캡처")} ${$(n,e.snapshotCount)}`:"",h?` · ${n("uiStudio.analysis.childTargets","하위 대상")} ${$(n,e.children.length)}`:""]})]})]}),h&&o&&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(n,x.latest.design_check_summary)}),t.jsx("span",{className:s.analysisChildDetailHint,children:n("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},x.key))})]})}function Ua(e,i,a=1e4){const[o,l]=p.useState(null),[r,n]=p.useState(!0),[g,d]=p.useState(null),_=JSON.stringify(i),m=p.useCallback(async()=>{try{const h=await le(e,i);l(h),d(null)}catch(h){d(h.message)}finally{n(!1)}},[e,_]);return p.useEffect(()=>{let h=!0;const x=async()=>{try{const w=await le(e,i);h&&(l(w),d(null))}catch(w){h&&d(w.message)}finally{h&&n(!1)}};x();const j=setInterval(()=>{x()},a);return()=>{h=!1,clearInterval(j)}},[e,_,a]),{data:o,loading:r,error:g,refresh:m}}const za="_filterBar_1nnge_4",qa="_filterGroup_1nnge_14",Va="_filterLabel_1nnge_21",Wa="_filterCheckbox_1nnge_28",Ka="_segmentGroup_1nnge_45",Qa="_segmentBtn_1nnge_55",Ya="_segmentBtnActive_1nnge_73",Ja="_filterInput_1nnge_79",Xa="_filterResetBtn_1nnge_95",Za="_requestRow_1nnge_114",er="_requestRowMain_1nnge_127",tr="_requestDetailToggle_1nnge_134",ir="_thumbPair_1nnge_156",ar="_thumbPairButton_1nnge_164",rr="_thumbSlot_1nnge_179",sr="_thumbImg_1nnge_204",nr="_thumbPlaceholder_1nnge_211",or="_thumbArrow_1nnge_219",lr="_extraPathsBadge_1nnge_225",cr="_requestMeta_1nnge_239",dr="_requestLabel_1nnge_247",ur="_requestTime_1nnge_256",hr="_requestStats_1nnge_261",pr="_statDot_1nnge_269",gr="_summaryPill_1nnge_273",mr="_requestActions_1nnge_278",_r="_expandHint_1nnge_285",yr="_mutationsArea_1nnge_298",fr="_mutLoading_1nnge_307",xr="_mutEmpty_1nnge_308",Sr="_mutError_1nnge_314",jr="_mutationRow_1nnge_320",wr="_mutationLine_1nnge_330",vr="_mutTs_1nnge_337",br="_mutCommand_1nnge_343",Cr="_mutPath_1nnge_349",Ir="_mutDiff_1nnge_359",Nr="_mutErr_1nnge_314",Pr="_changeDetails_1nnge_374",kr="_changeDetailRow_1nnge_382",Tr="_changeDetailRowNoBefore_1nnge_391",Br="_changeDetailBadge_1nnge_395",Dr="_changeDetail_text_1nnge_412",Gr="_changeDetail_color_1nnge_417",Mr="_changeDetail_size_1nnge_422",Ar="_changeDetail_layout_1nnge_427",Rr="_changeDetail_state_1nnge_432",Lr="_changeDetail_asset_1nnge_437",$r="_changeDetail_property_1nnge_442",Er="_changeDetailProperty_1nnge_446",Hr="_changeDetailArrow_1nnge_454",Or="_changeDetailOldValue_1nnge_460",Fr="_changeDetailNewValue_1nnge_461",Ur="_compareDialogLayer_1nnge_479",zr="_compareDialog_1nnge_479",qr="_beforeAfterDrawer_1nnge_510",Vr="_drawerHeader_1nnge_520",Wr="_drawerTitle_1nnge_529",Kr="_drawerCloseBtn_1nnge_536",Qr="_drawerBody_1nnge_552",Yr="_pathTabs_1nnge_559",Jr="_pathTab_1nnge_559",Xr="_pathTabActive_1nnge_588",Zr="_comparePanel_1nnge_594",es="_compareHalf_1nnge_604",ts="_compareLabel_1nnge_611",is="_compareImg_1nnge_622",as="_comparePlaceholder_1nnge_630",rs="_compareDetailsPanel_1nnge_642",ss="_compareDetailsHeader_1nnge_651",ns="_drawerFooter_1nnge_669",os="_drawerActionBtn_1nnge_677",ls="_historyTabWrap_1nnge_695",cs="_historyWorkspace_1nnge_701",ds="_historyMainColumn_1nnge_706",us="_requestList_1nnge_710",hs="_emptyHistory_1nnge_715",ps="_historyError_1nnge_722",gs="_historyLoading_1nnge_728",ms="_listHeader_1nnge_736",_s="_listHeaderTitle_1nnge_745",ys="_clearBtn_1nnge_752",fs="_deleteErrBanner_1nnge_771",c={filterBar:za,filterGroup:qa,filterLabel:Va,filterCheckbox:Wa,segmentGroup:Ka,segmentBtn:Qa,segmentBtnActive:Ya,filterInput:Ja,filterResetBtn:Xa,requestRow:Za,requestRowMain:er,requestDetailToggle:tr,thumbPair:ir,thumbPairButton:ar,thumbSlot:rr,thumbImg:sr,thumbPlaceholder:nr,thumbArrow:or,extraPathsBadge:lr,requestMeta:cr,requestLabel:dr,requestTime:ur,requestStats:hr,statDot:pr,summaryPill:gr,requestActions:mr,expandHint:_r,mutationsArea:yr,mutLoading:fr,mutEmpty:xr,mutError:Sr,mutationRow:jr,mutationLine:wr,mutTs:vr,mutCommand:br,mutPath:Cr,mutDiff:Ir,mutErr:Nr,changeDetails:Pr,changeDetailRow:kr,changeDetailRowNoBefore:Tr,changeDetailBadge:Br,changeDetail_text:Dr,changeDetail_color:Gr,changeDetail_size:Mr,changeDetail_layout:Ar,changeDetail_state:Rr,changeDetail_asset:Lr,changeDetail_property:$r,changeDetailProperty:Er,changeDetailArrow:Hr,changeDetailOldValue:Or,changeDetailNewValue:Fr,compareDialogLayer:Ur,compareDialog:zr,beforeAfterDrawer:qr,drawerHeader:Vr,drawerTitle:Wr,drawerCloseBtn:Kr,drawerBody:Qr,pathTabs:Yr,pathTab:Jr,pathTabActive:Xr,comparePanel:Zr,compareHalf:es,compareLabel:ts,compareImg:is,comparePlaceholder:as,compareDetailsPanel:rs,compareDetailsHeader:ss,drawerFooter:ns,drawerActionBtn:os,historyTabWrap:ls,historyWorkspace:cs,historyMainColumn:ds,requestList:us,emptyHistory:hs,historyError:ps,historyLoading:gs,listHeader:ms,listHeaderTitle:_s,clearBtn:ys,deleteErrBanner:fs};function xs(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}=D();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(o=>t.jsx(Ss,{mutation:o},o.mutationId))})}function Ss({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:xs(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(js,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function js({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 ws(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function vs(e){if(!e)return null;const i=e.split(/[./]/).filter(o=>o.length>0);if(i.length===0)return null;const a=i.findIndex(o=>o==="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=vs(i.affectedPaths[0]);if(a){const o=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(o,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 bs(e,i){if(!i)return null;const a=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(o=>typeof o=="string"&&o.length>0);return a.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${a.join(" · ")}`}function Cs(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)}`,o=`${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} · ${o} · ${l}`}function Me({req:e,placeId:i,onOpenCompare:a,imageUrlOverride:o,sampleMutations:l}){const{t:r}=D(),[n,g]=p.useState(!1),[d,_]=p.useState(null),[m,h]=p.useState(!1),[x,j]=p.useState(null),w=o!=null,C=e.affectedPaths[0]??null,G=e.affectedPaths.length-1,I=C?e.beforeSnapshots[C]??null:null,u=C?e.afterSnapshots[C]??null:null,P=I?w?o:_e(I,i):null,A=u?w?o:_e(u,i):null,S=bs(r,e.qualityPlanSummary),N=Cs(r,e.postChangeDesignCheckSummary),E=async()=>{if(!n&&d===null)if(w&&l!=null)_(l);else{h(!0),j(null);try{const v=await je(i,e.requestId);_(v.mutations)}catch(v){j(v.message)}finally{h(!1)}}g(v=>!v)};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:v=>a(v.currentTarget),disabled:!C,"aria-label":`${J(r,e)} ${r("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:P?t.jsx("img",{className:c.thumbImg,src:P,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:A?t.jsx("img",{className:c.thumbImg,src:A,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","이후 없음")})})}),G>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:["+",G]})})]})}),t.jsxs("button",{className:c.requestDetailToggle,type:"button","aria-expanded":n,"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:ws(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})})]}),N&&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:N})})]})]})]}),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:n?r("uiStudio.history.row.collapseDetails","Hide change details"):r("uiStudio.history.row.expandDetails","Show {n} change details").replace("{n}",String(e.mutationCount))})})})]})]}),n&&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}),d&&t.jsx(Ge,{mutations:d,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:o,sampleDetail:l}){const{t:r}=D(),n=p.useRef(null),g=l!=null,[d,_]=p.useState(g?l:null),[m,h]=p.useState(!g),[x,j]=p.useState(null),[w,C]=p.useState(g&&l.affectedPaths.length>0?l.affectedPaths[0]:null);p.useEffect(()=>{var S;(S=n.current)==null||S.focus()},[]),p.useEffect(()=>{const S=N=>{N.key==="Escape"&&(N.preventDefault(),a())};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[a]),p.useEffect(()=>{if(g)return;let S=!0;return h(!0),j(null),je(i,e).then(N=>{S&&(_(N),N.affectedPaths.length>0&&C(N.affectedPaths[0]))}).catch(N=>{S&&j(N.message)}).finally(()=>{S&&h(!1)}),()=>{S=!1}},[e,i,g]);const G=w&&d?d.beforeSnapshots[w]??null:null,I=w&&d?d.afterSnapshots[w]??null:null,u=G?o??ye(G,i):null,P=I?o??ye(I,i):null,A=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:n,className:c.compareDialog,role:"dialog","aria-modal":"true","aria-label":A,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:A}),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&&d&&t.jsxs(t.Fragment,{children:[d.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:d.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:()=>C(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")})}),u?t.jsx("img",{className:c.compareImg,src:u,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")})}),P?t.jsx("img",{className:c.compareImg,src:P,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:d.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(n=>Number.isNaN(n)))return;const[o,l,r]=a;return new Date(o,l-1,r,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function Is(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,o=e.to?fe(e.to,!0):void 0;a&&(i.from=a),o&&(i.to=o)}else if(e.datePreset!=="all"){const a=new Date;if(e.datePreset==="today"){const{start:o,end:l}=z(a);i.from=o.toISOString(),i.to=l.toISOString()}else if(e.datePreset==="yesterday"){const o=new Date(a);o.setDate(o.getDate()-1);const{start:l,end:r}=z(o);i.from=l.toISOString(),i.to=r.toISOString()}else{const o=e.datePreset==="7d"?6:29,l=new Date(a);l.setDate(l.getDate()-o);const{start:r}=z(l),{end:n}=z(a);i.from=r.toISOString(),i.to=n.toISOString()}}return i}function Re(){return{action:"all",datePreset:"all"}}function Ns(){const{t:e}=D(),{trackEvent:i}=H(),a=ze(e),[o,l]=p.useState(null),r=o?a.requests.find(d=>d.requestId===o)??null:null,n=p.useCallback((d,_)=>{l(d)},[]),g=p.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":o?"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(B,{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(d=>t.jsx(Me,{req:d,placeId:0,onOpenCompare:_=>n(d.requestId,_),imageUrlOverride:ce,sampleMutations:a.mutationsByRequest[d.requestId]},d.requestId))})]}),o&&r&&t.jsx(Ae,{requestId:o,placeId:0,onClose:g,imageUrlOverride:ce,sampleDetail:{...r,mutations:a.mutationsByRequest[r.requestId]??[]}})]})]})}function Ps({filter:e,onChange:i}){const{t:a}=D(),o=[{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(B,{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:o.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(B,{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(B,{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(B,{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 ks(){var E;const{t:e}=D(),{trackEvent:i}=H(),a=Ce(1),o=((E=a.data)==null?void 0:E.placeId)??0,[l,r]=p.useState(Re),{data:n,loading:g,error:d,refresh:_}=Ua(o,Is(l)),[m,h]=p.useState(null),[x,j]=p.useState(!1),[w,C]=p.useState(!1),[G,I]=p.useState(null),u=async()=>{I(null);try{await qe(o,{all:!0,alsoSnapshots:w}),await _(),j(!1)}catch(v){throw I(v.message),v}},P=(n==null?void 0:n.requests)??[],A=te(a.error)||te(d),S=p.useCallback((v,R)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),h(v)},[i]),N=p.useCallback(()=>{h(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[A?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(Ps,{filter:l,onChange:r}),t.jsxs("div",{className:c.listHeader,children:[t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(B,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})}),P.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")})})]}),g&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!g&&d&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",d]}),!g&&!d&&P.length===0&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.empty","아직 변경 이력이 없습니다. AI 에이전트가 manage_ui 로 UI 를 수정하면 자동으로 기록됩니다.")}),!g&&P.length>0&&t.jsx("div",{className:c.requestList,children:P.map(v=>t.jsx(Me,{req:v,placeId:o,onOpenCompare:R=>S(v.requestId,R)},v.requestId))}),G&&t.jsx("div",{className:c.deleteErrBanner,children:G})]}),m&&t.jsx(Ae,{requestId:m,placeId:o,onClose:N})]}),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:C},confirmLabel:e("common.delete","삭제"),onConfirm:u,onClose:()=>j(!1)})]})}function Ts({tier:e}){return e==="basic"?t.jsx(Ns,{}):t.jsx(ks,{})}const Bs=["analysis","history"];function $s(){const{t:e}=D(),{trackEvent:i}=H(),{tier:a,loading:o}=Ee(),[l,r]=He(),n=l.get("tab"),g=n&&Bs.includes(n)?n:"analysis",d=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(We,{items:_,value:g,onChange:d}),o?t.jsx("div",{className:s.emptyState,children:e("uiStudio.loading","Loading...")}):g==="analysis"?t.jsx(Ha,{tier:a}):t.jsx(Ts,{tier:a})]})}export{$s as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,j as e,y as w,r as N,z as y,p as f,L as j}from"./index-BIVkyPD7.js";const C="_card_f20gt_2",T="_cardUnread_f20gt_15",b="_cardRead_f20gt_20",S="_topRow_f20gt_25",v="_categoryChip_f20gt_32",k="_versionChip_f20gt_45",R="_date_f20gt_57",H="_title_f20gt_65",E="_body_f20gt_74",L="_linkList_f20gt_82",A="_link_f20gt_82",U="_newBadge_f20gt_104",n={card:C,cardUnread:T,cardRead:b,topRow:S,categoryChip:v,versionChip:k,date:R,title:H,body:E,linkList:L,link:A,newBadge:U},B={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function u({announcement:s,isNew:g}){const{locale:r,t:i}=x(),o=g?n.cardUnread:n.cardRead,h=s.title[r]??s.title.en,l=s.body[r]??s.body.en,d=s.links??(s.link?[s.link]:[]),_=c=>typeof c=="string"?c:c[r]??c.en;return e.jsxs("div",{className:`${n.card} ${o}`,children:[e.jsxs("div",{className:n.topRow,children:[e.jsx("span",{className:n.categoryChip,children:i(B[s.category])}),s.version&&e.jsx("span",{className:n.versionChip,children:s.version}),g&&e.jsx("span",{className:n.newBadge,children:i("whatsNew.newBadge","NEW")}),e.jsx("span",{className:n.date,children:s.date})]}),e.jsx("h3",{className:n.title,children:h}),e.jsx("p",{className:n.body,children:l}),d.length>0&&e.jsx("div",{className:n.linkList,children:d.map(c=>{const p=_(c.url),t=_(c.label);return e.jsxs("a",{className:n.link,href:p,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",t]},p)})})]})}const I="_page_19yl3_2",$="_pageHeader_19yl3_10",z="_pageHeaderText_19yl3_17",M="_pageTitle_19yl3_24",W="_pageSubtitle_19yl3_31",O="_settingsIcon_19yl3_38",Y="_section_19yl3_67",G="_sectionTitle_19yl3_73",K="_unreadCount_19yl3_85",P="_empty_19yl3_100",q="_divider_19yl3_108",a={page:I,pageHeader:$,pageHeaderText:z,pageTitle:M,pageSubtitle:W,settingsIcon:O,section:Y,sectionTitle:G,unreadCount:K,empty:P,divider:q};function F(){const{t:s}=x(),{readSet:g,markRead:r}=w(),i=N.useMemo(()=>{const t=[];for(const m of y)g.has(m.id)||t.push(m.id);return t},[]),o=N.useRef(i);o.current=i,N.useEffect(()=>()=>{o.current.length>0&&r(o.current)},[]);const h=N.useMemo(()=>new Set(i),[i]),l=y.filter(t=>h.has(t.id)),d=y.filter(t=>!h.has(t.id)),_=l.length>0,c=d.length>0,p=e.jsxs("div",{className:a.pageHeader,children:[e.jsxs("div",{className:a.pageHeaderText,children:[e.jsx("h1",{className:a.pageTitle,children:s("whatsNew.pageTitle","What's New")}),e.jsx("p",{className:a.pageSubtitle,children:s("whatsNew.pageSubtitle","Stay up to date with MCP changes")})]}),e.jsx(f,{text:s("sidebar.settings","Settings"),children:e.jsx(j,{to:"/settings","aria-label":s("sidebar.settings","Settings"),className:a.settingsIcon,children:"⚙️"})})]});return y.length===0?e.jsxs("div",{className:a.page,children:[p,e.jsx("p",{className:a.empty,children:s("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:a.page,children:[p,_&&e.jsxs("section",{className:a.section,children:[e.jsxs("h2",{className:a.sectionTitle,children:[s("whatsNew.unreadSection","Unread"),e.jsx("span",{className:a.unreadCount,children:l.length})]}),l.map(t=>e.jsx(u,{announcement:t,isNew:!0},`unread-${t.id}`))]}),_&&c&&e.jsx("hr",{className:a.divider}),c&&e.jsxs("section",{className:a.section,children:[e.jsx("h2",{className:a.sectionTitle,children:s("whatsNew.allSection","All Announcements")}),d.map(t=>e.jsx(u,{announcement:t,isNew:!1},`all-${t.id}`))]})]})}export{F as Component};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{q as o}from"./index-BIVkyPD7.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 e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],c=o("x",e);export{c as X};
|