import{React as P,jsxRuntimeExports as e,reactExports as n}from"./vendor-react.js";import{Root2$4 as be,Item2$2 as Ne,Indicator as Me,Circle as He,Root2$5 as Ue,Item as Oe,Header as Xe,Trigger2 as ge,ChevronDown as Ke,Content2$3 as ye,X as qe,LoaderCircle as N,ArrowRightLeft as Je,RefreshCw as Qe,Copy as X,toast as h}from"./vendor-common.js";import{apiService as xe}from"./excalidrawUiMode.js";import{readExportModalPreferences as We,mergeExportModalPreferences as Ye,Tabs as Ze,TabsList as es,TabsTrigger as k,createExportReviewFailureResult as ss}from"../index.js";import ts from"./ExportReviewDialogView.js";import{cn as E,Dialog as rs,DialogContent as as,DialogHeader as ns,DialogTitle as ds,Button as u,DialogFooter as is}from"./dialog.js";import{Input as me,Label as ue,Textarea as ls}from"./AppDialogProvider.js";import{Select as pe,SelectTrigger as he,SelectValue as fe,SelectContent as je,SelectItem as K}from"./select.js";import{Switch as q}from"./switch.js";import"./_commonjsHelpers.js";import"./spec-template-vendor.js";import"./vendor-antd.js";import"./preload-helper.js";import"./_commonjs-dynamic-modules.js";import"./vendor-assistant.js";import"./vendor-export.js";import"./vendor-genie.js";const os=["Axure 导出工作流","Axure API 规范"];function cs(t){const{itemName:a}=t;return`请为当前项目执行「新增或更新 Axure API（代码+文档）」任务，严格按固定要求处理，不依赖已有解析结果。

必须先阅读并遵循以下固定规则/规范（由系统上下文提供）：
${os.map(i=>`- ${i}`).join(`
`)}

目标资源：
- \`${a}\`
- 当前资源的运行入口与规格说明

任务要求：
1. 以 \`useImperativeHandle\` 返回对象作为 Axure API 真值来源，补齐或更新 \`eventList\` / \`actionList\` / \`varList\` / \`configList\` / \`dataList\`。
2. 保持现有业务行为、交互和视觉表现不变，只做 Axure API 相关必要改动。
3. 同步更新规格说明中的 5.x Axure API 章节（5.1-5.5），确保与代码一致；若文件不存在请创建。
4. 输出结果时给出改动摘要，并明确列出新增/更新了哪些 API。
5. 如当前文件缺失任意列表，完整新增并保证可被静态识别；如已存在，补齐字段描述并确保命名与规范一致。

输出要求：
- 列出 5 类列表各自是“新增 / 更新 / 保持不变”。
- 标注规格说明是否已同步完成。
`}const ve=P.forwardRef(({className:t,...a},i)=>e.jsx(be,{className:E("grid gap-3",t),...a,ref:i}));ve.displayName=be.displayName;const J=P.forwardRef(({className:t,...a},i)=>e.jsx(Ne,{ref:i,className:E("aspect-square h-4 w-4 rounded-full border border-foreground text-foreground ring-offset-background focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-white",t),...a,children:e.jsx(Me,{className:"flex items-center justify-center text-primary-foreground",children:e.jsx(He,{className:"h-2.5 w-2.5 fill-current text-current"})})}));J.displayName=Ne.displayName;const xs=Ue,R=P.forwardRef(({className:t,...a},i)=>e.jsx(Oe,{ref:i,className:E("border-b",t),...a}));R.displayName="AccordionItem";const S=P.forwardRef(({className:t,children:a,...i},x)=>e.jsx(Xe,{asChild:!0,children:e.jsx("div",{className:"m-0 flex h-full flex-1 items-center",children:e.jsxs(ge,{ref:x,className:E("flex flex-1 items-center justify-between py-2 text-sm transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...i,children:[a,e.jsx(Ke,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})})}));S.displayName=ge.displayName;const L=P.forwardRef(({className:t,children:a,...i},x)=>e.jsx(ye,{ref:x,className:E("overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",t),...i,children:e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:a})}));L.displayName=ye.displayName;const ms=[{key:"eventList",title:"eventList 事件列表"},{key:"actionList",title:"actionList 动作列表"},{key:"varList",title:"varList 变量列表"},{key:"configList",title:"configList 配置列表"},{key:"dataList",title:"dataList 数据列表"}];function o(t){if(t==null)return"—";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);try{return JSON.stringify(t)}catch{return String(t)}}function us(t){return t==="parsed"?"结构化":t==="raw"?"部分解析":"未定义"}function ps({open:t,preferencesStorageKey:a,onClose:i,imageConfig:x,setImageConfig:F,axureCopyOptions:V,setAxureCopyOptions:Q,onDimensionChange:W,onSwapDimensions:we,onDimensionBlur:Y,isExporting:I,onExport:Ae,onCopyRuntimeComponent:Ce,onCopyToAxure:ke,onCopyConfig:Z,activeTab:Re,itemName:g,sourceTargetPath:f,exportAvailability:B,preferredPromptClient:hs,preferredIDE:fs,ideAvailability:js,initialReviewResult:z,onInitialReviewHandled:T}){const ee="原型",se='"><script type="text/javascript" src="https://static.axhub.im/lib/runtime.js" ><\/script> <link href="',[Se,_]=n.useState(null),[Le,D]=n.useState(!1),[b,te]=n.useState(!1),[l,re]=n.useState("dynamicPrototype"),[ae,ne]=n.useState(!1),[$,y]=n.useState(""),[j,G]=n.useState(""),[Pe,de]=n.useState(!1),[M,v]=n.useState(null),[H,ie]=n.useState(!1),[le,w]=n.useState(""),U=n.useRef(!1),A=B.canUseSourceFeatures,oe=B.axureRuntimeDisabledReason,p=B.axureSourceDisabledReason;n.useEffect(()=>{U.current=!1;const s=We(a);re(s.activeTabKey??"dynamicPrototype"),G(s.selectedExportType??""),U.current=!0},[a]),n.useEffect(()=>{U.current&&Ye(a,{activeTabKey:l,selectedExportType:j})},[l,a,j]),n.useEffect(()=>{t||(y(""),v(null),w(""))},[t]),n.useEffect(()=>{!t||!z||(_(z),D(!0),T==null||T())},[z,T,t]);const O=async()=>{if(!f||!A)return!0;te(!0);try{const s=await xe.reviewCode(f,{enforceComponentExportName:!0,mode:"axure-export"});return s.passed?!0:(_(s),D(!0),!1)}catch(s){return console.error("代码检查失败:",s),_(ss({itemName:g||f,sourceTargetPath:f,message:(s==null?void 0:s.message)||"代码检查接口调用失败"})),D(!0),!1}finally{te(!1)}};n.useEffect(()=>{(async()=>{if(t&&j&&l==="copyConfig"){if(!A){y(p||"源码或 artifact metadata 缺失");return}de(!0);try{if(!await O()){G(""),y("");return}const c=await Z(j);y(c)}catch{h.error("加载配置失败"),y("")}finally{de(!1)}}})()},[l,p,A,Z,t,j]);const ce=async()=>{if(!f){v(null),w("请先选择一个条目");return}if(!A){v(null),w(p||"源码或 artifact metadata 缺失");return}ie(!0),w("");try{const s=await xe.getAxureApiPreview(f);v(s)}catch(s){v(null),w((s==null?void 0:s.message)||"加载 Axure API 失败")}finally{ie(!1)}};n.useEffect(()=>{!t||l!=="axureApi"||ce()},[t,l,f]);const Ee=async()=>{await O()&&Ae()},Ie=async()=>{await O()&&Ce()},Te=async()=>{if(!(ae||b)){ne(!0);try{await ke(V)}finally{ne(!1)}}},De=async()=>{if(!$){h.warning("请先选择导出内容");return}try{await navigator.clipboard.writeText($),h.success("配置已复制到剪贴板")}catch{h.error("复制失败，请检查浏览器剪贴板权限")}},$e=async()=>{try{await navigator.clipboard.writeText(se),h.success("链接已复制到剪贴板")}catch{h.error("复制链接失败，请检查浏览器剪贴板权限")}},Fe=async()=>{if(!g){h.warning("请先选择一个条目");return}const s=cs({itemName:g});try{await navigator.clipboard.writeText(s),h.success("Prompt 已复制到剪贴板")}catch{h.error("复制 Prompt 失败，请检查浏览器剪贴板权限")}},Ve=(s,r)=>{const c=s==="eventList"?"payload":s==="actionList"?"params":"扩展信息",d=s==="eventList"?"payload":s==="actionList"?"params":null;return e.jsx("div",{className:"overflow-x-auto rounded-md border",children:e.jsxs("table",{className:"min-w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 font-medium",children:"name"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"desc"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:c})]})}),e.jsx("tbody",{children:r.items.length===0?e.jsx("tr",{children:e.jsx("td",{className:"px-3 py-2 text-muted-foreground",colSpan:3,children:"无条目"})}):r.items.map((m,C)=>e.jsxs("tr",{className:"border-t",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:o(m.name)}),e.jsx("td",{className:"px-3 py-2",children:o(m.desc)}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:o(d?m[d]:m)})]},`${s}-${C}`))})]})})},Be=s=>s.items.length===0?e.jsx("div",{className:"px-1 py-2 text-sm text-muted-foreground",children:"无条目"}):e.jsx("div",{className:"overflow-x-auto rounded-md border",children:e.jsxs("table",{className:"min-w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 font-medium",children:"type"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"attributeId"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"displayName"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"info"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"initialValue"})]})}),e.jsx("tbody",{children:s.items.map((r,c)=>e.jsxs("tr",{className:"border-t align-top",children:[e.jsx("td",{className:"px-3 py-2",children:o(r.type)}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:o(r.attributeId)}),e.jsx("td",{className:"px-3 py-2",children:o(r.displayName)}),e.jsx("td",{className:"px-3 py-2",children:o(r.info)}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:o(r.initialValue)})]},`config-${c}`))})]})}),ze=s=>Array.isArray(s)?s.map(r=>{if(r&&typeof r=="object"){const c=r;return{name:o(c.name),desc:o(c.desc)}}return{name:o(r),desc:"—"}}):[],_e=s=>s.items.length===0?e.jsx("div",{className:"px-1 py-2 text-sm text-muted-foreground",children:"无条目"}):e.jsx("div",{className:"overflow-x-auto rounded-md border",children:e.jsxs("table",{className:"min-w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 font-medium",children:"name"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"desc"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"keys"})]})}),e.jsx("tbody",{children:s.items.map((r,c)=>{const d=ze(r.keys);return e.jsxs("tr",{className:"border-t align-top",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:o(r.name)}),e.jsx("td",{className:"px-3 py-2",children:o(r.desc)}),e.jsx("td",{className:"px-3 py-2",children:d.length===0?e.jsx("span",{className:"text-xs text-muted-foreground",children:"无 keys"}):e.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map((m,C)=>e.jsx("span",{className:"inline-flex items-center rounded bg-muted/50 px-2 py-0.5 font-mono text-[11px]",children:m.desc!=="—"?`${m.name} · ${m.desc}`:m.name},`data-${c}-key-${C}`))})})]},`data-${c}`)})})]})});return e.jsxs(e.Fragment,{children:[e.jsx(rs,{open:t,onOpenChange:s=>!s&&i(),children:e.jsxs(as,{className:"flex h-[560px] w-[min(90vw,860px)] max-w-[860px] flex-col overflow-hidden p-0 text-sm [&>[data-dialog-close]]:hidden",children:[e.jsxs(ns,{className:"border-b px-5 py-3.5",children:[e.jsx(ds,{className:"sr-only",children:"导出到 Axure"}),e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(Ze,{value:l,onValueChange:s=>{(s==="dynamicPrototype"||s==="staticPrototype"||s==="axureApi"||s==="usageGuide"||s==="copyConfig")&&re(s)},className:"w-full max-w-[480px]",children:e.jsxs(es,{className:"grid h-8 w-full grid-cols-5 rounded-lg border border-border/70 bg-muted/50 p-0.5",children:[e.jsx(k,{value:"dynamicPrototype",className:"h-full rounded-md px-2.5 py-0 text-[13px] leading-none data-[state=active]:shadow-none",children:"动态原型"}),e.jsx(k,{value:"staticPrototype",className:"h-full rounded-md px-2.5 py-0 text-[13px] leading-none data-[state=active]:shadow-none",children:"可编辑原型"}),e.jsx(k,{value:"axureApi",className:"h-full rounded-md px-2.5 py-0 text-[13px] leading-none data-[state=active]:shadow-none",children:"Axure API"}),e.jsx(k,{value:"copyConfig",className:"h-full rounded-md px-2.5 py-0 text-[13px] leading-none data-[state=active]:shadow-none",children:"复制配置"}),e.jsx(k,{value:"usageGuide",className:"h-full rounded-md px-2.5 py-0 text-[13px] leading-none data-[state=active]:shadow-none",children:"使用说明"})]})}),e.jsx(u,{variant:"ghost",size:"icon-sm",className:"h-7 w-7 shrink-0 rounded-md",onClick:i,"aria-label":"关闭",children:e.jsx(qe,{className:"h-4 w-4"})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4.5",children:l==="dynamicPrototype"?e.jsxs("div",{className:"space-y-3",children:[A?null:e.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50/50 p-3 text-sm text-blue-900 dark:border-blue-900 dark:bg-blue-950/40 dark:text-blue-100",children:"当前项目可打开通用 Axure 导出入口；源码或 artifact metadata 缺失，Runtime 封面、复制配置和 Make 导出等高级功能暂不可用。"}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[minmax(0,1fr)_248px]",children:[e.jsx("div",{className:"flex h-[360px] items-center justify-center overflow-hidden rounded-md border bg-muted/30 p-3",children:x.previewUrl?e.jsx("img",{src:x.previewUrl,alt:"Preview",className:"h-full w-full object-contain"}):e.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:[e.jsx(N,{className:"mx-auto mb-2 h-5 w-5 animate-spin"}),"正在生成预览..."]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"导出尺寸"}),e.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2",children:[e.jsx(me,{type:"number",min:1,value:x.width,onChange:s=>W("width",Number(s.target.value||0)),onBlur:Y,placeholder:"宽"}),e.jsx(u,{variant:"ghost",size:"icon-sm",className:"h-8 w-8 shrink-0 rounded-md text-muted-foreground hover:text-foreground",onClick:we,"aria-label":"交换宽高",children:e.jsx(Je,{className:"h-4 w-4"})}),e.jsx(me,{type:"number",min:1,value:x.height,onChange:s=>W("height",Number(s.target.value||0)),onBlur:Y,placeholder:"高"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"图片内容"}),e.jsxs(ve,{value:x.contentType,onValueChange:s=>{s&&F(r=>({...r,contentType:s}))},children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(J,{value:"title",id:"export-content-title"}),e.jsxs(ue,{htmlFor:"export-content-title",className:"text-sm font-normal",children:[ee,"标题"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(J,{value:"screenshot",id:"export-content-screenshot"}),e.jsxs(ue,{htmlFor:"export-content-screenshot",className:"text-sm font-normal",children:[ee,"截图"]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"包含配置"}),e.jsxs(pe,{value:x.includeConfig,onValueChange:s=>F(r=>({...r,includeConfig:s})),children:[e.jsx(he,{children:e.jsx(fe,{placeholder:"选择配置"})}),e.jsxs(je,{children:[e.jsx(K,{value:"none",children:"无"}),e.jsx(K,{value:"code",children:"原型"})]})]})]}),Re==="prototypes"?e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("div",{className:"text-sm font-medium",children:"全屏展示"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"在 Axure 中全屏渲染原型"})]}),e.jsx(q,{checked:x.isFullScreen??!0,onCheckedChange:s=>{F(r=>({...r,isFullScreen:s}))},"aria-label":"全屏展示"})]}):null]})]})]}):l==="staticPrototype"?e.jsxs("div",{className:"mx-auto w-full max-w-[620px] space-y-3",children:[e.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50/50 p-3 text-sm text-blue-900 dark:border-blue-900 dark:bg-blue-950/40 dark:text-blue-100",children:oe||"粘贴到 Axure 后可自由编辑"}),e.jsxs("div",{className:"rounded-md border",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 px-4 py-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm font-medium",children:"保留 Axure 层级"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"关闭后将减少大量动态面板"})]}),e.jsx(q,{checked:V.preserveHierarchy,onCheckedChange:s=>{Q(r=>({...r,preserveHierarchy:s}))},"aria-label":"保留 Axure 层级"})]}),e.jsx("div",{className:"h-px bg-border"}),e.jsxs("div",{className:"flex items-start justify-between gap-4 px-4 py-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm font-medium",children:"保留 Axure SVG 图标"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"关闭后将转化为 PNG 导出"})]}),e.jsx(q,{checked:V.preserveSvgIcons,onCheckedChange:s=>{Q(r=>({...r,preserveSvgIcons:s}))},"aria-label":"保留 Axure SVG 图标"})]})]})]}):l==="axureApi"?e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50/50 p-3 text-sm text-blue-900 dark:border-blue-900 dark:bg-blue-950/40 dark:text-blue-100",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"font-medium",children:"当前 Axure Handle API 预览"}),e.jsxs("div",{className:"text-xs",children:["数据来源：当前资源运行入口的 ",e.jsx("code",{children:"useImperativeHandle"})]}),e.jsxs("div",{className:"text-xs",children:["固定技能：",e.jsx("code",{children:"Axure 导出工作流"}),"、",e.jsx("code",{children:"Axure API 规范"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>void ce(),disabled:H||!g||!!p,children:[e.jsx(Qe,{className:`h-4 w-4 ${H?"animate-spin":""}`}),"刷新"]}),e.jsxs(u,{variant:"brand",size:"sm",onClick:()=>void Fe(),disabled:!g||!!p,children:[e.jsx(X,{className:"h-4 w-4"}),"复制 Prompt"]})]})]})}),H?e.jsxs("div",{className:"rounded-md border p-4 text-center text-sm text-muted-foreground",children:[e.jsx(N,{className:"mx-auto mb-2 h-5 w-5 animate-spin"}),"正在解析 Axure API..."]}):le?e.jsx("div",{className:"rounded-md border border-amber-300/60 bg-amber-50/50 p-3 text-sm text-amber-900 dark:border-amber-700/60 dark:bg-amber-950/30 dark:text-amber-100",children:le}):M?e.jsxs("div",{className:"space-y-3",children:[M.hasAxureHandle?null:e.jsxs("div",{className:"rounded-md border border-amber-300/60 bg-amber-50/50 p-3 text-sm text-amber-900 dark:border-amber-700/60 dark:bg-amber-950/30 dark:text-amber-100",children:["未检测到 ",e.jsx("code",{children:"useImperativeHandle"}),"，可使用上方复制的 Prompt 让 AI 新增 Axure API。"]}),e.jsx("div",{className:"overflow-hidden rounded-md border",children:ms.map(({key:s,title:r},c)=>{const d=M.lists[s],m=d.parseStatus==="raw"&&d.raw;return e.jsxs("div",{className:c===0?"":"border-t",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 bg-muted/20 px-3 py-2.5",children:[e.jsx("div",{className:"text-sm font-medium",children:r}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:["状态：",us(d.parseStatus)]}),d.sourceKey?e.jsxs("span",{children:["来源：",d.sourceKey]}):null]})]}),e.jsxs("div",{className:"space-y-2 px-3 py-3",children:[s==="configList"?Be(d):s==="dataList"?_e(d):Ve(s,d),d.warnings.length>0?e.jsx("div",{className:"rounded-md border border-amber-300/60 bg-amber-50/50 px-3 py-2 text-xs text-amber-900 dark:border-amber-700/60 dark:bg-amber-950/30 dark:text-amber-100",children:d.warnings.map((C,Ge)=>e.jsxs("div",{children:["- ",C]},`${s}-warning-${Ge}`))}):null,m?e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"结构化解析不完整，已回退原始片段："}),e.jsx("pre",{className:"max-h-48 overflow-auto rounded-md border bg-muted/30 p-2 font-mono text-xs",children:d.raw})]}):null]})]},s)})})]}):e.jsx("div",{className:"rounded-md border p-4 text-center text-sm text-muted-foreground",children:"暂无可展示的 Axure API 数据"})]}):l==="copyConfig"?e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50/50 p-3 text-sm text-blue-900 dark:border-blue-900 dark:bg-blue-950/40 dark:text-blue-100",children:"导出本地 html 或发布到 Axure Cloud 时若图片失效，可以使用此功能复制配置。"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"导出内容"}),e.jsxs(pe,{value:j||void 0,onValueChange:s=>G(s),disabled:!!p,children:[e.jsx(he,{children:e.jsx(fe,{placeholder:"请选择导出内容"})}),e.jsx(je,{children:e.jsx(K,{value:"code",children:"原型"})})]})]}),j?e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"配置内容"}),Pe?e.jsxs("div",{className:"rounded-md border p-4 text-center text-sm text-muted-foreground",children:[e.jsx(N,{className:"mx-auto mb-2 h-5 w-5 animate-spin"}),"正在加载配置..."]}):e.jsx(ls,{value:$,readOnly:!0,onFocus:s=>s.currentTarget.select(),className:"h-[320px] w-full font-mono text-sm",placeholder:"配置内容将显示在这里"})]}):null]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-blue-200 bg-blue-50/50 p-3 text-sm text-blue-900 dark:border-blue-900 dark:bg-blue-950/40 dark:text-blue-100",children:["以下为","四","种方式的准备工作与使用说明。"]}),e.jsx("div",{className:"rounded-md border",children:e.jsxs(xs,{type:"single",collapsible:!0,defaultValue:"runtime-component",className:"w-full",children:[e.jsxs(R,{value:"runtime-component",className:"border-b px-4",children:[e.jsx(S,{className:"py-3 text-[15px] font-semibold hover:no-underline",children:"复制 runtime 组件（推荐）"}),e.jsxs(L,{className:"pb-4",children:[e.jsx("div",{className:"text-xs font-semibold tracking-wide text-muted-foreground",children:"准备工作："}),e.jsx("div",{className:"mt-1 space-y-1 text-sm text-muted-foreground",children:e.jsx("p",{children:"在 Axure 中-发布- 生成 html - 设置 - 字体 - 添加字体，填入以下链接(含引号)"})}),e.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border bg-muted/40 px-3 py-2",children:[e.jsx("div",{className:"min-w-0 flex-1 font-mono text-xs break-all",children:se}),e.jsx(u,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0",onClick:()=>void $e(),"aria-label":"复制链接",children:e.jsx(X,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"mt-2 text-xs font-semibold tracking-wide text-muted-foreground",children:"使用："}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"复制 runtime 组件，粘贴到需要演示的页面即可"})]})]}),e.jsxs(R,{value:"download-cover",className:"border-b px-4",children:[e.jsx(S,{className:"py-3 text-[15px] font-semibold hover:no-underline",children:"下载 runtime 封面"}),e.jsxs(L,{className:"pb-4",children:[e.jsx("div",{className:"text-xs font-semibold tracking-wide text-muted-foreground",children:"准备工作："}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"下载 Axhub Runtime 元件，拖入需要演示的页面"}),e.jsx("div",{className:"mt-2 text-xs font-semibold tracking-wide text-muted-foreground",children:"使用："}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"下载 runtime 封面，返回 Axure 双击替换 runtime 元件的封面图片"})]})]}),e.jsxs(R,{value:"copy-prototype",className:"border-b px-4",children:[e.jsx(S,{className:"py-3 text-[15px] font-semibold hover:no-underline",children:"复制原型"}),e.jsxs(L,{className:"pb-4",children:[e.jsx("div",{className:"text-xs font-semibold tracking-wide text-muted-foreground",children:"准备工作："}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"打开 3743 及以上版本的 Axure"}),e.jsx("div",{className:"mt-2 text-xs font-semibold tracking-wide text-muted-foreground",children:"使用："}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"复制后粘贴到需要演示的页面即可"})]})]}),e.jsxs(R,{value:"copy-config",className:"border-b-0 px-4",children:[e.jsx(S,{className:"py-3 text-[15px] font-semibold hover:no-underline",children:"复制配置"}),e.jsxs(L,{className:"pb-4",children:[e.jsx("div",{className:"text-xs font-semibold tracking-wide text-muted-foreground",children:"准备工作："}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"下载 Axhub Runtime 元件，拖入需要演示的页面"}),e.jsx("div",{className:"mt-2 text-xs font-semibold tracking-wide text-muted-foreground",children:"使用："}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"复制配置，打开 Runtime 元件下的 config 中继器，粘贴到“编辑器配置”所在行的 value"})]})]})]})})]})}),e.jsxs(is,{className:"flex flex-row justify-end gap-2 border-t px-5 py-3.5",children:[e.jsx(u,{variant:"outline",size:"sm",onClick:i,children:"取消"}),l==="dynamicPrototype"?e.jsxs(e.Fragment,{children:[e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>void Ee(),disabled:I||b||!!p,children:[I||b?e.jsx(N,{className:"h-4 w-4 animate-spin"}):null,"下载 Runtime 封面"]}),e.jsxs(u,{variant:"brand",size:"sm",onClick:()=>void Ie(),disabled:I||b||!!p,children:[I||b?e.jsx(N,{className:"h-4 w-4 animate-spin"}):null,"复制 Runtime 组件"]})]}):l==="staticPrototype"?e.jsxs(u,{variant:"brand",size:"sm",onClick:()=>void Te(),disabled:!!oe,children:[ae||b?e.jsx(N,{className:"h-4 w-4 animate-spin"}):null,"复制到 Axure"]}):l==="copyConfig"?e.jsxs(u,{variant:"brand",size:"sm",onClick:()=>void De(),disabled:!$||!!p,children:[e.jsx(X,{className:"h-4 w-4"}),"复制配置"]}):null]})]})}),e.jsx(ts,{open:Le,reviewResult:Se,onOpenChange:s=>D(s)})]})}function $s({state:t,actions:a}){return e.jsx(ps,{open:t.open,preferencesStorageKey:t.preferencesStorageKey,onClose:a.onClose,imageConfig:t.imageConfig,setImageConfig:a.setImageConfig,axureCopyOptions:t.axureCopyOptions,setAxureCopyOptions:a.setAxureCopyOptions,onDimensionChange:a.onDimensionChange,onSwapDimensions:a.onSwapDimensions,onDimensionBlur:a.onDimensionBlur,isExporting:t.isExporting,onExport:a.onExport,onCopyRuntimeComponent:a.onCopyRuntimeComponent,onCopyToAxure:a.onCopyToAxure,onCopyConfig:a.onCopyConfig,activeTab:t.activeTab,itemName:t.itemName,sourceTargetPath:t.sourceTargetPath,exportAvailability:t.exportAvailability,preferredPromptClient:t.preferredPromptClient,preferredIDE:t.preferredIDE,ideAvailability:t.ideAvailability,initialReviewResult:t.initialReviewResult,onInitialReviewHandled:a.onInitialReviewHandled})}export{$s as default};
