@weppy/roblox-mcp 2.17.10 → 2.17.12
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 +25 -0
- package/README.md +2 -0
- package/dashboard/dist/assets/{AiPromptExamples-BSFrFYar.js → AiPromptExamples-B3Uy68MJ.js} +1 -1
- package/dashboard/dist/assets/{AssetsPage-Bt9gZnJ_.js → AssetsPage-DGSoVLnO.js} +1 -1
- package/dashboard/dist/assets/{ChangelogPage-C4tBBoXT.js → ChangelogPage-B9dCtQOo.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-BbqpSaVw.js → ConfirmModal-B6ovGUld.js} +1 -1
- package/dashboard/dist/assets/{ConnectionPage-Sy7xUWtJ.js → ConnectionPage-B3NzHXCM.js} +1 -1
- package/dashboard/dist/assets/{ControlsPage-ECpr55X_.js → ControlsPage-dQj67_QM.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-DJ0xywJq.js → GameChangeDetail-BfltcON0.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-DAd1I756.js → InfoLabel-CUAC4KaS.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-C2xJb1Wf.js → OverviewPage-DAHV_J9P.js} +1 -1
- package/dashboard/dist/assets/{PageHeader-_z4Dtkbg.js → PageHeader-BbXDD7J9.js} +1 -1
- package/dashboard/dist/assets/{PlaceSelectOptions-Dd_m61bQ.js → PlaceSelectOptions-CoWR0lUt.js} +1 -1
- package/dashboard/dist/assets/{PlaytestAiPromptExamples-CNe0qWb1.js → PlaytestAiPromptExamples-CNzT1Zzl.js} +1 -1
- package/dashboard/dist/assets/{PlaytestPage-DZa14JH0.js → PlaytestPage-DoyKVZGe.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-BiDPnuz8.js → SettingsPage-DmuhCaCs.js} +1 -1
- package/dashboard/dist/assets/SyncPage-BeZ52U2s.css +1 -0
- package/dashboard/dist/assets/SyncPage-DTwGdjCc.js +1 -0
- package/dashboard/dist/assets/{Tabs-BoD1I6c5.js → Tabs-CI7QBRFn.js} +1 -1
- package/dashboard/dist/assets/{TierPromoPanel-CQQdO5mK.js → TierPromoPanel-BcWyr5ni.js} +1 -1
- package/dashboard/dist/assets/{ToolsPage-D7ovZ3QM.js → ToolsPage-BYlAjTDF.js} +1 -1
- package/dashboard/dist/assets/{TooltipText-NA7u0bu6.js → TooltipText-C8S8B8k6.js} +1 -1
- package/dashboard/dist/assets/UiStudioPage-DmWjv22S.css +1 -0
- package/dashboard/dist/assets/UiStudioPage-Sg9Sc7dA.js +11 -0
- package/dashboard/dist/assets/{WhatsNewPage-D3cvOOAD.js → WhatsNewPage-Xu9jN9ei.js} +1 -1
- package/dashboard/dist/assets/{bot-D89pfHg8.js → bot-GYHFrFjr.js} +1 -1
- package/dashboard/dist/assets/{check-GVlTbKVy.js → check-CK84xvEL.js} +1 -1
- package/dashboard/dist/assets/{copy-DVGVC27v.js → copy-Dagqdoq_.js} +1 -1
- package/dashboard/dist/assets/{index-uP4eoQi-.js → index-Dryjq9a5.js} +32 -32
- package/dashboard/dist/assets/{rotate-ccw-Dxk8CuFi.js → rotate-ccw-BhctsB9r.js} +1 -1
- package/dashboard/dist/assets/{sample-requests-CQy_WSFJ.js → sample-requests-B6Kd_Wul.js} +1 -1
- package/dashboard/dist/assets/{trash-2-CEfHj47n.js → trash-2-BkWSghui.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-BGDr-4gk.js → useLiveUptime-C0rFrLl1.js} +1 -1
- package/dashboard/dist/assets/{useSettings-kOu_k9zT.js → useSettings-CyIbYDSy.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dist/index.js +379 -319
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/SyncPage-BIm9tW0s.css +0 -1
- package/dashboard/dist/assets/SyncPage-EcDvwdB8.js +0 -1
- package/dashboard/dist/assets/UiStudioPage-CtSFtEbS.css +0 -1
- package/dashboard/dist/assets/UiStudioPage-wYZQClUu.js +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,r as i,b as I,D as ht,u as at,X as mt,a as bt,k as xt}from"./index-uP4eoQi-.js";import{P as ft}from"./PageHeader-_z4Dtkbg.js";import{T as M}from"./TooltipText-NA7u0bu6.js";import{C as _t}from"./ConfirmModal-BbqpSaVw.js";import{a as gt,T as jt,C as yt}from"./Tabs-BoD1I6c5.js";import"./ConfirmModal.module-DJksQHBd.js";import"./PlaceSelectOptions-Dd_m61bQ.js";const Ct="_wrapper_1s3lp_2",kt="_table_1s3lp_7",Tt="_sortable_1s3lp_32",Nt="_sortArrow_1s3lp_41",St="_clickable_1s3lp_52",wt="_empty_1s3lp_57",A={wrapper:Ct,table:kt,sortable:Tt,sortArrow:Nt,clickable:St,empty:wt};function vt({columns:t,data:o,sortBy:c,sortDir:k="asc",onSort:b,onRowClick:l,rowKey:N,emptyMessage:S}){return e.jsx("div",{className:A.wrapper,children:e.jsxs("table",{className:A.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:t.map(h=>e.jsxs("th",{style:h.width?{width:h.width}:void 0,className:h.sortable?A.sortable:void 0,onClick:h.sortable&&b?()=>b(h.key):void 0,children:[e.jsx("span",{children:h.label}),h.sortable&&c===h.key&&e.jsx("span",{className:A.sortArrow,children:k==="asc"?"▴":"▾"})]},h.key))})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:A.empty,children:S||"No data"})}):o.map((h,w)=>{const C=N?N(h):String(w);return e.jsx("tr",{className:l?A.clickable:void 0,tabIndex:l?-1:void 0,onClick:l?_=>l(h,_.currentTarget):void 0,children:t.map(_=>e.jsx("td",{children:_.render?_.render(h):String(h[_.key]??"")},_.key))},C)})})]})})}function Mt(t){return{...t,sequenceNumber:typeof t.sequenceNumber=="number"?t.sequenceNumber:void 0,executionTimeMs:typeof t.executionTimeMs=="number"?t.executionTimeMs:void 0}}const Bt=50;function Pt(t){if(typeof t=="number")return{placeId:String(t)}}function Y(t,o){return typeof o!="number"?t:`${t}?placeId=${encodeURIComponent(String(o))}`}function Lt(t){const o=(t==null?void 0:t.placeId)??null,[c,k]=i.useState(null),[b,l]=i.useState(!0),[N,S]=i.useState([]),[h,w]=i.useState(0),[C,_]=i.useState(!1),[U,O]=i.useState(!0),[m,E]=i.useState(0),[g,F]=i.useState(""),B=i.useRef(null),T=i.useCallback(async()=>{l(!0);try{const j=Pt(o),u=j?await I.get("/api/dashboard/tool-stats",j):await I.get("/api/dashboard/tool-stats");k(u)}catch{}finally{l(!1)}},[o]),x=i.useCallback(async(j,u)=>{O(!0);try{const P={limit:String(Bt),offset:String(j)};u&&(P.tool=u),typeof o=="number"&&(P.placeId=String(o));const H=await I.get("/api/dashboard/history",P);S(H.entries.map(Mt)),w(H.total),_(H.hasMore)}catch{S([]),w(0),_(!1)}finally{O(!1)}},[o]),D=i.useCallback(()=>{T(),x(m,g)},[x,T,m,g]),V=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/history/clear",o)),x(m,g)},[x,m,g,o]),K=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/statistics/clear",o)),T()},[T,o]);return i.useEffect(()=>{T()},[T]),i.useEffect(()=>{x(m,g)},[x,m,g]),i.useEffect(()=>{const j=new ht;B.current=j,j.connect();const u=j.on("command",()=>{T(),x(m,g)});return()=>{u(),j.disconnect(),B.current=null}},[x,T,m,g]),{statistics:c,statsLoading:b,history:N,historyTotal:h,historyHasMore:C,historyLoading:U,historyOffset:m,historyToolFilter:g,setHistoryOffset:E,setHistoryToolFilter:F,refresh:D,clearHistory:V,clearStatistics:K}}const Et="_page_1rtjt_2",Ht="_card_1rtjt_14",At="_cardToolbar_1rtjt_21",Rt="_sectionTitle_1rtjt_29",It="_dangerButton_1rtjt_36",Ot="_proBadge_1rtjt_55",Ft="_statusOk_1rtjt_70",Dt="_statusFallback_1rtjt_83",$t="_statusUnsupported_1rtjt_96",qt="_statusWarning_1rtjt_109",Wt="_statusError_1rtjt_122",Ut="_tierBasic_1rtjt_136",Vt="_tierPro_1rtjt_140",Kt="_tierMixed_1rtjt_145",Gt="_filterRow_1rtjt_156",zt="_filterLabel_1rtjt_163",Jt="_filterSelect_1rtjt_172",Qt="_detailsButton_1rtjt_187",Zt="_detailShell_1rtjt_210",Xt="_detailHeader_1rtjt_218",Yt="_detailHeading_1rtjt_229",te="_detailTitle_1rtjt_236",ee="_detailRecordName_1rtjt_243",se="_detailHeaderActions_1rtjt_252",ae="_detailCloseButton_1rtjt_259",oe="_detailBody_1rtjt_282",le="_detailSection_1rtjt_294",re="_detailList_1rtjt_313",ie="_detailItem_1rtjt_319",ne="_detailLabel_1rtjt_326",ce="_detailValue_1rtjt_331",de="_pre_1rtjt_337",ue="_pagination_1rtjt_355",pe="_pageInfo_1rtjt_363",he="_btn_1rtjt_369",me="_tierDistribution_1rtjt_397",be="_tierBarWrap_1rtjt_401",xe="_tierBarBasic_1rtjt_409",fe="_tierBarPro_1rtjt_414",_e="_tierLabels_1rtjt_419",ge="_statsTableWrap_1rtjt_428",je="_statsTable_1rtjt_428",ye="_sortableHeader_1rtjt_460",Ce="_sortArrow_1rtjt_465",ke="_statsToolRow_1rtjt_469",Te="_statsActionRow_1rtjt_477",Ne="_expandButton_1rtjt_481",Se="_expandIcon_1rtjt_493",we="_actionLabel_1rtjt_498",ve="_emptyStats_1rtjt_505",Me="_summaryLine_1rtjt_511",a={page:Et,card:Ht,cardToolbar:At,sectionTitle:Rt,dangerButton:It,proBadge:Ot,statusOk:Ft,statusFallback:Dt,statusUnsupported:$t,statusWarning:qt,statusError:Wt,tierBasic:Ut,tierPro:Vt,tierMixed:Kt,filterRow:Gt,filterLabel:zt,filterSelect:Jt,detailsButton:Qt,detailShell:Zt,detailHeader:Xt,detailHeading:Yt,detailTitle:te,detailRecordName:ee,detailHeaderActions:se,detailCloseButton:ae,detailBody:oe,detailSection:le,detailList:re,detailItem:ie,detailLabel:ne,detailValue:ce,pre:de,pagination:ue,pageInfo:pe,btn:he,tierDistribution:me,tierBarWrap:be,tierBarBasic:xe,tierBarPro:fe,tierLabels:_e,statsTableWrap:ge,statsTable:je,sortableHeader:ye,sortArrow:Ce,statsToolRow:ke,statsActionRow:Te,expandButton:Ne,expandIcon:Se,actionLabel:we,emptyStats:ve,summaryLine:Me},Be=new Set(["clientId","placeId","pinnedTarget","recentPriority","globalQueue"]);function tt(t){return typeof t=="string"&&t.length>0?t:void 0}function Pe(t){if(!Array.isArray(t))return;const o=t.filter(c=>typeof c=="string"&&c.length>0);return o.length>0?o:void 0}function Le(t){const o=t.result??{};return{requestedCommand:t.requestedCommand??tt(o.requestedCommand),executedCommand:t.executedCommand??tt(o.executedCommand),alternatives:t.alternatives??Pe(o.alternatives)}}function ot(t,o){switch(t.status){case"fallback":return{label:o("tools.badge.fallback","FALLBACK"),tooltip:o("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:a.statusFallback};case"unsupported":return{label:o("tools.badge.unsupported","UNSUPPORTED"),tooltip:o("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:a.statusUnsupported};case"warning":return{label:o("tools.badge.warn","WARN"),tooltip:o("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:a.statusWarning};case"error":return{label:o("tools.badge.err","FAILED"),tooltip:o("tools.badge.err.tooltip","The tool run failed."),className:a.statusError};default:return{label:o("tools.status.ok","OK"),tooltip:o("tools.status.ok.tooltip","The tool run completed successfully."),className:a.statusOk}}}function y(t,o){return e.jsxs("div",{className:a.detailItem,children:[e.jsx("span",{className:a.detailLabel,children:t}),e.jsx("span",{className:a.detailValue,children:o})]})}function Ee(t){if(!t||typeof t!="object")return;const o=t;if(typeof o.selectionMode=="string"&&Be.has(o.selectionMode))return o}function et(t){if(!(!t||typeof t!="object"||!("routing"in t)))return Ee(t.routing)}function He(t){return t.routing??et(t.result)??et(t.data)}function Ae(t,o){return t.requestedClientId?t.requestedClientId:t.requestedPlaceId!==void 0?t.requestedPlaceId:o("tools.history.routing.none","No Studio target named")}function Re(t){return t.actualPlaceName?`${t.actualPlaceName} · ${t.actualPlaceId??"-"}`:t.actualClientId??"-"}function Ie({entry:t,onClose:o}){const{t:c}=at(),k=ot(t,c),b=Le(t),l=He(t);return e.jsxs("div",{className:a.detailShell,children:[e.jsxs("header",{className:a.detailHeader,children:[e.jsxs("div",{className:a.detailHeading,children:[e.jsx("span",{className:a.detailTitle,children:c("tools.detail.title","Tool execution")}),e.jsx("span",{className:a.detailRecordName,children:t.command})]}),e.jsxs("div",{className:a.detailHeaderActions,children:[e.jsx(M,{text:k.tooltip,children:e.jsx("span",{className:k.className,children:k.label})}),e.jsx("button",{type:"button",className:a.detailCloseButton,onClick:o,"aria-label":c("common.close","Close"),children:e.jsx(mt,{size:18,"aria-hidden":"true"})})]})]}),e.jsxs("div",{className:a.detailBody,children:[e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:c("tools.detail.params","Parameters")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.result.tooltip","Returned result payload for this tool run."),children:c("tools.detail.result","Result")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]}),l&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:c("tools.history.routing","Routing")}),e.jsxs("div",{className:a.detailList,children:[y(c("tools.history.routing.mode","Mode"),l.selectionMode),y(c("tools.history.routing.requested","Requested"),Ae(l,c)),y(c("tools.history.routing.actual","Actual"),Re(l))]})]}),(t.status==="fallback"||t.status==="unsupported"||t.status==="warning"||t.status==="error")&&e.jsx("section",{className:a.detailSection,children:e.jsxs("div",{className:a.detailList,children:[t.status==="fallback"&&b.requestedCommand?y(c("tools.detail.requestedCommand","Requested Command"),b.requestedCommand):null,t.status==="fallback"&&b.executedCommand?y(c("tools.detail.executedCommand","Executed Command"),b.executedCommand):null,t.status==="fallback"&&b.alternatives?y(c("tools.detail.alternatives","Alternatives"),b.alternatives.join(", ")):null,t.status==="unsupported"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="unsupported"?y(c("tools.detail.noFallback","No Fallback"),c("tools.detail.noFallback.value","No fallback ran.")):null,t.status==="warning"&&t.warningMessage?y(c("tools.detail.warningMessage","Warning Message"),t.warningMessage):null,t.status==="error"&&t.errorMessage?y(c("tools.detail.errorMessage","Error Message"),t.errorMessage):null,t.status==="error"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="error"&&t.fallbackCommand?y(c("tools.detail.executedCommand","Executed Command"),t.fallbackCommand):null]})})]})]})}const G=50;function Oe(t){const o=new Date(t);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function W(t){return typeof t!="number"||!Number.isFinite(t)?"-":t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function R(t,o){return o==="pro"?t("tier.pro","Pro"):o==="mixed"?t("tier.mixed","Mixed"):t("tier.basic","Basic")}function lt(t,o){return o!==t&&o.startsWith(`${t}_`)?o.slice(t.length+1):""}function st(t,o){const c=lt(t,o);return c?`${t}.${c}`:t}function Ge(){const{t}=at(),{trackEvent:o,trackPageView:c}=bt(),[k,b]=i.useState(null),l=Lt({placeId:k}),{show:N}=xt(),[S,h]=i.useState("history"),[w,C]=i.useState(null),_=i.useRef(null),[U,O]=i.useState(null),[m,E]=i.useState(null),[g,F]=i.useState(!1),[B,T]=i.useState("totalCalls"),[x,D]=i.useState("desc"),V=i.useCallback(s=>{T(n=>n===s?(D(r=>r==="asc"?"desc":"asc"),s):(D("desc"),s))},[]),K=i.useMemo(()=>{var n;const s=new Set;return Object.keys(((n=l.statistics)==null?void 0:n.tools)??{}).forEach(r=>s.add(r)),l.history.forEach(r=>{r.tool&&s.add(r.tool)}),l.historyToolFilter&&s.add(l.historyToolFilter),Array.from(s).sort()},[l.history,l.historyToolFilter,l.statistics]),j=i.useMemo(()=>{var s;return(s=l.statistics)!=null&&s.tools?Object.values(l.statistics.tools).map(n=>{var X;const r=Object.entries(n.commands??{}).map(([p,d])=>({toolName:n.tool,commandName:d.command??p,label:lt(n.tool,d.command??p)||(d.command??p),tier:d.tier,totalCalls:d.totalCalls,successCount:d.successCount,fallbackCount:d.fallbackCount,unsupportedCount:d.unsupportedCount,warningCount:d.warningCount??0,failureCount:d.failureCount,totalExecutionTimeMs:d.totalExecutionTimeMs,avgExecutionTimeMs:d.avgExecutionTimeMs})),f=r.reduce((p,d)=>p+d.totalCalls,0),v=r.reduce((p,d)=>p+d.successCount,0),$=r.reduce((p,d)=>p+d.fallbackCount,0),q=r.reduce((p,d)=>p+d.unsupportedCount,0),dt=r.reduce((p,d)=>p+d.warningCount,0),ut=r.reduce((p,d)=>p+d.failureCount,0),Z=r.reduce((p,d)=>p+d.totalExecutionTimeMs,0),pt=new Set(r.map(p=>p.tier)).size>1?"mixed":((X=r[0])==null?void 0:X.tier)??n.tier;return{toolName:n.tool,tier:pt,commands:r,totalCalls:f,successCount:v,fallbackCount:$,unsupportedCount:q,warningCount:dt,failureCount:ut,totalExecutionTimeMs:Z,avgExecutionTimeMs:f>0?Math.round(Z/f):0}}):[]},[l.statistics]),u=i.useCallback((s,n,r,f)=>e.jsx(M,{text:t(r,f),children:t(s,n)}),[t]),P=i.useCallback((s,n)=>{_.current=n,C(s)},[]),H=i.useCallback(()=>{C(null)},[]),z=i.useMemo(()=>[...j].sort((n,r)=>{const f=n[B],v=r[B];if(typeof f=="number"&&typeof v=="number")return x==="asc"?f-v:v-f;const $=String(f??""),q=String(v??"");return x==="asc"?$.localeCompare(q):q.localeCompare($)}),[j,B,x]),rt=i.useMemo(()=>[{key:"timestamp",label:u("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:s=>Oe(s.timestamp)},{key:"toolName",label:u("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:s=>e.jsxs("span",{children:[st(s.tool,s.command),s.tier==="pro"&&e.jsx(M,{text:t("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:e.jsx("span",{className:a.proBadge,children:t("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:u("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:s=>W(s.executionTimeMs)},{key:"status",label:u("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:s=>{const n=ot(s,t);return e.jsx(M,{text:n.tooltip,children:e.jsx("span",{className:n.className,children:n.label})})}},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:s=>e.jsx("span",{className:s.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,s.tier)})},{key:"details",label:t("tools.detail.open","Details"),width:"84px",render:s=>{const n=st(s.tool,s.command);return e.jsx("button",{type:"button",className:a.detailsButton,"aria-haspopup":"dialog","aria-label":t("tools.detail.openLabel","View details for {command}").replace("{command}",n),onClick:r=>{r.stopPropagation(),P(s,r.currentTarget)},children:t("tools.detail.open","Details")})}}],[P,t,u]),J=i.useMemo(()=>[{key:"toolName",label:u("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:u("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:u("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:u("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:u("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:u("tools.col.warn","WARN","tools.col.warn.tooltip","Number of expected failures caused by caller input, project state, Roblox policy, or user code."),sortable:!0,width:"80px"},{key:"failureCount",label:u("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:u("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:s=>W(s.avgExecutionTimeMs)},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:s=>e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})}],[t,u]),L=i.useMemo(()=>{if(!l.statistics)return null;const s=l.statistics.tierSummary.basic.totalCalls,n=l.statistics.tierSummary.pro.totalCalls,r=s+n;if(r===0)return null;const f=Math.round(s/r*100),v=100-f;return{basic:s,pro:n,basicPct:f,proPct:v}},[l.statistics]),Q=i.useCallback(s=>{O(n=>n===s?null:s)},[]),it=i.useCallback(async()=>{if(m){F(!0);try{m==="history"?await l.clearHistory():await l.clearStatistics(),N(t("toast.clearSuccess","Cleared successfully"),"success"),E(null)}catch{N(t("toast.clearFailed","Failed to clear data"),"error")}finally{F(!1)}}},[m,N,t,l]),nt=i.useCallback(s=>{const n=s==="history"?"tools_history":"tools_statistics";o("dashboard_click_event",{click_target:s==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:n}),c({page:"tools",tab:n}),C(null),h(s)},[o,c]),ct=["history","statistics"].map(s=>({key:s,label:t(`tools.tab.${s}`,s.charAt(0).toUpperCase()+s.slice(1))}));return e.jsxs("div",{className:a.page,children:[e.jsx(ft,{title:t("page.tools.title","Tools"),description:t("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),e.jsx(gt,{surface:"tools",selectable:!0,selectedPlaceId:k,onSelectedPlaceIdChange:s=>{C(null),b(s),l.setHistoryOffset(0)}}),e.jsx(jt,{items:ct,value:S,onChange:nt}),S==="history"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.history","History")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),E("history")},children:t("common.clear","Clear")})]}),e.jsx("div",{className:a.filterRow,children:e.jsxs("label",{className:a.filterLabel,children:[t("tools.filter.tool","Tool"),":",e.jsxs("select",{className:a.filterSelect,value:l.historyToolFilter,onChange:s=>{C(null),l.setHistoryToolFilter(s.target.value),l.setHistoryOffset(0)},children:[e.jsx("option",{value:"",children:t("tools.filter.all","All")}),K.map(s=>e.jsx("option",{value:s,children:s},s))]})]})}),e.jsx(vt,{columns:rt,data:l.history,rowKey:s=>s.id,onRowClick:(s,n)=>P(s,n),emptyMessage:t("tools.empty.history","No tool history entries for this place")}),e.jsxs("div",{className:a.pagination,children:[e.jsx("button",{className:a.btn,disabled:l.historyOffset===0,title:t("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(Math.max(0,l.historyOffset-G))},children:t("tools.page.prev","Prev")}),e.jsxs("span",{className:a.pageInfo,children:[l.historyOffset+1,"–",Math.min(l.historyOffset+G,l.historyTotal)," / ",l.historyTotal]}),e.jsx("button",{className:a.btn,disabled:!l.historyHasMore,title:t("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(l.historyOffset+G)},children:t("tools.page.next","Next")})]})]}),S==="statistics"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.statistics","Statistics")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),E("statistics")},children:t("common.clear","Clear")})]}),L&&e.jsxs("div",{className:a.tierDistribution,children:[e.jsxs("div",{className:a.tierBarWrap,children:[e.jsx("div",{className:a.tierBarBasic,style:{width:`${L.basicPct}%`}}),e.jsx("div",{className:a.tierBarPro,style:{width:`${L.proPct}%`}})]}),e.jsxs("div",{className:a.tierLabels,children:[e.jsxs("span",{children:[R(t,"basic")," ",L.basicPct,"% (",L.basic,")"]}),e.jsxs("span",{children:[R(t,"pro")," ",L.proPct,"% (",L.pro,")"]})]})]}),e.jsx("div",{className:a.statsTableWrap,children:e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsx("tr",{children:J.map(s=>e.jsxs("th",{style:s.width?{width:s.width}:void 0,className:s.sortable?a.sortableHeader:void 0,onClick:s.sortable?()=>V(s.key):void 0,children:[e.jsx("span",{children:s.label}),s.sortable&&B===s.key&&e.jsx("span",{className:a.sortArrow,children:x==="asc"?"▴":"▾"})]},s.key))})}),e.jsx("tbody",{children:z.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:J.length,className:a.emptyStats,children:t("tools.empty.stats","No tool statistics for this place")})}):z.map(s=>{const n=U===s.toolName;return e.jsxs(i.Fragment,{children:[e.jsxs("tr",{className:a.statsToolRow,onClick:()=>Q(s.toolName),children:[e.jsx("td",{children:e.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":n,"aria-label":`${s.toolName} ${n?t("common.collapse","Collapse"):t("common.expand","Expand")}`,onClick:r=>{r.stopPropagation(),Q(s.toolName)},children:[e.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:n?"▾":"▸"}),e.jsx("span",{children:s.toolName})]})}),e.jsx("td",{children:s.totalCalls}),e.jsx("td",{children:s.successCount}),e.jsx("td",{children:s.fallbackCount}),e.jsx("td",{children:s.unsupportedCount}),e.jsx("td",{children:s.warningCount}),e.jsx("td",{children:s.failureCount}),e.jsx("td",{children:W(s.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})})]}),n&&s.commands.map(r=>e.jsxs("tr",{className:a.statsActionRow,children:[e.jsx("td",{children:e.jsx("span",{className:a.actionLabel,children:r.label})}),e.jsx("td",{children:r.totalCalls}),e.jsx("td",{children:r.successCount}),e.jsx("td",{children:r.fallbackCount}),e.jsx("td",{children:r.unsupportedCount}),e.jsx("td",{children:r.warningCount}),e.jsx("td",{children:r.failureCount}),e.jsx("td",{children:W(r.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx("span",{className:r.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,r.tier)})})]},`${s.toolName}:${r.commandName}`))]},s.toolName)})})]})}),l.statistics&&e.jsxs("div",{className:a.summaryLine,children:[t("tools.summary.total","Total"),": ",l.statistics.totalCalls," ",t("tools.summary.calls","calls")," | ",t("tools.summary.sessions","Sessions"),": ",l.statistics.totalSessions]})]}),e.jsx(yt,{open:w!==null,ariaLabel:t("tools.detail.dialogLabel","Tool execution detail"),onClose:H,returnFocusTo:_.current,testId:"tools-history-detail-popup-layer",children:w&&e.jsx(Ie,{entry:w,onClose:H})}),e.jsx(_t,{open:m!==null,title:m==="history"?t("tools.clear.history.title","Clear history?"):t("tools.clear.statistics.title","Clear statistics?"),message:m==="history"?t("tools.clear.history.message","This permanently removes the current place tools history."):t("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:g,onCancel:()=>!g&&E(null),onConfirm:it})]})}export{Ge as Component};
|
|
1
|
+
import{j as e,r as i,b as I,D as ht,u as at,X as mt,a as bt,k as xt}from"./index-Dryjq9a5.js";import{P as ft}from"./PageHeader-BbXDD7J9.js";import{T as M}from"./TooltipText-C8S8B8k6.js";import{C as _t}from"./ConfirmModal-B6ovGUld.js";import{a as gt,T as jt,C as yt}from"./Tabs-CI7QBRFn.js";import"./ConfirmModal.module-DJksQHBd.js";import"./PlaceSelectOptions-CoWR0lUt.js";const Ct="_wrapper_1s3lp_2",kt="_table_1s3lp_7",Tt="_sortable_1s3lp_32",Nt="_sortArrow_1s3lp_41",St="_clickable_1s3lp_52",wt="_empty_1s3lp_57",A={wrapper:Ct,table:kt,sortable:Tt,sortArrow:Nt,clickable:St,empty:wt};function vt({columns:t,data:o,sortBy:c,sortDir:k="asc",onSort:b,onRowClick:l,rowKey:N,emptyMessage:S}){return e.jsx("div",{className:A.wrapper,children:e.jsxs("table",{className:A.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:t.map(h=>e.jsxs("th",{style:h.width?{width:h.width}:void 0,className:h.sortable?A.sortable:void 0,onClick:h.sortable&&b?()=>b(h.key):void 0,children:[e.jsx("span",{children:h.label}),h.sortable&&c===h.key&&e.jsx("span",{className:A.sortArrow,children:k==="asc"?"▴":"▾"})]},h.key))})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:A.empty,children:S||"No data"})}):o.map((h,w)=>{const C=N?N(h):String(w);return e.jsx("tr",{className:l?A.clickable:void 0,tabIndex:l?-1:void 0,onClick:l?_=>l(h,_.currentTarget):void 0,children:t.map(_=>e.jsx("td",{children:_.render?_.render(h):String(h[_.key]??"")},_.key))},C)})})]})})}function Mt(t){return{...t,sequenceNumber:typeof t.sequenceNumber=="number"?t.sequenceNumber:void 0,executionTimeMs:typeof t.executionTimeMs=="number"?t.executionTimeMs:void 0}}const Bt=50;function Pt(t){if(typeof t=="number")return{placeId:String(t)}}function Y(t,o){return typeof o!="number"?t:`${t}?placeId=${encodeURIComponent(String(o))}`}function Lt(t){const o=(t==null?void 0:t.placeId)??null,[c,k]=i.useState(null),[b,l]=i.useState(!0),[N,S]=i.useState([]),[h,w]=i.useState(0),[C,_]=i.useState(!1),[U,O]=i.useState(!0),[m,E]=i.useState(0),[g,F]=i.useState(""),B=i.useRef(null),T=i.useCallback(async()=>{l(!0);try{const j=Pt(o),u=j?await I.get("/api/dashboard/tool-stats",j):await I.get("/api/dashboard/tool-stats");k(u)}catch{}finally{l(!1)}},[o]),x=i.useCallback(async(j,u)=>{O(!0);try{const P={limit:String(Bt),offset:String(j)};u&&(P.tool=u),typeof o=="number"&&(P.placeId=String(o));const H=await I.get("/api/dashboard/history",P);S(H.entries.map(Mt)),w(H.total),_(H.hasMore)}catch{S([]),w(0),_(!1)}finally{O(!1)}},[o]),D=i.useCallback(()=>{T(),x(m,g)},[x,T,m,g]),V=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/history/clear",o)),x(m,g)},[x,m,g,o]),K=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/statistics/clear",o)),T()},[T,o]);return i.useEffect(()=>{T()},[T]),i.useEffect(()=>{x(m,g)},[x,m,g]),i.useEffect(()=>{const j=new ht;B.current=j,j.connect();const u=j.on("command",()=>{T(),x(m,g)});return()=>{u(),j.disconnect(),B.current=null}},[x,T,m,g]),{statistics:c,statsLoading:b,history:N,historyTotal:h,historyHasMore:C,historyLoading:U,historyOffset:m,historyToolFilter:g,setHistoryOffset:E,setHistoryToolFilter:F,refresh:D,clearHistory:V,clearStatistics:K}}const Et="_page_1rtjt_2",Ht="_card_1rtjt_14",At="_cardToolbar_1rtjt_21",Rt="_sectionTitle_1rtjt_29",It="_dangerButton_1rtjt_36",Ot="_proBadge_1rtjt_55",Ft="_statusOk_1rtjt_70",Dt="_statusFallback_1rtjt_83",$t="_statusUnsupported_1rtjt_96",qt="_statusWarning_1rtjt_109",Wt="_statusError_1rtjt_122",Ut="_tierBasic_1rtjt_136",Vt="_tierPro_1rtjt_140",Kt="_tierMixed_1rtjt_145",Gt="_filterRow_1rtjt_156",zt="_filterLabel_1rtjt_163",Jt="_filterSelect_1rtjt_172",Qt="_detailsButton_1rtjt_187",Zt="_detailShell_1rtjt_210",Xt="_detailHeader_1rtjt_218",Yt="_detailHeading_1rtjt_229",te="_detailTitle_1rtjt_236",ee="_detailRecordName_1rtjt_243",se="_detailHeaderActions_1rtjt_252",ae="_detailCloseButton_1rtjt_259",oe="_detailBody_1rtjt_282",le="_detailSection_1rtjt_294",re="_detailList_1rtjt_313",ie="_detailItem_1rtjt_319",ne="_detailLabel_1rtjt_326",ce="_detailValue_1rtjt_331",de="_pre_1rtjt_337",ue="_pagination_1rtjt_355",pe="_pageInfo_1rtjt_363",he="_btn_1rtjt_369",me="_tierDistribution_1rtjt_397",be="_tierBarWrap_1rtjt_401",xe="_tierBarBasic_1rtjt_409",fe="_tierBarPro_1rtjt_414",_e="_tierLabels_1rtjt_419",ge="_statsTableWrap_1rtjt_428",je="_statsTable_1rtjt_428",ye="_sortableHeader_1rtjt_460",Ce="_sortArrow_1rtjt_465",ke="_statsToolRow_1rtjt_469",Te="_statsActionRow_1rtjt_477",Ne="_expandButton_1rtjt_481",Se="_expandIcon_1rtjt_493",we="_actionLabel_1rtjt_498",ve="_emptyStats_1rtjt_505",Me="_summaryLine_1rtjt_511",a={page:Et,card:Ht,cardToolbar:At,sectionTitle:Rt,dangerButton:It,proBadge:Ot,statusOk:Ft,statusFallback:Dt,statusUnsupported:$t,statusWarning:qt,statusError:Wt,tierBasic:Ut,tierPro:Vt,tierMixed:Kt,filterRow:Gt,filterLabel:zt,filterSelect:Jt,detailsButton:Qt,detailShell:Zt,detailHeader:Xt,detailHeading:Yt,detailTitle:te,detailRecordName:ee,detailHeaderActions:se,detailCloseButton:ae,detailBody:oe,detailSection:le,detailList:re,detailItem:ie,detailLabel:ne,detailValue:ce,pre:de,pagination:ue,pageInfo:pe,btn:he,tierDistribution:me,tierBarWrap:be,tierBarBasic:xe,tierBarPro:fe,tierLabels:_e,statsTableWrap:ge,statsTable:je,sortableHeader:ye,sortArrow:Ce,statsToolRow:ke,statsActionRow:Te,expandButton:Ne,expandIcon:Se,actionLabel:we,emptyStats:ve,summaryLine:Me},Be=new Set(["clientId","placeId","pinnedTarget","recentPriority","globalQueue"]);function tt(t){return typeof t=="string"&&t.length>0?t:void 0}function Pe(t){if(!Array.isArray(t))return;const o=t.filter(c=>typeof c=="string"&&c.length>0);return o.length>0?o:void 0}function Le(t){const o=t.result??{};return{requestedCommand:t.requestedCommand??tt(o.requestedCommand),executedCommand:t.executedCommand??tt(o.executedCommand),alternatives:t.alternatives??Pe(o.alternatives)}}function ot(t,o){switch(t.status){case"fallback":return{label:o("tools.badge.fallback","FALLBACK"),tooltip:o("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:a.statusFallback};case"unsupported":return{label:o("tools.badge.unsupported","UNSUPPORTED"),tooltip:o("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:a.statusUnsupported};case"warning":return{label:o("tools.badge.warn","WARN"),tooltip:o("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:a.statusWarning};case"error":return{label:o("tools.badge.err","FAILED"),tooltip:o("tools.badge.err.tooltip","The tool run failed."),className:a.statusError};default:return{label:o("tools.status.ok","OK"),tooltip:o("tools.status.ok.tooltip","The tool run completed successfully."),className:a.statusOk}}}function y(t,o){return e.jsxs("div",{className:a.detailItem,children:[e.jsx("span",{className:a.detailLabel,children:t}),e.jsx("span",{className:a.detailValue,children:o})]})}function Ee(t){if(!t||typeof t!="object")return;const o=t;if(typeof o.selectionMode=="string"&&Be.has(o.selectionMode))return o}function et(t){if(!(!t||typeof t!="object"||!("routing"in t)))return Ee(t.routing)}function He(t){return t.routing??et(t.result)??et(t.data)}function Ae(t,o){return t.requestedClientId?t.requestedClientId:t.requestedPlaceId!==void 0?t.requestedPlaceId:o("tools.history.routing.none","No Studio target named")}function Re(t){return t.actualPlaceName?`${t.actualPlaceName} · ${t.actualPlaceId??"-"}`:t.actualClientId??"-"}function Ie({entry:t,onClose:o}){const{t:c}=at(),k=ot(t,c),b=Le(t),l=He(t);return e.jsxs("div",{className:a.detailShell,children:[e.jsxs("header",{className:a.detailHeader,children:[e.jsxs("div",{className:a.detailHeading,children:[e.jsx("span",{className:a.detailTitle,children:c("tools.detail.title","Tool execution")}),e.jsx("span",{className:a.detailRecordName,children:t.command})]}),e.jsxs("div",{className:a.detailHeaderActions,children:[e.jsx(M,{text:k.tooltip,children:e.jsx("span",{className:k.className,children:k.label})}),e.jsx("button",{type:"button",className:a.detailCloseButton,onClick:o,"aria-label":c("common.close","Close"),children:e.jsx(mt,{size:18,"aria-hidden":"true"})})]})]}),e.jsxs("div",{className:a.detailBody,children:[e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:c("tools.detail.params","Parameters")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.result.tooltip","Returned result payload for this tool run."),children:c("tools.detail.result","Result")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]}),l&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:c("tools.history.routing","Routing")}),e.jsxs("div",{className:a.detailList,children:[y(c("tools.history.routing.mode","Mode"),l.selectionMode),y(c("tools.history.routing.requested","Requested"),Ae(l,c)),y(c("tools.history.routing.actual","Actual"),Re(l))]})]}),(t.status==="fallback"||t.status==="unsupported"||t.status==="warning"||t.status==="error")&&e.jsx("section",{className:a.detailSection,children:e.jsxs("div",{className:a.detailList,children:[t.status==="fallback"&&b.requestedCommand?y(c("tools.detail.requestedCommand","Requested Command"),b.requestedCommand):null,t.status==="fallback"&&b.executedCommand?y(c("tools.detail.executedCommand","Executed Command"),b.executedCommand):null,t.status==="fallback"&&b.alternatives?y(c("tools.detail.alternatives","Alternatives"),b.alternatives.join(", ")):null,t.status==="unsupported"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="unsupported"?y(c("tools.detail.noFallback","No Fallback"),c("tools.detail.noFallback.value","No fallback ran.")):null,t.status==="warning"&&t.warningMessage?y(c("tools.detail.warningMessage","Warning Message"),t.warningMessage):null,t.status==="error"&&t.errorMessage?y(c("tools.detail.errorMessage","Error Message"),t.errorMessage):null,t.status==="error"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="error"&&t.fallbackCommand?y(c("tools.detail.executedCommand","Executed Command"),t.fallbackCommand):null]})})]})]})}const G=50;function Oe(t){const o=new Date(t);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function W(t){return typeof t!="number"||!Number.isFinite(t)?"-":t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function R(t,o){return o==="pro"?t("tier.pro","Pro"):o==="mixed"?t("tier.mixed","Mixed"):t("tier.basic","Basic")}function lt(t,o){return o!==t&&o.startsWith(`${t}_`)?o.slice(t.length+1):""}function st(t,o){const c=lt(t,o);return c?`${t}.${c}`:t}function Ge(){const{t}=at(),{trackEvent:o,trackPageView:c}=bt(),[k,b]=i.useState(null),l=Lt({placeId:k}),{show:N}=xt(),[S,h]=i.useState("history"),[w,C]=i.useState(null),_=i.useRef(null),[U,O]=i.useState(null),[m,E]=i.useState(null),[g,F]=i.useState(!1),[B,T]=i.useState("totalCalls"),[x,D]=i.useState("desc"),V=i.useCallback(s=>{T(n=>n===s?(D(r=>r==="asc"?"desc":"asc"),s):(D("desc"),s))},[]),K=i.useMemo(()=>{var n;const s=new Set;return Object.keys(((n=l.statistics)==null?void 0:n.tools)??{}).forEach(r=>s.add(r)),l.history.forEach(r=>{r.tool&&s.add(r.tool)}),l.historyToolFilter&&s.add(l.historyToolFilter),Array.from(s).sort()},[l.history,l.historyToolFilter,l.statistics]),j=i.useMemo(()=>{var s;return(s=l.statistics)!=null&&s.tools?Object.values(l.statistics.tools).map(n=>{var X;const r=Object.entries(n.commands??{}).map(([p,d])=>({toolName:n.tool,commandName:d.command??p,label:lt(n.tool,d.command??p)||(d.command??p),tier:d.tier,totalCalls:d.totalCalls,successCount:d.successCount,fallbackCount:d.fallbackCount,unsupportedCount:d.unsupportedCount,warningCount:d.warningCount??0,failureCount:d.failureCount,totalExecutionTimeMs:d.totalExecutionTimeMs,avgExecutionTimeMs:d.avgExecutionTimeMs})),f=r.reduce((p,d)=>p+d.totalCalls,0),v=r.reduce((p,d)=>p+d.successCount,0),$=r.reduce((p,d)=>p+d.fallbackCount,0),q=r.reduce((p,d)=>p+d.unsupportedCount,0),dt=r.reduce((p,d)=>p+d.warningCount,0),ut=r.reduce((p,d)=>p+d.failureCount,0),Z=r.reduce((p,d)=>p+d.totalExecutionTimeMs,0),pt=new Set(r.map(p=>p.tier)).size>1?"mixed":((X=r[0])==null?void 0:X.tier)??n.tier;return{toolName:n.tool,tier:pt,commands:r,totalCalls:f,successCount:v,fallbackCount:$,unsupportedCount:q,warningCount:dt,failureCount:ut,totalExecutionTimeMs:Z,avgExecutionTimeMs:f>0?Math.round(Z/f):0}}):[]},[l.statistics]),u=i.useCallback((s,n,r,f)=>e.jsx(M,{text:t(r,f),children:t(s,n)}),[t]),P=i.useCallback((s,n)=>{_.current=n,C(s)},[]),H=i.useCallback(()=>{C(null)},[]),z=i.useMemo(()=>[...j].sort((n,r)=>{const f=n[B],v=r[B];if(typeof f=="number"&&typeof v=="number")return x==="asc"?f-v:v-f;const $=String(f??""),q=String(v??"");return x==="asc"?$.localeCompare(q):q.localeCompare($)}),[j,B,x]),rt=i.useMemo(()=>[{key:"timestamp",label:u("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:s=>Oe(s.timestamp)},{key:"toolName",label:u("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:s=>e.jsxs("span",{children:[st(s.tool,s.command),s.tier==="pro"&&e.jsx(M,{text:t("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:e.jsx("span",{className:a.proBadge,children:t("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:u("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:s=>W(s.executionTimeMs)},{key:"status",label:u("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:s=>{const n=ot(s,t);return e.jsx(M,{text:n.tooltip,children:e.jsx("span",{className:n.className,children:n.label})})}},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:s=>e.jsx("span",{className:s.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,s.tier)})},{key:"details",label:t("tools.detail.open","Details"),width:"84px",render:s=>{const n=st(s.tool,s.command);return e.jsx("button",{type:"button",className:a.detailsButton,"aria-haspopup":"dialog","aria-label":t("tools.detail.openLabel","View details for {command}").replace("{command}",n),onClick:r=>{r.stopPropagation(),P(s,r.currentTarget)},children:t("tools.detail.open","Details")})}}],[P,t,u]),J=i.useMemo(()=>[{key:"toolName",label:u("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:u("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:u("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:u("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:u("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:u("tools.col.warn","WARN","tools.col.warn.tooltip","Number of expected failures caused by caller input, project state, Roblox policy, or user code."),sortable:!0,width:"80px"},{key:"failureCount",label:u("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:u("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:s=>W(s.avgExecutionTimeMs)},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:s=>e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})}],[t,u]),L=i.useMemo(()=>{if(!l.statistics)return null;const s=l.statistics.tierSummary.basic.totalCalls,n=l.statistics.tierSummary.pro.totalCalls,r=s+n;if(r===0)return null;const f=Math.round(s/r*100),v=100-f;return{basic:s,pro:n,basicPct:f,proPct:v}},[l.statistics]),Q=i.useCallback(s=>{O(n=>n===s?null:s)},[]),it=i.useCallback(async()=>{if(m){F(!0);try{m==="history"?await l.clearHistory():await l.clearStatistics(),N(t("toast.clearSuccess","Cleared successfully"),"success"),E(null)}catch{N(t("toast.clearFailed","Failed to clear data"),"error")}finally{F(!1)}}},[m,N,t,l]),nt=i.useCallback(s=>{const n=s==="history"?"tools_history":"tools_statistics";o("dashboard_click_event",{click_target:s==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:n}),c({page:"tools",tab:n}),C(null),h(s)},[o,c]),ct=["history","statistics"].map(s=>({key:s,label:t(`tools.tab.${s}`,s.charAt(0).toUpperCase()+s.slice(1))}));return e.jsxs("div",{className:a.page,children:[e.jsx(ft,{title:t("page.tools.title","Tools"),description:t("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),e.jsx(gt,{surface:"tools",selectable:!0,selectedPlaceId:k,onSelectedPlaceIdChange:s=>{C(null),b(s),l.setHistoryOffset(0)}}),e.jsx(jt,{items:ct,value:S,onChange:nt}),S==="history"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.history","History")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),E("history")},children:t("common.clear","Clear")})]}),e.jsx("div",{className:a.filterRow,children:e.jsxs("label",{className:a.filterLabel,children:[t("tools.filter.tool","Tool"),":",e.jsxs("select",{className:a.filterSelect,value:l.historyToolFilter,onChange:s=>{C(null),l.setHistoryToolFilter(s.target.value),l.setHistoryOffset(0)},children:[e.jsx("option",{value:"",children:t("tools.filter.all","All")}),K.map(s=>e.jsx("option",{value:s,children:s},s))]})]})}),e.jsx(vt,{columns:rt,data:l.history,rowKey:s=>s.id,onRowClick:(s,n)=>P(s,n),emptyMessage:t("tools.empty.history","No tool history entries for this place")}),e.jsxs("div",{className:a.pagination,children:[e.jsx("button",{className:a.btn,disabled:l.historyOffset===0,title:t("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(Math.max(0,l.historyOffset-G))},children:t("tools.page.prev","Prev")}),e.jsxs("span",{className:a.pageInfo,children:[l.historyOffset+1,"–",Math.min(l.historyOffset+G,l.historyTotal)," / ",l.historyTotal]}),e.jsx("button",{className:a.btn,disabled:!l.historyHasMore,title:t("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(l.historyOffset+G)},children:t("tools.page.next","Next")})]})]}),S==="statistics"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.statistics","Statistics")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),E("statistics")},children:t("common.clear","Clear")})]}),L&&e.jsxs("div",{className:a.tierDistribution,children:[e.jsxs("div",{className:a.tierBarWrap,children:[e.jsx("div",{className:a.tierBarBasic,style:{width:`${L.basicPct}%`}}),e.jsx("div",{className:a.tierBarPro,style:{width:`${L.proPct}%`}})]}),e.jsxs("div",{className:a.tierLabels,children:[e.jsxs("span",{children:[R(t,"basic")," ",L.basicPct,"% (",L.basic,")"]}),e.jsxs("span",{children:[R(t,"pro")," ",L.proPct,"% (",L.pro,")"]})]})]}),e.jsx("div",{className:a.statsTableWrap,children:e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsx("tr",{children:J.map(s=>e.jsxs("th",{style:s.width?{width:s.width}:void 0,className:s.sortable?a.sortableHeader:void 0,onClick:s.sortable?()=>V(s.key):void 0,children:[e.jsx("span",{children:s.label}),s.sortable&&B===s.key&&e.jsx("span",{className:a.sortArrow,children:x==="asc"?"▴":"▾"})]},s.key))})}),e.jsx("tbody",{children:z.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:J.length,className:a.emptyStats,children:t("tools.empty.stats","No tool statistics for this place")})}):z.map(s=>{const n=U===s.toolName;return e.jsxs(i.Fragment,{children:[e.jsxs("tr",{className:a.statsToolRow,onClick:()=>Q(s.toolName),children:[e.jsx("td",{children:e.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":n,"aria-label":`${s.toolName} ${n?t("common.collapse","Collapse"):t("common.expand","Expand")}`,onClick:r=>{r.stopPropagation(),Q(s.toolName)},children:[e.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:n?"▾":"▸"}),e.jsx("span",{children:s.toolName})]})}),e.jsx("td",{children:s.totalCalls}),e.jsx("td",{children:s.successCount}),e.jsx("td",{children:s.fallbackCount}),e.jsx("td",{children:s.unsupportedCount}),e.jsx("td",{children:s.warningCount}),e.jsx("td",{children:s.failureCount}),e.jsx("td",{children:W(s.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})})]}),n&&s.commands.map(r=>e.jsxs("tr",{className:a.statsActionRow,children:[e.jsx("td",{children:e.jsx("span",{className:a.actionLabel,children:r.label})}),e.jsx("td",{children:r.totalCalls}),e.jsx("td",{children:r.successCount}),e.jsx("td",{children:r.fallbackCount}),e.jsx("td",{children:r.unsupportedCount}),e.jsx("td",{children:r.warningCount}),e.jsx("td",{children:r.failureCount}),e.jsx("td",{children:W(r.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx("span",{className:r.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,r.tier)})})]},`${s.toolName}:${r.commandName}`))]},s.toolName)})})]})}),l.statistics&&e.jsxs("div",{className:a.summaryLine,children:[t("tools.summary.total","Total"),": ",l.statistics.totalCalls," ",t("tools.summary.calls","calls")," | ",t("tools.summary.sessions","Sessions"),": ",l.statistics.totalSessions]})]}),e.jsx(yt,{open:w!==null,ariaLabel:t("tools.detail.dialogLabel","Tool execution detail"),onClose:H,returnFocusTo:_.current,testId:"tools-history-detail-popup-layer",children:w&&e.jsx(Ie,{entry:w,onClose:H})}),e.jsx(_t,{open:m!==null,title:m==="history"?t("tools.clear.history.title","Clear history?"):t("tools.clear.statistics.title","Clear statistics?"),message:m==="history"?t("tools.clear.history.message","This permanently removes the current place tools history."):t("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:g,onCancel:()=>!g&&E(null),onConfirm:it})]})}export{Ge as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i,i as r}from"./index-
|
|
1
|
+
import{j as i,i as r}from"./index-Dryjq9a5.js";function p({text:o,children:t}){return i.jsx(r,{text:o,children:t})}export{p as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._page_12gq5_2{display:flex;flex-direction:column;gap:var(--content-gap);max-width:var(--content-max)}._grid_12gq5_9{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:16px}._card_12gq5_16{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--bg-card);padding:0;text-align:left;position:relative;color:inherit}._card_12gq5_16:hover{border-color:var(--accent)}._cardBodyButton_12gq5_31{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:left}._cardBodyButton_12gq5_31:focus-visible{outline:none;box-shadow:inset var(--focus-ring)}._thumb_12gq5_48{width:100%;aspect-ratio:16 / 9;object-fit:contain;object-position:center;display:block;background:var(--bg-secondary)}._runtimeObservationPlaceholder_12gq5_57{display:flex;align-items:center;justify-content:center;padding:12px;color:var(--text-secondary);font-size:11px;font-weight:600;line-height:1.35;text-align:center}._badges_12gq5_69{position:absolute;top:8px;right:8px;display:flex;gap:4px}._priorityHighBadge_12gq5_77,._priorityMediumBadge_12gq5_78,._priorityLowBadge_12gq5_79{display:inline-flex;align-items:center;min-height:22px;padding:2px 6px;border:1px solid var(--border);border-radius:var(--radius-control);font-size:12px;font-weight:600;cursor:default}._priorityHighBadge_12gq5_77{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}._priorityMediumBadge_12gq5_78{background:var(--pro-bg-soft);border-color:var(--pro-border);color:var(--pro-text)}._priorityLowBadge_12gq5_79{background:var(--bg-secondary);border-color:var(--border);color:var(--text-secondary)}._cardMeta_12gq5_109{padding:8px 12px;font-size:12px;color:var(--text-primary)}._target_12gq5_115{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._time_12gq5_122{color:var(--text-muted);margin-top:4px}._drawer_12gq5_127{width:100%;flex:1 1 auto;min-height:0;max-height:none;display:flex;flex-direction:column;background:var(--bg-card);border:0;border-radius:0;overflow:hidden;padding:0;box-shadow:none;color:var(--text-primary);box-sizing:border-box}._drawerToolbar_12gq5_144{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))}._drawerTitleBlock_12gq5_155{min-width:0;display:flex;flex-direction:column;gap:3px}._drawerEyebrow_12gq5_162{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._drawerTarget_12gq5_171{overflow:hidden;color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._drawerToolbarActions_12gq5_181{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._closeBtn_12gq5_189{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;cursor:pointer;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--text-secondary);transition:border-color var(--transition),background var(--transition),color var(--transition)}._closeBtn_12gq5_189:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._detailBody_12gq5_210{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 24px 24px}._screenshotPreviewFrame_12gq5_217{display:flex;align-items:center;justify-content:center;width:100%;height:clamp(180px,32vh,320px);margin-top:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);overflow:hidden}._fullImg_12gq5_230{display:block;width:100%;height:100%;object-fit:contain}._metaDl_12gq5_237{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:16px 0;font-size:13px}._metaDl_12gq5_237 dt{color:var(--text-muted)}._platformGuidance_12gq5_249{margin-top:16px;color:var(--text-primary);font-size:13px;overflow-wrap:anywhere}._platformGuidance_12gq5_249>summary{cursor:pointer;padding:12px 0;font-weight:600}._platformGuidance_12gq5_249>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}._platformGuidanceItem_12gq5_267{border-top:1px solid var(--border);padding:12px 0}._platformGuidanceItem_12gq5_267 h4,._platformGuidanceItem_12gq5_267 p{margin:0 0 8px}._platformGuidanceKind_12gq5_277,._platformGuidanceItem_12gq5_267 ._metaDl_12gq5_237 dt{color:var(--text-secondary)}._platformGuidanceItem_12gq5_267 ._metaDl_12gq5_237{grid-template-columns:minmax(0,120px) minmax(0,1fr)}._platformGuidanceItem_12gq5_267 dd{margin:0}._errorMsg_12gq5_290{color:var(--error-text);padding:12px}._suggestionsWrap_12gq5_295{margin-top:16px}._suggestionsWrap_12gq5_295 h3{margin:0 0 12px;font-size:16px}._prioritySection_12gq5_302{margin-bottom:16px}._sectionHighHeader_12gq5_306{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--error)}._sectionLowHeader_12gq5_312{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning-text)}._sectionMediumHeader_12gq5_318{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning)}._groupCard_12gq5_324{border:1px solid var(--border);border-radius:8px;margin-bottom:8px;background:var(--bg-secondary);overflow:hidden}._groupHeader_12gq5_331{width:100%;display:flex;align-items:center;gap:8px;padding:10px 12px;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--text-primary);font:inherit}._groupHeader_12gq5_331:hover{background:var(--bg-card)}._groupLabel_12gq5_347{font-weight:600;font-size:13px;flex:1}._groupCount_12gq5_352{font-size:12px;color:var(--text-muted);padding:2px 8px;background:var(--bg-card);border-radius:10px}._groupChevron_12gq5_359{color:var(--text-muted);font-size:12px}._groupBody_12gq5_363{padding:0 12px 12px}._groupDescription_12gq5_366{font-size:12px;color:var(--text-muted);margin:8px 0 4px}._groupFix_12gq5_371{font-size:12px;color:var(--text-primary);margin:4px 0 8px;padding:6px 10px;background:var(--bg-card);border-left:3px solid var(--accent);border-radius:4px}._falsePositive_12gq5_380{font-size:12px;color:var(--warning-text);margin:4px 0 8px;padding:6px 10px;background:var(--warning-bg);border-radius:4px}._itemList_12gq5_388{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}._suggestionItem_12gq5_396{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:var(--bg-card);border-radius:6px;font-size:12px}._suggestionInfo_12gq5_406{display:flex;flex-direction:column;gap:2px;min-width:0}._pathBreadcrumb_12gq5_412{font-family:monospace;font-size:11px;color:var(--text-primary);background:transparent;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._currentValue_12gq5_421{font-size:11px;color:var(--text-muted)}._copyFixBtn_12gq5_425{padding:4px 10px;background:var(--accent);color:var(--bg-card);border:none;border-radius:4px;cursor:pointer;font-size:11px;font-weight:600;flex-shrink:0}._copyFixBtn_12gq5_425:hover{opacity:.9}._emptySuggestions_12gq5_439{text-align:center;padding:24px;color:var(--text-muted);font-size:13px}._sampleBanner_12gq5_447{display:flex;flex-direction:column;gap:12px;padding:18px 20px;border:1px solid var(--pro-border);border-radius:var(--radius);background:linear-gradient(135deg,#f0bd5829,#f0bd5808 55%),var(--bg-card);margin-bottom:16px}._sampleBannerRow_12gq5_460{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}._sampleBannerMain_12gq5_468{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}._sampleBadge_12gq5_476{width:fit-content;color:var(--pro-text);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.02em;opacity:.92}._sampleTitle_12gq5_486{font-family:var(--font-label);font-size:16px;font-weight:600;color:var(--text-primary)}._sampleMessage_12gq5_493{max-width:560px;color:var(--text-secondary);font-size:13px;line-height:1.5}._sampleActions_12gq5_500{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._primaryAction_12gq5_508,._secondaryAction_12gq5_509{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border-radius:8px;font-family:var(--font-label);font-size:12px;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._secondaryAction_12gq5_509{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer}._secondaryAction_12gq5_509:hover{border-color:var(--accent);background:var(--accent-dim)}._primaryAction_12gq5_508{border:1px solid var(--pro-badge);background:var(--pro-badge);color:var(--pro-text-on-badge)}._primaryAction_12gq5_508:hover{opacity:.9}._emptyState_12gq5_544{text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._pluginGuideCard_12gq5_552{display:flex;align-items:flex-start;gap:14px;padding:18px 20px;border:1px solid var(--warning);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary)}._pluginGuideMarker_12gq5_563{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;border:1px solid var(--warning);color:var(--warning);font-family:var(--font-label);font-size:15px;font-weight:700}._pluginGuideBody_12gq5_578{min-width:0}._pluginGuideTitle_12gq5_582{margin:0 0 8px;color:var(--text-primary);font-family:var(--font-label);font-size:15px;font-weight:600}._pluginGuideMessage_12gq5_590{margin:0 0 12px;color:var(--text-secondary);font-size:13px;line-height:1.5}._pluginGuideChecklist_12gq5_597{display:flex;flex-direction:column;gap:7px;margin:0 0 14px;padding:0;list-style:none}._pluginGuideChecklist_12gq5_597 li{position:relative;padding-left:20px;color:var(--text-secondary);font-size:13px}._pluginGuideChecklist_12gq5_597 li:before{content:"○";position:absolute;left:2px;color:var(--text-muted)}._pluginGuideWaiting_12gq5_620{display:inline-flex;align-items:center;gap:8px;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._pluginGuideDot_12gq5_629{width:7px;height:7px;border-radius:50%;background:var(--warning)}._analysisWorkspace_12gq5_637{width:100%;position:relative}._analysisMainColumn_12gq5_642{min-width:0}._analysisSummaryPanel_12gq5_647{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:16px;padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._analysisSummaryPanel_12gq5_647 h2,._recentCapturesHeader_12gq5_660 h2{margin:0;font-size:16px;font-family:var(--font-label);color:var(--text-primary)}._analysisSummaryText_12gq5_667,._recentCapturesMeta_12gq5_668{margin:6px 0 0;color:var(--text-secondary);font-size:13px}._analysisReportGrid_12gq5_674{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-top:14px}._analysisReportGroup_12gq5_681{min-width:0}._analysisReportCard_12gq5_685{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;width:100%;min-height:128px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisReportCard_12gq5_685:hover{border-color:var(--accent);background:var(--bg-secondary)}._analysisReportThumb_12gq5_707{width:112px;aspect-ratio:16 / 10;object-fit:contain;object-position:center;border-radius:6px;background:var(--bg-secondary)}._analysisReportBody_12gq5_716{min-width:0;display:flex;flex-direction:column;gap:7px}._analysisReportTopline_12gq5_723{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._analysisVerdict_12gq5_730{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-family:var(--font-label);font-size:12px;font-weight:600}._analysisVerdict_needsFix_12gq5_741,._analysisVerdict_review_12gq5_742{color:var(--accent);background:var(--accent-dim)}._analysisVerdict_incomplete_12gq5_747{color:var(--warning-text);background:var(--warning-bg)}._analysisVerdict_passed_12gq5_752{color:var(--text-secondary);background:var(--bg-secondary)}._analysisReportCounts_12gq5_757{color:var(--text-secondary);font-size:12px}._readinessSummary_12gq5_762{display:flex;flex-wrap:wrap;gap:5px}._readinessChip_12gq5_768{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;font-weight:600;line-height:1.3}._readinessChipReady_12gq5_783{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._readinessChipPending_12gq5_789{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._primaryReadinessBlock_12gq5_795{display:flex;flex-direction:column;gap:8px;width:100%}._criticSummary_12gq5_802{display:flex;flex-direction:column;gap:3px;margin:0;padding:8px 10px;border-left:2px solid var(--accent);background:var(--accent-dim);color:var(--text-secondary);font-size:12px;line-height:1.45}._criticSummary_12gq5_802>span{color:var(--text-primary);font-size:11px;font-weight:600}._analysisReportTarget_12gq5_821{overflow:hidden;color:var(--text-primary);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._analysisReportIssue_12gq5_830{color:var(--text-secondary);font-size:12px;line-height:1.35}._analysisReportCoverage_12gq5_836{color:var(--text-muted);font-size:12px;line-height:1.4}._coverageChips_12gq5_842{display:flex;flex-wrap:wrap;gap:5px}._coverageChip_12gq5_842{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:5px;background:var(--bg-card);color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:500;cursor:default}._coverageChip_completed_12gq5_863{border-color:var(--success-border);color:var(--success-text)}._coverageChip_failed_12gq5_868{border-color:var(--error-border);color:var(--error-text)}._coverageChip_skipped_12gq5_873,._coverageChip_not_requested_12gq5_874{border-color:var(--warning-border);color:var(--warning-text)}._analysisReportMeta_12gq5_879{margin-top:auto;color:var(--text-muted);font-size:11px;line-height:1.35}._analysisChildList_12gq5_886{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding:8px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._analysisChildRow_12gq5_897{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:6px;background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisChildRow_12gq5_897:hover{border-color:var(--accent);background:var(--accent-dim)}._analysisChildPath_12gq5_918{overflow:hidden;color:var(--text-primary);font-family:var(--font-code);font-size:11px;text-overflow:ellipsis;white-space:nowrap}._analysisChildSummary_12gq5_927,._analysisChildDetailHint_12gq5_928{color:var(--text-secondary);font-size:11px}._analysisChildDetailHint_12gq5_928{color:var(--text-muted)}._drawerAnalysisSummary_12gq5_937{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._drawerAnalysisSummaryItem_12gq5_948{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._drawerAnalysisLabel_12gq5_955{min-width:64px;color:var(--text-muted);font-size:12px}._drawerAnalysisCounts_12gq5_961,._drawerAnalysisValue_12gq5_962{color:var(--text-secondary);font-size:12px}._recentCapturesSection_12gq5_967{margin-top:28px}._recentCapturesHeader_12gq5_660{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._drawerPrimaryActions_12gq5_979{display:flex;align-items:center;gap:8px;min-width:0}._drawerActionBtn_12gq5_986{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 14px;border-radius:7px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerActionBtn_12gq5_986:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._drawerActionBtn_12gq5_986:disabled{opacity:.45;cursor:not-allowed}._drawerMoreMenu_12gq5_1015{position:relative;flex:0 0 auto}._drawerMoreButton_12gq5_1020{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:7px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);cursor:pointer;list-style:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerMoreButton_12gq5_1020:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._drawerMoreButton_12gq5_1020::-webkit-details-marker{display:none}._drawerMoreMenuBody_12gq5_1045{position:absolute;top:calc(100% + 6px);right:0;z-index:2;min-width:180px;padding:6px;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);box-shadow:0 8px 24px #0000002e}._drawerMenuItem_12gq5_1058{display:block;width:100%;padding:8px 10px;border:0;border-radius:5px;background:transparent;color:var(--text-primary);text-align:left;font-family:var(--font-label);font-size:12px;cursor:pointer}._drawerMenuItem_12gq5_1058:hover:not(:disabled){background:var(--bg-secondary)}._drawerMenuItem_12gq5_1058:disabled{opacity:.45;cursor:not-allowed}._drawerMenuItemDanger_12gq5_1081{color:var(--danger-text)}._drawerMenuItemDanger_12gq5_1081:hover:not(:disabled){background:var(--danger-hover-bg)}._actionErrMsg_12gq5_1090{font-size:12px;color:var(--error-text);padding:6px 10px;background:#e0555514;border-radius:4px;margin-top:10px}._actionStatusMsg_12gq5_1099{display:inline-flex;flex-direction:column;align-items:flex-start;max-width:100%;font-size:12px;padding:7px 10px;border:1px solid transparent;border-radius:7px;margin-top:0;margin-bottom:10px;line-height:1.45}._actionStatus_info_12gq5_1113{color:var(--text-secondary);background:var(--bg-secondary);border-color:var(--border)}._actionStatus_success_12gq5_1119{color:var(--success-text);background:var(--success-bg);border-color:var(--success-border)}._actionStatus_warning_12gq5_1125{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}._actionStatusDetail_12gq5_1131{margin-top:2px;color:var(--text-muted)}._galleryHeader_12gq5_1137{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._galleryHeader_12gq5_1137 h2{margin:0;color:var(--text-primary);font-size:var(--type-surface-title-size);font-weight:600;line-height:var(--leading-title)}._cardChecked_12gq5_1154{border-color:var(--accent)!important;box-shadow:0 0 0 2px var(--accent);background:var(--accent-dim)}._cardCheckbox_12gq5_1161{position:absolute;top:8px;left:8px;opacity:0;z-index:2;transition:opacity var(--transition),background var(--transition),border-color var(--transition)}._card_12gq5_16:hover ._cardCheckbox_12gq5_1161,._card_12gq5_16:focus-within ._cardCheckbox_12gq5_1161,._cardChecked_12gq5_1154 ._cardCheckbox_12gq5_1161{opacity:1}._captureSelectionActions_12gq5_1176{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}._selectionToolbar_12gq5_1185,._selectionBar_12gq5_1186{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 12px;padding:12px 16px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius)}._selectionToolbar_12gq5_1185{position:sticky;top:0;z-index:8;justify-content:space-between}._selectionToolbarCount_12gq5_1205{color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._selectionToolbarActions_12gq5_1212{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._selectionBarBtn_12gq5_1219{padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),opacity var(--transition)}._selectionBarBtn_12gq5_1219:hover:not(:disabled){border-color:var(--accent)}._selectionBarBtn_12gq5_1219:focus-visible{outline:none;box-shadow:var(--focus-ring)}._selectionBarBtn_12gq5_1219:disabled{opacity:.45;cursor:not-allowed}._selectionBarBtnDanger_12gq5_1245{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}._selectionBarBtnDanger_12gq5_1245:hover:not(:disabled){border-color:var(--danger);background:var(--danger-hover-bg)}@media(max-width:768px){._drawer_12gq5_127{padding:0}._drawerToolbar_12gq5_144{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._drawerToolbarActions_12gq5_181{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._drawerActionBtn_12gq5_986{padding:7px 10px}._detailBody_12gq5_210{padding:14px}}._emptyState_13gyl_1{display:flex;flex-direction:column;gap:var(--space-section);padding:20px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._header_13gyl_11,._method_13gyl_12{display:flex;flex-direction:column;gap:var(--space-related)}._header_13gyl_11 h3,._header_13gyl_11 p,._method_13gyl_12 h4{margin:0}._header_13gyl_11 h3{color:var(--text-primary);font-family:var(--font-label);font-size:var(--type-section-title-size);font-weight:600}._header_13gyl_11 p{color:var(--text-secondary);font-size:var(--type-body-size);line-height:var(--leading-body)}._method_13gyl_12{padding:14px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary)}._methodTitle_13gyl_44{display:flex;align-items:center;gap:var(--space-related);color:var(--text-primary)}._methodTitle_13gyl_44 h4{font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600}._moreExamples_13gyl_57{color:var(--text-secondary);font-size:var(--type-body-size)}._moreExamples_13gyl_57 summary{width:fit-content;min-height:34px;color:var(--accent-hover);font-weight:600;line-height:34px;cursor:pointer}._moreExamples_13gyl_57[open] summary{margin-bottom:var(--space-related)}._moreExamples_13gyl_57 summary:focus-visible{outline:none;box-shadow:var(--focus-ring)}._filterBar_1203k_4{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;margin-bottom:8px;border-bottom:1px solid var(--border)}._filterGroup_1203k_14{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._filterLabel_1203k_21{font-size:12px;color:var(--text-muted);font-weight:500;white-space:nowrap}._filterCheckbox_1203k_28{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none}._filterCheckbox_1203k_28 input[type=checkbox]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent)}._segmentGroup_1203k_45{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--border);border-radius:7px;background:var(--bg-secondary)}._segmentBtn_1203k_55{min-height:26px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;white-space:nowrap;transition:background var(--transition),color var(--transition)}._segmentBtn_1203k_55:hover{color:var(--text-primary)}._segmentBtnActive_1203k_73{background:var(--bg-card);color:var(--text-primary);box-shadow:0 0 0 1px var(--border)}._filterInput_1203k_79{font-size:12px;padding:4px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);font-family:inherit;width:130px}._filterInput_1203k_79:focus{outline:none;border-color:var(--accent)}._filterResetBtn_1203k_95{min-height:30px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition)}._filterResetBtn_1203k_95:hover{border-color:var(--accent);color:var(--text-primary)}._requestRow_1203k_114{border:1px solid var(--border);border-radius:var(--radius);margin-bottom:8px;background:var(--bg-card);overflow:hidden;transition:border-color var(--transition)}._requestRow_1203k_114:hover{border-color:var(--accent)}._requestRowMain_1203k_127{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}._requestDetailToggle_1203k_134{flex:1;min-width:0;display:flex;align-items:flex-start;gap:12px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}._requestDetailToggle_1203k_134:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}._thumbPair_1203k_156{display:flex;align-items:center;gap:4px;flex-shrink:0;position:relative}._thumbPairButton_1203k_164{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;border-radius:6px}._thumbPairButton_1203k_164:focus-visible{outline:2px solid var(--accent);outline-offset:3px}._thumbPairButton_1203k_164:hover ._thumbSlot_1203k_179{border-color:var(--accent)}._thumbPairButton_1203k_164:disabled{cursor:not-allowed;opacity:.72}._thumbPairButton_1203k_164:disabled:hover ._thumbSlot_1203k_179{border-color:var(--border)}._thumbSlot_1203k_179{width:72px;height:48px;border:1px solid var(--border);border-radius:4px;overflow:hidden;background:var(--bg-secondary);display:flex;align-items:center;justify-content:center}._thumbImg_1203k_204{width:100%;height:100%;object-fit:cover;display:block}._thumbPlaceholder_1203k_211{font-size:10px;color:var(--text-muted);text-align:center;padding:4px;line-height:1.3}._thumbArrow_1203k_219{font-size:12px;color:var(--text-muted);flex-shrink:0}._extraPathsBadge_1203k_225{position:absolute;bottom:0;right:0;background:var(--accent);color:#fff;font-size:10px;font-weight:700;padding:1px 4px;border-radius:3px;line-height:1.4}._requestMeta_1203k_239{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}._requestLabel_1203k_247{font-size:13px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._requestTime_1203k_256{font-size:11px;color:var(--text-muted)}._requestStats_1203k_261{font-size:12px;color:var(--text-secondary);display:flex;gap:4px;flex-wrap:wrap}._statDot_1203k_269{color:var(--text-muted)}._summaryPill_1203k_273{color:var(--text-secondary)}._requestReadiness_1203k_277{display:flex;flex-wrap:wrap;gap:5px}._requestReadinessPill_1203k_283{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-size:11px;font-weight:600;line-height:1.35}._requestReadinessReady_1203k_297{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._requestReadinessPending_1203k_303{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._requestActions_1203k_310{display:flex;flex-direction:column;gap:6px;flex-shrink:0}._expandHint_1203k_317{padding:5px 10px;border-radius:5px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;white-space:nowrap;-webkit-user-select:none;user-select:none}._mutationsArea_1203k_330{border-top:1px solid var(--border);background:var(--bg-secondary);padding:8px 14px;display:flex;flex-direction:column;gap:4px}._mutLoading_1203k_339,._mutEmpty_1203k_340{font-size:12px;color:var(--text-muted);padding:4px 0}._mutError_1203k_346{font-size:12px;color:var(--error-text);padding:4px 0}._mutationRow_1203k_352{font-size:12px;padding:6px 0;border-bottom:1px solid var(--border)}._mutationRow_1203k_352:last-child{border-bottom:none}._mutationLine_1203k_362{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}._mutTs_1203k_369{color:var(--text-muted);flex-shrink:0;font-size:11px}._mutCommand_1203k_375{color:var(--accent);font-weight:500;flex-shrink:0}._mutPath_1203k_381{font-family:monospace;font-size:11px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}._mutDiff_1203k_391{color:var(--text-muted);font-size:11px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._mutErr_1203k_346{color:var(--error-text);font-size:11px}._changeDetails_1203k_406{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:88px}._changeDetailRow_1203k_414{display:grid;grid-template-columns:72px minmax(96px,180px) minmax(0,1fr) 14px minmax(0,1fr);align-items:start;gap:8px;min-height:24px;font-size:11px}._changeDetailRowNoBefore_1203k_423{grid-template-columns:72px minmax(96px,180px) 14px minmax(0,1fr)}._changeDetailBadge_1203k_427{justify-self:start;padding:2px 6px;border-radius:4px;border:1px solid var(--border);background:var(--bg-card);color:var(--text-secondary);font-weight:600;line-height:1.4;white-space:nowrap}._changeDetail_text_1203k_444{color:#2563eb;border-color:#2563eb47}._changeDetail_color_1203k_449{color:#b45309;border-color:#b4530947}._changeDetail_size_1203k_454{color:#047857;border-color:#04785747}._changeDetail_layout_1203k_459{color:#7c3aed;border-color:#7c3aed47}._changeDetail_state_1203k_464{color:#be123c;border-color:#be123c47}._changeDetail_asset_1203k_469{color:#0369a1;border-color:#0369a147}._changeDetail_property_1203k_474{color:var(--text-secondary)}._changeDetailProperty_1203k_478{font-family:var(--font-code);color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._changeDetailArrow_1203k_486{color:var(--text-muted);text-align:center;line-height:1.6}._changeDetailOldValue_1203k_492,._changeDetailNewValue_1203k_493{font-family:var(--font-code);overflow-wrap:anywhere;word-break:break-word;line-height:1.6}._changeDetailOldValue_1203k_492{color:var(--error-text);text-decoration:line-through;text-decoration-thickness:1px}._changeDetailNewValue_1203k_493{color:var(--success-text)}._compareDialogLayer_1203k_511{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;overflow:auto}._compareDialog_1203k_511{width:100%;height:100%;min-height:0;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;box-shadow:0 24px 60px #0000006b;outline:none;overflow:hidden}._beforeAfterDrawer_1203k_542{width:100%;height:100%;min-height:0;background:var(--bg-card);display:flex;flex-direction:column;overflow:hidden}._drawerHeader_1203k_552{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);flex-shrink:0}._drawerTitle_1203k_561{margin:0;font-size:var(--type-section-title-size);font-weight:600;line-height:var(--leading-title);color:var(--text-primary)}._drawerCloseBtn_1203k_569{padding:5px 12px;border-radius:5px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);font-size:12px;cursor:pointer;transition:border-color var(--transition)}._drawerCloseBtn_1203k_569:hover{border-color:var(--accent);color:var(--text-primary)}._drawerBody_1203k_585{padding:20px;color:var(--text-muted);font-size:13px}._pathTabs_1203k_592{display:flex;gap:2px;border-bottom:1px solid var(--border);padding:0 20px;flex-shrink:0;overflow-x:auto}._pathTab_1203k_592{font-family:var(--font-label);font-size:12px;padding:8px 14px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;transition:color var(--transition),border-color var(--transition)}._pathTab_1203k_592:hover{color:var(--text-primary)}._pathTabActive_1203k_621{color:var(--accent);border-bottom-color:var(--accent)}._comparePanel_1203k_627{display:grid;grid-template-columns:1fr 1fr;gap:1px;flex:1;min-height:0;background:var(--border);overflow:auto}._compareHalf_1203k_637{background:var(--bg-card);display:flex;flex-direction:column;min-height:0}._compareLabel_1203k_644{font-size:11px;font-weight:600;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase;padding:8px 12px;border-bottom:1px solid var(--border);flex-shrink:0}._compareImg_1203k_655{width:100%;flex:1;object-fit:contain;background:var(--bg-secondary);display:block}._comparePlaceholder_1203k_663{flex:1;display:flex;align-items:center;justify-content:center;font-size:13px;color:var(--text-muted);background:var(--bg-secondary);padding:24px;text-align:center}._compareDetailsPanel_1203k_675{flex-shrink:0;max-height:min(34%,260px);overflow:auto;padding:12px 20px 14px;border-top:1px solid var(--border);background:var(--bg-secondary)}._compareDetailsHeader_1203k_684{margin-bottom:8px;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._compareDetailsPanel_1203k_675 ._changeDetails_1203k_406{padding-left:0}._compareDetailsPanel_1203k_675 ._mutPath_1203k_381,._compareDetailsPanel_1203k_675 ._mutDiff_1203k_391{max-width:none}._drawerFooter_1203k_702{display:flex;justify-content:flex-end;padding:12px 20px;border-top:1px solid var(--border);flex-shrink:0}._drawerActionBtn_1203k_710{padding:7px 16px;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),background var(--transition)}._drawerActionBtn_1203k_710:hover{border-color:var(--accent);background:var(--accent-dim)}._historyTabWrap_1203k_728{display:flex;flex-direction:column;gap:0}._historyWorkspace_1203k_734{width:100%;position:relative}._historyMainColumn_1203k_739{min-width:0}._requestList_1203k_743{display:flex;flex-direction:column}._emptyHistory_1203k_748{display:flex;flex-direction:column;gap:var(--space-related);text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._historyError_1203k_758{padding:16px 0;color:var(--error-text);font-size:13px}._historyLoading_1203k_764{padding:48px 20px;text-align:center;color:var(--text-muted);font-size:13px}._listHeader_1203k_772{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px}._listHeaderTitle_1203k_781{font-size:14px;font-weight:600;color:var(--text-primary);margin:0}._clearBtn_1203k_788{padding:6px 12px;border:1px solid var(--danger-border);border-radius:var(--radius-control);background:var(--danger-bg);color:var(--danger-text);font-family:var(--font-label);font-size:12px;font-weight:500;cursor:pointer;transition:background var(--transition),border-color var(--transition)}._clearBtn_1203k_788:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearBtn_1203k_788:focus-visible{outline:none;box-shadow:var(--focus-ring)}._deleteErrBanner_1203k_812{padding:8px 12px;margin-bottom:8px;border-radius:var(--radius);background:var(--error-bg, rgba(224, 85, 85, .12));border:1px solid var(--error-border, rgba(224, 85, 85, .4));color:var(--error-text);font-size:13px}@media(max-width:1120px){._compareDialogLayer_1203k_511{left:calc(var(--sidebar-width) + 16px);right:16px;bottom:16px;padding:12px}}@media(max-width:768px){._compareDialogLayer_1203k_511{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{f as ke,l as W,h as Fe,r as g,u as k,j as t,a as E,R as ze,X as Ve,T as je,e as We,z as Ke}from"./index-Dryjq9a5.js";import{I as R}from"./InfoLabel-CUAC4KaS.js";import{T as y}from"./TooltipText-C8S8B8k6.js";import{C as Ye,P as Qe}from"./PageHeader-BbXDD7J9.js";import{D as le,c as ce,e as Je,g as Xe,h as Ze,i as ue,j as Ie,k as et,l as de,d as tt}from"./sample-requests-B6Kd_Wul.js";import{C as it,a as st,T as at}from"./Tabs-CI7QBRFn.js";import{A as pe}from"./AiPromptExamples-B3Uy68MJ.js";import{B as rt}from"./bot-GYHFrFjr.js";import"./PlaceSelectOptions-CoWR0lUt.js";import"./copy-Dagqdoq_.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 nt=[["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"}]],ot=ke("camera",nt);/**
|
|
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 lt=[["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"}]],ct=ke("ellipsis",lt);async function Ne(e){const i=await fetch(`${W}${e}`);if(!i.ok){let s=null;try{s=await i.json()}catch{}throw new Fe(i.status,(s==null?void 0:s.message)??i.statusText,(s==null?void 0:s.error)??null,s)}return await i.json()}function U(e){return typeof e=="number"&&Number.isFinite(e)?e:0}const ut=["structure","visual","interaction","primary_view_context","responsive_viewport"];function he(e){const i=e.coverage_dimensions,s={structure:{status:e.deterministic_status==="failed"?"failed":"completed",reasons:[]},visual:{status:e.visual_status??"not_requested",reasons:[]},interaction:{status:"skipped",reasons:[]},primary_view_context:{status:"skipped",reasons:[]},responsive_viewport:{status:"skipped",reasons:[]}};if(!i)return s;for(const n of ut){const o=i[n];o&&["completed","not_requested","skipped","failed"].includes(o.status)&&(s[n]={status:o.status,reasons:Array.isArray(o.reasons)?o.reasons.filter(a=>typeof a=="string"):[]})}return s}function dt(e,i){return e.readiness==="ready"||e.readiness==="review_required"||e.readiness==="insufficient_evidence"?e.readiness:"insufficient_evidence"}function pt(e){return e==="recompose"||e==="refine"||e==="approved"?e:void 0}function ht(e){return e==="recommended"||e==="required"?e:void 0}function _t(e){if(Array.isArray(e))return e.filter(i=>i==="primary_visual"||i==="functional_safe"||i==="responsive_ready")}function gt(e){if(e.design_check_summary){const n={platform_guidance:e.design_check_summary.platform_guidance,platform_ui:e.design_check_summary.platform_ui,priority_high:U(e.design_check_summary.priority_high),priority_medium:U(e.design_check_summary.priority_medium),priority_low:U(e.design_check_summary.priority_low),deterministic_status:e.design_check_summary.deterministic_status==="failed"?"failed":"completed",visual_status:e.design_check_summary.visual_status??"not_requested",coverage:e.design_check_summary.coverage==="structural_and_visual"?"structural_and_visual":"structural_only",skipped_reasons:Array.isArray(e.design_check_summary.skipped_reasons)?e.design_check_summary.skipped_reasons.filter(a=>typeof a=="string"):[],primary_visual_status:e.design_check_summary.primary_visual_status,primary_visual_verdict:pt(e.design_check_summary.primary_visual_verdict),critic_summary:typeof e.design_check_summary.critic_summary=="string"?e.design_check_summary.critic_summary:void 0,functional_safe:typeof e.design_check_summary.functional_safe=="boolean"?e.design_check_summary.functional_safe:void 0,responsive_requirement:ht(e.design_check_summary.responsive_requirement),responsive_ready:typeof e.design_check_summary.responsive_ready=="boolean"?e.design_check_summary.responsive_ready:void 0,required_dimensions:_t(e.design_check_summary.required_dimensions),observation_source:e.design_check_summary.observation_source==="play_client"?"play_client":e.design_check_summary.observation_source==="edit"?"edit":void 0,runtime_status:e.design_check_summary.runtime_status==="completed"||e.design_check_summary.runtime_status==="skipped"?e.design_check_summary.runtime_status:void 0,limitations:Array.isArray(e.design_check_summary.limitations)?e.design_check_summary.limitations.filter(a=>typeof a=="string"):[],state_coverage:Array.isArray(e.design_check_summary.state_coverage)?e.design_check_summary.state_coverage:[]},o=he({...n,coverage_dimensions:e.design_check_summary.coverage_dimensions});return{...n,coverage_dimensions:o,viewport_profiles_tested:Array.isArray(e.design_check_summary.viewport_profiles_tested)?e.design_check_summary.viewport_profiles_tested.filter(a=>typeof a=="string"):[],readiness:dt(e.design_check_summary)}}if(!e.lint_summary)return null;const i={priority_high:U(e.lint_summary.errors),priority_medium:U(e.lint_summary.warnings),priority_low:0,deterministic_status:"completed",visual_status:"not_requested",coverage:"structural_only",skipped_reasons:[]},s=he(i);return{...i,coverage_dimensions:s,viewport_profiles_tested:[],readiness:"insufficient_evidence"}}function mt(e){return{guidance_refs:e.guidance_refs,evidence:e.evidence,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 Pe(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:gt(e),primary_view_context:e.primary_view_context,image:e.image}}function yt(e){const i=e.check_results??e.lint_results??[];return{...Pe(e),check_results:i.map(mt),image_url:e.image_url,meta:e.meta,layout_metadata:e.layout_metadata,target_profiles:e.target_profiles,profile_simulations:e.profile_simulations,design_check_context:e.design_check_context}}async function _e(e,i){const s=new URLSearchParams;i!==void 0&&s.set("limit",String(i));const n=s.toString()?`?${s.toString()}`:"",o=await Ne(`/api/ui-studio/snapshots${n}`);return{...o,snapshots:o.snapshots.map(Pe)}}async function ft(e,i){const s=i!==void 0?`?placeId=${i}`:"",n=await Ne(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${s}`);return yt(n)}function Te(e,i){const s=i!==void 0?`?placeId=${i}`:"";return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${s}`}const St=1e4;function qe(e=50){const[i,s]=g.useState(null),[n,o]=g.useState(!0),[a,l]=g.useState(null),u=g.useCallback(async()=>{try{const p=await _e(void 0,e);s(p),l(null)}catch(p){l(p instanceof Error?p.message:String(p))}finally{o(!1)}},[e]);return g.useEffect(()=>{let p=!1;const d=async()=>{try{const h=await _e(void 0,e);p||(s(h),l(null))}catch(h){p||l(h instanceof Error?h.message:String(h))}finally{p||o(!1)}};d();const m=setInterval(()=>{d()},St);return()=>{p=!0,clearInterval(m)}},[e]),{data:i,loading:n,error:a,refresh:u}}const xt="_page_12gq5_2",vt="_grid_12gq5_9",Ct="_card_12gq5_16",bt="_cardBodyButton_12gq5_31",wt="_thumb_12gq5_48",kt="_runtimeObservationPlaceholder_12gq5_57",jt="_badges_12gq5_69",It="_priorityHighBadge_12gq5_77",Nt="_priorityMediumBadge_12gq5_78",Pt="_priorityLowBadge_12gq5_79",Tt="_cardMeta_12gq5_109",qt="_target_12gq5_115",Rt="_time_12gq5_122",Bt="_drawer_12gq5_127",Gt="_drawerToolbar_12gq5_144",Dt="_drawerTitleBlock_12gq5_155",At="_drawerEyebrow_12gq5_162",Mt="_drawerTarget_12gq5_171",$t="_drawerToolbarActions_12gq5_181",Lt="_closeBtn_12gq5_189",Et="_detailBody_12gq5_210",Ut="_screenshotPreviewFrame_12gq5_217",Ot="_fullImg_12gq5_230",Ht="_metaDl_12gq5_237",Ft="_platformGuidance_12gq5_249",zt="_platformGuidanceItem_12gq5_267",Vt="_platformGuidanceKind_12gq5_277",Wt="_errorMsg_12gq5_290",Kt="_suggestionsWrap_12gq5_295",Yt="_prioritySection_12gq5_302",Qt="_sectionHighHeader_12gq5_306",Jt="_sectionLowHeader_12gq5_312",Xt="_sectionMediumHeader_12gq5_318",Zt="_groupCard_12gq5_324",ei="_groupHeader_12gq5_331",ti="_groupLabel_12gq5_347",ii="_groupCount_12gq5_352",si="_groupChevron_12gq5_359",ai="_groupBody_12gq5_363",ri="_groupDescription_12gq5_366",ni="_groupFix_12gq5_371",oi="_falsePositive_12gq5_380",li="_itemList_12gq5_388",ci="_suggestionItem_12gq5_396",ui="_suggestionInfo_12gq5_406",di="_pathBreadcrumb_12gq5_412",pi="_currentValue_12gq5_421",hi="_copyFixBtn_12gq5_425",_i="_emptySuggestions_12gq5_439",gi="_sampleBanner_12gq5_447",mi="_sampleBannerRow_12gq5_460",yi="_sampleBannerMain_12gq5_468",fi="_sampleBadge_12gq5_476",Si="_sampleTitle_12gq5_486",xi="_sampleMessage_12gq5_493",vi="_sampleActions_12gq5_500",Ci="_primaryAction_12gq5_508",bi="_secondaryAction_12gq5_509",wi="_emptyState_12gq5_544",ki="_pluginGuideCard_12gq5_552",ji="_pluginGuideMarker_12gq5_563",Ii="_pluginGuideBody_12gq5_578",Ni="_pluginGuideTitle_12gq5_582",Pi="_pluginGuideMessage_12gq5_590",Ti="_pluginGuideChecklist_12gq5_597",qi="_pluginGuideWaiting_12gq5_620",Ri="_pluginGuideDot_12gq5_629",Bi="_analysisWorkspace_12gq5_637",Gi="_analysisMainColumn_12gq5_642",Di="_analysisSummaryPanel_12gq5_647",Ai="_recentCapturesHeader_12gq5_660",Mi="_analysisSummaryText_12gq5_667",$i="_recentCapturesMeta_12gq5_668",Li="_analysisReportGrid_12gq5_674",Ei="_analysisReportGroup_12gq5_681",Ui="_analysisReportCard_12gq5_685",Oi="_analysisReportThumb_12gq5_707",Hi="_analysisReportBody_12gq5_716",Fi="_analysisReportTopline_12gq5_723",zi="_analysisVerdict_12gq5_730",Vi="_analysisVerdict_needsFix_12gq5_741",Wi="_analysisVerdict_review_12gq5_742",Ki="_analysisVerdict_incomplete_12gq5_747",Yi="_analysisVerdict_passed_12gq5_752",Qi="_analysisReportCounts_12gq5_757",Ji="_readinessSummary_12gq5_762",Xi="_readinessChip_12gq5_768",Zi="_readinessChipReady_12gq5_783",es="_readinessChipPending_12gq5_789",ts="_primaryReadinessBlock_12gq5_795",is="_criticSummary_12gq5_802",ss="_analysisReportTarget_12gq5_821",as="_analysisReportIssue_12gq5_830",rs="_analysisReportCoverage_12gq5_836",ns="_coverageChips_12gq5_842",os="_coverageChip_12gq5_842",ls="_coverageChip_completed_12gq5_863",cs="_coverageChip_failed_12gq5_868",us="_coverageChip_skipped_12gq5_873",ds="_coverageChip_not_requested_12gq5_874",ps="_analysisReportMeta_12gq5_879",hs="_analysisChildList_12gq5_886",_s="_analysisChildRow_12gq5_897",gs="_analysisChildPath_12gq5_918",ms="_analysisChildSummary_12gq5_927",ys="_analysisChildDetailHint_12gq5_928",fs="_drawerAnalysisSummary_12gq5_937",Ss="_drawerAnalysisSummaryItem_12gq5_948",xs="_drawerAnalysisLabel_12gq5_955",vs="_drawerAnalysisCounts_12gq5_961",Cs="_drawerAnalysisValue_12gq5_962",bs="_recentCapturesSection_12gq5_967",ws="_drawerPrimaryActions_12gq5_979",ks="_drawerActionBtn_12gq5_986",js="_drawerMoreMenu_12gq5_1015",Is="_drawerMoreButton_12gq5_1020",Ns="_drawerMoreMenuBody_12gq5_1045",Ps="_drawerMenuItem_12gq5_1058",Ts="_drawerMenuItemDanger_12gq5_1081",qs="_actionErrMsg_12gq5_1090",Rs="_actionStatusMsg_12gq5_1099",Bs="_actionStatus_info_12gq5_1113",Gs="_actionStatus_success_12gq5_1119",Ds="_actionStatus_warning_12gq5_1125",As="_actionStatusDetail_12gq5_1131",Ms="_galleryHeader_12gq5_1137",$s="_cardChecked_12gq5_1154",Ls="_cardCheckbox_12gq5_1161",Es="_captureSelectionActions_12gq5_1176",Us="_selectionToolbar_12gq5_1185",Os="_selectionBar_12gq5_1186",Hs="_selectionToolbarCount_12gq5_1205",Fs="_selectionToolbarActions_12gq5_1212",zs="_selectionBarBtn_12gq5_1219",Vs="_selectionBarBtnDanger_12gq5_1245",r={page:xt,grid:vt,card:Ct,cardBodyButton:bt,thumb:wt,runtimeObservationPlaceholder:kt,badges:jt,priorityHighBadge:It,priorityMediumBadge:Nt,priorityLowBadge:Pt,cardMeta:Tt,target:qt,time:Rt,drawer:Bt,drawerToolbar:Gt,drawerTitleBlock:Dt,drawerEyebrow:At,drawerTarget:Mt,drawerToolbarActions:$t,closeBtn:Lt,detailBody:Et,screenshotPreviewFrame:Ut,fullImg:Ot,metaDl:Ht,platformGuidance:Ft,platformGuidanceItem:zt,platformGuidanceKind:Vt,errorMsg:Wt,suggestionsWrap:Kt,prioritySection:Yt,sectionHighHeader:Qt,sectionLowHeader:Jt,sectionMediumHeader:Xt,groupCard:Zt,groupHeader:ei,groupLabel:ti,groupCount:ii,groupChevron:si,groupBody:ai,groupDescription:ri,groupFix:ni,falsePositive:oi,itemList:li,suggestionItem:ci,suggestionInfo:ui,pathBreadcrumb:di,currentValue:pi,copyFixBtn:hi,emptySuggestions:_i,sampleBanner:gi,sampleBannerRow:mi,sampleBannerMain:yi,sampleBadge:fi,sampleTitle:Si,sampleMessage:xi,sampleActions:vi,primaryAction:Ci,secondaryAction:bi,emptyState:wi,pluginGuideCard:ki,pluginGuideMarker:ji,pluginGuideBody:Ii,pluginGuideTitle:Ni,pluginGuideMessage:Pi,pluginGuideChecklist:Ti,pluginGuideWaiting:qi,pluginGuideDot:Ri,analysisWorkspace:Bi,analysisMainColumn:Gi,analysisSummaryPanel:Di,recentCapturesHeader:Ai,analysisSummaryText:Mi,recentCapturesMeta:$i,analysisReportGrid:Li,analysisReportGroup:Ei,analysisReportCard:Ui,analysisReportThumb:Oi,analysisReportBody:Hi,analysisReportTopline:Fi,analysisVerdict:zi,analysisVerdict_needsFix:Vi,analysisVerdict_review:Wi,analysisVerdict_incomplete:Ki,analysisVerdict_passed:Yi,analysisReportCounts:Qi,readinessSummary:Ji,readinessChip:Xi,readinessChipReady:Zi,readinessChipPending:es,primaryReadinessBlock:ts,criticSummary:is,analysisReportTarget:ss,analysisReportIssue:as,analysisReportCoverage:rs,coverageChips:ns,coverageChip:os,coverageChip_completed:ls,coverageChip_failed:cs,coverageChip_skipped:us,coverageChip_not_requested:ds,analysisReportMeta:ps,analysisChildList:hs,analysisChildRow:_s,analysisChildPath:gs,analysisChildSummary:ms,analysisChildDetailHint:ys,drawerAnalysisSummary:fs,drawerAnalysisSummaryItem:Ss,drawerAnalysisLabel:xs,drawerAnalysisCounts:vs,drawerAnalysisValue:Cs,recentCapturesSection:bs,drawerPrimaryActions:ws,drawerActionBtn:ks,drawerMoreMenu:js,drawerMoreButton:Is,drawerMoreMenuBody:Ns,drawerMenuItem:Ps,drawerMenuItemDanger:Ts,actionErrMsg:qs,actionStatusMsg:Rs,actionStatus_info:Bs,actionStatus_success:Gs,actionStatus_warning:Ds,actionStatusDetail:As,galleryHeader:Ms,cardChecked:$s,cardCheckbox:Ls,captureSelectionActions:Es,selectionToolbar:Us,selectionBar:Os,selectionToolbarCount:Hs,selectionToolbarActions:Fs,selectionBarBtn:zs,selectionBarBtnDanger:Vs};function Ws({snapshot:e,placeId:i,onClick:s,imageUrlOverride:n,selectable:o,selected:a,onToggleSelect:l}){var v,I,B;const{t:u}=k(),p=((v=e.design_check_summary)==null?void 0:v.priority_high)??0,d=((I=e.design_check_summary)==null?void 0:I.priority_medium)??0,m=((B=e.design_check_summary)==null?void 0:B.priority_low)??0,h=new Date(e.captured_at*1e3).toLocaleString(),S=n??Te(e.snapshot_id,i),f=()=>{l==null||l(e.snapshot_id)};return t.jsxs("div",{className:`${r.card} ${a?r.cardChecked:""}`,children:[o&&t.jsx(y,{text:u("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx(Ye,{className:r.cardCheckbox,"aria-label":u("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!a,onChange:f})}),t.jsxs("button",{className:r.cardBodyButton,onClick:j=>s(j.currentTarget),type:"button",children:[e.image?t.jsx("img",{className:r.thumb,src:S,alt:e.snapshot_id,loading:"lazy"}):t.jsx("div",{className:`${r.thumb} ${r.runtimeObservationPlaceholder}`,role:"img","aria-label":u("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:u("uiStudio.runtimeStructureObservation","Runtime structure observation")}),t.jsxs("div",{className:r.badges,children:[p>0&&t.jsx(y,{text:u("uiStudio.gallery.priorityHighBadge.tooltip","Number of suggestions to review first. Click for details."),children:t.jsx("span",{className:r.priorityHighBadge,children:p})}),d>0&&t.jsx(y,{text:u("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:r.priorityMediumBadge,children:d})}),m>0&&t.jsx(y,{text:u("uiStudio.gallery.priorityLowBadge.tooltip","Number of optional improvements."),children:t.jsx("span",{className:r.priorityLowBadge,children:m})})]}),t.jsxs("div",{className:r.cardMeta,children:[t.jsx("div",{className:r.target,children:e.target??e.scope}),t.jsx("div",{className:r.time,children:h})]})]})]})}const Ks={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function Ys(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const Qs={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:"화면 가장자리 배치가 가독성이나 조작에 영향을 준다면, 측정된 영역과 적용 가능한 Roblox 지침을 검토하고 의도한 배치를 존중하는 대안을 고려하세요.",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 Js(e,i,s){const n=Ks[e];return n?{...i,checkLabel:s(`uiStudio.fix.${n}.label`,i.checkLabel),description:s(`uiStudio.fix.${n}.description`,i.description),howToFix:s(`uiStudio.fix.${n}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?s(`uiStudio.fix.${n}.falsePositive`,i.falsePositiveNote):void 0}:i}function Xs(e,i){const s=Qs[e]??null;return s?i?Js(e,s,i):s:null}function Zs(e){return Ys(e)}function ea(e,i){const s=new Map;for(const o of e){const a=`${o.displayPriority}::${o.rule}`,l=s.get(a)??[];l.push(o),s.set(a,l)}const n=[];for(const[o,a]of s){const[l,u]=o.split("::"),p=a.filter(Zs).length;n.push({rule:u??"unknown",priority:l,items:a,fixTemplate:Xs(u??"",i),falsePositiveRatio:a.length>0?p/a.length:0})}return n.sort((o,a)=>{const l={priority_high:0,priority_medium:1,priority_low:2};return o.priority!==a.priority?l[o.priority]-l[a.priority]:a.items.length-o.items.length}),{high:n.filter(o=>o.priority==="priority_high"),medium:n.filter(o=>o.priority==="priority_medium"),low:n.filter(o=>o.priority==="priority_low")}}function Re(e){const i=e.split("."),s=i[i.length-1]??e,n=i[i.length-2],o=n?`${n} > ${s}`:s;return{full:e,breadcrumb:o,leaf:s}}function ta(e){if(!e||typeof e!="object")return!1;const i=e;return["id","revision","title","summary","applies_when","limitations"].every(s=>typeof i[s]=="string")&&(i.kind==="constraint"||i.kind==="recommendation")&&!!i.source&&["url","section","checked_at"].every(s=>typeof i.source[s]=="string")}function ia(e){try{const i=new URL(e);return i.protocol==="https:"&&i.hostname==="create.roblox.com"&&!i.username&&!i.password?i.href:void 0}catch{return}}function sa({summary:e}){const{t:i}=k(),s=Array.isArray(e==null?void 0:e.platform_guidance)?e.platform_guidance.filter(ta):[];return s.length===0?null:t.jsxs("details",{className:r.platformGuidance,children:[t.jsx("summary",{children:i("uiStudio.platformGuidance.title","Roblox guidance")}),t.jsx("p",{children:i("uiStudio.platformGuidance.context","Reference guidance for the AI to interpret in your project. It does not authorize changes.")}),s.map(n=>{const o=ia(n.source.url);return t.jsxs("section",{className:r.platformGuidanceItem,children:[t.jsx("h4",{children:n.title}),t.jsx("p",{className:r.platformGuidanceKind,children:n.kind==="constraint"?i("uiStudio.platformGuidance.constraint","API constraint"):i("uiStudio.platformGuidance.recommendation","Recommendation")}),t.jsx("p",{children:n.summary}),t.jsxs("dl",{className:r.metaDl,children:[t.jsx("dt",{children:i("uiStudio.platformGuidance.appliesWhen","Applies when")}),t.jsx("dd",{children:n.applies_when}),t.jsx("dt",{children:i("uiStudio.platformGuidance.limitations","Limits")}),t.jsx("dd",{children:n.limitations}),t.jsx("dt",{children:i("uiStudio.platformGuidance.source","Official source")}),t.jsx("dd",{children:o?t.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:n.source.section}):n.source.section}),t.jsx("dt",{children:i("uiStudio.platformGuidance.checkedAt","Source checked")}),t.jsx("dd",{children:n.source.checked_at}),t.jsx("dt",{children:i("uiStudio.platformGuidance.revision","Guidance revision")}),t.jsx("dd",{children:n.revision})]})]},`${n.id}:${n.revision}`)})]})}function Be(e){return typeof e=="object"&&e!==null}function ge(e){return Be(e.data)?e.data:{}}function se(e,i){const s=e[i];return Be(s)?s:{}}function Q(e,i){const s=e[i];return typeof s=="string"?s:null}function J(e,i){const s=e[i];return typeof s=="number"&&Number.isFinite(s)?s:0}function aa(e){const i=se(e,"design_check_summary");return{priority_high:J(i,"priority_high"),priority_medium:J(i,"priority_medium"),priority_low:J(i,"priority_low")}}function me(e){if(!(e.success??e.ok??!e.error))throw new Error(e.error??"UI Studio action failed")}function ye(e,i){return Ge(e,aa(i))}function O(e,i,s,n,o){const a=e(i,s);return o?`${a}: ${o} · ${n}`:`${a}: ${n}`}function ra(e){const i=e.design_check_summary;return((i==null?void 0:i.priority_high)??0)>0?"needsFix":(i==null?void 0:i.readiness)==="insufficient_evidence"?"incomplete":((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?"review":"passed"}function na(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):i==="incomplete"?e("uiStudio.analysis.verdict.incomplete","검토 증거 부족"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function X(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function Ge(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${X(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${X(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${X(e,(i==null?void 0:i.priority_low)??0)}`}function oa(e,i){return Ge(e,i.design_check_summary)}function la(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function ca(e,i){return i==="ready"?e("uiStudio.readiness.ready","Ready"):i==="review_required"?e("uiStudio.readiness.reviewRequired","Review required"):i==="insufficient_evidence"?e("uiStudio.readiness.insufficient","Evidence incomplete"):e("uiStudio.readiness.unknown","Readiness unknown")}function ua({snapshotId:e,placeId:i,onClose:s,sampleDetail:n,tier:o,onActionDone:a}){const[l,u]=g.useState(n??null),[p,d]=g.useState(null),[m,h]=g.useState(null),[S,f]=g.useState(null),[v,I]=g.useState(null),[B,j]=g.useState(null),{t:_}=k(),{trackEvent:q}=E(),N=o==="pro";g.useEffect(()=>{if(n){u(n),d(null);return}let b=!1;return ft(e,i).then(A=>{b||u(A)}).catch(A=>{b||d(A instanceof Error?A.message:String(A))}),()=>{b=!0}},[e,i,n]);const C=async()=>{if(l!=null&&l.target){q("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),I("preview"),f({tone:"info",message:_("uiStudio.actions.previewRunning","캡처 중..."),detail:_("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const b=await ce("preview",{targetPath:l.target,placeId:i});me(b);const A=ge(b),$=Q(A,"snapshot_id"),Y=se(A,"screenshot"),x=se(A,"meta"),M=Q(Y,"saved_path"),T=Q(x,"persist_warning"),F=ye(_,A);f(T?{tone:"warning",message:O(_,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",F,$),detail:T}:$&&M?{tone:"success",message:O(_,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",F,$),detail:_("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:$?{tone:"warning",message:O(_,"uiStudio.actions.previewComplete","캡처 완료",F,$),detail:_("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:O(_,"uiStudio.actions.previewComplete","캡처 완료",F),detail:_("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(a==null?void 0:a())}catch(b){h(b instanceof Error?b.message:String(b))}finally{I(null)}}},P=async()=>{if(l!=null&&l.target){q("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),I("check"),f({tone:"info",message:_("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:_("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const b=await ce("check",{targetPath:l.target,placeId:i});me(b);const A=ge(b),$=ye(_,A);f({tone:"success",message:O(_,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",$),detail:_("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(a==null?void 0:a())}catch(b){h(b instanceof Error?b.message:String(b))}finally{I(null)}}},D=async()=>{h(null),f(null);try{await Je(i,e),await(a==null?void 0:a()),j(null),s()}catch(b){throw h(b instanceof Error?b.message:String(b)),b}},G=N?void 0:_("uiStudio.actions.proRequired","Pro에서 사용 가능"),w=l!=null&&l.target?Re(l.target):null;return t.jsxs("div",{className:r.drawer,children:[t.jsxs("div",{className:r.drawerToolbar,"data-testid":"snapshot-detail-toolbar",children:[t.jsxs("div",{className:r.drawerTitleBlock,children:[t.jsx("span",{className:r.drawerEyebrow,children:_("uiStudio.analysis.detailDialog","Analysis detail")}),t.jsx("span",{className:r.drawerTarget,title:(w==null?void 0:w.full)??e,children:(w==null?void 0:w.breadcrumb)??e})]}),t.jsxs("div",{className:r.drawerToolbarActions,children:[l&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:r.drawerPrimaryActions,children:[t.jsx(y,{text:G??_("uiStudio.actions.captureCurrentState.tooltip","Save the UI currently shown in Studio as a new capture. Existing captures are kept."),children:t.jsxs("button",{className:r.drawerActionBtn,onClick:()=>void C(),disabled:!N||!l.target||v!==null,type:"button",children:[t.jsx(ot,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:_("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(y,{text:G??_("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:r.drawerActionBtn,onClick:()=>void P(),disabled:!N||!l.target||v!==null,type:"button",children:[t.jsx(ze,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:_("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:r.drawerMoreMenu,children:[t.jsx("summary",{className:r.drawerMoreButton,title:_("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":_("uiStudio.actions.more","More"),children:t.jsx(ct,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:r.drawerMoreMenuBody,children:t.jsx(y,{text:G??_("uiStudio.actions.deleteSnapshot.tooltip","Delete only this capture file. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${r.drawerMenuItem} ${r.drawerMenuItemDanger}`,onClick:()=>{q("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),j("deleteSnapshot")},disabled:!N,type:"button",children:_("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(y,{text:_("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:r.closeBtn,onClick:s,type:"button","aria-label":_("uiStudio.detailClose","Close"),children:t.jsx(Ve,{size:18,"aria-hidden":"true"})})})]})]}),p&&t.jsx("div",{className:r.errorMsg,children:p}),l&&t.jsxs("div",{className:r.detailBody,children:[m&&t.jsx("div",{className:r.actionErrMsg,children:m}),S&&t.jsxs("div",{className:`${r.actionStatusMsg} ${r[`actionStatus_${S.tone}`]??""}`,children:[t.jsx("div",{children:S.message}),S.detail&&t.jsx("div",{className:r.actionStatusDetail,children:S.detail})]}),t.jsx(da,{detail:l}),t.jsx("div",{className:r.screenshotPreviewFrame,"data-testid":"analysis-screenshot-preview",children:l.image?t.jsx("img",{className:r.fullImg,src:l.image_url,alt:l.snapshot_id}):t.jsx("div",{className:`${r.fullImg} ${r.runtimeObservationPlaceholder}`,role:"img","aria-label":_("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:_("uiStudio.runtimeStructureObservation","Runtime structure observation")})}),t.jsx(ga,{items:l.check_results,summary:l.design_check_summary}),t.jsx(sa,{summary:l.design_check_summary}),t.jsxs("dl",{className:r.metaDl,children:[t.jsx("dt",{children:t.jsx(R,{label:_("uiStudio.capturedAt","Captured"),tooltip:_("uiStudio.capturedAt.tooltip","When this screen was captured.")})}),t.jsx("dd",{children:new Date(l.captured_at*1e3).toLocaleString()}),t.jsx("dt",{children:t.jsx(R,{label:_("uiStudio.scope","Scope"),tooltip:_("uiStudio.scope.tooltip","Capture scope (full screen or a specific UI).")})}),t.jsx("dd",{children:l.scope}),l.target&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(R,{label:_("uiStudio.target","Target"),tooltip:_("uiStudio.target.tooltip","Exact path of the captured UI instance.")})}),t.jsx("dd",{children:l.target})]}),l.brief_id&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(R,{label:_("uiStudio.briefId","Brief"),tooltip:_("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:l.brief_id})]})]})]}),B==="deleteSnapshot"&&t.jsx(le,{title:_("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:_("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:_("common.delete","삭제"),onConfirm:D,onClose:()=>j(null)})]})}function da({detail:e}){const{t:i}=k(),s=ra(e);return t.jsxs("section",{className:r.drawerAnalysisSummary,children:[t.jsxs("div",{className:r.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:r.drawerAnalysisLabel,children:t.jsx(R,{label:i("uiStudio.analysis.verdictLabel","개선 요약"),tooltip:i("uiStudio.analysis.verdictLabel.tooltip","Overall improvement verdict for this capture.")})}),t.jsx("span",{className:`${r.analysisVerdict} ${r[`analysisVerdict_${s}`]??""}`,children:na(i,s)}),t.jsx("span",{className:r.drawerAnalysisCounts,children:oa(i,e)})]}),t.jsxs("div",{className:r.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:r.drawerAnalysisLabel,children:t.jsx(R,{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:r.drawerAnalysisValue,children:e.thresholds_source})]}),t.jsx(pa,{summary:e.design_check_summary}),t.jsx(_a,{summary:e.design_check_summary}),t.jsx(ha,{summary:e.design_check_summary})]})}function pa({summary:e}){const{t:i}=k();if(!e)return null;const s=e.functional_safe===!0?i("uiStudio.functional.checkedScopeSafe","Checked scope safe"):e.functional_safe===!1?i("uiStudio.functional.risk","Risk found"):i("uiStudio.functional.unknown","Unknown"),n=e.responsive_requirement==="required"?i("uiStudio.responsive.required","Required"):e.responsive_requirement==="recommended"?i("uiStudio.responsive.recommended","Recommended"):i("uiStudio.responsive.unknown","Unknown");return t.jsxs("div",{className:r.primaryReadinessBlock,children:[t.jsxs("div",{className:r.readinessSummary,"aria-label":i("uiStudio.readiness.summary","UI readiness"),children:[t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.primaryVisual.label","Primary visual")," · ",la(i,e.primary_visual_verdict)]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.functional.label","Functional")," · ",s]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.responsive.label","Responsive")," · ",n]}),e.observation_source&&t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.observationSource.label","검사 출처")," · ",e.observation_source==="play_client"?i("uiStudio.observationSource.playClient","Play client"):i("uiStudio.observationSource.edit","Edit")]}),t.jsx("span",{className:`${r.readinessChip} ${e.readiness==="ready"?r.readinessChipReady:r.readinessChipPending}`,children:ca(i,e.readiness)})]}),e.critic_summary&&t.jsxs("p",{className:r.criticSummary,children:[t.jsx("span",{children:i("uiStudio.criticSummary","Critic summary")}),e.critic_summary]})]})}function ha({summary:e}){var s,n;const{t:i}=k();return!e||!((s=e.state_coverage)!=null&&s.length)&&!((n=e.limitations)!=null&&n.length)?null:t.jsxs("div",{className:r.primaryReadinessBlock,children:[e.state_coverage&&e.state_coverage.length>0&&t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.stateCoverage.label","상태별 검토"),children:e.state_coverage.map(o=>t.jsxs("span",{className:r.coverageChip,title:o.reasons.join(", "),children:[o.stateId," · ",o.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):o.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},`${o.stateId}:${o.status}`))}),e.limitations&&e.limitations.length>0&&t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.limitations.label","검토 제한"),children:e.limitations.map(o=>t.jsx("span",{className:r.coverageChip,children:o},o))})]})}function _a({summary:e}){const{t:i}=k(),s=e==null?void 0:e.coverage_dimensions;if(!s)return null;const n=[["Structure",s.structure],["Visual",s.visual],["Interaction",s.interaction],["Primary view",s.primary_view_context],["Responsive",s.responsive_viewport]];return t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.analysis.coverageDimensions","검토 범위"),children:n.map(([o,a])=>t.jsxs("span",{className:`${r.coverageChip} ${r[`coverageChip_${a.status}`]??""}`,title:a.reasons.join(", "),children:[o," · ",a.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):a.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},o))})}function ga({items:e,summary:i}){const{t:s}=k();if(e.length===0)return t.jsx("p",{className:r.emptySuggestions,children:(i==null?void 0:i.readiness)==="insufficient_evidence"?s("uiStudio.noSuggestionsIncomplete","제안은 없지만 검토되지 않은 범위가 남아 있습니다."):s("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:n,medium:o,low:a}=ea(e,s);return t.jsxs("div",{className:r.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(R,{label:s("uiStudio.designCheckResultsTitle","Design Check suggestions"),tooltip:s("uiStudio.designCheckResultsTitle.tooltip","All improvement suggestions found in this capture.")})}),n.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionHighHeader,children:s("uiStudio.highPrioritySection","우선 검토")}),n.map(l=>t.jsx(Z,{group:l},`h-${l.rule}`))]}),o.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionMediumHeader,children:s("uiStudio.mediumPrioritySection","검토 권장")}),o.map(l=>t.jsx(Z,{group:l},`m-${l.rule}`))]}),a.length>0&&t.jsxs("section",{className:r.prioritySection,children:[t.jsx("h4",{className:r.sectionLowHeader,children:s("uiStudio.lowPrioritySection","선택 개선")}),a.map(l=>t.jsx(Z,{group:l},`l-${l.rule}`))]})]})}function Z({group:e}){var l,u,p;const{t:i}=k(),[s,n]=g.useState(e.priority==="priority_high"&&e.items.length<=5),o=e.falsePositiveRatio>=.5&&!!((l=e.fixTemplate)!=null&&l.falsePositiveNote),a=((u=e.fixTemplate)==null?void 0:u.checkLabel)??e.rule;return t.jsxs("div",{className:r.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:r.groupHeader,onClick:()=>n(d=>!d),type:"button",children:[t.jsx("span",{className:r.groupLabel,children:a}),t.jsx(y,{text:i("uiStudio.groupSummary.tooltip","Number of UI elements matching this group."),children:t.jsxs("span",{className:r.groupCount,children:[e.items.length," ",i("uiStudio.groupSummary","items")]})}),t.jsx("span",{className:r.groupChevron,children:s?"▾":"▸"})]})}),s&&t.jsxs("div",{className:r.groupBody,children:[e.fixTemplate&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:r.groupDescription,children:e.fixTemplate.description}),t.jsx("p",{className:r.groupFix,children:e.fixTemplate.howToFix})]}),o&&t.jsx(y,{text:i("uiStudio.falsePositiveWarning.tooltip","This check can produce false positives — verify before applying."),children:t.jsxs("p",{className:r.falsePositive,children:[i("uiStudio.falsePositiveWarning","May contain false positives"),":"," ",(p=e.fixTemplate)==null?void 0:p.falsePositiveNote]})}),t.jsx("ul",{className:r.itemList,children:e.items.map((d,m)=>t.jsx(ma,{item:d,group:e},`${d.path}-${m}`))})]})]})}function ma({item:e,group:i}){var d;const{t:s}=k(),{trackEvent:n}=E(),[o,a]=g.useState(!1),l=Re(e.path),u=((d=i.fixTemplate)==null?void 0:d.buildUpdateCommand(e))??null,p=async()=>{if(u)try{await navigator.clipboard.writeText(u),n("dashboard_click_event",{click_target:"ui_studio_copy_ai_instruction",page:"ui-studio",tab:"ui_studio_analysis"}),a(!0),setTimeout(()=>a(!1),2e3)}catch{}};return t.jsxs("li",{className:r.suggestionItem,children:[t.jsxs("div",{className:r.suggestionInfo,children:[t.jsx("code",{className:r.pathBreadcrumb,title:`${s("uiStudio.fullPath","Full path")}: ${l.full}`,children:l.breadcrumb}),t.jsxs("span",{className:r.currentValue,children:[t.jsx(y,{text:s("uiStudio.colCurrent.tooltip","The currently applied value."),children:t.jsx("span",{children:s("uiStudio.colCurrent","Current")})}),": ",t.jsx("strong",{children:String(e.actual)})," → ",t.jsx(y,{text:s("uiStudio.colRecommended.tooltip","The recommended value."),children:t.jsx("span",{children:s("uiStudio.colRecommended","Recommended")})}),": ",t.jsx("strong",{children:String(e.expected)})]})]}),u&&t.jsx(y,{text:s("uiStudio.copyFixCommand.tooltip","Copy a prompt that asks the AI to fix this issue."),children:t.jsx("button",{className:r.copyFixBtn,onClick:p,type:"button",children:o?s("uiStudio.copiedToClipboard","Copied"):s("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function ee(e,i){return Object.entries(i).reduce((s,[n,o])=>s.split(`{${n}}`).join(String(o)),e)}function ya(e,i){return i.rule==="contrast"?ee(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"?ee(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"?ee(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 De="sample_inventory_preview",ae=Xe,fa=[{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 Sa(e){const n={snapshot_id:De,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}},o={...n,check_results:fa.map(l=>({...l,hint:ya(e,l)})),image_url:ae};return{list:{placeId:0,snapshots:[n],totalCount:1},detail:o}}const xa=/plugin not connected|sync not started/i;function re(e){return typeof e=="string"&&xa.test(e)}function Ae(){const{t:e}=k();return t.jsxs("section",{className:r.pluginGuideCard,role:"status","aria-live":"polite",children:[t.jsx("div",{className:r.pluginGuideMarker,"aria-hidden":"true",children:"!"}),t.jsxs("div",{className:r.pluginGuideBody,children:[t.jsx("h2",{className:r.pluginGuideTitle,children:e("uiStudio.pluginGuide.title","Roblox Studio 플러그인이 연결되지 않았습니다")}),t.jsx("p",{className:r.pluginGuideMessage,children:e("uiStudio.pluginGuide.message","UI Studio는 연결된 Studio place의 화면 캡처와 변경 이력을 표시합니다. Studio와 WEPPY Plugin을 연결하면 자동으로 갱신됩니다.")}),t.jsxs("ul",{className:r.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:r.pluginGuideWaiting,children:[t.jsx("span",{className:r.pluginGuideDot,"aria-hidden":"true"}),e("uiStudio.pluginGuide.waiting","플러그인 연결을 기다리는 중...")]})]})]})}function va(e){return{review:{id:"review-ui",title:e("uiStudio.emptyGuide.ai.reviewTitle","Review an existing UI"),request:e("uiStudio.emptyGuide.ai.reviewRequest","Inspect both Edit UI and UI created in the Play Client, then identify a screen to review. If there are several candidates, ask me which one to use first. Check text readability, overlapping elements, safe areas, and content outside the screen, then save the evidence in UI Studio. Do not modify the existing UI, and clearly separate semantic runtime observations, available screenshots, required states, and anything you could not verify.")},create:{id:"create-ui",title:e("uiStudio.emptyGuide.ai.createTitle","Create a new UI"),request:e("uiStudio.emptyGuide.ai.createRequest","Create an inventory UI for this game. Check the existing UI and data structure first, and ask me if the required features or visual direction are unclear. Do not overwrite existing UI. Capture and review the finished screen, then save the results in UI Studio.")}}}const Ca="_emptyState_13gyl_1",ba="_header_13gyl_11",wa="_method_13gyl_12",ka="_methodTitle_13gyl_44",ja="_moreExamples_13gyl_57",H={emptyState:Ca,header:ba,method:wa,methodTitle:ka,moreExamples:ja};function Me({kind:e}){const{locale:i,t:s}=k(),n=va(s),o=e==="analysis",a={copy:s("guidance.ai.copy","Copy request"),copying:s("guidance.ai.copying","Copying…"),copied:s("guidance.ai.copied","Copied"),copyFailed:s("guidance.ai.copyFailed","Could not copy. Select the request text and copy it manually.")};return t.jsxs("section",{className:H.emptyState,children:[t.jsxs("header",{className:H.header,children:[t.jsx("h3",{children:o?s("uiStudio.emptyGuide.analysis.title","Create or review game UI"):s("uiStudio.emptyGuide.history.title","Start a UI task")}),t.jsx("p",{children:o?s("uiStudio.emptyGuide.analysis.description","Ask AI to create or review UI, then inspect the saved screens and findings here."):s("uiStudio.emptyGuide.history.description","When AI creates or changes UI, the change record will appear here.")})]}),t.jsxs("section",{className:H.method,children:[t.jsxs("div",{className:H.methodTitle,children:[t.jsx(rt,{size:16,"aria-hidden":"true"}),t.jsx("h4",{children:s("uiStudio.emptyGuide.ai.title","Ask AI")})]}),t.jsx(pe,{examples:[o?n.review:n.create],resetKey:`${i}|ui-studio-${e}`,labels:a,nextStep:s("guidance.ai.nextStep","Paste this request into an AI chat connected to WEPPY.")}),o&&t.jsxs("details",{className:H.moreExamples,children:[t.jsx("summary",{children:s("uiStudio.emptyGuide.ai.more","Other request examples")}),t.jsx(pe,{examples:[n.create],resetKey:`${i}|ui-studio-create`,labels:a})]})]})]})}function Ia(e){return((e==null?void 0:e.priority_high)??0)>0||((e==null?void 0:e.priority_medium)??0)>0||((e==null?void 0:e.priority_low)??0)>0}function K(e){return e===null||e.readiness==="insufficient_evidence"}function $e(e){return e.target??e.scope}function Na(e){const i=$e(e),s=i.split(".").filter(o=>o.length>0),n=s.findIndex(o=>o==="StarterGui");return n>=0&&s[n+1]?["StarterGui",s[n+1]].join("."):i}function Le(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":K(e)?"incomplete":"passed"}function Pa(e){return Le(e.design_check_summary)}function fe(e){return ne(e.design_check_summary)}function ne(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:K(e)?3:4}function Ta(e){var l;if(e.length===0)return null;if(e.length===1)return((l=e[0])==null?void 0:l.latest.design_check_summary)??null;const i=e.reduce((u,p)=>{const d=p.latest.design_check_summary;u.priority_high+=(d==null?void 0:d.priority_high)??0,u.priority_medium+=(d==null?void 0:d.priority_medium)??0,u.priority_low+=(d==null?void 0:d.priority_low)??0,(d==null?void 0:d.deterministic_status)==="failed"&&(u.deterministic_status="failed"),(d==null?void 0:d.visual_status)==="failed"?u.visual_status="failed":(d==null?void 0:d.visual_status)==="skipped"&&u.visual_status!=="failed"?u.visual_status="skipped":(d==null?void 0:d.visual_status)==="completed"&&u.visual_status==="completed"?u.visual_status="completed":(d==null?void 0:d.visual_status)!=="completed"&&u.visual_status==="completed"&&(u.visual_status="not_requested"),(d==null?void 0:d.coverage)!=="structural_and_visual"&&(u.coverage="structural_only");for(const m of(d==null?void 0:d.skipped_reasons)??[])u.skipped_reasons.add(m);(d==null?void 0:d.readiness)==="insufficient_evidence"?u.readiness="insufficient_evidence":(d==null?void 0:d.readiness)==="review_required"&&u.readiness==="ready"&&(u.readiness="review_required");for(const m of(d==null?void 0:d.viewport_profiles_tested)??[])u.viewport_profiles_tested.add(m);return u},{priority_high:0,priority_medium:0,priority_low:0,deterministic_status:"completed",visual_status:"completed",coverage:"structural_and_visual",skipped_reasons:new Set,readiness:"ready",viewport_profiles_tested:new Set}),s=e.flatMap(u=>u.latest.design_check_summary?[u.latest.design_check_summary]:[]),n=u=>{const p=s.flatMap(h=>{var S;return(S=h.coverage_dimensions)!=null&&S[u]?[h.coverage_dimensions[u]]:[]}),d=p.map(h=>h.status);return{status:d.includes("failed")?"failed":d.length===s.length&&d.every(h=>h==="completed")?"completed":d.length>0&&d.every(h=>h==="not_requested")?"not_requested":"skipped",reasons:Array.from(new Set(p.flatMap(h=>h.reasons)))}},o=s.some(u=>u.coverage_dimensions)?{structure:n("structure"),visual:n("visual"),interaction:n("interaction"),primary_view_context:n("primary_view_context"),responsive_viewport:n("responsive_viewport")}:void 0,a=Array.from(new Set(s.flatMap(u=>u.observation_source?[u.observation_source]:[])));return{priority_high:i.priority_high,priority_medium:i.priority_medium,priority_low:i.priority_low,deterministic_status:i.deterministic_status,visual_status:i.visual_status,coverage:i.coverage,skipped_reasons:[...i.skipped_reasons],readiness:i.readiness,viewport_profiles_tested:[...i.viewport_profiles_tested],coverage_dimensions:o,observation_source:a.length===1?a[0]:void 0,limitations:Array.from(new Set(s.flatMap(u=>u.limitations??[]))),state_coverage:s.flatMap(u=>u.state_coverage??[])}}function qa(e){const i=new Map;for(const o of e){const a=$e(o),l=i.get(a);if(!l){i.set(a,{latest:o,snapshotCount:1});continue}l.snapshotCount+=1,o.captured_at>l.latest.captured_at&&(l.latest=o)}const s=[...i.entries()].map(([o,a])=>({key:o,latest:a.latest,snapshotCount:a.snapshotCount,verdict:Pa(a.latest)})),n=new Map;for(const o of s){const a=Na(o.latest),l=n.get(a)??[];l.push(o),n.set(a,l)}return[...n.entries()].map(([o,a])=>{var d;const l=a.sort((m,h)=>{const S=fe(m.latest)-fe(h.latest);return S!==0?S:h.latest.captured_at-m.latest.captured_at}),u=l.reduce((m,h)=>h.latest.captured_at>m.captured_at?h.latest:m,((d=l[0])==null?void 0:d.latest)??a[0].latest),p=Ta(l);return{key:o,latest:u,snapshotCount:l.reduce((m,h)=>m+h.snapshotCount,0),children:l,summary:p,verdict:Le(p)}}).sort((o,a)=>{const l=ne(o.summary)-ne(a.summary);return l!==0?l:a.latest.captured_at-o.latest.captured_at})}function Ra(e){return e.reduce((i,s)=>(Ia(s.summary)?i.hasSuggestions+=1:s.summary&&(i.noSuggestions+=1),K(s.summary)&&(i.evidenceIncomplete+=1),i),{hasSuggestions:0,evidenceIncomplete:0,noSuggestions:0})}function L(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function oe(e,i){const s=K(i)?` · ${e("uiStudio.analysis.verdict.incomplete","검토 증거 부족")}`:"";return`${e("uiStudio.priorityHigh","우선 검토")} ${L(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${L(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${L(e,(i==null?void 0:i.priority_low)??0)}${s}`}function Se(e){const i=e==null?void 0:e.coverage_dimensions;return i?[["Visual",i.visual],["Interaction",i.interaction],["Primary view",i.primary_view_context],["Responsive",i.responsive_viewport]].flatMap(([s,n])=>typeof n=="object"&&n.status!=="completed"?[s]:[]):[]}function Ba(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function Ga(e,i){return i==="ready"?e("uiStudio.readiness.ready","Ready"):i==="review_required"?e("uiStudio.readiness.reviewRequired","Review required"):i==="insufficient_evidence"?e("uiStudio.readiness.insufficient","Evidence incomplete"):e("uiStudio.readiness.unknown","Readiness unknown")}function Da(e,i,s){const n=s.evidenceIncomplete>0?` · ${V(e,"incomplete")} ${L(e,s.evidenceIncomplete)}`:"";return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${L(e,i)} · ${V(e,"needsFix")} ${L(e,s.hasSuggestions)}${n} · ${V(e,"passed")} ${L(e,s.noSuggestions)}`}function xe(e,i){return(i==null?void 0:i.deterministic_status)==="failed"?e("uiStudio.analysis.coverage.deterministicFailed","구조 검사 실패"):(i==null?void 0:i.coverage)==="structural_and_visual"&&i.visual_status==="completed"?e("uiStudio.analysis.coverage.full","구조·시각 검사 완료"):(i==null?void 0:i.visual_status)==="skipped"?e("uiStudio.analysis.coverage.visualSkipped","구조 검사만 완료 · 시각 검사 생략"):(i==null?void 0:i.visual_status)==="failed"?e("uiStudio.analysis.coverage.visualFailed","구조 검사 완료 · 시각 검사 실패"):e("uiStudio.analysis.coverage.structuralOnly","구조 검사만 완료")}function Aa({tier:e}){const{t:i}=k(),{trackEvent:s}=E(),n=e==="basic",o=qe(50),a=g.useRef(null),[l,u]=g.useState(null),[p,d]=g.useState(new Set),[m,h]=g.useState(new Set),[S,f]=g.useState(!1),v=g.useCallback((x,M)=>{const T=l===x;T||(a.current=M??null),u(T?null:x)},[l]),I=g.useCallback(()=>{u(null)},[]),B=g.useCallback(x=>{d(M=>{const T=new Set(M);return T.has(x)?T.delete(x):T.add(x),T})},[]),j=n?Sa(i):null,_=(j==null?void 0:j.list)??o.data,q=n?!1:o.loading,N=g.useCallback(x=>{h(M=>{const T=new Set(M);return T.has(x)?T.delete(x):T.add(x),T})},[]),C=x=>{h(new Set(x))},P=()=>{h(new Set)},D=async()=>{const x=(_==null?void 0:_.placeId)??0;s("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await Ze(x,{ids:[...m]}),await o.refresh(),f(!1),h(new Set)};if(q)return t.jsx("div",{className:r.page,children:i("uiStudio.loading","Loading...")});if(!n&&re(o.error))return t.jsx(Ae,{});if(!n&&o.error)return t.jsxs("div",{className:r.page,children:[i("uiStudio.error","Error"),": ",o.error]});const G=(_==null?void 0:_.snapshots)??[],w=_!==null,b=(_==null?void 0:_.placeId)??0,A=G.map(x=>x.snapshot_id),$=qa(G),Y=Ra($);return t.jsxs("div",{children:[t.jsx("div",{className:r.analysisWorkspace,"data-detail-open":l?"true":"false",children:t.jsxs("div",{className:r.analysisMainColumn,"data-testid":"analysis-main-column",children:[n&&t.jsx("div",{className:r.sampleBanner,children:t.jsxs("div",{className:r.sampleBannerRow,children:[t.jsxs("div",{className:r.sampleBannerMain,children:[t.jsx("div",{className:r.sampleBadge,children:i("uiStudio.sample.badge","Preview of the Pro UI gallery")}),t.jsx("div",{className:r.sampleTitle,children:i("uiStudio.sample.title","You are previewing the UI screenshot gallery that unlocks after upgrading to Pro.")}),t.jsx("div",{className:r.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:r.sampleActions,children:t.jsx("a",{className:r.primaryAction,href:je.uiStudioAnalysis,target:"_blank",rel:"noreferrer",onClick:()=>s("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:r.galleryHeader,children:t.jsx("h2",{children:t.jsx(R,{label:i("uiStudio.title","UI Studio"),tooltip:i("uiStudio.title.tooltip","A central place to review AI-generated UI screens and improvement suggestions.")})})}),G.length===0?w?t.jsx(Me,{kind:"analysis"}):t.jsx("div",{className:r.emptyState,children:i("uiStudio.empty.unavailable","UI Studio data is not available yet.")}):t.jsxs(t.Fragment,{children:[t.jsx("section",{className:r.analysisSummaryPanel,children:t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(R,{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:r.analysisSummaryText,children:Da(i,$.length,Y)})]})}),t.jsx("div",{className:r.analysisReportGrid,"data-testid":"analysis-report-grid",children:$.map(x=>t.jsx($a,{report:x,placeId:b,imageUrlOverride:n?ae:void 0,expanded:p.has(x.key),onPrimaryClick:M=>{x.children.length>1?B(x.key):v(x.latest.snapshot_id,M)},onChildClick:(M,T)=>v(M,T)},x.key))}),t.jsxs("section",{className:r.recentCapturesSection,children:[t.jsxs("div",{className:r.recentCapturesHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(R,{label:i("uiStudio.analysis.recentCapturesTitle","최근 캡처"),tooltip:i("uiStudio.analysis.recentCapturesTitle.tooltip","All recently saved captures in chronological order.")})}),t.jsxs("p",{className:r.recentCapturesMeta,children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",L(i,G.length)]})]}),!n&&G.length>0&&t.jsxs("div",{className:r.captureSelectionActions,children:[t.jsx(y,{text:i("uiStudio.gallery.selectAll.tooltip","Select every visible capture at once."),children:t.jsx("button",{className:r.selectionBarBtn,onClick:()=>C(A),type:"button",children:i("uiStudio.gallery.selectAll","모두 선택")})}),m.size>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:r.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:r.selectionBarBtn,onClick:P,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:`${r.selectionBarBtn} ${r.selectionBarBtnDanger}`,onClick:()=>f(!0),type:"button",children:i("common.delete","삭제")})})]})]})]}),t.jsx("div",{className:r.grid,children:G.map(x=>t.jsx(Ws,{snapshot:x,placeId:b,onClick:M=>v(x.snapshot_id,M),imageUrlOverride:n?ae:void 0,selectable:!n,selected:m.has(x.snapshot_id),onToggleSelect:N},x.snapshot_id))})]})]})]})}),t.jsx(it,{open:l!==null,ariaLabel:i("uiStudio.analysis.detailDialog","Analysis detail"),onClose:I,returnFocusTo:a.current,testId:"analysis-detail-popup-layer",children:l&&t.jsx(ua,{snapshotId:l,placeId:b,onClose:I,sampleDetail:n&&l===De?(j==null?void 0:j.detail)??null:null,tier:e,onActionDone:n?void 0:o.refresh})}),S&&t.jsx(le,{title:i("uiStudio.confirm.deleteBatchTitle","화면 캡처 일괄 삭제"),message:i("uiStudio.confirm.deleteBatchMessage",`선택한 ${m.size}개의 화면 캡처를 삭제합니다. 이 작업은 되돌릴 수 없습니다.`),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:D,onClose:()=>f(!1)})]})}function V(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):i==="incomplete"?e("uiStudio.analysis.verdict.incomplete","검토 증거 부족"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function Ma(e,i){if(((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){if((i==null?void 0:i.readiness)==="insufficient_evidence"){const s=Se(i);return s.length>0?`${e("uiStudio.analysis.remainingReview","남은 검토")}: ${s.join(", ")}`:e("uiStudio.analysis.issueSummary.incomplete","검토 증거가 더 필요합니다.")}return oe(e,i)}if((i==null?void 0:i.readiness)==="insufficient_evidence"){const s=Se(i);return s.length>0?`${e("uiStudio.analysis.remainingReview","남은 검토")}: ${s.join(", ")}`:e("uiStudio.analysis.issueSummary.incomplete","검토 증거가 더 필요합니다.")}return e("uiStudio.analysis.issueSummary.passed","현재 검토 기준에서 추가 개선 제안은 없습니다.")}function $a({report:e,placeId:i,imageUrlOverride:s,expanded:n,onPrimaryClick:o,onChildClick:a}){var S;const{t:l}=k(),u=e.latest,p=s??Te(u.snapshot_id,i),d=new Date(u.captured_at*1e3).toLocaleString(),m=V(l,e.verdict),h=e.children.length>1;return t.jsxs("div",{className:r.analysisReportGroup,children:[t.jsxs("button",{className:r.analysisReportCard,"aria-expanded":h?n:void 0,"aria-label":`${e.key} ${h?l("uiStudio.analysis.expandChildren","하위 대상 보기"):l("uiStudio.analysis.openDetail","상세 보기")}`,onClick:f=>o(f.currentTarget),type:"button",children:[u.image?t.jsx("img",{className:r.analysisReportThumb,src:p,alt:u.snapshot_id,loading:"lazy"}):t.jsx("div",{className:`${r.analysisReportThumb} ${r.runtimeObservationPlaceholder}`,role:"img","aria-label":l("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:l("uiStudio.runtimeStructureObservation","Runtime structure observation")}),t.jsxs("div",{className:r.analysisReportBody,children:[t.jsxs("div",{className:r.analysisReportTopline,children:[t.jsx(y,{text:e.verdict==="passed"?l("uiStudio.analysis.verdict.passed.tooltip","No improvements suggested under the current review thresholds."):l("uiStudio.analysis.verdict.hasSuggestions.tooltip","Some improvements were found in this UI. Click the card for details."),children:t.jsx("span",{className:`${r.analysisVerdict} ${r[`analysisVerdict_${e.verdict}`]??""}`,children:m})}),t.jsx(y,{text:l("uiStudio.analysis.counts.tooltip","Shows how many suggestions are marked review first, recommended, or optional."),children:t.jsx("span",{className:r.analysisReportCounts,children:oe(l,e.summary)})})]}),t.jsx("div",{className:r.analysisReportTarget,children:e.key}),((S=e.summary)==null?void 0:S.readiness)==="insufficient_evidence"&&e.verdict!=="incomplete"&&t.jsx("div",{className:r.analysisReportIssue,children:l("uiStudio.analysis.verdict.incomplete","검토 증거 부족")}),t.jsx(La,{summary:e.summary}),t.jsx("div",{className:r.analysisReportIssue,children:Ma(l,e.summary)}),t.jsx("div",{className:r.analysisReportCoverage,children:xe(l,e.summary)}),t.jsx(Ea,{summary:e.summary}),t.jsxs("div",{className:r.analysisReportMeta,children:[d," ·"," ",t.jsx(y,{text:l("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom)."),children:t.jsx("span",{children:l("uiStudio.analysis.thresholds","검토 기준")})}),": ",u.thresholds_source,e.snapshotCount>1?` · ${l("uiStudio.analysis.captureLabel","캡처")} ${L(l,e.snapshotCount)}`:"",h?` · ${l("uiStudio.analysis.childTargets","하위 대상")} ${L(l,e.children.length)}`:""]})]})]}),h&&n&&t.jsx("div",{className:r.analysisChildList,children:e.children.map(f=>t.jsxs("button",{className:r.analysisChildRow,onClick:v=>a(f.latest.snapshot_id,v.currentTarget),type:"button",children:[t.jsx("span",{className:r.analysisChildPath,children:f.key}),t.jsx("span",{className:r.analysisChildSummary,children:oe(l,f.latest.design_check_summary)}),t.jsx("span",{className:r.analysisChildSummary,children:xe(l,f.latest.design_check_summary)}),t.jsx("span",{className:r.analysisChildDetailHint,children:l("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},f.key))})]})}function La({summary:e}){const{t:i}=k();if(!e)return null;const s=e.functional_safe===!0?i("uiStudio.functional.checkedScopeSafe","Checked scope safe"):e.functional_safe===!1?i("uiStudio.functional.risk","Risk found"):i("uiStudio.functional.unknown","Unknown"),n=e.responsive_requirement==="required"?i("uiStudio.responsive.required","Required"):e.responsive_requirement==="recommended"?i("uiStudio.responsive.recommended","Recommended"):i("uiStudio.responsive.unknown","Unknown");return t.jsxs("div",{className:r.readinessSummary,"aria-label":i("uiStudio.readiness.summary","UI readiness"),children:[t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.primaryVisual.label","Primary visual")," · ",Ba(i,e.primary_visual_verdict)]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.functional.label","Functional")," · ",s]}),t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.responsive.label","Responsive")," · ",n]}),e.observation_source&&t.jsxs("span",{className:r.readinessChip,children:[i("uiStudio.observationSource.label","검사 출처")," · ",e.observation_source==="play_client"?i("uiStudio.observationSource.playClient","Play client"):i("uiStudio.observationSource.edit","Edit")]}),t.jsx("span",{className:`${r.readinessChip} ${e.readiness==="ready"?r.readinessChipReady:r.readinessChipPending}`,children:Ga(i,e.readiness)})]})}function Ea({summary:e}){const{t:i}=k(),s=e==null?void 0:e.coverage_dimensions;if(!s)return null;const n=[["Structure",s.structure],["Visual",s.visual],["Interaction",s.interaction],["Primary view",s.primary_view_context],["Responsive",s.responsive_viewport]];return t.jsx("div",{className:r.coverageChips,"aria-label":i("uiStudio.analysis.coverageDimensions","검토 범위"),children:n.map(([o,a])=>t.jsxs("span",{className:`${r.coverageChip} ${r[`coverageChip_${a.status}`]??""}`,title:a.reasons.join(", "),children:[o," · ",a.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):a.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},o))})}function Ua(e,i,s=1e4){const[n,o]=g.useState(null),[a,l]=g.useState(!0),[u,p]=g.useState(null),d=JSON.stringify(i),m=g.useCallback(async()=>{if(e===null){o(null),p(null),l(!1);return}try{const h=await ue(e,i);o(h),p(null)}catch(h){p(h.message)}finally{l(!1)}},[e,d]);return g.useEffect(()=>{let h=!0;if(e===null)return o(null),p(null),l(!1),()=>{h=!1};const S=async()=>{try{const v=await ue(e,i);h&&(o(v),p(null))}catch(v){h&&p(v.message)}finally{h&&l(!1)}};S();const f=setInterval(()=>{S()},s);return()=>{h=!1,clearInterval(f)}},[e,d,s]),{data:n,loading:a,error:u,refresh:m}}const Oa="_filterBar_1203k_4",Ha="_filterGroup_1203k_14",Fa="_filterLabel_1203k_21",za="_filterCheckbox_1203k_28",Va="_segmentGroup_1203k_45",Wa="_segmentBtn_1203k_55",Ka="_segmentBtnActive_1203k_73",Ya="_filterInput_1203k_79",Qa="_filterResetBtn_1203k_95",Ja="_requestRow_1203k_114",Xa="_requestRowMain_1203k_127",Za="_requestDetailToggle_1203k_134",er="_thumbPair_1203k_156",tr="_thumbPairButton_1203k_164",ir="_thumbSlot_1203k_179",sr="_thumbImg_1203k_204",ar="_thumbPlaceholder_1203k_211",rr="_thumbArrow_1203k_219",nr="_extraPathsBadge_1203k_225",or="_requestMeta_1203k_239",lr="_requestLabel_1203k_247",cr="_requestTime_1203k_256",ur="_requestStats_1203k_261",dr="_statDot_1203k_269",pr="_summaryPill_1203k_273",hr="_requestReadiness_1203k_277",_r="_requestReadinessPill_1203k_283",gr="_requestReadinessReady_1203k_297",mr="_requestReadinessPending_1203k_303",yr="_requestActions_1203k_310",fr="_expandHint_1203k_317",Sr="_mutationsArea_1203k_330",xr="_mutLoading_1203k_339",vr="_mutEmpty_1203k_340",Cr="_mutError_1203k_346",br="_mutationRow_1203k_352",wr="_mutationLine_1203k_362",kr="_mutTs_1203k_369",jr="_mutCommand_1203k_375",Ir="_mutPath_1203k_381",Nr="_mutDiff_1203k_391",Pr="_mutErr_1203k_346",Tr="_changeDetails_1203k_406",qr="_changeDetailRow_1203k_414",Rr="_changeDetailRowNoBefore_1203k_423",Br="_changeDetailBadge_1203k_427",Gr="_changeDetail_text_1203k_444",Dr="_changeDetail_color_1203k_449",Ar="_changeDetail_size_1203k_454",Mr="_changeDetail_layout_1203k_459",$r="_changeDetail_state_1203k_464",Lr="_changeDetail_asset_1203k_469",Er="_changeDetail_property_1203k_474",Ur="_changeDetailProperty_1203k_478",Or="_changeDetailArrow_1203k_486",Hr="_changeDetailOldValue_1203k_492",Fr="_changeDetailNewValue_1203k_493",zr="_compareDialogLayer_1203k_511",Vr="_compareDialog_1203k_511",Wr="_beforeAfterDrawer_1203k_542",Kr="_drawerHeader_1203k_552",Yr="_drawerTitle_1203k_561",Qr="_drawerCloseBtn_1203k_569",Jr="_drawerBody_1203k_585",Xr="_pathTabs_1203k_592",Zr="_pathTab_1203k_592",en="_pathTabActive_1203k_621",tn="_comparePanel_1203k_627",sn="_compareHalf_1203k_637",an="_compareLabel_1203k_644",rn="_compareImg_1203k_655",nn="_comparePlaceholder_1203k_663",on="_compareDetailsPanel_1203k_675",ln="_compareDetailsHeader_1203k_684",cn="_drawerFooter_1203k_702",un="_drawerActionBtn_1203k_710",dn="_historyTabWrap_1203k_728",pn="_historyWorkspace_1203k_734",hn="_historyMainColumn_1203k_739",_n="_requestList_1203k_743",gn="_emptyHistory_1203k_748",mn="_historyError_1203k_758",yn="_historyLoading_1203k_764",fn="_listHeader_1203k_772",Sn="_listHeaderTitle_1203k_781",xn="_clearBtn_1203k_788",vn="_deleteErrBanner_1203k_812",c={filterBar:Oa,filterGroup:Ha,filterLabel:Fa,filterCheckbox:za,segmentGroup:Va,segmentBtn:Wa,segmentBtnActive:Ka,filterInput:Ya,filterResetBtn:Qa,requestRow:Ja,requestRowMain:Xa,requestDetailToggle:Za,thumbPair:er,thumbPairButton:tr,thumbSlot:ir,thumbImg:sr,thumbPlaceholder:ar,thumbArrow:rr,extraPathsBadge:nr,requestMeta:or,requestLabel:lr,requestTime:cr,requestStats:ur,statDot:dr,summaryPill:pr,requestReadiness:hr,requestReadinessPill:_r,requestReadinessReady:gr,requestReadinessPending:mr,requestActions:yr,expandHint:fr,mutationsArea:Sr,mutLoading:xr,mutEmpty:vr,mutError:Cr,mutationRow:br,mutationLine:wr,mutTs:kr,mutCommand:jr,mutPath:Ir,mutDiff:Nr,mutErr:Pr,changeDetails:Tr,changeDetailRow:qr,changeDetailRowNoBefore:Rr,changeDetailBadge:Br,changeDetail_text:Gr,changeDetail_color:Dr,changeDetail_size:Ar,changeDetail_layout:Mr,changeDetail_state:$r,changeDetail_asset:Lr,changeDetail_property:Er,changeDetailProperty:Ur,changeDetailArrow:Or,changeDetailOldValue:Hr,changeDetailNewValue:Fr,compareDialogLayer:zr,compareDialog:Vr,beforeAfterDrawer:Wr,drawerHeader:Kr,drawerTitle:Yr,drawerCloseBtn:Qr,drawerBody:Jr,pathTabs:Xr,pathTab:Zr,pathTabActive:en,comparePanel:tn,compareHalf:sn,compareLabel:an,compareImg:rn,comparePlaceholder:nn,compareDetailsPanel:on,compareDetailsHeader:ln,drawerFooter:cn,drawerActionBtn:un,historyTabWrap:dn,historyWorkspace:pn,historyMainColumn:hn,requestList:_n,emptyHistory:gn,historyError:mn,historyLoading:yn,listHeader:fn,listHeaderTitle:Sn,clearBtn:xn,deleteErrBanner:vn};function Cn(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function ve(e){return e==null?"nil":typeof e=="string"?`"${e}"`:typeof e=="object"?JSON.stringify(e):String(e)}function Ee({mutations:e,emptyLabel:i}){const{t:s}=k();return e.length===0?t.jsx("div",{className:c.mutEmpty,children:i??s("uiStudio.history.row.mutationsEmpty","No change details")}):t.jsx(t.Fragment,{children:e.map(n=>t.jsx(bn,{mutation:n},n.mutationId))})}function bn({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:Cn(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(wn,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function wn({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:ve(e.before)}),t.jsx("span",{className:c.changeDetailArrow,children:"→"}),t.jsx("span",{className:c.changeDetailNewValue,children:ve(e.after)})]})}function Ce(e,i){return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function kn(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function jn(e){if(!e)return null;const i=e.split(/[./]/).filter(n=>n.length>0);if(i.length===0)return null;const s=i.findIndex(n=>n==="StarterGui");return s>=0&&i[s+1]?i[s+1]:i[i.length-1]??null}function te(e,i){if(i.label)return i.label;const s=jn(i.affectedPaths[0]);if(s){const n=i.mutationCount===1?"uiStudio.history.row.pathLabelOne":"uiStudio.history.row.pathLabelMany",o=i.mutationCount===1?"{path} · {n} change detail":"{path} · {n} change details";return e(n,o).replace("{path}",s).replace("{n}",String(i.mutationCount))}return e("uiStudio.history.row.toolLabel","UI changes ({n})").replace("{n}",String(i.mutationCount))}function ie(e,i){return`${i}${e("uiStudio.storage.countSuffix","")}`}function In(e,i){if(!i)return null;const s=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(n=>typeof n=="string"&&n.length>0);return s.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${s.join(" · ")}`}function Nn(e,i,s){if(!i)return null;if(i.source==="unavailable")return e("uiStudio.history.row.designCheckUnavailable","Suggestions: unavailable");if(s==="insufficient_evidence"||i.readiness==="insufficient_evidence")return e("uiStudio.history.row.readinessIncomplete","Readiness: evidence incomplete");if(i.total===0)return e("uiStudio.history.row.designCheckNone","Suggestions: none");const n=`${e("uiStudio.priorityHigh","Priority")} ${ie(e,i.priority_high)}`,o=`${e("uiStudio.priorityMedium","Recommended")} ${ie(e,i.priority_medium)}`,a=`${e("uiStudio.priorityLow","Optional")} ${ie(e,i.priority_low)}`;return`${e("uiStudio.history.row.designCheck","Suggestions")}: ${n} · ${o} · ${a}`}function Pn(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function Ue({req:e,placeId:i,onOpenCompare:s,imageUrlOverride:n,sampleMutations:o}){const{t:a}=k(),[l,u]=g.useState(!1),[p,d]=g.useState(null),[m,h]=g.useState(!1),[S,f]=g.useState(null),v=n!=null,I=e.affectedPaths[0]??null,B=e.affectedPaths.length-1,j=I?e.beforeSnapshots[I]??null:null,_=I?e.afterSnapshots[I]??null:null,q=j?v?n:Ce(j,i):null,N=_?v?n:Ce(_,i):null,C=In(a,e.qualityPlanSummary),P=Nn(a,e.postChangeDesignCheckSummary,e.readiness),D=e.postChangeDesignCheckSummary,G=async()=>{if(!l&&p===null)if(v&&o!=null)d(o);else{h(!0),f(null);try{const w=await Ie(i,e.requestId);d(w.mutations)}catch(w){f(w.message)}finally{h(!1)}}u(w=>!w)};return t.jsxs("div",{className:c.requestRow,children:[t.jsxs("div",{className:c.requestRowMain,children:[t.jsx(y,{text:a("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:w=>s(w.currentTarget),disabled:!I,"aria-label":`${te(a,e)} ${a("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:q?t.jsx("img",{className:c.thumbImg,src:q,alt:a("uiStudio.compare.before","Before"),loading:"lazy"}):t.jsx(y,{text:a("uiStudio.history.row.noBeforeState.tooltip","No capture saved before this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:a("uiStudio.history.row.noBeforeState","이전 없음")})})}),t.jsx("span",{className:c.thumbArrow,children:"→"}),t.jsx("div",{className:c.thumbSlot,children:N?t.jsx("img",{className:c.thumbImg,src:N,alt:a("uiStudio.compare.after","After"),loading:"lazy"}):t.jsx(y,{text:a("uiStudio.history.row.noAfterState.tooltip","No capture saved after this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:a("uiStudio.history.row.noAfterState","이후 없음")})})}),B>0&&t.jsx(y,{text:a("uiStudio.history.row.extraPaths.tooltip","Number of additional UIs changed in this action."),children:t.jsxs("span",{className:c.extraPathsBadge,children:["+",B]})})]})}),t.jsxs("button",{className:c.requestDetailToggle,type:"button","aria-expanded":l,"aria-label":`${te(a,e)} ${a("uiStudio.history.row.toggleDetails","Toggle change details")}`,onClick:()=>void G(),children:[t.jsxs("span",{className:c.requestMeta,children:[t.jsx("span",{className:c.requestLabel,children:te(a,e)}),t.jsx("span",{className:c.requestTime,children:kn(e.startedAt)}),t.jsxs("span",{className:c.requestStats,children:[t.jsx(y,{text:a("uiStudio.history.row.affectedPaths.tooltip","Number of UIs affected by this action."),children:t.jsxs("span",{children:[a("uiStudio.history.row.affectedPaths","Paths")," ",e.affectedPaths.length,a("uiStudio.storage.countSuffix","")]})}),t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:a("uiStudio.history.row.mutations.tooltip","Number of detailed changes (e.g., property edits)."),children:t.jsxs("span",{children:[a("uiStudio.history.row.mutations","Change details")," ",e.mutationCount,a("uiStudio.storage.countSuffix","")]})}),C&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:a("uiStudio.history.row.qualityPlan.tooltip","Brief design direction used for this change."),children:t.jsx("span",{className:c.summaryPill,children:C})})]}),P&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:a("uiStudio.history.row.designCheck.tooltip","Post-change Design Check suggestion summary."),children:t.jsx("span",{className:c.summaryPill,children:P})})]})]}),D&&t.jsxs("span",{className:c.requestReadiness,"aria-label":a("uiStudio.readiness.summary","UI readiness"),children:[t.jsx("span",{className:c.requestReadinessPill,children:Pn(a,D.primary_visual_verdict)}),t.jsx("span",{className:c.requestReadinessPill,children:D.functional_safe===!0?a("uiStudio.functional.safeCompact","Functional safe"):D.functional_safe===!1?a("uiStudio.functional.riskCompact","Functional risk"):a("uiStudio.functional.unknownCompact","Functional unknown")}),t.jsx("span",{className:c.requestReadinessPill,children:D.responsive_requirement==="required"?a("uiStudio.responsive.requiredCompact","Responsive required"):D.responsive_requirement==="recommended"?a("uiStudio.responsive.recommendedCompact","Responsive recommended"):a("uiStudio.responsive.unknownCompact","Responsive unknown")}),D.readiness==="ready"&&t.jsx("span",{className:`${c.requestReadinessPill} ${c.requestReadinessReady}`,children:a("uiStudio.readiness.ready","Ready")}),D.readiness==="review_required"&&t.jsx("span",{className:`${c.requestReadinessPill} ${c.requestReadinessPending}`,children:a("uiStudio.readiness.reviewRequired","Review required")})]})]}),t.jsx("span",{className:c.requestActions,children:t.jsx(y,{text:a("uiStudio.history.row.toggleDetails.tooltip","Show or hide a per-line breakdown of what changed."),children:t.jsx("span",{className:c.expandHint,children:l?a("uiStudio.history.row.collapseDetails","Hide change details"):a("uiStudio.history.row.expandDetails","Show {n} change details").replace("{n}",String(e.mutationCount))})})})]})]}),l&&t.jsxs("div",{className:c.mutationsArea,children:[m&&t.jsx("div",{className:c.mutLoading,children:a("uiStudio.history.loading","로딩 중...")}),S&&t.jsx("div",{className:c.mutError,children:S}),p&&t.jsx(Ee,{mutations:p,emptyLabel:a("uiStudio.history.row.mutationsEmpty","No change details")})]})]})}function be(e,i){return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Oe({requestId:e,placeId:i,onClose:s,imageUrlOverride:n,sampleDetail:o}){const{t:a}=k(),l=g.useRef(null),u=o!=null,[p,d]=g.useState(u?o:null),[m,h]=g.useState(!u),[S,f]=g.useState(null),[v,I]=g.useState(u&&o.affectedPaths.length>0?o.affectedPaths[0]:null);g.useEffect(()=>{var C;(C=l.current)==null||C.focus()},[]),g.useEffect(()=>{const C=P=>{P.key==="Escape"&&(P.preventDefault(),s())};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[s]),g.useEffect(()=>{if(u)return;let C=!0;return h(!0),f(null),Ie(i,e).then(P=>{C&&(d(P),P.affectedPaths.length>0&&I(P.affectedPaths[0]))}).catch(P=>{C&&f(P.message)}).finally(()=>{C&&h(!1)}),()=>{C=!1}},[e,i,u]);const B=v&&p?p.beforeSnapshots[v]??null:null,j=v&&p?p.afterSnapshots[v]??null:null,_=B?n??be(B,i):null,q=j?n??be(j,i):null,N=a("uiStudio.history.row.compare","전후 비교");return t.jsx("div",{className:c.compareDialogLayer,"data-testid":"history-compare-dialog-layer",onClick:s,role:"presentation",children:t.jsx("section",{ref:l,className:c.compareDialog,role:"dialog","aria-modal":"true","aria-label":N,tabIndex:-1,onClick:C=>C.stopPropagation(),children:t.jsxs("div",{className:c.beforeAfterDrawer,children:[t.jsxs("div",{className:c.drawerHeader,children:[t.jsx("h2",{className:c.drawerTitle,children:N}),t.jsx("button",{className:c.drawerCloseBtn,onClick:s,type:"button",children:a("uiStudio.history.drawer.close","닫기")})]}),m&&t.jsx("div",{className:c.drawerBody,children:a("uiStudio.history.loading","로딩 중...")}),S&&t.jsx("div",{className:c.drawerBody,children:t.jsx("span",{className:c.mutErr,children:S})}),!m&&!S&&p&&t.jsxs(t.Fragment,{children:[p.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:p.affectedPaths.map(C=>t.jsx(y,{text:`${a("uiStudio.compare.path.tooltip","The UI instance path for this screen.")} ${C}`,children:t.jsx("button",{role:"tab","aria-selected":v===C,className:`${c.pathTab} ${v===C?c.pathTabActive:""}`,onClick:()=>I(C),type:"button",children:C.split("/").pop()??C})},C))}),t.jsxs("div",{className:c.comparePanel,children:[t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:a("uiStudio.compare.before.tooltip","The screen saved just before AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:a("uiStudio.compare.before","Before")})}),_?t.jsx("img",{className:c.compareImg,src:_,alt:a("uiStudio.compare.before","Before")}):t.jsx("div",{className:c.comparePlaceholder,children:a("uiStudio.history.row.noBeforeState","이전 상태 없음")})]}),t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:a("uiStudio.compare.after.tooltip","The screen saved just after AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:a("uiStudio.compare.after","After")})}),q?t.jsx("img",{className:c.compareImg,src:q,alt:a("uiStudio.compare.after","After")}):t.jsx("div",{className:c.comparePlaceholder,children:a("uiStudio.history.row.noAfterState","이후 상태 없음")})]})]}),t.jsxs("section",{className:c.compareDetailsPanel,children:[t.jsx("div",{className:c.compareDetailsHeader,children:a("uiStudio.history.drawer.changeDetails","Change details")}),t.jsx(Ee,{mutations:p.mutations,emptyLabel:a("uiStudio.history.row.mutationsEmpty","No change details")})]})]}),t.jsx("div",{className:c.drawerFooter,children:t.jsx("button",{className:c.drawerActionBtn,onClick:s,type:"button",children:a("uiStudio.history.drawer.close","닫기")})})]})})})}function z(e){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999);return{start:i,end:s}}function we(e,i){const s=e.split("-").map(Number);if(s.length!==3||s.some(l=>Number.isNaN(l)))return;const[n,o,a]=s;return new Date(n,o-1,a,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function Tn(e){const i={limit:50};if(e.action!=="all"&&(i.action=e.action),e.datePreset==="custom"){const s=e.from?we(e.from,!1):void 0,n=e.to?we(e.to,!0):void 0;s&&(i.from=s),n&&(i.to=n)}else if(e.datePreset!=="all"){const s=new Date;if(e.datePreset==="today"){const{start:n,end:o}=z(s);i.from=n.toISOString(),i.to=o.toISOString()}else if(e.datePreset==="yesterday"){const n=new Date(s);n.setDate(n.getDate()-1);const{start:o,end:a}=z(n);i.from=o.toISOString(),i.to=a.toISOString()}else{const n=e.datePreset==="7d"?6:29,o=new Date(s);o.setDate(o.getDate()-n);const{start:a}=z(o),{end:l}=z(s);i.from=a.toISOString(),i.to=l.toISOString()}}return i}function He(){return{action:"all",datePreset:"all"}}function qn(e){return e.action==="all"&&e.datePreset==="all"&&e.from===void 0&&e.to===void 0}function Rn(){const{t:e}=k(),{trackEvent:i}=E(),s=et(e),[n,o]=g.useState(null),a=n?s.requests.find(p=>p.requestId===n)??null:null,l=g.useCallback((p,d)=>{o(p)},[]),u=g.useCallback(()=>{o(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[t.jsx("div",{className:r.sampleBanner,children:t.jsxs("div",{className:r.sampleBannerRow,children:[t.jsxs("div",{className:r.sampleBannerMain,children:[t.jsx("div",{className:r.sampleBadge,children:e("uiStudio.history.sample.bannerBadge","Preview of the Pro change history")}),t.jsx("div",{className:r.sampleTitle,children:e("uiStudio.history.sample.bannerTitle","You are previewing the UI change history that unlocks after upgrading to Pro.")}),t.jsx("div",{className:r.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:r.sampleActions,children:t.jsx("a",{className:r.primaryAction,href:je.uiStudioHistory,target:"_blank",rel:"noreferrer",title:e("uiStudio.history.sample.tooltip","Full history is available with Pro"),onClick:()=>i("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_history_banner",page:"ui-studio",tab:"ui_studio_history"}),children:e("tier.upgrade","View Pro")})})]})}),t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":n?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx("div",{className:c.listHeader,children:t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(R,{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:s.requests.map(p=>t.jsx(Ue,{req:p,placeId:0,onOpenCompare:d=>l(p.requestId,d),imageUrlOverride:de,sampleMutations:s.mutationsByRequest[p.requestId]},p.requestId))})]}),n&&a&&t.jsx(Oe,{requestId:n,placeId:0,onClose:u,imageUrlOverride:de,sampleDetail:{...a,mutations:s.mutationsByRequest[a.requestId]??[]}})]})]})}function Bn({filter:e,onChange:i}){const{t:s}=k(),n=[{value:"all",label:s("uiStudio.history.filter.actionAll","All"),tooltip:s("uiStudio.history.filter.actionAll.tooltip","Show every kind of action.")},{value:"create_tree",label:s("uiStudio.history.filter.actionCreate","Create"),tooltip:s("uiStudio.history.filter.actionCreate.tooltip","Show only actions that created a new UI.")},{value:"update",label:s("uiStudio.history.filter.actionUpdate","Update"),tooltip:s("uiStudio.history.filter.actionUpdate.tooltip","Show only actions that updated an existing UI.")},{value:"delete",label:s("uiStudio.history.filter.actionDelete","Delete"),tooltip:s("uiStudio.history.filter.actionDelete.tooltip","Show only actions that deleted a UI.")}],o=[{value:"all",label:s("uiStudio.history.filter.dateAll","All"),tooltip:s("uiStudio.history.filter.dateAll.tooltip","Show the full history.")},{value:"today",label:s("uiStudio.history.filter.today","Today"),tooltip:s("uiStudio.history.filter.today.tooltip","Show only changes from today.")},{value:"yesterday",label:s("uiStudio.history.filter.yesterday","Yesterday"),tooltip:s("uiStudio.history.filter.yesterday.tooltip","Show only changes from yesterday.")},{value:"7d",label:s("uiStudio.history.filter.last7Days","Last 7 days"),tooltip:s("uiStudio.history.filter.last7Days.tooltip","Show changes from the last 7 days.")},{value:"30d",label:s("uiStudio.history.filter.last30Days","Last 30 days"),tooltip:s("uiStudio.history.filter.last30Days.tooltip","Show changes from the last 30 days.")},{value:"custom",label:s("uiStudio.history.filter.customRange","Custom range"),tooltip:s("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(R,{label:s("uiStudio.history.filter.actions","작업 유형"),tooltip:s("uiStudio.history.filter.actions.tooltip","Filter records by the kind of change AI made.")})}),t.jsx("div",{className:c.segmentGroup,children:n.map(a=>t.jsx(y,{text:a.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.action===a.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,action:a.value}),"aria-pressed":e.action===a.value,type:"button",children:a.label})},a.value))})]}),t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(R,{label:s("uiStudio.history.filter.period","Period"),tooltip:s("uiStudio.history.filter.period.tooltip","Filter records by time range.")})}),t.jsx("div",{className:c.segmentGroup,children:o.map(a=>t.jsx(y,{text:a.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.datePreset===a.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,datePreset:a.value,from:a.value==="custom"?e.from:void 0,to:a.value==="custom"?e.to:void 0}),"aria-pressed":e.datePreset===a.value,type:"button",children:a.label})},a.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(R,{label:s("uiStudio.history.filter.from","시작일"),tooltip:s("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:a=>i({...e,from:a.target.value||void 0})}),t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-to-date",children:t.jsx(R,{label:s("uiStudio.history.filter.to","종료일"),tooltip:s("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:a=>i({...e,to:a.target.value||void 0})})]}),t.jsx(y,{text:s("uiStudio.history.filter.reset.tooltip","Reset all filters to defaults."),children:t.jsx("button",{className:c.filterResetBtn,onClick:()=>i(He()),type:"button",children:s("uiStudio.history.filter.reset","Reset")})})]})}function Gn(){var G;const{t:e}=k(),{trackEvent:i}=E(),s=qe(1),n=((G=s.data)==null?void 0:G.placeId)??null,[o,a]=g.useState(He),{data:l,loading:u,error:p,refresh:d}=Ua(n,Tn(o)),[m,h]=g.useState(null),[S,f]=g.useState(!1),[v,I]=g.useState(!1),[B,j]=g.useState(null),_=async()=>{if(j(null),n===null){j(e("uiStudio.history.noPlaceAction","Current place is not available yet."));return}try{await tt(n,{all:!0,alsoSnapshots:v}),await d(),f(!1)}catch(w){throw j(w.message),w}},q=(l==null?void 0:l.requests)??[],N=n===null&&s.loading,C=re(s.error)||re(p),P=g.useCallback((w,b)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),h(w)},[i]),D=g.useCallback(()=>{h(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[C?t.jsx(Ae,{}):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(Bn,{filter:o,onChange:a}),t.jsxs("div",{className:c.listHeader,children:[t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(R,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})}),q.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"}),f(!0)},type:"button",children:e("uiStudio.history.clear","Clear")})})]}),N&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loadingPlace","Loading current place...")}),!N&&u&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!N&&!u&&p&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",p]}),!N&&!u&&!p&&n===null&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.noPlace","No current place data is available yet. Connect WEPPY Plugin and sync a place to view UI change history.")}),!N&&!u&&!p&&n!==null&&q.length===0&&(qn(o)?t.jsx(Me,{kind:"history"}):t.jsxs("div",{className:c.emptyHistory,children:[t.jsx("strong",{children:e("uiStudio.history.filteredEmpty.title","No change history matches these filters")}),t.jsx("span",{children:e("uiStudio.history.filteredEmpty.body","Change the filters or use Reset to show the full history.")})]})),!N&&!u&&n!==null&&q.length>0&&t.jsx("div",{className:c.requestList,children:q.map(w=>t.jsx(Ue,{req:w,placeId:n,onOpenCompare:b=>P(w.requestId,b)},w.requestId))}),B&&t.jsx("div",{className:c.deleteErrBanner,children:B})]}),m&&n!==null&&t.jsx(Oe,{requestId:m,placeId:n,onClose:D})]}),S&&t.jsx(le,{title:e("uiStudio.history.confirm.clearRequestsTitle","변경 이력 삭제"),message:e("uiStudio.history.confirm.clearRequestsMessage","현재 place의 변경 이력을 삭제합니다. Studio 인스턴스에는 영향을 주지 않습니다."),danger:!0,cascadeOption:{label:e("uiStudio.history.confirm.cascadeOption","연결된 화면 캡처도 함께 삭제"),checked:v,onChange:I},confirmLabel:e("common.delete","삭제"),onConfirm:_,onClose:()=>f(!1)})]})}function Dn({tier:e}){return e==="basic"?t.jsx(Rn,{}):t.jsx(Gn,{})}const An=["analysis","history"];function Wn(){const{t:e}=k(),{trackEvent:i}=E(),{tier:s,loading:n}=We(),[o,a]=Ke(),l=o.get("tab"),u=l&&An.includes(l)?l:"analysis",p=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"}),a(h=>{const S=new URLSearchParams(h);return S.set("tab",m),S})},d=[{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:r.page,children:[t.jsx(Qe,{title:e("page.uiStudio.title","UI Studio"),description:e("page.uiStudio.description","Review UI captures, improvement suggestions, and before/after change history."),helpTopicId:"uiStudio",helpState:{tier:s}}),!n&&s==="pro"&&t.jsx(st,{surface:"uiStudio"}),t.jsx(at,{items:d,value:u,onChange:p}),n?t.jsx("div",{className:r.emptyState,children:e("uiStudio.loading","Loading...")}):u==="analysis"?t.jsx(Aa,{tier:s}):t.jsx(Dn,{tier:s})]})}export{Wn as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as j,j as e,L as f,Z as k,r as g,_ as x}from"./index-
|
|
1
|
+
import{u as j,j as e,L as f,Z as k,r as g,_ as x}from"./index-Dryjq9a5.js";import{P as z}from"./PageHeader-BbXDD7J9.js";import{P as C}from"./PlaytestAiPromptExamples-CNzT1Zzl.js";import"./AiPromptExamples-B3Uy68MJ.js";import"./copy-Dagqdoq_.js";const P="_card_15ozw_2",v="_cardUnread_15ozw_15",R="_cardRead_15ozw_20",T="_cardUnreadWarning_15ozw_25",A="_topRow_15ozw_32",I="_categoryChip_15ozw_39",L="_versionChip_15ozw_52",B="_importantBadge_15ozw_64",U="_date_15ozw_77",b="_title_15ozw_85",E="_body_15ozw_94",S="_aiPrompt_15ozw_102",W="_aiPromptIntro_15ozw_112",$="_linkList_15ozw_125",M="_link_15ozw_125",O="_internalLink_15ozw_147",Y="_newBadge_15ozw_169",t={card:P,cardUnread:v,cardRead:R,cardUnreadWarning:T,topRow:A,categoryChip:I,versionChip:L,importantBadge:B,date:U,title:b,body:E,aiPrompt:S,aiPromptIntro:W,linkList:$,link:M,internalLink:O,newBadge:Y},H={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function u({announcement:s,isNew:i}){var a;const{locale:c,t:n}=j(),d=i?t.cardUnread:t.cardRead,l=s.severity==="warning",p=l&&i?t.cardUnreadWarning:"",w=s.title[c]??s.title.en,N=s.body[c]??s.body.en,_=s.links??(s.link?[s.link]:[]),h=r=>typeof r=="string"?r:r[c]??r.en;return e.jsxs("div",{className:`${t.card} ${d} ${p}`,children:[e.jsxs("div",{className:t.topRow,children:[e.jsx("span",{className:t.categoryChip,children:n(H[s.category])}),l&&e.jsx("span",{className:t.importantBadge,children:n("whatsNew.importantBadge","IMPORTANT")}),s.version&&e.jsx("span",{className:t.versionChip,children:s.version}),i&&e.jsx("span",{className:t.newBadge,children:n("whatsNew.newBadge","NEW")}),e.jsx("span",{className:t.date,children:s.date})]}),e.jsx("h3",{className:t.title,children:w}),e.jsx("p",{className:t.body,children:N}),((a=s.aiPrompt)==null?void 0:a.kind)==="playtest-values"&&e.jsxs("div",{className:t.aiPrompt,children:[e.jsxs("div",{className:t.aiPromptIntro,children:[e.jsx("strong",{children:n("playtest.emptyValues.aiTitle","Ask AI")}),e.jsx("span",{children:n("playtest.emptyValues.aiDescription","Copy a request and paste it into an AI chat connected to WEPPY.")})]}),e.jsx(C,{exampleIds:[s.aiPrompt.exampleId]})]}),_.length>0&&e.jsx("div",{className:t.linkList,children:_.map(r=>{const m=h(r.url),y=h(r.label);return m.startsWith("/")?e.jsx(f,{className:`${t.link} ${t.internalLink}`,to:m,children:y},m):e.jsxs("a",{className:t.link,href:m,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",y]},m)})})]})}const V="_page_4653w_2",q="_section_4653w_10",D="_sectionTitle_4653w_16",G="_unreadCount_4653w_28",K="_empty_4653w_43",Z="_divider_4653w_51",o={page:V,section:q,sectionTitle:D,unreadCount:G,empty:K,divider:Z};function se(){const{t:s}=j(),{readSet:i,markRead:c}=k(),n=g.useMemo(()=>{const a=[];for(const r of x)i.has(r.id)||a.push(r.id);return a},[]),d=g.useRef(n);d.current=n,g.useEffect(()=>()=>{d.current.length>0&&c(d.current)},[]);const l=g.useMemo(()=>new Set(n),[n]),p=x.filter(a=>l.has(a.id)),w=x.filter(a=>!l.has(a.id)),N=p.length>0,_=w.length>0,h=e.jsx(z,{title:s("whatsNew.pageTitle","What's New"),description:s("whatsNew.pageSubtitle","Stay up to date with MCP changes"),helpTopicId:"whatsNew"});return x.length===0?e.jsxs("div",{className:o.page,children:[h,e.jsx("p",{className:o.empty,children:s("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:o.page,children:[h,N&&e.jsxs("section",{className:o.section,children:[e.jsxs("h2",{className:o.sectionTitle,children:[s("whatsNew.unreadSection","Unread"),e.jsx("span",{className:o.unreadCount,children:p.length})]}),p.map(a=>e.jsx(u,{announcement:a,isNew:!0},`unread-${a.id}`))]}),N&&_&&e.jsx("hr",{className:o.divider}),_&&e.jsxs("section",{className:o.section,children:[e.jsx("h2",{className:o.sectionTitle,children:s("whatsNew.allSection","All Announcements")}),w.map(a=>e.jsx(u,{announcement:a,isNew:!1},`all-${a.id}`))]})]})}export{se as Component};
|